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: 

ALV Interactive

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

Hi,

Don't pass the USER_COMMAND subroutine for the second ALV call..

Thanks,

Naren

0 Kudos

ALV call is dynamic.

The same FM is used all times.

Any suggestions.

Former Member
0 Kudos

Hi,

Please post the code of how you are calling the alv dynamically..

Sorry I am not clear with your requirement..

Thanks,

Naren

0 Kudos

Please mail me at ydderuhdam@yahoo.com.

I will mail the code to you.

Madhu.