Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Update Second Telephone Number through BAPIADDR1 in SD_CUSTOMER_MAINTAIN_AL

Hi,

I am updating Customer Address using the function module SD_CUSTOMER_MAINTAIN_ALL.

I have defined a structure ls_bapiaddr1( of type BAPIADDR1) and workarea itab1 ( of type KNA1)and populated BAPIADDR1 with the respective field values in KNA1 and passing the below parameters to the function module.

ls_bapiaddr1-addr_no = itab1-adrnr.

ls_bapiaddr1-NAME = itab1-name1.

LS_BAPIADDR1-NAME_2 = itab1-name2.

LS_BAPIADDR1-NAME_3 = itab1-name3.

LS_BAPIADDR1-NAME_4 = itab1-name4.

LS_BAPIADDR1-street = itab1-stras.

LS_BAPIADDR1-district = itab1-ort02.

LS_BAPIADDR1-postl_cod1 = itab1-pstlz.

LS_BAPIADDR1-city = itab1-ort01.

LS_BAPIADDR1-country = itab1-land1.

LS_BAPIADDR1-region = itab1-regio.

LS_BAPIADDR1-taxjurcode = itab1-txjcd.

LS_BAPIADDR1-transpzone = itab1-lzone.

LS_BAPIADDR1-po_box = itab1-pfach.

LS_BAPIADDR1-postl_cod2 = itab1-pstl2.

LS_BAPIADDR1-langu = itab1-spras.

LS_BAPIADDR1-tel1_numbr = itab1-telf1.

LS_BAPIADDR1-fax_number = itab1-telfx.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'

EXPORTING

I_KNA1 = itab1

I_BAPIADDR1 = ls_bapiaddr1

I_MAINTAIN_ADDRESS_BY_KNA1 = 'X'

PI_POSTFLAG = 'X'.

By using the above FM,all the address fields are populating correctly.

Here, the issue is if a customer has second telephone number ( KNA1-TELF2), then it is always updating with SPACE.

Even though, i am not passing any second telephone number here, it is changing to blank only.

Can you please suggest, how to rectify the above issue for not updating second telephone number with blank?

Thanks in advance,

Vamsee

Tags:
replied

Well, you might try something like FM BAPI_ADDRESSCONTPART_CHANGE instead.

Rob

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question