‎2013 Oct 15 4:54 PM
Hello experts,
I have a problem regarding the usage of the function module ADDR_GET. After execution of this FM, I get the subrc 0 but an error. In the error_table I get an entry with MSG_ID = AM, MSG_TYPE = E, MSG_NUMBER = 873. The FM 'MESSAGE_PREPARE' gives me the text "Date ' ' is not valid".
I already checked the date which i input into the FM, this is correct. The DATE_FROM in the database table ADRC is filled in this entry with 01.01.0001. Could this be the problem, as low_date is usually 01.01.1800?
Thanks in advance for your help
Alex
‎2013 Oct 16 8:42 AM
Hi Alex,
Pass the ADDRESS_SELECTION-DATE = '00010101',You will get the data.If you use any other date other than this you will get the same problem. Strange but check the code line 139 of pgm LSZA0F21.
Or else, just dont pass the date while calling the FM, you will get the values in SADR and date details in versions table.
Thanks.
‎2013 Oct 15 5:02 PM
‎2013 Oct 16 7:53 AM
‎2013 Oct 15 5:03 PM
I tried passing a valid address number with leading zeroes, and date in YYYYMMDD format. (00010101 in your case), and call was successful.
‎2013 Oct 16 7:59 AM
‎2013 Oct 16 9:02 AM
The FM documentation says that address date field is not supported. This is the reason why call works for blank date or 00010101 date, and not for sy-datum.
The parameter DATE is for time dependency. It is not currently supported. The parameter does not show a validity date for which the address is to be read. If the parameter is filled with a value other than '00000000' (initial value for date field) or '00010101' (currently the only possible database key), an error is returned in ERROR_TABLE (return code 'E').
Here is a sample code.
DATA v_address_selection TYPE addr1_sel.
DATA v_sadr TYPE sadr.
v_address_selection-addrnumber = '0000098765'.
*v_address_selection-date = sy-datum.
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = v_address_selection
IMPORTING
sadr = v_sadr
EXCEPTIONS
OTHERS = 1.
‎2013 Oct 16 11:16 AM
‎2013 Oct 15 5:04 PM
Please share the format in which you are passing the date. It should be in "YYYYMMDD" format.
Regards
‎2013 Oct 16 7:54 AM
I am passing SY-DATUM, so the format of the date is correct.
‎2013 Oct 16 8:01 AM
Could please paste the screen shot of data being passed to FM plus the data in database table which you are expecting.
‎2013 Oct 16 8:42 AM
Hi Alex,
Pass the ADDRESS_SELECTION-DATE = '00010101',You will get the data.If you use any other date other than this you will get the same problem. Strange but check the code line 139 of pgm LSZA0F21.
Or else, just dont pass the date while calling the FM, you will get the values in SADR and date details in versions table.
Thanks.
‎2013 Oct 16 11:15 AM