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

Inserting EMail into Partners when using BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
2,021

I found a document from 07 about using the Partneraddresses table to fill out the email to populate the Email address field but it isn't working as I thought it would and I'm confused on what I'm doing wrong.

Here is the link to the thread that I was referring to: http://scn.sap.com/message/3178498

I've tried what Shyla stated to do but when I do that there is nothing in the email field when I'm looking at the order and drill into the partner records.

1 REPLY 1
Read only

Former Member
0 Likes
1,384

Hi,

I checked this. Basically when you are filling up a PARTNERADDRESS its basically create a new partner address for that order. You follow the exact step as mentioned in http://scn.sap.com/message/3178498 and then need to fill up the field PARTNERADDRESSES-COUNTRY (this is a mandatory field) and if the country value is not populated then new partner address will not be created.

Also note that it will create a new partner address - so if you want to change the email only then you need to fill up the other details also (Name, Street , Region etc) otherwise these will be blank in your new address. So fill up the below details -

* Ship-to

  I_ORDER_PARTNERS-PARTN_ROLE    = 'WE'.

  I_ORDER_PARTNERS-PARTN_NUMB    = '0000241269'.

  I_ORDER_PARTNERS-ADDR_LINK     = XXXXXXX

  I_PARTNERADDRESSES-ADDR_NO     = XXXXXXX

  I_PARTNERADDRESSES-NAME        = WA_CUSTOMER-NAME.

  I_PARTNERADDRESSES-NAME_2      = WA_CUSTOMER-NAME2.

  I_PARTNERADDRESSES-STREET_LNG  = WA_CUSTOMER-STREET.

  I_PARTNERADDRESSES-CITY        = WA_CUSTOMER-CITY.

  I_PARTNERADDRESSES-REGION      = WA_CUSTOMER-STATE.

  I_PARTNERADDRESSES-POSTL_COD1  = WA_CUSTOMER-ZIPCODE.

  I_PARTNERADDRESSES-COUNTRY     = WA_CUSTOMER-COUNTRY.  "This is mandatory

  I_PARTNERADDRESSES-TEL1_NUMBR  = WA_CUSTOMER-PHONE.

  I_PARTNERADDRESSES-E_MAIL      = YYYYYYYYYYYYYY     "New Email

  I_PARTNERADDRESSES-LANGU       = SY-LANGU.