‎2007 Jun 27 8:37 AM
Hi Experts,
Can anyone give me an idea,which function module is used to update vendor communication address details.As I have tried the function module 'ADDR_SAVE_INTERN' but there is no web address field.
**points will be rewarded
Regards,
Naresh.
‎2007 Jun 27 10:22 AM
Have a look at ADDR_COMM_MAINTAIN.
It's a complicated one though...
‎2007 Jun 27 10:26 AM
You will need to call function module 'ADDR_MEMORY_SAVE' as well. Maybe that already solves your problem...
If not, here's an example that works for me. It does use a macro though... Not nice but flexible.
* ----------------------------------------------------------------------
* DEFINITION
* ----------------------------------------------------------------------
DEFINE comm_maintain.
refresh i_ad&1.
clear i_ad&1.
i_ad&1-&2 = &3.
i_ad&1-updateflag = &6.
i_ad&1-consnumber = &7.
append i_ad&1.
call function 'ADDR_COMM_MAINTAIN'
exporting
address_number = address_number
language = sy-langu
table_type = 'AD&1'
substitute_all_comm_data = &4
accept_telnr_call = ' '
consider_consnumber_for_insert = &5
check_address = 'X'
tables
comm_table = i_ad&1
error_table = error_table
exceptions
parameter_error = 1
address_not_exist = 2
internal_error = 3
others = 4.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
END-OF-DEFINITION.
Then:
* ----------------------------------------------------------------------
* Fill structures and corresponding ITAB
* <Comm_Structure>-<Field_name> = <Value>
* ----------------------------------------------------------------------
IF NOT telephone IS INITIAL.
comm_maintain tel tel_number telephone 'X' ' ' '' ''.
ENDIF.
IF NOT fax IS INITIAL.
comm_maintain fax fax_number fax 'X' ' ' '' ''.
ENDIF.
IF NOT teletex IS INITIAL.
comm_maintain ttx ttx_number teletex 'X' ' ' '' ''.
ENDIF.
IF NOT telex IS INITIAL.
comm_maintain tlx tlx_number telex 'X' ' ' '' ''.
ENDIF.
IF NOT email IS INITIAL.
comm_maintain smtp smtp_addr email 'X' ' ' '' ''.
ENDIF.
CALL FUNCTION 'ADDR_MEMORY_SAVE'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'A' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.Oh yes... The internal tables:
DATA: i_adtel like table of adtel with header line.
DATA: i_adfax like table of adfax with header line.
DATA: i_adttx like table of adttx with header line.
DATA: i_adtlx like table of adtlx with header line.
DATA: i_adsmtp like table of adsmtp with header line.
‎2007 Jun 27 10:35 AM
Hi,
try this BAPI_BUPA_ADDRESS_CHANGE
BAPI_BUPA_ADDRESS_ADD
Regards