06-24-2007 2:25 PM
Hi Experts,
Right now i have the date format like : MM.DD.YYYY
and i want it in the output as : DD.MM.YYYY
For currency right now i have the format(USA) 1,49,999.000.
i need to display in the European country format like: 149,999.99
Please suggest me how to do this.
Thanks
Dany
06-24-2007 3:24 PM
You can display output format as you expected
Just go SU01 Transaction -> enter your user id -> Click on change button -> see the tab called default -> here you can change what ever you want.
if you do not want change the user profile then use below code
Date logic :
data g_date like sy-datum.
g_date = sy-datum.
CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.
write:\ g_date.
Edit_mask is To apply the report output formatting options same as in the WRITE statement in report writing.
wa_fcat-edit_mask = '__:__:__'.
wa_fcat-edit_mask = 'DD/MM/YYYY'.
Cuurency format :
data:
lv_price TYPE bseg-dmbtr VALUE '123.45-',
lv_price2 TYPE bseg-dmbtr VALUE '123.45'.
WRITE:
/ lv_price USING EDIT MASK 'RRV__________.__',
/ lv_price2 USING EDIT MASK 'RRV__________.__'.
Thanks
Seshu
06-24-2007 3:24 PM
You can display output format as you expected
Just go SU01 Transaction -> enter your user id -> Click on change button -> see the tab called default -> here you can change what ever you want.
if you do not want change the user profile then use below code
Date logic :
data g_date like sy-datum.
g_date = sy-datum.
CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.
write:\ g_date.
Edit_mask is To apply the report output formatting options same as in the WRITE statement in report writing.
wa_fcat-edit_mask = '__:__:__'.
wa_fcat-edit_mask = 'DD/MM/YYYY'.
Cuurency format :
data:
lv_price TYPE bseg-dmbtr VALUE '123.45-',
lv_price2 TYPE bseg-dmbtr VALUE '123.45'.
WRITE:
/ lv_price USING EDIT MASK 'RRV__________.__',
/ lv_price2 USING EDIT MASK 'RRV__________.__'.
Thanks
Seshu
06-25-2007 4:26 AM
Hi,
Thanks for the reply.
Well i dont have authorization to SU01, please tell me If i use the code below i need not make any config changes/settings irrespective of the user logon.
Date logic :
data g_date like sy-datum.
g_date = sy-datum.
CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.
write:\ g_date.
Do i need to use edit mask now..as i want to display it in a script layout?
Please reply
Thanks
06-25-2007 4:45 AM
Hi Dan,
If you do not have auth ,then use program logic to perform
Use below logic:
Date logic :
data g_date like sy-datum.
g_date = sy-datum.
CONCATENATE g_date6(2) '.' g_date4(2) '.' g_date+0(4) INTO g_date.
write:\ g_date.
Use below logic to get Currency format
Edit mask
Thanks
Seshu
06-24-2007 3:35 PM
Hi
For date use WRITE DATE DD/MM/YYYY.
For currency try the below FM.
CONVERT_TO_FOREIGN_CURRENCY
Cheers,
Hakim
06-24-2007 4:04 PM
HI
Use the following code for date conversion.
data: v_date(8) type c.
call function 'CONVERT_DATE_TO_INTERNAL'
exporting
date_external = '12.12.2006'
importing
date_internal = v_date.
write:/ v_date.
or else.
Look at the Function modules CONVERT_DATE_TO_INTERNAL or CONVERT_DATE_TO_EXTERNAL.
If the aboe are not useful, then you need to do it manually. just take date, Month and year in 3 fields and concatenate the same into another date field with the correct format.
For currency
Please check these FM.
CONVERT_TO_LOCAL_CURRENCY
ISB_CONVERT_TO_LOCAL_CURRENCY
Reward me if its useful.
Regards
Ravi
06-24-2007 9:32 PM
Hi
For date
Write sy-datum DD/MM/YYYY.
This will write the as DD.MM.YYYY if your personal settings for date separator is DOT.
write v_value CURRENCY <country>. "You can get the country code from table TCURX.
Regards
Navneet
06-25-2007 4:32 AM
for changing the cuurency format only you have to go SU01 tcode but for date purpose you can use...
data : idate(10) value '12.31.2006',
vdate(10).
concatenate idate3(2) idate0(2) idate+6(4) into vdate separated by '.'.
for currency format you can use
set country 'DE'. or your country name it may work...
regards
shiba dutta
06-25-2007 4:57 AM
Hi Dan,
For currency format display...
GoTo SU01 User settings -> check for the currency formats
Thanks.
Hari krishna
06-25-2007 5:22 AM
Hi Dan,
Use the Function Module : CONVERT_TO_FOREIGN_CURRENCY for currency conversion.
Use Statement: WRTIE with extension of Date format in DD.MM.YYYY.
This will certainly help.