Application Development 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: 

To have multiple email ids for a Sold to while creating the SO using BAPI

venky_k
Explorer
0 Kudos

Hi All,

My requirement is to create a sales order using BAPI and to have multiple email ids to the Sold To.

I am using the BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create the SO.

I have written logic to update the Sold to Address with Email by linking the internal tables ORDER_PARTNERS and PARTNERADDRESSES.

However, I am not able to create Sold To with multiple Email IDs.

Kindly let me know how to handle this scenario?

8 REPLIES 8

I042439
Employee
Employee
0 Kudos

Hi Venky

Just a guess.....what happens if you have multiple lines in PARTNERADDRESSES for one partner, but with different email address? (The second line just has the email address for the same ADDR_NO)?

Regards,

Modak

0 Kudos

Hi Modak,

I tried to upload data with multiple lines (Email address for the same addr_no).

Result: System is updating only second record. (First record is ignored).

Regards,

Bharani.

0 Kudos

Hi Venky / Bharani

Try putting a break point in SD_SALES_PARTNER_MAINTAIN and executing the code. There you may find how actually the partner addresses are getting stored.

Maybe there is a way to create implicit enhancement and add another email

regards,

Modak

0 Kudos

Sure.. will do.

Regards,

Venky.

sachin_yadav3
Active Participant
0 Kudos

Hi,

Try with BAPI to change the sales order once the order has been created. I change bapi i think you can add multiple mail id.

Regards

Sachin

0 Kudos

Hi Sachin,

BAPI to change may work, however, it may show in the change log and it is against the requirement.

Regards,

Venky.

Jelena
Active Contributor
0 Kudos

I'm guessing this is needed for the output distribution to multiple emails. In such case I'd suggest to send output to Contact partner (CP) instead. Otherwise even if you somehow "feed" multiple emails into Sold-to address, I'm not sure the output program would "eat" it. At minimum just try that in VA01 - you won't be able to do in BAPI something that is not possible in the transaction.

Former Member
0 Kudos

This message was moderated.