03-29-2007 11:17 PM
I am using ALV interactive report.
When user double clicks on the first screen it pops to second screen with the right results. However when user double click on second screen it shouldnt perform any action, byt it further drills down.
How can this be solved.
THanks in Advance,
Madhu
03-29-2007 11:44 PM
Hi,
You have to a USER command routine to have a drill down..
Check this example report..
TYPE-POOLS: slis.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: BEGIN OF wa_ekko,
ebeln like ekko-ebeln,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
END OF wa_ekko.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.
SELECT * UP TO 100 ROWS
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'WA_EKKO'
i_inclname = v_repid
CHANGING
ct_fieldcat = gt_fieldcat.
Pass the program.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = gt_fieldcat
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = it_ekko.
----
FORM display_detail *
----
........ *
----
--> UCOMM *
--> SELFIELD *
----
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF ucomm = '&IC1'.
READ TABLE it_ekko INDEX selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDFORM.
Thanks,
Naren
03-29-2007 11:50 PM
Naren,
I am dynamically calling the FM for ALV and has a user command in it. The first time the user comman triggers and the INteractive report is displayed.
Again when user double clicks the same FM is triggered and it has the user command.
SO any number of times the user clicks it goes to a different screen.
IS there any system number to check.
Madhu.
03-29-2007 11:54 PM
Hi,
Don't pass the USER_COMMAND subroutine for the second ALV call..
Thanks,
Naren
03-29-2007 11:57 PM
ALV call is dynamic.
The same FM is used all times.
Any suggestions.
03-30-2007 12:02 AM
Hi,
Please post the code of how you are calling the alv dynamically..
Sorry I am not clear with your requirement..
Thanks,
Naren
03-30-2007 12:22 AM
Please mail me at ydderuhdam@yahoo.com.
I will mail the code to you.
Madhu.