Application Development and Automation 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: 
Read only

modify command

Former Member
0 Likes
291

HI

i am fetching fwste(tax amount) from bset table comparing with the fields of bkpf

table(bukrs,belnr,gjahr).

if bkpf-belnr is 170000000

for this belnr in bset it has 5 line items, for those 5 line items it consists of 5 -fwste (tax amount) values.so i need to get all those 5 tax amount values.

so how to write code for these while using read table within a loop.

please see the below code.

please suggest me if we can use modify.

  • LOOP AT gt_bkpf WHERE belnr NE ' '.

*

  • MOVE gt_bkpf-bukrs TO gt_final-bukrs.

  • MOVE gt_bkpf-xblnr TO gt_final-xblnr.

  • MOVE gt_bkpf-belnr TO gt_final-belnr.

  • MOVE gt_bkpf-usnam TO gt_final-usnam.

  • MOVE gt_bkpf-budat TO gt_final-budat.

*

READ TABLE gt_rbco WITH KEY belnr = gt_rbkp-belnr BINARY SEARCH.

IF sy-subrc = 0.

MOVE gt_rbco-buzei TO gt_final-buzei.

MOVE gt_rbco-wrbtr TO gt_final-wrbtr.

MOVE gt_rbco-menge TO gt_final-menge.

MOVE gt_rbco-meins TO gt_final-meins.

ENDIF.

READ TABLE GT_BSET WITH KEY BELNR = GT_BKPF-BELNR

bukrs = gt_bkpf-bukrs

gjahr = gt_bkpf-gjahr BINARY SEARCH.

IF SY-SUBRC = 0.

MOVE GT_BSET-FWSTE TO GT_FINAL-FWSTE.

ENDIF.

ENDLOOP.

1 REPLY 1
Read only

Former Member
0 Likes
268

loop the table gt_rbco and

read gt_bkpf table

Regards,

siva