‎2007 Apr 19 9:46 AM
Hi,
I am having one existing program, for this in menu painter i have to create button and in that button i have to add logic in that. Please can you tell me the process.
Thanks
‎2007 Apr 19 9:48 AM
Hi Ali,
Just go to the Form Painter, add the button, and then Save it and retreive from the painter and in the PAI logic, provide the code for the button which you added and then save it and check it and activate it. You can see the output successfully.
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 19 9:48 AM
Hi Ali,
Just go to the Form Painter, add the button, and then Save it and retreive from the painter and in the PAI logic, provide the code for the button which you added and then save it and check it and activate it. You can see the output successfully.
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 19 9:51 AM
Hi Ali,
You can put your code in User Command Events (PAI).
This is your code looks like :
if sy-ucomm = 'ZABC'. *for example your function code for your button was ZABC
--> put your code here
endif.
Best Regards,
Victor
‎2007 Apr 19 9:52 AM
Hi,
You can write the SET PF-STATUS in the program. therer you can create the Buttons. based on the button function codes you can write the code
IF SY-UCOMM = 'BUT1'.
write code here for button1.
ELSEIF SY-UCOMM = 'BUT2'.
write code here for button2.
ENDIF.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
Regards
Sudheer
‎2007 Apr 19 9:58 AM
hi ali,
do it like this ....
<b>AT USER-COMMAND</b>
<b> IF SY-UCOMM = 'A1'.
write code here for button1 .
ELSEIF SY-UCOMM = 'A2'.
write code here for button2 .
ENDIF.</b>
reward point if this helps u
ravi