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

How to insert partner function to sales document ?

Former Member
0 Likes
2,406


Hi Experts,

I'm able to update partner function by assigning new customer based on sales document using BAPI_SALESORDER_CHANGE.

But how to insert a partner function to sales document?

Please provide a bapi or function module.

Regards,

Ashok


Hi Experts,

I'm able to update partner function by assigning new customer based on sales document using BAPI_SALESORDER_CHANGE.

But how to insert a partner function to sales document?

Please provide a bapi or function module.

Regards,

Ashok

6 REPLIES 6
Read only

Former Member
0 Likes
1,824

Have you tried using the  PARTNERS parameter of the BAPI you mention?

Read only

0 Likes
1,824

yes I've tried in dat way also

Read only

former_member809980
Participant
0 Likes
1,824

Hi,

you can insert the partner in the following way..

add your partner function to the Partner table..


I_BAPIPARNR-PARTN_ROLE = 'ZD'.

I_BAPIPARNR-PARTN_NUMB = P_KUNNR.

APPEND I_BAPIPARNR.


I_BAPIPARNRC-DOCUMENT = F_VBELN.

I_BAPIPARNRC-UPDATEFLAG = 'I'.

I_BAPIPARNRC-PARTN_ROLE = 'ZD'.

APPEND I_BAPIPARNRC.


thanks!!

Read only

venkateswaran_k
Active Contributor
0 Likes
1,824

Hi Ashok

You need to fill the following tables in the BAPI_SALESORDER_CHANGE

      PARTNERS                   STRUCTURE  BAPIPARNR OPTIONAL

      PARTNERCHANGES     STRUCTURE  BAPIPARNRC OPTIONAL

      PARTNERADDRESSES STRUCTURE  BAPIADDR1 OPTIONAL

As Aditya's example you need to update name and address and partner role

Both Partners and partnerchanages table should be inserted

Regards,

Venkat

Read only

0 Likes
1,824

If i do as above I'm getting below Error in BAPI

'Partners from account group 0001 are not permitted for partner function AC'

Read only

0 Likes
1,824

That  means it is working.

It is only a configuration issue.

Please consult with SD Consultant to define the appropriate account group in XD02.

Regards,

Venkat