Skip to Content
avatar image
Former Member

Contact partner in bapi BAPI_SALESORDER_CREATEFROMDAT2

Hi abapers:

I have a problem when creating sales orders with a contact as a partner.

Filling the internal table of Partners, I assign CP (Contact) and Contact number which is comming from table KNVK.

When calling the bapi, the sales order is created with the contact but not the Contact assigned by me. At the end, the contact is taken, by the bapi, from the sold-to. In case of the sold-to doesn't have any contact created, no contact partner is created.

Of course, the contact number assigned via program and the contact number of sold-to are differents.

I don't know why SAP decides to take the contact from sold-to instead of taking the data provied by the program.

Please, i need you help.

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 11, 2008 at 03:21 PM

    Hello Ernesto

    I called the BAPI (Login language = EN) using partner AP <customer no> and it worked.

    I assume you have to set IMPORTING parameter CONVERT = 'X' in order to ensure that the BAPI interprets the language-dependent partner role correctly.

    Documentation of this parameter CONVERT:

    
     FU BAPI_SALESORDER_CREATEFROMDAT2CONVERT
     ____________________________________________________
     Short Text
         Conversion of Partner Function + Order Type
     Description
         In previous SAP Releases, you had to specify the German abbreviation for
         the order type and partner functions. This parameter now checks whether
         your Customizing has been configured so that you can enter the
         abbreviation in your own language and it is then converted into the
         German key.
     Value range
         o   Space = Not converted
         o     X   = Converted
     Default
         Space
     Function Module
         BAPI_SALESORDER_CREATEFROMDAT2
    

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Ernesto

      These language-dependent customizing data kept me confusing for quite some time.

      Working for a Swiss company yet doing a lot of work for our subsidiary in UK I need to know that

      SH = Ship-to-party corresponds to WE = Warenempfänger.

      Invoices are sent as EDI output to PY = Payer yet the partner in the IDoc appears as RG = Regulierer.

      Thus, one of the first things I did was to print out a list of the language-dependent customizing data to avoid further confusion.

      Anyway, many thanks for your feedback because now I know a little bit more about this BAPI, too.

      REgards

      Uwe