Tuesday, October 26, 2010

How can I format the date being displayed in the SAP Script?

The date fields in SAP Scripts can be formatted using the SET DATE MASK control command.
Eg.:
/: SET DATE MASK = 'MMMM DD, YY'
This displays the date as : September 26, 07

The following are the codes that can be used in the date mask:

YY

Year (2 digits)

YYYY

Year (4 Digits)

MM

Month (2 Digits)

MMM

Month Name (Abbreviated)

MMMM

Month Name (Full)

DD

Day as two digits

DDD

Day name (Abbreviated)

DDDD

Day name


Using the SET DATE MASK causes the subsequent date fields to be displayed using the same formatting. To return to the default formatting use the following command:
/: SET DATE MASK = ' '

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites