on 2011 Nov 30 4:28 AM
Hi,
I am using BAPI_BUPA_ADDRESS_CHANGE to change address usages.In transaction BP, we maintain several address usages - mailing address, billing address, delivery address etc.. For each of these we have a address type. Using this address type and 'U' in update flag, I am using FM BAPI_BUPA_ADDRESS_CHANGE to change a particular address type. The code is below.
g_addressusage-addresstype = c_mail_add.
append g_addressusage to i_addressusage.
clear g_addressusage.
g_addr_usage_x-addresstype = 'X'.
g_addr_usage_x-updateflag = c_upd_aduse.
append g_addr_usage_x to i_addr_usage_x.
clear g_addr_usage_x.
call function 'BAPI_BUPA_ADDRESS_CHANGE'
exporting
businesspartner = g_dealer_flex_app-internal_account
addressdata = g_addressdata
addressdata_x = g_chng_add_x
tables
addressusage = i_addressusage
addressusage_x = i_addr_usage_x
return = e_ret.
The FM works well with sy-subrc = 0 but the new address replaces all address usages including the standard address! I specifically mentioned c_mail_add as address type for which I need to assign a new address. However, the FM overwrites other address types too. Am I missing something here?
Thank you.
not sure but try with UPDATE flag as I instead of U.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.