07-21-2008 9:25 AM
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.
07-21-2008 9:41 AM
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
07-21-2008 9:28 AM
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/.....
07-21-2008 9:41 AM
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
07-21-2008 10:27 AM
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.
07-21-2008 10:54 AM
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
07-22-2008 9:07 PM
03-22-2010 3:27 AM
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
03-22-2010 3:28 AM
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
03-22-2010 5:22 AM
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
03-22-2010 8:00 AM
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,
07-21-2008 9:44 AM
03-22-2010 7:33 AM
You should use ALV Control in dialog program instead of ALV grid display.
03-22-2010 8:13 AM
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,