on 09-13-2010 6:40 PM
In the script text editor if I have to give Less than equal to sep 22nd 2010,
should I follow like
IF &EKKO-BEDAT& LE 09/22/2010 or
IF &EKKO-BEDAT& LE 22/09/2010 or
IF &EKKO-BEDAT& LE 22092010 or
IF &EKKO-BEDAT& LE 09222010 or
IF &EKKO-BEDAT& LE '22.09.2010'.
In the table it is getting stored as 09/22/2010 ie sep 10th 2010.In Script debugging it is showing as 22.09.2010.
Thanks,
K.Kiran.
There may be a work around for this
Why cant you place these conditions in your program and check it here lke in your program
IF EKKO-BEDAT LE 09/22/2010 or
flag = 'A'.
endif.
IF EKKO-BEDAT LE 22/09/2010 or
flag = 'B'.
endif.
in form check it like
if &flag& = 'A'....
in your program before harcoding the date , get the user settings date format and convert it before comparing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what about declaring a dummy date variable lobally in driver program? you could fill it somewhere there and then in form just do following:
/: IF &EKKO-BEDAT& LE &DUMMY_DATE&
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
You could try declaring a form in a subroutine pool to accept the EKKO-BEDAT field and to perform your test there, setting a flag and returning that back to the SAPScript for testing.
Something like:
(SAPScript)
/: DEFINE &FLAG& = ' '
/: PERFORM DATE_TEST IN PROGRAM Z_SUBROUTINE_POOL
/: USING &EKKO-BEDAT&
/: CHANGING &FLAG&
/: ENDPERFORM
/: IF &FLAG& = 'X'
....
/: ELSE
....
/: ENDIF
ABAP (in program/subroutine pool Z_SUBROUTINE_POOL)
FORM DATE_TEST TABLES T_IN STRUCTURE ITCSY
T_OUT STRUCTURE ITCSY.
DATA: L_BEDAT TYPE D.
LOOP AT T_IN.
IF T_IN-NAME = 'ÉKKO-BEDAT'.
L_BEDAT = T_IN-VALUE.
ENDIF
ENDLOOP.
* Assumes that EKKO-BEDAT is passed in YYYYMMDD format
LOOP AT T_OUT.
IF T_OUT-NAME = 'FLAG'.
IF L_BEDAT LE '20100922'.
T_OUT-VALUE = 'X'.
ELSE.
T_OUT-VALUE = SPACE.
ENDIF.
ENDIF.
MODIFY T_OUT.
ENDLOOP.
ENDFORM.
Apologies if there are any syntax errors here!
Regards, Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kiran,
Try like this
IF F &EKKO-BEDAT& LE '20100922' i.e, YYYYMMDD
Regards,
Jagadeesh T.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.