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 INTERACTING

Former Member
0 Kudos
58

Hi All,

I took two tables vbak and vbap. I want to generate alv reports which is interactive. If i click sales document(header data) in basic output list, it has to generate the corresponding secondary list(item details). I coded basic list but i dunno how to generate secondary list. So i need to know the procedure and code. Pls send it very urgent.

Regards,

Kiran.

6 REPLIES 6

Former Member
0 Kudos
45

Hi,

Use this link contains a sample program . Event "HOTSPOT" leads to interactive report.

http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm

Lanka

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
45

Are you using the FM or the CLASS?

Regards,

Rich Heilman

0 Kudos
45

im using function module

0 Kudos
45

Hi Kiran,

Please check SAP sample programs starts with BCALV*.

Use SE38 transaction and search with BCALV*

You will find some good samples.

Need more help let me know.

Lanka

Former Member
0 Kudos
45

Hi Kiran,

Try this code.Write it at end of selection event.

*----


form USER_COMMAND using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when 'PICK' OR '&IC1'.

if rs_selfield-sel_tab_field = 'IT_EKPO-EBELN'.

PERFORM WRITE_REPORT. "Update the catlog here.

endif.

endcase.

endform.

Create the PF-status for the report.

*----


FORM FRM_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'STANDARD2' .

ENDFORM. "FRM_PF_STATUS.

Update the catlog for the first report as

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_PF_STATUS_SET = <b>'FRM_PF_STATUS'</b>

i_callback_user_command = <b>'USER_COMMAND'</b>

is_layout = Gs_layout

it_fieldcat = Gt_fieldcat

it_sort = Gt_sort

IT_EVENTS = GT_EVENTS[]

TABLES

t_outtab = IT_VBAK.

Former Member
0 Kudos
45

Hi,

In the FORM (suroutine) of EVENTS call ALV function module once more but now pass the item level details internal table to OUTTAB

Regards,

Deepak