‎2012 Jun 12 3:05 PM
All,
I am having Module pool , My requirement is in the Module pool screen there 2 buttons
Convert
Thou
Whenever user presses the "Convert" button i need to triiger 2 ok_codes one after the other ie First i needs to trigger "Convert" then PBO will come then i needs to trigger "Thou"
I should not have to put code currently in "Thou" in the "Convert" code.
My question is how to call 2 OK code 1 after the other.
Thanks
aRs
‎2012 Jun 12 3:13 PM
Why don't you call the two forms one after one
CASE OK_CODE.
WHEN 'CONVERT'.
PERFORM CONVERT.
PERFORM THOU.
WHEN 'THOU'.
PERFORM THOU.
ENDCASE.
Else you can go to tricks like storing a flag in PAI during first processing of ok_code and then (In PBO) if flag is set use a SUPPRESS DIALOG to trigger PAI. (... )
Regards,
Raymond
‎2012 Jun 12 3:34 PM
Raymond,
"
Else you can go to tricks like storing a flag in PAI during first processing of ok_code and then (In PBO) if flag is set use a SUPPRESS DIALOG to trigger PAI."
Could you please explain this little bit particularly SUPPRESS DIALOG
Thanks
aRs
‎2012 Jun 12 3:34 PM
Hi,
You can also use the FM SAPGUI_SET_FUNCTIONCODE to force your new ok-code when pressing CONVERT...
Kr,
Manu.
‎2012 Jun 12 3:47 PM
Manu,
This i have used in PBO. but then also system not moving to PAI after this
Ie After the First ok_code "Convert" control comes in PBO here i am used this ..As per my knowledge system has to go for PAI after this. but that's not happening
Thanks
aRs
‎2012 Jun 12 4:05 PM
No you can use it in your PAI... the screen flow will go to PBO+PAI to reprocess your new code..
eg.
MODULE pai_user_command.
CASE sy-ucomm.
WHEN 'CONVERT'.
perform some_routine.
CALL FUNCTION SAPGUI_SET_FUNCTIONCODE
EXPORTING functioncode = '=THOU'...
WHEN 'THOU'.
"...
ENDCASE.
ENDMODULE.
should work...
Kr,
Manu.
added: have made a quick test: confirmed, this is fully working
‎2012 Jun 12 3:45 PM
Hi aRs,
You can also use cl_gui_cfw=>set_new_ok_code( ).
Regards,
Manuel H.
‎2012 Jun 12 3:49 PM
Manuel,
Used cl_gui_cfw=>set_new_ok_code( ) , but no use.
Thanks
aRs