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: 

how to create interactive report in alv grid

Former Member
0 Kudos

hi experts .

i am retriving details form kna1 and vbak table using common column kunnr in alv grdi format .after data is retrived i want when user click on value of netwr it display Sales Order Details (List of Sales Orders) from VBAK table using interactive report format. so please help me write code to above solution.

Moderator message : Spec dumping not allowed, read forum rules before posting. Thread locked.

Edited by: Vinod Kumar on Nov 28, 2011 1:34 PM

1 REPLY 1

Former Member
0 Kudos

Hi,

Use CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

In this FM in EXPORTING use parameter " i_callback_user_command".

e.g i_callback_user_command= 'USER_COMMAND'.

Now define a FORM as

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE rs_selfield-fieldname. "this will capture the field on which you clicked

when 'VBELN'.

"SOMETHING SHOULD HAPPEN say sales order details fetched into table it_sales.

when 'LIFNR'.

"SOMETHING SHOULD HAPPEN

ENDCASE.

Now again use CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' and provide value as it_sales for parameter "t_outtab"

ENDFORM. "user_command