on 03-27-2019 5:04 AM
Hi experts.
I am working with SAP ByDesign and I got an error as below:
"String literal is expected."
This is my code:
-------------------------------------------------------------------------------------------
line1 : var query = CustomerInvoice.QueryByElements;
line2 : var params = query.CreateSelectionParams();
line3 : var signCode = "I";
line4 : params.Add(query.ReleaseStatusCode, signCode, "EQ", "3");
-------------------------------------------------------------------------------------------
I got an error at line4 "signCode".
So, I tried this
var signCode:LANGUAGEINDEPENDENT_SHORT_Name = "I";
And I still have an error as "String literal is expected.".
Surely, the below syntax is working good.
params.Add(query.ReleaseStatusCode, "I", "EQ", "3");
Is there anyone who can explain what I made wrong and understood wrong way?
Thanks.
Lee
Dear Lee,
As per documentation:
String Literals String expressions begin and end with double or single quote marks, and these string expressions are subject to backslash escape. The scripting engine does not support any escape sequences in the literals. In general, we do not recommend using escape sequences.
Please refer
7.3.3 Syntax of Front-End Scripts
for more details.
ANant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anant.
Thank you for your quick reply.
I am still wondering according to below reason:
--------------------------------------------------------------
var msgStatus = "E";
raise msgDateTermError.Create(msgStatus);
--------------------------------------------------------------
That is working well.
I reckon above code should not be worked according to 7.3.3 Syntax of Front-End Scripts.
Maybe I missed something to understand clearly.
Thank you.
Lee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.