‎2016 Jul 14 3:17 PM
Hi All,
I am working on a script and in the text element i am using an if statement which spans over 2 lines as below:
/: IF &lv_var1& EQ 'a' OR &lv_var2& EQ 'b' OR
&lv_var3& EQ 'c' OR &lv_var4& EQ 'd'.
On syntax check, I am getting the error : Parameter expected in between the 2 lines.
So, what could be the possible reason for the above error.
Regards,
Tanushree
‎2016 Jul 14 3:43 PM
Hi Tanushree,
You should write in both lines in the sapscript '/: ' like this:
/: IF &lv_var1& EQ 'a' OR &lv_var2& EQ 'b' OR
/: &lv_var3& EQ 'c' OR &lv_var4& EQ 'd'.
Try this
‎2016 Jul 14 4:49 PM
‎2016 Jul 14 6:33 PM
Hi
Probably you need to write the whole IF condition in only one command line:
/: IF &lv_var1& EQ 'a' OR &lv_var2& EQ 'b' OR &lv_var3& EQ 'c' ....
Max
‎2016 Jul 14 6:33 PM
Hi Tanushree,
Have you tried in the same line using left/right page (click right mouse button)?
Or try, for example, with a paragraph Z1, we use the '=' in the second line:
Z1 &var1&,,&var2&,,...
= &var3&
But don´t know if it works with a command line...
Teresa
‎2016 Jul 14 6:58 PM
As said in the documentation: "The entire control statement must fit into one line; spreading it over subsequent lines is not allowed"
‎2016 Jul 15 2:12 AM
Use Graphical Editor (Setting->Form Painter->(Sapscript Tab)->Tick Graphical PC Editor.
Inside the window, Click Insert Command in Tool Bar then insert your condition as 1 line in Command Option.