Call screen on button click?
I have a mainscreen with开发者_如何学编程 a few buttons in it and I'm trying to assiciate each button with a screen call. I can't get it to work though. I created the button with the layout painter but I don't see how to make it functional.
Any ideas? Thanks!
- open the screen painter
- double click on the button
- enter a Function Code (the field is above "Context Menu Form")
now that your button has a function code it will fire this OK-Code and the dynpros "PROCESS AFTER INPUT" will be run. add a PAI module to the dynpro and in the module you could for example make the following coding:
case sy-ucomm. " the ok code
when 'your_buttons_function_code_here'.
call screen YOUR_SCREEN_NUMBER_HERE.
when others.
" DO NOTHING
endcase.
You must create a screen & perform CALL SCREEN inside that event. There's a concept called PAO & PBO. You may refer that too. Few links for your reference..
- http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab2935c111d1829f0000e829fbfe/content.htm
- http://www.abapprogramming.net/2008/04/sap-abap-syntax-for-call-screen.html
精彩评论