‎2008 Oct 15 3:15 PM
Hi all,
I need to check a date in a sapscript in this way:
/E HEADER_1
/: IF &MXABK-TDATE& = '20060601'
/: <code A>
/: ELSE.
/: <code B>
/: ENDIF.but it doesn't work.
(I hope I don't have to use a form routine for a check so simple).
Could you help me?
I thank you in advance.
Best regards
‎2008 Oct 15 3:19 PM
Hi Paolo,
Try to Use the below code in script.
/E HEADER_1
/: set edit mask : 'YYYYMMDD'.
/: IF &MXABK-TDATE& = '20060601'
/: <code A>
/: ELSE.
/: <code B>
/: ENDIF.
‎2008 Oct 15 3:18 PM
Just write in the sapscript the value of MXABK-TDATE, this will show you the format it uses when doing the compare.Most probably you'll need to check it against '06/01/2006'
‎2008 Oct 15 3:19 PM
Hi Paolo,
Try to Use the below code in script.
/E HEADER_1
/: set edit mask : 'YYYYMMDD'.
/: IF &MXABK-TDATE& = '20060601'
/: <code A>
/: ELSE.
/: <code B>
/: ENDIF.
‎2008 Oct 15 3:21 PM
I suspect the date format that is getting passed from the program.
In SE71 transaction please activate debugger (Menu utilities ->Activate debugger) and debug the program.