Skip to Content
avatar image
Former Member

In IW32 Sold to party field not getting updated using BAPI_ALM_ORDER_MAINTAIN

Hello,

I am trying to update Sold to party field in IW32 using BAPI_ALM_ORDER_MAINTAIN , return was successful still field cannot get updated

IT_HEADER_NEW_UP-ORDERID = '%00000000001'.
IT_HEADER_NEW_UP-MN_WK_CTR = 'X'.
IT_HEADER_NEW_UP-PLANT = 'X'.
IT_HEADER_NEW_UP-START_DATE = 'X'.
IT_HEADER_NEW_UP-FINISH_DATE = 'X'.
IT_HEADER_NEW_UP-SHORT_TEXT = 'X'.
*WA_HEADER_UP-EQUIPMENT = 'X'.
*WA_HEADER_UP-FUNCT_LOC = 'X'.
APPEND IT_HEADER_NEW_UP.

IT_OPERATION-ACTIVITY = '0010'.
IT_OPERATION-CONTROL_KEY = 'PM01'.
IT_OPERATION-WORK_CNTR = 'NPCL'.
IT_OPERATION-PLANT = '0002'.
APPEND IT_OPERATION.

IT_OPERATION_UP-ACTIVITY = 'X'.
IT_OPERATION_UP-CONTROL_KEY = 'X'.
IT_OPERATION_UP-WORK_CNTR = 'X'.
IT_OPERATION_UP-PLANT = 'X'.
APPEND IT_OPERATION.

IT_RELATION-OPERATION_PREDECESSOR = '0010'.
IT_RELATION-ORDER_SUCCESSOR = '%00000000001'.
IT_RELATION-OPERATION_SUCCESSOR = '0010'.
IT_RELATION-RELATION_TYPE = 'SF'.
IT_RELATION-WORK_CNTR = 'NPCL'.
IT_RELATION-PLANT = '0002'.
APPEND IT_RELATION.

IT_RELATION_UP-OPERATION_PREDECESSOR = 'X'.
IT_RELATION_UP-ORDER_SUCCESSOR = 'X'.
IT_RELATION_UP-OPERATION_SUCCESSOR = 'X'.
IT_RELATION_UP-RELATION_TYPE = 'X'.
IT_RELATION_UP-WORK_CNTR = 'X'.
IT_RELATION_UP-PLANT = 'X'.
APPEND IT_RELATION_UP.

IT_METHODS-REFNUMBER = '000001'.
IT_METHODS-OBJECTTYPE = 'HEADER'.
* IT_METHODS-OBJECTTYPE = 'HEADER_NEW_NEw'.
IT_METHODS-METHOD = 'CREATE'.
IT_METHODS-OBJECTKEY = '%00000000001'.
APPEND IT_METHODS.

IT_METHODS-REFNUMBER = '000001'.
IT_METHODS-OBJECTTYPE = 'OPERATION'.
IT_METHODS-METHOD = 'CREATE'.
IT_METHODS-OBJECTKEY = '%00000000001'.
APPEND IT_METHODS.

IT_METHODS-REFNUMBER = '000001'.
IT_METHODS-OBJECTTYPE = ''.
IT_METHODS-METHOD = 'SAVE'.
IT_METHODS-OBJECTKEY = '%00000000001'.
APPEND IT_METHODS.

IT_PART-ORDERID = '%00000000001'. "'ORDERID'.
IT_PART-PARTN_ROLE = 'VW'. "'RE' "'VW' "'AG'
*IT_PART-PARTN_ROLE_OLD = ' '.
IT_PART-PARTNER = V_KUNUM.
*IT_PART-PARTNER_OLD = V_KUNUM.
APPEND IT_PART.

IT_PART_UP-ORDERID = '%00000000001'.
IT_PART_UP-PARTN_ROLE = 'X'.
IT_PART_UP-PARTNER = 'X'.
*IT_PART_UP-PARTN_ROLE_OLD = 'X'.
IT_PART_UP-PARTNER = 'X'.
*IT_PART_UP-PARTNER_OLD = 'X'.
APPEND IT_PART_UP.

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
IT_METHODS = IT_METHODS
IT_HEADER = IT_HEADER_NEW_NEW
IT_OPERATION = IT_OPERATION
IT_PARTNER = IT_PART
IT_PARTNER_UP = IT_PART_UP
RETURN = IT_RETURN
ET_NUMBERS = ET_NUMBERS.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 08, 2017 at 11:35 AM

    Do you get any Msg in ReturnParameters? If so, please inform us on What Msg-ID / Number is issued.

    Is this associated to a perticular OrderType (so for certain OrderTypes it works and others it doesn't? Then check SAP-KBA 2107432.

    Also, there are some older SAP-KBA's on the BAPI and Sold-to Party (SAP-KBA 1156973 / SAP-KBA1057555).

    Add comment
    10|10000 characters needed characters exceeded