10-28-2015 3:45 PM
HI all,
I am facing issue with update adrc , adr6 table .
I have some data in z segment of vendor master in inbound idoc. i need to update this data into adrc , adr6 and tiban table .
i have seen threads for update vendor master data , ADDR_MAINTAIN_COMPLETE., ADDR_UPDATE, BAPI_BUPA_ADDRESS_CHANGE., but these are not satisfactory .
Any one can help with any FM which can do the work for me?
Regards,
Karan
10-29-2015 3:31 PM
Thanks Michael and raymond for response .
I have managed to update many fields with FM ADDR_UPDATE ,but still did not found the way to update EMail address which resides in ADR6 table .
Can any one help in that?
Regards,
Karan
10-28-2015 3:50 PM
You coud also look at method VMD_EI_API=>MAINTAIN_BAPI (there are now some samples and threads on it in scn)
Regards,
Raymond
10-28-2015 4:10 PM
10-29-2015 3:31 PM
Thanks Michael and raymond for response .
I have managed to update many fields with FM ADDR_UPDATE ,but still did not found the way to update EMail address which resides in ADR6 table .
Can any one help in that?
Regards,
Karan
10-29-2015 5:21 PM
Did you try ADDR_COMM_MAINTAIN as it is being used in standard transaction like XK01/02 FK01/02.
Sample code which is working in my system.
DATA : itab TYPE STANDARD TABLE OF adsmtp.
DATA : error_table TYPE STANDARD TABLE OF addr_error.
DATA : wa_itab TYPE adsmtp.
DATA : g_address_handle TYPE ad_handle.
wa_itab-consnumber = '001'. "Sequencial number 3 char
wa_itab-smtp_addr = 'test@gmail.com'.
wa_itab-smtp_srch = wa_itab-smtp_addr(20).
TRANSLATE wa_itab-smtp_srch TO UPPER CASE.
wa_itab-flgdefault = 'X'. "abap_true.
wa_itab-updateflag = 'U'. "I'nsert, 'U'pdate, 'D'elete
wa_itab-home_flag = 'X'.
APPEND wa_itab TO itab.
CALL FUNCTION 'ADDR_COMM_MAINTAIN'
EXPORTING
address_handle = g_address_handle
address_number = '0000047056'
table_type = 'ADSMTP'
iv_time_dependence = 'X' "abap_true'
TABLES
comm_table = itab
error_table = error_table
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
LEAVE PROGRAM.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'ADDR_MEMORY_SAVE'
* EXPORTING
* EXECUTE_IN_UPDATE_TASK = ' ' "You may want set this flag as 'X' if you are calling "from BADI/UserExit or Idoc even based on reqmnt
EXCEPTIONS
ADDRESS_NUMBER_MISSING = 1
PERSON_NUMBER_MISSING = 2
INTERNAL_ERROR = 3
DATABASE_ERROR = 4
REFERENCE_MISSING = 5
OTHERS = 6
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
10-30-2015 11:25 AM
HI rudra ,
Thank for your reply .
I think it should work , but when i implemented this FM in my exit , i got field consnumber in error table . not able to find use of this.
DO you have any idea?
Regards,
Karan
10-30-2015 11:38 AM
It is just a 3 digit sequential number. Check table ADR6.
So when you want to update/Delete ( Flag "U"/"D" ) you have pass that correctly(Should be existing in ADR6) in the comm_table. When you use Insert ( "I") it should not be existing in ADR6.
11-16-2015 6:56 AM