‎2009 Feb 21 12:35 PM
Hi,
In Sap Scriptrs form (SE71) in one of the Element I am doing the validation as below
/: IF &LFA1-NAME1& <> 'RAHUL' AND &LFA1-NAME1& <> 'RAGHU' AND &LFA1-NAME1& <> 'ARUN'
&LFA1-NAME1& <> 'ANIL' AND &LFA1-NAME1& <> 'MOHAN' AND &LFA1-NAME1& <> 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
it is not working, please explain me what would be the problem
Previously the code was as below and it was working
/: IF &LFA1-NAME1& <> 'RAHUL' AND &LFA1-NAME1& <> 'RAGHU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
Edited by: shilpa12 shilpa12 on Feb 21, 2009 1:39 PM
‎2009 Feb 21 12:52 PM
hi...
make your validation at the time when u r selecting the value in the program
for ex.
select <field name > from table <table name > into internal table
where < field name > in ( values u required).
hope this help you
Regards
Ritesh J
‎2009 Feb 21 12:43 PM
There is error in your code....
It should be have = or EQ
/: IF &LFA1-NAME1& = 'RAHUL' AND &LFA1-NAME1& 'RAGHU' AND &LFA1-NAME1& 'ARUN'
&LFA1-NAME1& 'ANIL' AND &LFA1-NAME1& 'MOHAN' AND &LFA1-NAME1& 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
‎2009 Feb 21 12:45 PM
Sorry the code as below
/: IF &LFA1-NAME1& neq 'RAHUL' AND &LFA1-NAME1& neq 'RAGHU' AND &LFA1-NAME1& neq 'ARUN' &LFA1-NAME1& neq 'ANIL' AND &LFA1-NAME1& neq 'MOHAN' AND &LFA1-NAME1& neq 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
it is not working, please explain me what would be the problem
Previously the code was as below and it was working
/: IF &LFA1-NAME1& neq 'RAHUL' AND &LFA1-NAME1& neq 'RAGHU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
Edited by: shilpa12 shilpa12 on Feb 21, 2009 1:46 PM
Edited by: shilpa12 shilpa12 on Feb 21, 2009 1:46 PM
‎2009 Feb 21 12:50 PM
/: IF &LFA1-NAME1& 'RAHUL' AND &LFA1-NAME1& 'RAGHU' AND &LFA1-NAME1& 'ARUN'
/:&LFA1-NAME1& 'ANIL' AND &LFA1-NAME1& 'MOHAN' AND &LFA1-NAME1& 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
" Have u checked ur code by tying /: on the second line
‎2009 Feb 21 12:52 PM
hi...
make your validation at the time when u r selecting the value in the program
for ex.
select <field name > from table <table name > into internal table
where < field name > in ( values u required).
hope this help you
Regards
Ritesh J
‎2009 Feb 21 12:54 PM
‎2009 Feb 22 10:29 AM
‎2009 Feb 21 3:08 PM
Hi,
Then try this way
/: IF &LFA1-NAME1& NEQ 'RAHUL' AND &LFA1-NAME1& NEQ 'RAGHU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
/: IF &LFA1-NAME1& NEQ 'ARUN' AND &LFA1-NAME1& NEQ 'ANIL'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
/: IF&LFA1-NAME1& NEQ 'MOHAN' AND &LFA1-NAME1& NEQ 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
or
/: IF &LFA1-NAME1& NEQ 'RAHUL' AND &LFA1-NAME1& NEQ 'RAGHU' AND
= &LFA1-NAME1& NEQ 'ARUN' AND &LFA1-NAME1& NEQ 'ANIL' AND &LFA1-NAME1& NEQ 'MOHAN'
= AND &LFA1-NAME1& NEQ 'MANU'
/: INCLUDE Z_TEST TEXT ID ST
/: ENDIF
" just check the paragraph format for line feed = or /
Regards
Bala Krishna
Edited by: Bala Krishna on Feb 21, 2009 8:45 PM
‎2009 Feb 21 3:29 PM
i guess 2nd option will work. bcoz in the 1st option, say, value is MANASA, then, all the 3 times the INCLUDE will trigger.....so, i guess, using ELSEIF is better option.
thanq
Edited by: SAP ABAPer on Feb 21, 2009 4:29 PM