Skip to Content

BAPI to change Bill to Party in Sales order Header

Hi Experts,

Could anyone please suggest how can i change bill to party in Sales order header?

I tried using BAPI_SALESORDER_CHANGE but it is asking for line item to be changed.

How can i change the header bill to party, please assist.

Thanks in Advance,

Aayush Aggarwal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 21, 2016 at 12:22 PM

    First remove parameter PARTNERS and only use PARTNERCHANGES.

    In case of error, try to delete and recreate the partner, a record in PARTNERCHANGES with DOCUMENT, UPDATEFLAG = 'D', PARTN_ROLE and P_NUMB_OLD for old value and a new record in PARTNERS for insertion of new value.

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 21, 2016 at 10:14 AM

    Which parameter did you pass to BAPI and which error (or 'no change' status) message id did you receive?

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Raymond,

      i am passing sales order number in header, alongwith

      In order_header_in,

      SALES ORG, DIVISION and DISTRIBUTION CHANNEL

      in order_header_inx

      Update as 'U'

      'X' for above mentioned fields.

      in table PARTNERS,

      Partner role

      Partner Number

      in table PARTNERCHANGES,

      DOCUMENT

      UPDATEFLAG as 'U'

      PARTNER_ROLE

      P_NUMB_OLD

      P_NUMB_NEW

      And when i am commiting it is giving me a dump i.e. DBSQL_DUPLICATE_KEY_ERROR.

      Please assist me.

      Regards,

      Aayush Aggarwal