2007 Aug 23 9:15 PM
hello guys,
in a smartform i want to have a date ina format <date nameof the month and year>
for example:
25 august 2008
how can i do that...plz help me
regds
hello guys,
in a smartform i want to have a date ina format <date nameof the month and year>
for example:
25 august 2008
how can i do that...plz help me
regds
2007 Aug 23 9:22 PM
Below info is from "SAP Smart Forms (BC-SRV-SCR) material"
"&SFSY-DATE& Displays the date. You determine the display format in the user master record."
2007 Aug 23 9:27 PM
when u say &sfsy-datum& it displays in 24.08.2007....but i need that month saying <august> instead of number...
Any helps plz......
rgds
2007 Aug 23 9:29 PM
If your problem is getting the names of the months you can use MONTH_NAMES_GET (or CASE statement)
2007 Aug 23 9:31 PM
Hi,
do this...
in the text element give.
set date mask '__/___/____'
v_date
2007 Aug 23 9:41 PM
Hey use this it is working for me..
/: SET DATE MASK = 'DD.MMM.YYYY'
&SY-DATUM&
<a href="http://www.howforge.com/date-mask-template-in-command-set-date-mask-for-sapscript">Date Mask</a>
2007 Aug 23 10:03 PM
2007 Aug 23 9:32 PM
Hi Sudheer,
You can write this in code, where ever you want just write the code in that window,
use FM MONTH_NAMES_GET to get the month name,just write the simple code, you will get the Date format as you want
Regards,
KK
2007 Aug 23 10:24 PM
Hi,
In your smart form, before you display date, create Program Lines & write following code in it. I hope it will solve your problem. For e.g. lets consider v_datum contains the date before conversion and v_date contains the date after conversion.
DATA : x_t247 TYPE t247,
v_datum TYPE sy-datum VALUE '20070823',
v_date TYPE string,
v_month TYPE fcktx.
SELECT SINGLE ktx
FROM t247
INTO v_month
WHERE spras = sy-langu
AND mnr = v_datum+4(2).
CONCATENATE sy-datum+6(2) v_month sy-datum+0(4) INTO v_date.
Here, if v_datum has a value '20070823', v_date will contain '23 Aug 2007'.
Reward points if the answer is helpful.
Regards,
Mukul
2007 Aug 24 9:00 AM
hI mk,
its giving the error saying V_date is not defined and V_date is not declared in data statement
2007 Aug 24 9:03 AM
declare v_date in global data tab of smartform
and in import and export parameters also use v_date
reward points if it helps
Message was edited by:
abapuser
2007 Aug 24 11:48 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |