Application Development 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: 

Problem with Secondary ALV Output List

babu_kilari4
Active Contributor
0 Kudos

Hi All,

I have a scenario as explained below.

1) I have a selection screen.

2) After executing it , I display an ALV output screen. In this first ALV Output screen I have an button. When I click on this button it would go to some other system executes some transactions and comes back and displays another ALV output.

3) In the second ALV Output list, when I click on standard ALV BACK button, I want to come out to selection screen. But, it is displaying the first ALV Output.

Below is the piece of code for the second ALV list.

Please let me know if I am missing somethign?

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_bypassing_buffer       = c_yes
      i_buffer_active          = space
      i_callback_program       = w_repid
      i_callback_pf_status_set = 'F_SET_STATUSAPO'
      i_callback_user_command  = 'F_LEAVE_LISTPROCESSING'
      is_layout                = e_layoutapo
      it_fieldcat              = i_apocatalog
    TABLES
      t_outtab                 = t_output.

  IF sy-subrc EQ  0.

  ENDIF.

FORM f_set_statusapo USING us_extab TYPE slis_t_extab .

  SET PF-STATUS 'ZVXN_STATUSAPO'.

ENDFORM.

FORM f_leave_listprocessing USING us_fcode TYPE sy-ucomm.

  IF us_fcode EQ '&F03'
  OR us_fcode EQ '&F15'
  OR us_fcode EQ '&F12'.

    LEAVE TO SCREEN 0.

  ENDIF.

ENDFORM.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

I think the user-command of the first list after calling the second ALV u have to set the flag EXIT of slis_selfield:

FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                        RS_SELFIELD TYPE SLIS_SELFIELD..
  CASE R_UCOMM.
      WHEN 'ALV'
          CALL FUNCTION ALV
             ...................
             RS_SELFIELD-EXIT = 'X'.
    
ENDFORM.

Max

2 REPLIES 2

Former Member
0 Kudos

Hi

I think the user-command of the first list after calling the second ALV u have to set the flag EXIT of slis_selfield:

FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                        RS_SELFIELD TYPE SLIS_SELFIELD..
  CASE R_UCOMM.
      WHEN 'ALV'
          CALL FUNCTION ALV
             ...................
             RS_SELFIELD-EXIT = 'X'.
    
ENDFORM.

Max

0 Kudos

Thanks Max. It worked.