‎2008 Jul 25 11:10 AM
hi,
LOOP AT i1_bsak.
READ TABLE i2_bsak WITH KEY augbl = i1_bsak-augbl.
IF sy-subrc = 0.
i1_bsak-wskto = i1_bsak-wskto - i2_bsak-wskto.
MODIFY i1_bsak TRANSPORTING wskto.
MODIFY i_bsak FROM i1_bsak TRANSPORTING wskto WHERE bschl = '31' and augbl = i1_bsak-augbl.
DELETE i_bsak WHERE bschl = '21' and augbl = i1_bsak-augbl.
ENDIF.
ENDLOOP.
the second modify statement is not working.
its telling i_bsak and i1_bsak is not compatible.
what do i need to do.??
‎2008 Jul 25 11:13 AM
poonam,
here is your second modify statement:
MODIFY i_bsak FROM i1_bsak TRANSPORTING wskto WHERE bschl = '31' and augbl = i1_bsak-augbl.you are looping on i1_bsak and reading i2_bsak table than how can you expect to modify i_bsak table.it is not in exsitance in your piece of code.
kindly check and confirm.
Amit.
‎2008 Jul 25 11:21 AM
‎2008 Jul 25 11:14 AM
‎2008 Jul 25 11:21 AM
hi,
if the structure is not the same then wat do i need to do.
any other option?
‎2008 Jul 25 11:23 AM
hii poonam,
it will work for i1_bsak but not for i_bsak. as you are not looping or reading i_bsak table.if you want to perform on i_bsak then have one more loop on i_bsak then use MODIFY statement.
regards
twinkal
‎2008 Jul 25 11:27 AM
‎2008 Jul 25 11:27 AM
‎2008 Jul 25 11:32 AM
Hi
LOOP AT i1_bsak.
READ TABLE i2_bsak WITH KEY augbl = i1_bsak-augbl.
IF sy-subrc = 0.
i1_bsak-wskto = i1_bsak-wskto - i2_bsak-wskto.
MODIFY i1_bsak TRANSPORTING wskto.
*MODIFY i_bsak FROM i1_bsak TRANSPORTING wskto WHERE bschl = '31' and augbl = i1_bsak-augbl.
i_bsak-wskto = i1_bsak-wskto.
MODIFY i_bsak TRANSPORTING wskto WHERE bschl = '31' and augbl = i1_bsak-augbl.
DELETE i_bsak WHERE bschl = '21' and augbl = i1_bsak-augbl.
ENDIF.
ENDLOOP.Max