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

BAPI For Delivery Schedule

Former Member
0 Likes
989

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

2 REPLIES 2
Read only

Former Member
0 Likes
590

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

Read only

Former Member
0 Likes
590

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.