‎2008 Apr 02 4:17 PM
What is the function module name which can take country code as input and delivers date format according to the given input(coutry code)?
ex : for EU---- dd/mm/yyyy
for FE----- mm/dd/yyyy
‎2008 Apr 02 4:23 PM
Hi,
This information is held in table T005X, field DATFM. Take a look at the domain for this field to see the meaning of each value.
Regards,
Nick
‎2008 Apr 03 7:14 AM
‎2008 Apr 03 8:22 AM
Hi,
After you've read the table to determine the country's format you'll need a case statement based on the format number. In here you then reformat your date statement, either moving in elements of the date from one field to another or using WRITE ... USING EDIT MASK.
Regards,
Nick
‎2008 Apr 02 4:26 PM
Hi,
You want C14N_COUNTRY_DATE_DECF_GET
which returns a value 1 - 6, with meanings as follows.
1 DD.MM.YYYY
2 MM/DD/YYYY
3 MM-DD-YYYY
4 YYYY.MM.DD
5 YYYY/MM/DD
6 YYYY-MM-DD
John
‎2008 Apr 03 7:14 AM
Please help me that how to work with that Output values?
it is urgent in my project?
‎2008 Apr 03 8:42 AM
Hi,
Use the below code.
data: v_datfm like USR01-DATFM,
v_text like DD07V-DDTEXT,
v_value like DD07V-DOMVALUE_L.
CALL FUNCTION 'C14N_COUNTRY_DATE_DECF_GET'
EXPORTING
I_COUNTRY = 'IN'
IMPORTING
E_DATE_FORM = v_datfm
EXCEPTIONS
COUNTRY_NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
move v_datfm to v_value.
CALL FUNCTION 'C_DIC_DOMAIN_VALUE_TEXT_READ'
EXPORTING
NAME = 'XUDATFM'
SPRAS = SY-LANGU
VALUE = v_value
IMPORTING
TEXT = v_TEXT
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ v_text.
‎2008 Apr 03 8:46 AM
Hi,
Use the below code.
parameters: p_land like T005X-LAND.
data: v_datfm like USR01-DATFM,
v_text like DD07V-DDTEXT,
v_value like DD07V-DOMVALUE_L.
CALL FUNCTION 'C14N_COUNTRY_DATE_DECF_GET'
EXPORTING
I_COUNTRY = p_land
IMPORTING
E_DATE_FORM = v_datfm
EXCEPTIONS
COUNTRY_NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
move v_datfm to v_value.
CALL FUNCTION 'C_DIC_DOMAIN_VALUE_TEXT_READ'
EXPORTING
NAME = 'XUDATFM'
SPRAS = SY-LANGU
VALUE = v_value
IMPORTING
TEXT = v_TEXT
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ v_text.