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: 

REUSE_ALV_LIST_DISPLAY on a dialog program

0 Kudos

Hi,

I have a requirement where in I have to call REUSE_ALV_LIST_DISPLAY on a dialog program.

Can any one tell me how we can call a list display from a dialog program.

Regards,

Abhishek.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

You can use the ABAP keyword

LEAVE TO LIST-PROCESSING

inside the Dialog program and you can navigate to the List display.

Refer the program

DEMO_LEAVE_TO_LIST_PROCESSING

12 REPLIES 12

kesavadas_thekkillath
Active Contributor
0 Kudos

Just try what u do usually...

Build ur data and call...it wqhether in a button click or some thing else...or after data is fetched jsut call it...

Its bettr to go for a container concept/.....

former_member188685
Active Contributor
0 Kudos

You can use the ABAP keyword

LEAVE TO LIST-PROCESSING

inside the Dialog program and you can navigate to the List display.

Refer the program

DEMO_LEAVE_TO_LIST_PROCESSING

0 Kudos

Hi Vijay,

Statement LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0 does not work when we call a REUSE_ALV_LIST_DISPLAY. It only works when we use a write statement.

Kind Regards,

Abhishek.

0 Kudos

you have to use

LEAVE TO LIST-PROCESSING. and dont use AND RETURN TO SCREEN 0.

LEAVE TO LIST-PROCESSING.

submit BALVSD02 and return.

LEAVE LIST-PROCESSING.

it is working for me ...

PROGRAM  ZTEST_MODULE_TEST.

INCLUDE ZTEST_MODTOP                            .    " global Data

* INCLUDE ZTEST_MODO01                            .  " PBO-Modules
* INCLUDE ZTEST_MODI01                            .  " PAI-Modules
* INCLUDE ZTEST_MODF01                            .  " FORM-Routines
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module STATUS_0100 output.
  SET PF-STATUS 'AAA'.
  SET TITLEBAR 'xxx'.

endmodule.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
case sy-ucomm.
when 'BACK'.
 leave to screen 0.
when 'ALV'.
LEAVE TO LIST-PROCESSING.
 submit BALVSD02 and return.
LEAVE LIST-PROCESSING.
endcase.

endmodule.                 " USER_COMMAND_0100  INPUT

0 Kudos

Thanks Vijay,

Your solution works.

Kind Regards,

Abhishek.

0 Kudos

hi vijai,

i have the same problem using reuse_alv_list_display on a dialog program

i can solved it using the way you posted before, but how if my alv list also in the same program? but in a different screen?

so far i manage to display the alv out, but i cannot callback my user command

for example:

WHEN 'MASS_TRP'.

CALL SCREEN 0400.

and on screen 0400.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.----> "if i'm not using return to screen 0, everytime i click back, it will only go back to my alv list, while what i want is go back to my main program, any suggestion?"

SUPPRESS DIALOG.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = 'ZTICKETS'

i_callback_pf_status_set = '0400'

i_callback_user_command = 'USER_COMMAND' -


> "i cannot call back this eventhough i have the user command form"

is_layout = i_layout

it_fieldcat = i_fieldcat

i_save = 'A'

  • it_events = i_events

TABLES

t_outtab = i_mtrp.

IF sy-subrc <> 0.

ENDIF.

really appreciate if someone can help

thanks

0 Kudos

hi vijai,

i have the same problem using reuse_alv_list_display on a dialog program

i can solved it using the way you posted before, but how if my alv list also in the same program? but in a different screen?

so far i manage to display the alv out, but i cannot callback my user command

for example:

WHEN 'MASS_TRP'.

CALL SCREEN 0400.

and on screen 0400.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.----> "if i'm not using return to screen 0, everytime i click back, it will only go back to my alv list, while what i want is go back to my main program, any suggestion?"

SUPPRESS DIALOG.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = 'ZTICKETS'

i_callback_pf_status_set = '0400'

i_callback_user_command = 'USER_COMMAND' -


> "i cannot call back this eventhough i have the user command form"

is_layout = i_layout

it_fieldcat = i_fieldcat

i_save = 'A'

  • it_events = i_events

TABLES

t_outtab = i_mtrp.

IF sy-subrc <> 0.

ENDIF.

really appreciate if someone can help

thanks

0 Kudos

Hi acerania

for the pf_status_set parameter instead of specifying the screen number, use the perform name.

In the form, you can call the same pf status which has assigned to the screen. It works fine for me.

Thanks

Praveen

0 Kudos

hi praveen

thanks for the reply,

do you mean something like this?

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = 'ZTICKETS'

i_callback_pf_status_set = 'USER_COMMAND'

i_callback_user_command = 'USER_COMMAND'

is_layout = i_layout

it_fieldcat = i_fieldcat

i_save = 'A'

it_events = i_events

TABLES

t_outtab = i_mtrp.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

DATA: f_tabix LIKE sy-tabix.

SET PF-STATUS '0400'.

CASE r_ucomm....

i've tried this and its not working, i try to click the icon, and not entering the user command perform..do i miss something?

Thanks and Regards,

jj
Active Contributor
0 Kudos

See tcode: DWDM.

Former Member
0 Kudos

You should use ALV Control in dialog program instead of ALV grid display.

0 Kudos

hi intel,

yes, i can use alv control for this, but alv control cannot support alv list in oop,

that's why i'm using reuse_alv_list function, since what i need is some kind of interactive report in my main program.

Thanks and Regards,