05-19-2014 12:02 PM
Hi experts,
I am trying to update the REMARK field of the table ADRT using Function module ADDR_REMARKS_MAINTAIN.
After this Function module I am calling the ADDR_MEMORY_SAVE FM also. But the data is still not reflecting in the Database.
For your reference:-
The ADRT table contents:-
The values used while calling the FM are:-
COMM_REMARKS table:-
What could be the problem? Please advice.
Thanks.
05-19-2014 12:13 PM
Hi Arshdeep,
please debug your function module and see, what are you getting in RETURN parameter in ADDR_REMARKS_MAINTAIN
05-19-2014 12:24 PM
Hi Sanjeev - Thanks for your response!
The RETURN parameter is empty, please see below.
05-19-2014 12:28 PM
Hi ,
did you passed the address number with leading zero, please check it once. See what is in comm_remarks_out
05-19-2014 12:28 PM
05-19-2014 1:30 PM
Hi Sanjeev,
Comm_remarks_out contains the exact same information as COMM_REMARKS.
(as shown in the screenshot above)
Thanks.
05-19-2014 1:32 PM
Hi Sander,
Thanks for your response!
I have provided a screenshot above that shows COMM_REMARKS contents.
COMM_REMARKS_OUT is empty initially.
After I run the Function module, COMM_REMARKS_OUT contains the same information as of COMM_REMARKS.
Thanks.
05-19-2014 1:33 PM
And yes, I passed the ADRNR with leading zeros. The system automatically truncates them.
05-19-2014 1:34 PM
05-19-2014 2:49 PM
And what do they contain when the function module is executed?
BTW, is the address valid on 01.01.0001?
That's a very old address
05-19-2014 12:47 PM
05-19-2014 1:44 PM
Hi Raymond,
Thanks for your response!
Will do try the same.
But why these FMs are not working? any idea on this?
Thanks a lot!
05-19-2014 2:58 PM
Those not released FM are not documented for us customers to use, so beware upgrade projects.
You could conceivably perform some where-used search on those to find how standard reports call them (e.g. report RJGADR20, FM ADDR_MAINTAIN_COMPLETE) but using an "official" tool would be far less risky.
Regards,
Raymond
07-22-2016 8:51 AM
Hi Arashdeep,
I have the same requirement , to update this field REMARK for customer using ABAP code.
Can you please help me ?
How did you get success ?
Thank you !
Harish Bhatt
07-27-2016 4:51 PM
Hello,
I got success to update REMARK field in ADRT table.
We can do following steps :
Get Sequence number:
CALL FUNCTION 'ADDR_SELECT_ADRCOMC_SINGLE'
EXPORTING
addrnumber = p_adrnr "Address Number
TABLES
et_adrcomc = lt_adrcomc.
IF sy-subrc EQ 0.
SORT lt_adrcomc BY comm_type.
READ TABLE lt_adrcomc
INTO ls_adrcomc
WITH KEY comm_type = 'INT'
BINARY SEARCH.
IF sy-subrc EQ 0.
ls_commtab-consnumber = ls_adrcomc-high_value + 1. "Sequence Number
ENDIF.
ENDIF.
ls_commtab-smtp_addr = p_email. "Email Address
ls_commtab-remark = p_remark. "Remark to add
ls_commtab-updateflag = 'I'. "Flag for insert
APPEND ls_commtab TO lt_commtab.
Update Remark in XD02 (ADRT table)
CALL FUNCTION 'ADDR_COMM_MAINTAIN'
EXPORTING
address_number = p_adrnr "Address Number
date_from = '00010101'
language = sy-langu
table_type = 'ADSMTP' "Constant
check_address = 'X'
iv_time_dependence = 'X'
iv_consider_adrcomc_for_insert = 'X'
IMPORTING
returncode = lv_return
TABLES
comm_table = lt_commtab.
IF sy-subrc = 0.
IF p_test IS INITIAL.
CALL FUNCTION 'ADDR_MEMORY_SAVE'.
ENDIF.
IF sy-subrc = 0.
WRITE : / 'Table ADRT is updated successfully for address :',
p_adrnr.
ENDIF.
ELSE.
WRITE : / 'Error- Table ADRT is not updated for address : ',
p_adrnr.
ENDIF.
Once data is updated in remark field of ADRT table, it will be reflected in XD02 also.
Please let me know if I am not clear enough.
Thank you !
Harish Bhatt
07-27-2016 4:57 PM
This FM ADDR_REMARKS_MAINTAIN is not designed for insert remark field in ADRT table.
10-03-2016 11:24 PM
Instead 'U' in updateflag field, put 'X'.
after call ' ADDR_MEMORY_SAVE'
' ADDR_MEMORY_CLEAR'
It works
Regards