‎2006 Oct 20 12:57 PM
hi,
I have a internal table ITAB it has
MATERIAL abcd
PLANT Get from PO line item in SAP
STGE Get from PO line item in SAP
MOVE_TYPE 101
ENTRY_QNT 1
PO_NUMBER 4506007300
PO_IT 00001
MVT_IND B
in this internal table i dont have plant and storage location so i was using
select ebeln ebelp werks lgort into JTAB from ebap for all entries in ITAB
where ebelp = ITAB-ebelp.
so now i got the plant and storage location in JTAB.
so can any one send the logic how i can modify ITAB with plant and storage location with respect to po line item.
thanks.
‎2006 Oct 20 1:06 PM
hi pavan ..
loop at jtab.
read table itab with key ebeln = jtab-ebeln
ebelp = jtab-ebelp.
if sy-subrc = 0.
itab-werks = jtab-werks.
itab-lgort = jtab-lgort.
modify itab transporting werks lgort
where ebeln = jtab-ebeln
ebelp = jtab-ebelp
endif.
endloop.
hope this helps
regards,
vijay<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm">modify</a>
check this for clear understanding
Message was edited by: Vijay
‎2006 Oct 20 1:06 PM
hi pavan ..
loop at jtab.
read table itab with key ebeln = jtab-ebeln
ebelp = jtab-ebelp.
if sy-subrc = 0.
itab-werks = jtab-werks.
itab-lgort = jtab-lgort.
modify itab transporting werks lgort
where ebeln = jtab-ebeln
ebelp = jtab-ebelp
endif.
endloop.
hope this helps
regards,
vijay<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm">modify</a>
check this for clear understanding
Message was edited by: Vijay
‎2006 Oct 20 1:21 PM
Hi Pavan,
try following code.
loop at itab.
select plant, storage location into itab-werks, itab-lgort.
if sy-subrc = 0.
modify itab transporting werks lgort index sy-tabix.
endif.
endloop.
-Anu