on 02-08-2005 11:16 AM
Hi to all .
I have created an order with BAPI_SALESORDER_CREATEFROMDAT2 , now i have to add some position to an existing open order .
How i have to proced ?
Wich bapi must i use ???
THANKS
I believe for every field in a structure that you put a value into, you need to put an 'X' into the corresponding field in the X structure. For example, you have structure ORDER_ITEMS_IN3 and the corresponding structure ORDER_ITEM_INX. Because you did:
ORDER_ITEMS_IN3-MATERIAL = 'M000590000'.
You need to do:
ORDER_ITEMS_INX-MATERIAL = 'X'.
The same applies to SCHEDULE_LINES. Because you did:
SCHEDULE_LINES-REQ_DATE = SY-DATUM.
You need to do:
SCHEDULE_LINESX-REQ_DATE = 'X'.
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what about BAPI_SALESORDER_CHANGE... ?
kr, achim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tryed to add the third position to an order , but
it doesn't work .
i have tried to fill the bapi structures like this :
ORDER_ITEMS_IN3-ITM_NUMBER = '000300'.
ORDER_ITEMS_IN3-MATERIAL = 'M000590000'.
APPEND ORDER_ITEMS_IN3.
ORDER_ITEM_INX-ITM_NUMBER = '000300'.
ORDER_ITEM_INX-UPDATEFLAG = 'I'.
APPEND ORDER_ITEM_INX.
SCHEDULE_LINES-REQ_QTY = 1.
SCHEDULE_LINES-SCHED_LINE = 1.
SCHEDULE_LINES-ITM_NUMBER = '000300'.
SCHEDULE_LINES-REQ_DATE = SY-DATUM.
APPEND SCHEDULE_LINES.
SCHEDULE_LINESX-ITM_NUMBER = '000300'.
SCHEDULE_LINESX-SCHED_LINE = 1.
SCHEDULE_LINESX-UPDATEFLAG = 'I'.
APPEND SCHEDULE_LINESX.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = ORDER_NUMBER
ORDER_HEADER_IN = ORDER_HEADER_IN
ORDER_HEADER_INX = ORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
RETURN = TAB_RETURN
ORDER_ITEM_IN = ORDER_ITEMS_IN3
ORDER_ITEM_INX = ORDER_ITEM_INX
PARTNERS =
PARTNERCHANGES =
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES = SCHEDULE_LINES
SCHEDULE_LINESX = SCHEDULE_LINESX
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
But in retunr message structures i have an error that say :
ERROR IN SALES ITEM IN 300 . . .
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.