Skip to Content

Force calling 2 OK codes simutaneously

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 12, 2012 at 02: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2012 at 02:34 PM

    Hi,

    You can also use the FM SAPGUI_SET_FUNCTIONCODE to force your new ok-code when pressing CONVERT...

    Kr,

    Manu.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member .Subramony A R .Subramony Ramakrishnan

      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 😉

  • Posted on Jun 12, 2012 at 02:45 PM

    Hi aRs,

    You can also use cl_gui_cfw=>set_new_ok_code( ).

    Regards,

    Manuel H.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.