‎2007 Feb 05 5:25 AM
HI all,
BAPI Used - BAPI_PO_CHANGE
I have a file containing PO# number, Material, Qty and delivery date, but no PO Item Number for delivery scheduling.
For Example:
PO# Number = ABC
Material = Q001
Qty = 110.
Delivery Date = 03/01/2007
PO# Number = ABC
Material = Q001
Qty = 40.
Delivery Date = 04/01/2007
The purchase order contain line items as follows;
PO# Number = ABC
PO Item = 10
Material = Q001
Qty = 100.
PO# Number = ABC
PO Item = 20
Material = Q001
Qty = 50.
How can i schedule the qty with their respective date.
One way is like this,
PO# Number = ABC
PO Item = 10
Scheule Line = 0001
Material = Q001
Qty = 100.
Delivery Date = 03/01/2007
PO# Number = ABC
PO Item = 20
Scheule Line = 0001
Material = Q001
Qty = 10.
Delivery Date = 03/01/2007
PO# Number = ABC
PO Item = 20
Scheule Line = 0002
Material = Q001
Qty = 40.
Delivery Date = 04/01/2007
Can anyone tell me how to obtain this logic,
Thanks,
Rajesh.
Message was edited by:
Rajesh Kumar
Message was edited by:
Rajesh Kumar
‎2007 Feb 05 5:32 AM
Hi Rajesh,
Its simple,
Declare a variable LV_POITEM(5) value '00010'.
When you are appending values to the internal table line items us ethis logic,
Loop at itab.
if sy-tabix = '1'.
PO Item = lv_poitem.
else.
PO Item = lv_poitem + 10.
endif.
.
.
.
Endloop.
Hope this would help you.
Thanks,
Prashanth
Message was edited by:
Prashanth KR
‎2007 Feb 05 5:46 AM
Hi Prasanth,
Have you noticed this part:
Material with same delivery date but should belong to different line items of PO#.
PO# Number = ABC
PO Item = 10
Scheule Line = 0001
Material = Q001
Qty = 100.
Delivery Date = 03/01/2007
PO# Number = ABC
PO Item = 20
Scheule Line = 0001
Material = Q001
Qty = 10.
Delivery Date = 03/01/2007
Please send your suggestions,
Rajesh.