Application Development 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: 

BAPI_SALESORDER_CHANGE Delivery Date at Line Item

Former Member
0 Kudos
1,382

Hi Guys,

We are trying to change the delivery date at the line item for a Sales Order using the date at the header.If we have a date change at the header,is there a way it can automatically change the date at the line item?can LOGIC_SWITCH field in the BAPI be used for this purpose.

we dont want to populate any line items.can only by changing the date,the dates at line item be changed?

thanks

Raj

11 REPLIES 11

Former Member
0 Kudos
401

Hi,

Please note that Delivery date at the header may not be the same as delivery date at item level. you have Avialability check (ATP Check) at item level and this will derrive the delivery dates at item level.

Regards,

Lanka

0 Kudos
401

Hi Lanka

Thanks for your quick reply.

I need to just change the Schedule Line Dates at the item level.is that possible using the BAPI?

0 Kudos
401

Hi ,

Yes. You can do that.

Regards,

Lanka

Please reward points for all useful answers

0 Kudos
401

How?

I am trying to change it at the header and the Schedule Line date should change.

is it possible automatically from the header without using the Schedule Line table in the BAPI?

0 Kudos
401

Hi,

You can do by using an user exit. I will let you know the details in short while.

Regards,

Lanka

0 Kudos
401

ok Lanka.

Thanks a lot

appreciate your help and patient reading

0 Kudos
401

Hi,

You are using BAPI_SALESORDER_CHANGE to just change the delivery date only or you are creating So through BAPI.

Can you call the BAPI second time and check the header date made any impact on item level deleivery date. Some times ATP will work when you call the BAPI Second time.

Regards,

Lanka

0 Kudos
401

Hi There

we are having a Z bapi for both creation as well as change.we create the sales order and use the change BAPI to add/cancel line items.now one scenario might be that we need to change the delivery date.the problem we are having right now is even though we change the delivery date at the header,the date at the line item doesnt change.

are you saying i should call the change BAPI twice,the first time it will update the header date and the second time it will change the date at line item?

0 Kudos
401

Hi,

Intially I thought of User Exit . But user exits won't work because you are using BAPI.

Try calling CHANGE BAPI twice. Set a break point and see after you have called it twice. I think first time BAPI may be Skipping the ATP check.

Regards,

Lanka

0 Kudos
401

Hey Lanka,

i tried running it twice without success.

i have tried changing the date at line item using the 'schedule line' table provided and it works.the only thing we want to achieve is by changing the header,it should reflect at the line item.

any suggestions?

thanks

0 Kudos
401

Hi ,

Please add Header date at scdedule lines Field "EDATU'.

I think this will work.

Header date will not copy to line items and this will effect the billing date only.

Regards,

Lanka