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: 

Update Second Telephone Number through BAPIADDR1 in SD_CUSTOMER_MAINTAIN_AL

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I'm also having this problem.

Experts, is there a way via FM to update telf2?

5 REPLIES 5

Former Member
0 Kudos

I'm also having this problem.

Experts, is there a way via FM to update telf2?

0 Kudos

Well, you might try something like FM BAPI_ADDRESSCONTPART_CHANGE instead.

Rob

0 Kudos

Within the XD02 address table there is an "other communication" button. Here you can add multiple addresses.

Rob, it appears that the BAPI you are referring to is the "contact person" phone numbers. Are these 2 areas the same?

Thanks

Jayden

0 Kudos

I have not used this BAPI; however, I have used batch input to do similar things. It does seem to work.

Rob

0 Kudos

Hi All,

Thank you very much for all your inputs.

I found out the root cause of the issue. This is purely address management memory issue. It does not belong to BAPI.

I raised with SAP about this issue and the same they mentioned. In fact, this issue occurs when we process large amount of records only ( 1 lac above).

Regards,

Vamsee