TYPES: BEGIN OF t_bkpf,
bukrs LIKE bkpf-bukrs,
belnr LIKE bkpf-belnr,
gjahr LIKE bkpf-gjahr,
bldat LIKE bkpf-bldat,
monat LIKE bkpf-monat,
budat LIKE bkpf-budat,
xblnr LIKE bkpf-xblnr,
awtyp LIKE bkpf-awtyp,
awkey LIKE bkpf-awkey,
END OF t_bkpf.
DATA: it_bkpf TYPE STANDARD TABLE OF t_bkpf INITIAL SIZE 0,
wa_bkpf TYPE t_bkpf.
TYPES: BEGIN OF t_bseg,
bukrs LIKE bseg-bukrs,
belnr LIKE bseg-belnr,
gjahr LIKE bseg-gjahr,
buzei LIKE bseg-buzei,
mwskz LIKE bseg-mwskz, "Tax code
umsks LIKE bseg-umsks, "Special G/L transaction type
prctr LIKE bseg-prctr, "Profit Centre
hkont LIKE bseg-hkont, "G/L account
xauto LIKE bseg-xauto,
koart LIKE bseg-koart,
dmbtr LIKE bseg-dmbtr,
mwart LIKE bseg-mwart,
hwbas LIKE bseg-hwbas,
aufnr LIKE bseg-aufnr,
projk LIKE bseg-projk,
shkzg LIKE bseg-shkzg,
kokrs LIKE bseg-kokrs,
END OF t_bseg.
DATA: it_bseg TYPE STANDARD TABLE OF t_bseg INITIAL SIZE 0,
wa_bseg TYPE t_bseg.
DATA: it_ekko TYPE STANDARD TABLE OF ekko.
*Select FOR ALL ENTRIES
SELECT bukrs belnr gjahr bldat monat budat xblnr awtyp awkey
UP TO 100 ROWS
FROM bkpf
INTO TABLE it_bkpf.
IF sy-subrc EQ 0.
SELECT bukrs belnr gjahr buzei mwskz umsks prctr hkont xauto koart
dmbtr mwart hwbas aufnr projk shkzg kokrs
FROM bseg
INTO TABLE it_bseg
FOR ALL ENTRIES IN it_bkpf
WHERE bukrs EQ it_bkpf-bukrs AND
belnr EQ it_bkpf-belnr AND
gjahr EQ it_bkpf-gjahr.
ENDIF.
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com
Social Plugin