‎2008 May 19 3:06 PM
Hi,
The following code is wrong and I want to know if it's possible to correct it without using another variable:
IF var1 < ( sy-datum + 15 ).
var2 = 1.
ELSEIF var1 > ( sy-datum + 15 ) AND var1 < ( sy-datum + 30 ).
var2 = 2.
ENDIF.
The ABAP syntax checking doesn't allow the logical expression with the "+"... Is not possible or simply I don't know how to do that?
I know that I can do something like that:
var3 = sy-datum + 15.
But I don't want that solution if it's possible
‎2008 May 19 7:03 PM
Sometimes ABAP sux.
Inside an if statement, you can use only logical expressions.
Sorry, I expect my answer was "helpful"
‎2008 May 19 7:03 PM
Sometimes ABAP sux.
Inside an if statement, you can use only logical expressions.
Sorry, I expect my answer was "helpful"
‎2008 May 20 8:32 AM
Thanks Sergi,
Yes, your answer is helpful, it confirmed my suspects about that's not possible in abap...
‎2008 May 19 7:05 PM
You have to store Sy-datum + 15 in a different variable.
and then use it in the logical expression.
For older version of SAP this is the only option. I thing the newest version of netweaver allows you to do what you want to do
Edited by: Aparna Shekhar on May 19, 2008 1:05 PM
‎2008 May 20 8:33 AM
Hi Aparna,
I'm programming in a SAP 6.2 Version and it doesn't allow to do that yet.