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: 

drill down in ALV

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

If you are using Class ALV then it is double click event and for example please refer SAP standard demo report - BCALV_GRID_02

0 Kudos

Hi

I am using function modules.

regards

srini

0 Kudos

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

Former Member
0 Kudos

Please go thru this link. This should help you to build Interactive ALV report.

Hope this helps.

ashish