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

Problem with function ADDR_UPDATE

Former Member
0 Likes
2,679

Hi Everybody! I'm doing a vendor modification for the basic view, but a have a problem. I need to change several dates, like name, address and phone numbers. I found the function ADDR_UPDATE, which work perfectly but no change the phone number 1 and phone number 2.

I try to make a Batch Input with SHDB and transaction XK02, but this don't make any changes over address fields and neither with phone number 2 (LFA1-TELF2). Did anyone know how change the field number2 (LFA1-TELF2)???

thanks for help!!

Oscar Requez

ABAP developer

Venezuela

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
1,840

Hi

try BUPA_ADDRESS_CHANGE

Regards,

Suresh Datti

9 REPLIES 9
Read only

suresh_datti
Active Contributor
0 Likes
1,841

Hi

try BUPA_ADDRESS_CHANGE

Regards,

Suresh Datti

Read only

0 Likes
1,840

Hi Suresh! I try with your suggestion, but this no have the field lfa1-telf2. Thanks.

Read only

0 Likes
1,840

Hi Oscar,

This is a generic function to change the address and not specific to vendors alone.. So you will not find LFA1 specific fields.. you can use the Table IT_ADTEL of the function module to pass the Tel No.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,840

Hi,

you can use the <b>FM BAPI_BUPA_ADDRESS_ADD "to add

BAPI_BUPA_ADDRESS_CHANGE "to change</b>

here you have an options to change or update the telf2.

regards

vijay

Read only

0 Likes
1,840

Hi Vijay, i'm looking for modify the change with the BAPI_BUPA_ADDRESS_CHANGE and don't find in with structure is that field. can you help me please?

Read only

0 Likes
1,840

Hi Oscar,

using the above BAPI you can change the address using LFA1-adrnr (address number)

in this BAPI you have table parameter <b>BAPIADTEL</b> there you can pass multiple phone numbers,

regards

vijay

Read only

0 Likes
1,840

Hi! at this point (in the program) a don't have the Bussiness parter only have the number of the address and the vendor. I'm calling the addr_update like this:

CALL FUNCTION 'ADDR_UPDATE'

EXPORTING

address_data = addr1_data

address_number = <b>et_adrc-addrnumber</b>

language = sy-langu

check_empty_address = 'X'

IMPORTING

address_data = address_data

returncode = returncode

data_has_changed = cambio

TABLES

error_table = addr_error

EXCEPTIONS

address_not_exist = 1

parameter_error = 2

version_not_exist = 3

internal_error = 4

OTHERS = 5.

Read only

0 Likes
1,840

Hi and thanks for the ideas!!!!

i found a way close to that I want. But still not be the one:

After do CALL FUNCTION 'ADDR_UPDATE':

CLEAR xadtel.

xadtel-tel_number = ztelf2.<b>(number that I need)</b>

xadtel-DFT_RECEIV = 'X'. <b>(ind. that SMS)</b>

xadtel-updateflag = 'I'. (Insert in the table phone)

APPEND xadtel.

CALL FUNCTION 'ADDR_COMM_MAINTAIN'

EXPORTING

  • address_handle = address_handle

address_number = et_adrc-addrnumber

table_type = 'ADTEL'

TABLES

comm_table = xadtel

error_table = lt_error

comm_table_out = adtel_out

EXCEPTIONS

parameter_error = 1

address_not_exist = 2

internal_error = 3

OTHERS = 4.

CALL FUNCTION 'ADDR_MEMORY_SAVE'.

Now I have a number that work like Mobile phone number. But I don't know how make in batch, the next step.

that would be, press the button "phone -> mobile phone" in the sub-screen that show when I press the button next to phone number.

Read only

former_member185489
Participant
0 Likes
1,840

hi guys, i have tried everything mentioned here and my update works fine too!! i am trying to update only the language field for those addressess for which it is not mentioned. i have used the sequential function modules. there is just one problem. there is a field in ADRC table with field name pers_addr which signifies whether an address is a personal address. when the address is a personal address, it's throwing an error message saying " the address is a personal address. " i used the debugger and it's throwing a parameter error in the 'addr_update' function module itself...setting sy subrc value to 2 at the end of the FM. however it's working fine when the address is not personal . has anyone here faced the same problem? it would be really helpful if i could get a work around this!..thanks!!