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: 

Problem with BAPI_SALESORDER_CHANGE ("Enter part 2 of the incoterms")

Former Member
0 Kudos

Hi,

I have a problem when I try to create Sales Order and change it with BAPI_SALESORDER_CHANGE.

Logic of my program is

1. Use BAPI_SALESDOCUMENT_COPY to copy data from Billing to Create SO

2. Use BAPI_SALESORDER_CHANGE to unblock Billing Block in Sales Order Created from step1

Problem occurs in step 2. Returning Bapi Error Message that "Enter part 2 of the Incoterms". I already check that after step 1 Sales Order already have incoterm2. And in step 2, I didn't send input parameter 'X' to update fiend incoterm2 (Table order_header_inx1).

I debug BAPI_SALESORDER_CHANGE and found that my error came from function 'SD_SALES_ITEM_MAINTAIN'. I think that this function is used for update item. I couldn't see why it gave me that error about INCOTERMS2 which is in header.

Have anyone ever been through the same problem before?

Thanks,

Pavin

5 REPLIES 5

Former Member
0 Kudos

I just found the cause of this problem and want to share in this topic.

Here is the process of BAPI_SALESORDER_CHANGE that cause my problem.

BAPI_SALESORDER_CHANGE -> SD_SALESDOCUMENT_CHANGE -> SD_SALES_ITEM_MAINTAIN -> perform vbkd-inco1_pruefen(sapfv45k) -> RV_INCOTERMS_CHECK

My problem occurs in Function RV_INCOTERMS_CHECK because value in field VBKD-INCO2 is missing. This case only happen when I try to create CFR SO with reference from EXW Billing.

Hope it's useful.

Regards,

Pavin

Edited by: Pavin P. on Apr 30, 2009 5:15 AM

Former Member
0 Kudos

Answered by myself.

Former Member
0 Kudos

Hi experts i am adding new line item to existing sales order through BAPI_SALESORDER_CHANGE

some times it is updated some times i am getting an error. In special case suppose first 20 line item SO is created after i am adding 10 line item then we are getting beloow error can any one plase help.

Error message is type : E 

                         ID     : A

                        number : 331

                        Message: Item '000000' is dose not exit

Regards,

anji

0 Kudos

Hi Anji,

It is recommended you start a new discussion for your query rather than continuing in another post.

Anyways, Please ensure you are passing values to the structure ORDER_ITEM_INX-ITM_NUMBER

and ORDER_ITEM_INX-UPDATEFLAG = 'I'.

For any further queries do start a new post.

Regards,

Pranav.

0 Kudos

hi Pranav,

i am maintianing ORDER_ITEM_INX-ITM_NUMBER

and ORDER_ITEM_INX-UPDATEFLAG = 'I'.

but am getting this error.

Regards,

anji