2008 Oct 29 9:16 PM
data: C_1300 TYPE GSBER VALUE '1300'.
data: C_1301 TYPE GSBER VALUE '1301'.
IF WA_GL-GSBER ne C_1300 OR WA_GL-GSBER ne C_1301.
IF WA_GL-PARGB ne C_1300 OR WA_GL-PARGB ne C_1301.
2008 Oct 30 5:23 AM
Hi,
The problem lies in the OR that u r using. It is possible that the condition might be working for NE. So you can replace this OR with AND. Your problem will be solved.
Thanks & Regards
data: C_1300 TYPE GSBER VALUE '1300'.
data: C_1301 TYPE GSBER VALUE '1301'.
IF WA_GL-GSBER ne C_1300 OR WA_GL-GSBER ne C_1301.
IF WA_GL-PARGB ne C_1300 OR WA_GL-PARGB ne C_1301.
2008 Oct 29 9:20 PM
What is not working ? Does it always return true or false ?
Check the data type of WA_GL-GSBER if it is character then should work.
regards,
Advait
2008 Oct 29 9:22 PM
WA_GL-GSBER is char 4 & c_1300 is char 4.
when both the field values are 1300, its still going inside if condition....
cheers.
santosh.
2008 Oct 29 9:24 PM
Yes, thats right. It works as the way it has to. You have used OR condition. Please check.
2008 Oct 29 9:27 PM
2008 Oct 29 9:23 PM
Just guessing here what the problem is.
If you chain two NE-conditions with an OR, the combined IF condition will always be true.
Thomas
2008 Oct 30 3:00 AM
Hi,
Try using this....
IF( ( WA_GL-GSBER ne C_1300 ) OR (WA_GL-GSBER ne C_1301) ) .
Thanks & Regards
Ruchi Tiwari
2008 Oct 30 3:09 AM
Hi Santosh,
Let me tell you how to solve this problem
Did you check the data declaration of WA_GL-GSBER and WA_GL-PARGB .
I think this value is not declared as character type. or
try it out in this way
IF ((WA_GL-GSBER ne C_1300 OR WA_GL-GSBER ne C_1301) and (IF WA_GL-PARGB ne C_1300 OR WA_GL-PARGB ne C_1301)).
" <Enter your Logic>
ENDIF.
Thanks,
Chidanand
2008 Oct 30 5:19 AM
hi santosh ,
1)IF WA_GL-GSBER ne C_1300 OR WA_GL-GSBER ne C_1301.
it will go inside the if condition when
either one of the condtion will be true or both .
you are saying that when
WA_GL-GSBER = 1300 .
WA_GL-GSBER = 1300 .
it is going inside the if condtion .....absolutly right ...
because one of the condtion is true at that time (WA_GL-GSBER ne C_1301) .
Thanks and regrds
Priyank dixit
2008 Oct 30 5:23 AM
Hi,
The problem lies in the OR that u r using. It is possible that the condition might be working for NE. So you can replace this OR with AND. Your problem will be solved.
Thanks & Regards
2008 Oct 30 1:34 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |