Application Development and Automation 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: 
Read only

Contact partner in bapi BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
1,178

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

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
989

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

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
990

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

Read only

0 Likes
989

Hi Uwe.

It was only neccesary to replace 'CP' by 'AP' and it works.

Thank you very much for your help.

Read only

0 Likes
989

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