‎2007 May 30 12:11 PM
Hi everybody,
i need a small help reg value conversion.
for suppose:
1>a = 1.234.567,89 in sap format
we need to convert this to a = 1,234,567.89 into flat file.
2>date format is showing as DD.MM.YYYY in sap format
we need to convert this to MM/DD/YYYY
(no matter which user is used to run the program)
please give me reply.
‎2007 May 30 12:15 PM
Hi
Check the User Settings for Currency and Date in SU01 Tcode (defaults) change it and see
Other wise in Program/script you can write
SET COUNTRY 'IN' and it will change the format
Reward points if useful
Regards
Anji
‎2007 May 30 12:19 PM
hi,
Check the User Settings in SU01 Tcode (defaults) change it and see
Other wise in Program you can write
SET COUNTRY 'IN' and it will change the format
n also we can manually by field positioning.
if useful reward some points.
withregards,
suresh babu aluri.
‎2007 May 30 12:19 PM
Hi,
the value is displayed on the user settings, if you want the same to be changed
then use the FM
CONVERSION_EXIT_ALPHA_OUTPUT
Regards
Shiva
‎2007 May 30 12:20 PM
Hi Sunil,
To dispaly the Date form System Format to User Format the FM 'CONVERT_DATE_TO_EXTERNAL' is used.
Consider this code.
REPORT zztest_arun_2.
DATA: e_date(10) type c VALUE '2/2/2006',
i_date(10).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = e_date
IMPORTING
date_internal = i_date
EXCEPTIONS
date_external_is_invalid = 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 : / 'CONVERT_DATE_TO_INTERNAL',
/ 'My Date:' , e_date ,
'Conv Date:', i_date.
skip 2.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = sy-datum
IMPORTING
DATE_EXTERNAL = e_date
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 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 : / 'CONVERT_DATE_TO_EXTERNAL',
/ 'My Date:' , sy-datum,
'Conv Date:', e_date.
Thanks,
reward If Helpful.