‎2006 May 26 10:24 AM
Hi,
i have a date 20060720 stored in a variable of type sy-datum. How do i convert it to format 20.07.2006 while printing it through a sapscript
regards
Nishant
‎2006 May 26 10:25 AM
Hi nishant,
1. no need to convert.
2. In the layout just mention
&mydate&
3. it will automatically print
in dd.mm.yyyy format
(based upon user settings)
regards,
amit m.
‎2006 May 26 10:27 AM
hi Nishanth,
Amit is Right it print in the way you want.
Regards,
Santosh
‎2006 May 26 10:28 AM
‎2006 May 26 10:29 AM
Hi Amit,
...".. In the layout just mention
&mydate&"
Can you please be more specific....
regards
‎2006 May 26 10:33 AM
mydate is just the sample variable name that Amit has mentioned.he just means that u r supposed to put ur variable for date in that place.The default format as i mentioned earlier will be picked up frpm the User's master data.That's all.
‎2006 May 26 10:34 AM
Hi again,
1. In your layout using se71,
u must be writing some other texts,
along with the position, at which,
u want your date to be printed.
2. So, suppose your variable name for date
(in driver program)
is MYDATE,
then
3. just use / type
in layout as,
&MYDATE&
4. Eg.
Todays Date is &MYDATE&
regards,
amit m.
‎2006 May 26 10:26 AM
hi,
data : date(10),
dat type sy-datum.
date = '20060720'.
dat = date.Regards
vijay
‎2006 May 26 10:27 AM
REPORT ZES .
data: v_date type char10.
CALL FUNCTION 'HRGPBS_HESA_DATE_FORMAT'
EXPORTING
p_date = sy-datum
IMPORTING
DATESTRING = v_date.
replace all occurences of '/' in v_date with '.' .
write v_date.
hope it solves your problem. pls close the thread by allocating points if u satisfy with solutions.
‎2006 May 26 10:27 AM
Hi,
Why not use another variable of type character that you would fill with a WRITE statement from the first variable ?
Another possibility would be to use offset - such as mydate+0(2) - on the date variable directly into the SAPscript.
Hope it helps.
Best regards,
Guillaume
‎2006 May 26 10:27 AM
‎2006 May 26 10:29 AM
In any SAP screen check SYSTEM->USER PROFILE->OWN DATA.This will show the user's default parameters.Check the defaults tab.Under the Date Format check the radiobutton DD.MM.YYYY.Dont do anything if it is already checked.This is the format that is taken to print the SY-DATUM value.
Cheers
Nishanth
Message was edited by: Nishanth Bhandar
‎2006 May 26 10:29 AM
Hi
Use the following codes
Report z.......
data v_date(10) type c.
write date to v_date.........
in SAPScript pass v_date and write as v_date..
this will work if ur dateformat is DD.MM.YYYY
Hope it helps
Anirban
‎2006 May 26 10:33 AM
Check this link too.
http://help.sap.com/saphelp_erp2004/helpdata/en/d1/803411454211d189710000e8322d00/frameset.htm
Thanks,
Susmitha
‎2006 May 26 10:39 AM
Hii
use
e.g. /: SET DATE MASK = MM DDDD (Day in full) yyyy
otherwise
&sydatum&