‎2009 Jan 23 10:47 AM
Hi experts,
I want the date should be in the format 08-Jan-09.
Can u plz help me in this issue...
Regards
Ganesh Reddy
‎2009 Jan 23 11:05 AM
Hi Ganesh,
Try it this way, in the PROGRAM LINES of your SMARTFORMS do the below coding before you display the date:
data:
g_date(12) type c.
call function 'CONVERSION_EXIT_SDATE_OUTPUT'
exporting
input = sy-datum
importing
output = g_date.
replace all occurrences of '.' in g_date with '-'.
replace g_date+7(2) in g_date with space.
translate g_date+4(2) to lower case.
write:/
g_date.With luck,
Pritam.
Edited by: Pritam Ghosh on Jan 23, 2009 12:09 PM
‎2009 Jan 23 10:53 AM
Use FM IDWT_READ_MONTH_TEXT to get Month text and concatenate date month text & year into a variable for display
Hope this helps...
‎2009 Jan 23 10:53 AM
hi,
try this code , in the concatenate give symbol '-' as well.
data : lv_mtext(10) type c.
data : lv_day(2) type c,
lv_mon(2) type c,
lv_year(4) type c.
lv_year = sy-datum+0(4).
lv_mon = sy-datum+4(2).
lv_day = sy-datum+6(2).
select single ltx into lv_mtext
from t247
where SPRAS = sy-langu
and mnr = lv_mon.
data : l_var1(15) type c,
l_var2(15) type c.
concatenate lv_mtext lv_day into l_var1 SEPARATED BY space.
concatenate ',' lv_year into l_var2 SEPARATED BY space.
concatenate l_var1 l_var2 into lv_date.
clear: lv_year,
lv_mon,
lv_day,
l_var1,
l_var2,
lv_mtext.
regards,
Rajesh S.
‎2009 Jan 23 10:54 AM
Hi,
You can display it according by changing user display settings in SU01, or if you want it be always the same, use FM CONVERSION_EXIT_SDATE_OUTPUT Eg: input = 20070201 and output = 01.FEB.2007
Regards
Marcin
‎2009 Jan 23 10:55 AM
use table T247 to get description of month...
use concatenate 'date' ' - ' 'month description' ' - ' 'year' into result.
‎2009 Jan 23 11:05 AM
Hi Ganesh,
Try it this way, in the PROGRAM LINES of your SMARTFORMS do the below coding before you display the date:
data:
g_date(12) type c.
call function 'CONVERSION_EXIT_SDATE_OUTPUT'
exporting
input = sy-datum
importing
output = g_date.
replace all occurrences of '.' in g_date with '-'.
replace g_date+7(2) in g_date with space.
translate g_date+4(2) to lower case.
write:/
g_date.With luck,
Pritam.
Edited by: Pritam Ghosh on Jan 23, 2009 12:09 PM