10-16-2007 3:25 PM
Hi all
In the ALV report output if i click on any field in a row, i should able to generate drill-down report, can any body suggest me a solution.
Regards
Srini
10-16-2007 3:27 PM
If you are using Class ALV then it is double click event and for example please refer SAP standard demo report - BCALV_GRID_02
10-16-2007 3:50 PM
10-16-2007 3:55 PM
You need to handle Double Click on At user command event. '&IC1' is the okcode for Double click. Please handle this in your program. I have given you links earlier to see events in ALV report. They are also using Function modules.
Here is a sample code -
1.) Declare user_command in events:
DATA: ls_event type slis_alv_event.
move 'USER_COMMAND' to ls_event-form.
append ls_event to gt_events.
2.) Getting cell value ." within the form USER_COMMAND:
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
Check function code
CASE R_UCOMM.
WHEN '&IC1'. "--> check your own sy-ucomm once you double click the line item
Check field clicked on within ALVgrid report
IF RS_SELFIELD-FIELDNAME = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
ENDIF.
ENDCASE.
ENDFORM.
ashish
10-16-2007 3:28 PM