Skip to Content
avatar image
Former Member

The Problem is about Standard Back Button Function in the Report Program.

The Problem is about Standard Back Button Function in the Report Program.

In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.

My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program. Thanks .

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Sep 15, 2010 at 03:15 AM

    Hi,

    Try to capture the sy-ucom of BACK button. Example:

    case sy-ucomm.
    when 'BACK'. "your back button command
       LEAVE TO SCREEN 0.
    endcase.
    

    Please check.

    Rgds,

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Thien Pham Minh

      This problem is program can not go back my report instand of forward to system code,when I debug.so even I have sy-ucomm,I can write code accoding to sy-comm in my report,when I press button, the program can not goto my report excuting than code,Using "at user-comand" except "BACK" function code document said.can you tell me How?

  • avatar image
    Former Member
    Sep 16, 2010 at 04:08 AM

    The issue is vague.

    What is the standard back button you're referring to? I mean please detailed out how you run everything. i.e. Did you start by running your report program then from there, it calls a standard transaction.

    'Coz if it only calls a standard transaction, normally when back button is hit, it will go back to your report program screen.

    If you're calling another screen (call screen), you just do it the PAI of that screen.In debugging mode, get what's the sy-ucomm of that BACK button, then start your coding in the PAI (LEAVE TO SCREEN 0 - this will go back to your previous screen). Elaborate more your issue if this still didn't help at all.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 17, 2010 at 04:20 AM

    Hi,

    First, is this a custom screen or from an ALV list? If from a custom screen, then the following might apply...

    In your GUI status, did you define the function associated with the button with the Function Type Exit (E) ?

    If so, pressing the button will trigger the MODULE mmm AT EXIT-COMMAND.

    Regards, Andy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 03:50 AM

    Hi,

    You can define your own PF-STATUS and in that assign the function code for BACK button anything except 'BACK'.

    The code would somewhat look like this:

    SET PF-STATUS 'TEST'.

    write : itab-col1,

    itab-col2.

    in the PF-STATUS 'TEST', assign the function code to BACK button as 'BCK'.

    Now in your program you can use the event AT USER-COMMAND.

    In this you can handle the functionality of BACK button.

    Hope this helps.

    Regards,

    Himanshu

    Add comment
    10|10000 characters needed characters exceeded