Skip to Content
0
Former Member
Jul 04, 2007 at 04:23 AM

Interactive thread

13 Views

I have two tables 1. vbak which have sales order details and 2. vbap having items detail. know problem is i want to display on intial screen sales order details and while on clicking that i want to display the items details.

i am using hide

code i written is

REPORT YTEST_REP5 no standard page heading.

tables: vbak , vbap.

data: it_vbak type vbak occurs 3 with header line.

data: it_vbap type vbap occurs 3 with header line.

DATA: F TYPE STRING.

data : begin of it_res occurs 3,

vbeln type vbak-vbeln,

kunnr type vbak-kunnr,

posnr type vbap-posnr,

matnr type vbap-matnr,

end of it_res.

data : begin of itab occurs 3,

posnr type vbap-posnr,

matnr type vbap-matnr,

end of itab.

select-options: s_vbeln for vbak-vbeln.

start-of-selection.

select *

from vbak

into table it_vbak

where vbeln in s_vbeln.

select *

from vbap

into table it_vbap

for all entries in it_vbak

where vbeln = it_vbak-vbeln.

loop at it_vbak.

at first.

write: / 'vbeln' , 20 'kunnr'.

uline.

skip.

endat.

write: / it_vbak-vbeln , 20 it_vbak-kunnr.

loop at it_vbap where vbeln = it_vbak-vbeln.

*hide: it_vbap-posnr , it_vbap-matnr.

itab-posnr = it_vbap-posnr.

itab-matnr = it_vbap-matnr.

append itab.

hide itab.

endloop.

endloop.

at line-selection.

loop at itab.

write: / itab-posnr , itab-matnr.

endloop.