Skip to Content
0
Former Member
Nov 10, 2007 at 07:34 AM

plz help me out with for all entries

101 Views

hi to all experts,

This is my sample code plz tell me how to output the data.plz help me out.im very much beginner in ABAP and i dont want to use loop and endloop is there any way

REPORT Z_FORALLENTERIES .

types : begin of ty_lfa1,

lifnr type lfa1-lifnr,

name1 type lfa1-name1,

land1 type lfa1-land1,

end of ty_lfa1.

types : begin of ty_lfb1 ,

lifnr type lfb1-lifnr,

bukrs type lfb1-bukrs,

pernr type lfb1-pernr,

end of ty_lfb1.

types : begin of ty_lfc1 ,

lifnr type lfc1-lifnr,

gjahr type lfc1-gjahr,

usnam type lfc1-usnam,

end of ty_lfc1.

types : begin of ty_lfbk ,

lifnr type lfbk-lifnr,

banks type lfbk-banks,

bankl type lfbk-bankl,

bankn type lfbk-bankn,

end of ty_lfbk.

types : begin of ty_final,

lifnr type lfa1-lifnr,

name1 type lfa1-name1,

land1 type lfa1-land1,

bukrs type lfb1-bukrs,

pernr type lfb1-pernr,

gjahr type lfc1-gjahr,

usnam type lfc1-usnam,

banks type lfbk-banks,

bankl type lfbk-bankl,

bankn type lfbk-bankn,

end of ty_final.

data : it_lfa1 type standard table of ty_lfa1 initial size 0 with header line.

data : it_lfb1 type standard table of ty_lfb1 initial size 0 with header line.

data : it_lfc1 type standard table of ty_lfc1 initial size 0 with header line.

*--


internal for outputting data--


data : it_lfbk type standard table of ty_lfbk initial size 0 with header line.

data : it_final type standard table of ty_final initial size 0,

wa_final like line of it_final.

select lifnr name1 land1

into table it_lfa1[]

from lfa1 up to 10 rows.

if it_lfa1[] is not initial.

select lifnr bukrs pernr

into table it_lfb1[]

from lfb1

for all entries in it_lfa1[]

where lifnr eq it_lfa1-lifnr.

endif.

if it_lfb1[] is not initial.

select lifnr gjahr usnam

into table it_lfc1[]

from lfc1

for all entries in it_lfb1[]

where lifnr eq it_lfb1-lifnr.

endif.

if it_lfc1[] is not initial.

select lifnr banks bankl bankn

into table it_lfbk[]

from lfbk

for all entries in it_lfc1[]

where lifnr eq it_lfc1-lifnr.

endif.