Skip to Content
0
Former Member
May 14, 2008 at 08:23 AM

related to internal table

38 Views

hi friends ,

i have fetched data from BSEG table using only 3 primary keys ( BELNR,BUKRS,GJAHR) except BUZEI,.

for the records these fields are same and only buzei is different ,then how can i loop through the internal table for further processing(i want to read internal table to fill another internal table in which i have only 3 key fields except buzei field) ..and also i have to consider SHKZG(debit/credit) field also to get difference..

of those recors..finally i want to get single record with difference value of those records in DMBTR..

example:

BUKRS BELNR GJAHR BUZEI SHKZG DMBTR

1000 11011 2007 1 H 300----


ADD BOTH H

1000 11011 2007 2 H 200

1000 11012 2007 1 S 400----


unique

1000 11013 2007 1 H 500----


diff H-S

1000 11013 2007 2 S 200

1000 11014 2007 1 H 400----


DIFF S-H 1000 11014 2007 2 S 600

1000 11015 2007 1 S 400----


ADD S+S 1000 11015 2007 1 S 500

FINAL RECORDS

1000 11011 2007 1 H 500

1000 11012 2007 1 S 400

1000 11013 2007 1 H 300

1000 11014 2007 1 S 200

1000 11015 2007 1 S 900