‎2006 Sep 21 9:08 PM
I want to modify one internal table from another internal table.
I have my code as below
it2_vbrk = it1_vbrk.
DELETE it2_vbrk WHERE aubel <> space.
SELECT vbelv
vbeln
INTO it_vbfa
FROM vbfa
FOR ALL ENTRIES IN it2_vbrk
WHERE vbeln EQ it2_vbrk-vbeln
AND vbtyp_v EQ 'C'.
ENDSELECT.
DELETE ADJACENT DUPLICATES FROM it_vbfa.
LOOP AT it_vbfa.
it1_vbrk-aubel = it_vbfa-vbelv. "sales order
MODIFY it1_vbrk WHERE vbeln = it_vbfa-vbeln
TRANSPORTING it_vbfa-vbelv.
ENDLOOP.
REFRESH : it2_vbrk.
CLEAR it2_vbrk.
I am having problems in the loop endloop of the table it_vbfa at the modify statement.
Shejal Shetty.
‎2006 Sep 21 9:18 PM
Hi,
I think transporting should come first and then the where condition..
MODIFY it1_vbrk TRANSPORTING aubel
WHERE vbeln = it_vbfa-vbeln.
It should be AUBEL instead of vbelv, since you are trying to modify aubel..
Thanks,
Naren
‎2006 Sep 21 9:11 PM
Hi,
You have to give transporting vbelv instead of it_vbfa-vbelv
MODIFY it1_vbrk WHERE vbeln = it_vbfa-vbeln
TRANSPORTING <b>vbelv</b>.
Thanks,
naren
‎2006 Sep 21 9:16 PM
Thanks Naren,
I tried it still has an error.
error-
"WHERE VBELN = IT_VBFA-VBELN" is not expected.
any suggestions.
shejal
‎2006 Sep 21 9:18 PM
Hi,
I think transporting should come first and then the where condition..
MODIFY it1_vbrk TRANSPORTING aubel
WHERE vbeln = it_vbfa-vbeln.
It should be AUBEL instead of vbelv, since you are trying to modify aubel..
Thanks,
Naren
‎2006 Sep 21 9:21 PM
‎2006 Sep 21 9:22 PM
hi,
try this..
MODIFY it1_vbrk TRANSPORTING vbelv WHERE vbeln = it_vbfa-vbeln.
or
LOOP AT it_vbfa.
it1_vbrk-aubel = it_vbfa-vbelv. "sales order
if it1_vbrk-vbeln = it_vbfa-vbeln.
MODIFY it1_vbrk TRANSPORTING vbelv.
endif.
ENDLOOP.
hope this helps