on 04-24-2018 4:40 PM
Hi,
I want to insert values in a DocStore.
This works manually:
INSERT INTO "dummy" values('{
"ID": "9993",
"v": "11",
"o": "B5000000B82",
"m": "0",
"n": "0",
"l": "DE"
}');
But in my code I've to Cast the values into a nvarchar
i.e.
Select
CAST("M" AS NVARCHAR(10)),
CAST("P" AS NVARCHAR(20)),
CAST("I" AS NVARCHAR(15)),
,...
After casting my values look like this in this object
INSERT INTO "dummy" values('{
"ID": "47",
"v": "01",
"o": "FB0000508901DE2C1600282C34CFBD2B",
"m": null,
"n": null,
"l": "de-DE"
}');
If I try it manually (sql console) then it works fine.
I think the problem is that it doesn't work with variables.
Get this error: invalid argument:
Tried Type as a Nvarchar and as a String.
i.e.
DECLARE lv_sM NVARCHAR(10);
DECLARE lv_sV NVARCHAR(20);.....
INSERT INTO "dummy" values('{
"M": lv_sM,
"v": lv_sV,
"U": lv_sU,
"a": lv_sA,
"z": lv_sZ,
"l": lv_sL
}');
Should it work with variables in stored procedures or are there any restrictions?
Thanks
Hello @draschke @pfefferf , I have similar requirement of inserting values inside doc store using amdp method.
Unfortunatly I am getting blelow syntax error in amdp method.
This is how my AMDP method looks like :
Syntax Error- "ZTEST_COLLECTION" is unknown. ABAP objects and DDIC objects must be declared in the USING clause of the method. Local names must start with ":"
Can you guys please help in resolve issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.