cancel
Showing results for 
Search instead for 
Did you mean: 

Date printing in SAP SCRIPT

Former Member
0 Kudos

hi friends,

I am workin in sap script, here i had used

PERFORM GET_DATE IN PROGRAM ZTEST

USING &EKPO-EBELN&

USING &EKPO-EBELP&

CHANGING &DEL_DATE&

ENDPERFORM

AND in subroutine program i had writen logic to fetch date,

but when I am printing date in my script, it is printed in format yyyymmdd, and i wan it in dd.mm.yyyy

so is there any standard way i can do it?

Accepted Solutions (1)

Accepted Solutions (1)

Mohamed_Mukhtar
Active Contributor
0 Kudos

hi,

CONVERSION_EXIT_PDATE_OUTPUT , use this function module

or

Write the below code in your subroutine

DATA : wa_date(8) ,
       wa_date1(10).
wa_date = sy-datum.
CONCATENATE wa_date+6(2) WA_DATE+4(2) wa_date+0(4) INTO wa_date1 SEPARATED by '.'.

WRITE wa_date1.

Thanks & Regards

Edited by: Always Learner on Dec 11, 2008 10:01 AM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Brijesh,

you can use this to change the format.

/: SET DATE MASK = 'DD,MM,YYYY'

hope it will help you.

regards,

Lokesh

Former Member
0 Kudos

use WIRTE TO

data : date1 type sy-datum,

date2 type sy-datum,

date type sy-datum.

date = sy-datum.

move date to date1.

write date to date2.

write : / date1, date2.