2008 Feb 06 4:28 AM
Hi....,
I have to display the system date as 06-Feb-2008 in the ALV Report in header part.
Is there any function in ALV which will convert the system date in the required format...?
2008 Feb 06 4:31 AM
Use the following code,
DATA : L_DATE LIKE SY-DATUM,
L_DAT(09), L_MON(03).
L_DATE = SY-DATUM.
CONCATENATE L_DATE+06(02) '-' INTO L_DAT.
SELECT SINGLE LTX FROM T247
INTO L_MON
WHERE MNR = L_DATE+04(02)
AND SPRAS = SY-LANGU.
CONCATENATE L_DAT L_MON '-' INTO L_DAT.
CONCATENATE L_DAT L_DATE+02(02) INTO L_DAT.
WRITE L_DAT.
Reward appropriate points.
Regards,
Mansi.
2008 Feb 06 4:33 AM
Use FM CONVERSION_EXIT_IDATE_OUTPUT
You will get the output for 01/01/2007 as 01JAN2007.
2008 Feb 06 4:34 AM
Hi,
Use the FM : MONTH_NAMES_GET to get the month name.Then use concatenate statement to get in the desired format.
Reward if helpful.
Thanks,
Dishant
2008 Feb 06 4:36 AM
Hi
Use this Logic
DATA: dd(2), mm(2), mmm(3), yyyy(4),
DDMMYYYY TYPE DATUM,
DDMMMYYYY TYPE CHAR11.
MOVE ddmmyyyy+6(2) TO dd.
MOVE ddmmyyyy+4(2) TO mm.
MOVE ddmmyyyy+0(4) TO yyyy.
CASE mm.
WHEN '01'. mmm = 'Jan'.
WHEN '02'. mmm = 'Feb'.
WHEN '03'. mmm = 'Mar'.
WHEN '04'. mmm = 'Apr'.
WHEN '05'. mmm = 'May'.
WHEN '06'. mmm = 'Jun'.
WHEN '07'. mmm = 'Jul'.
WHEN '08'. mmm = 'Aug'.
WHEN '09'. mmm = 'Sep'.
WHEN '10'. mmm = 'Oct'.
WHEN '11'. mmm = 'Nov'.
WHEN '12'. mmm = 'Dec'.
ENDCASE.
CONCATENATE dd mmm yyyy INTO ddmmmyyyy SEPARATED BY space.
Anbu
2008 Feb 06 4:42 AM
use this function module
CONVERSION_EXIT_IDATE_OUTPUT
pass the date in sap internal format ie year month and date
it will give date month year format into a varibale .
pass that to list header of the alv.
2008 Feb 06 4:44 AM