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

Former Member
0 Kudos

Hi Guys,

In BAPI_SALESORDER_CHANGE, i am trying to create a new line item and its condition types. I have an 'X' on INT_NUMBER_ASSIGNMENT, 'U' on Order Header Update Indicator and 'I's on the item Update and Condition Update Indicators. It works fine when i create a new line item with 00000 as Item_number. But the same is not working properly for Condition types as 00000 refers to the header of the sales document. Is there any way i can link between the new item and the condition type ? or anyway i can make the condition type to refer to the new item instead of the header ?

Hope i was clear with my query.

NO TAKERS ???

Thanks & regards,

Bikash

Message was edited by:

Bikash Agarwal

4 REPLIES 4

Former Member
0 Kudos

Hi,

Get the last line item number for the sales order from the table VBAP...

Then with that value..Increment by 10 for the new line item..

Thanks,

Naren

0 Kudos

Narendran,

Thanks for the reply. I had tried that earlier and after setting Int_number_assignment value to space, it worked. But i was just wondering how i cud do it automatically,ie, for SAP to assign the item no. itself. Or is it not possible??

Thanks again.,

Bikash

Former Member
0 Kudos

Hi,

Not sure..How to automatically take the numbering that works with the conditions also..

Thanks,

Naren

Former Member
0 Kudos

Hi Bikash,

I just read your thread, a litle bit late but maybe it helps.

The FU BAPI_SALESORDER_CHANGE behaves at that point like FU SD_SALESDOCUMENT_CREATE: if using the automatic creation of item numbers no schedules or conditions can be created - or changed. You'll find this in the documentation of SD_SALESDOCUMENT_CREATE.

If you want to insert more than one item, the item number have to be continuously - no gaps allowed. Otherwise no schedules or conditions will be created.

Kind regards

Rolf

Edited by: Rolf Höning on Jan 15, 2008 12:58 PM

Edited by: Rolf Höning on Jan 15, 2008 12:59 PM