Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to enable back functionality for a screen

Former Member
0 Likes
5,879

Hi everyone,

I have a ALV list report in the ABAP screen. it is getting populated properly. I want to integrate this into an application. Its like, from one application a button will be provided to execute the reports.

What i want to ask is how to enable the functionality of the ABAP default back button, so that who ever executes the report, can go back to the application from where they have visited.

--

Regards,

Vinay Bedre

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,660

Hi

Set PF-STATUS for that screen and Enabled all the required functionality And define it into program by CASE Sy-ucomm .

when 'BACK'.

Leave To screen 0.

ENDCASE.

4 REPLIES 4
Read only

Former Member
0 Likes
2,660

Create a GUI status and set the BACK button in the PAI of your screen with the code LEAVE TO SCREEN 0.

http://help.sap.com/saphelp_nw04/helpdata/en/d1/801d43454211d189710000e8322d00/content.htm

Read only

0 Likes
2,660

Hi,

data :  gi_selection      type standard table of rsparams.

at start of selection

    call function 'RS_REFRESH_FROM_SELECTOPTIONS'
    exporting
      curr_report     = sy-repid    " Program Name
    tables
      selection_table = gi_selection " Selection screen details
    exceptions
      not_found       = 1
      no_report       = 2
      others          = 3.

Now,

After calling function module 'REUSE_ALV_LIST_DISPLAY'

   call function 'REUSE_ALV_LIST_DISPLAY'.

    if sy-subrc eq 0.
    if gs_exit_caused_by_user-back eq gc_x.

      submit (sy-repid) with selection-table gi_selection
                             via selection-screen.

    else.
      if gs_exit_caused_by_user-exit eq gc_x.

        submit (sy-repid) with selection-table gi_selection
                                via selection-screen.
      else.
        if gs_exit_caused_by_user-cancel eq gc_x.
          leave program.
        endif.
      endif.
    endif.

  endif.

Hope this solves the issue.

Read only

Former Member
0 Likes
2,660

HI.

Create a pf status using menu painter(se41). in this goto Function keys...Assign a Func Code to back button icon and use that Func code in your program to  navigate back.

Read only

Former Member
0 Likes
2,661

Hi

Set PF-STATUS for that screen and Enabled all the required functionality And define it into program by CASE Sy-ucomm .

when 'BACK'.

Leave To screen 0.

ENDCASE.