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: 

Intenal table logic

Former Member
0 Kudos

Hello All,

I have 3 internal tables it_bkpf, it_bseg, it_zficash.

IN first it_bkpf the fields are BUKRS,

BELNR,GJAHR, BLART,BUDAT,MONAT.

In second IT it_BSEG the fields are BUKRS BELNR GJAHR DMBE2 HKONT PRCTR.

But Once we get the data from these tables , we need to compare the data which is maintianed in custom table it_zficash. In it_zficash the fields are 'FROM_HKONT' 'TO_HKNOT''FROM_BUKRS', 'TO_BUKRS','PRCTR','IN_BLART','EX_BLART'.

once comparison is over I need poplate only DMBE2 field from IT_BSEG .

In selection screen I am giving the period BKPF-MOnAT, Fiscal year BKPF-GJAHR.

We can't use join in this because BSEG table is Culstable.

Please help me in this.

regards,

Ajay

1 REPLY 1

Former Member
0 Kudos

Hi

First fetch BKPF data into ITAB

for all entries of ITAB then fetch the data into ITAB1 from BSEG

now loop ITAB. read ITAB1 in that loop. move the both tables data into FINAL.

fetch the fdata from ZTABLE into ITAB3.

loop at ITAB3.

read the table FINAL with key... of itab3.

if itab3-field <> final-f3 (compare the field and check the sy-subrc )

based on the values of sy-subrc

modify ITAB3 index sy-tabix transporting DMBe2.

endloop.

<b>Reward points for useful Answers</b>

Regards

Anji