Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vinisefrin
Contributor II
Contributor II

Syntaxe Paramenter as Variable on Function SAP Connector

Hello

I need to run an SAP function using the SAP Connector.

To perform this function, must pass as a parameter a variable value, which comes from an SAP table that is generated by a FOR

I tried to use the $ syntax (Test), but the parameter error: Call Instruction error analysis function.

Does anyone know what the correct syntaxe?

As step value for the parameter?

The following example:

SET vTeste = '0000453822';

[Z_CHANGEDOCUMENT_READ]:

LOAD *;

SQL {

  "function":"Z_CHANGEDOCUMENT_READ ",

  "output":"EDITPOS",

  "parameters":

  [

    { "direction":"out", "name":"ET_CDRED_STR", "optional":false },

    { "direction":"in", "length":4, "name":"ARCHIVE_HANDLE", "optional":true, "type":"INT", "value":"0" },

    { "direction":"in", "length":10, "name":"CHANGENUMBER", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":8, "name":"DATE_OF_CHANGE", "optional":true, "type":"DATE", "value":"00000000" },

    { "direction":"in", "length":8, "name":"DATE_UNTIL", "optional":true, "type":"DATE", "value":"99991231" },

    { "direction":"in", "length":32, "name":"KEYGUID", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":32, "name":"KEYGUID_STR", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":1, "name":"LOCAL_TIME", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":15, "name":"OBJECTCLASS", "optional":false, "type":"CHAR", "value":" " },

    { "direction":"in", "length":90, "name":"OBJECTID", "optional":true, "type":"CHAR", "value":$(vTeste) },

    { "direction":"in", "length":1, "name":"READ_CHANGEDOCU", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":70, "name":"TABLEKEY", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":254, "name":"TABLEKEY254", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":30, "name":"TABLENAME", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"in", "length":6, "name":"TIME_OF_CHANGE", "optional":true, "type":"TIME", "value":"000000" },

    { "direction":"in", "length":6, "name":"TIME_UNTIL", "optional":true, "type":"TIME", "value":"235959" },

    { "direction":"in", "length":6, "name":"TIME_ZONE", "optional":true, "type":"CHAR", "value":"UTC" },

    { "direction":"in", "length":12, "name":"USERNAME", "optional":true, "type":"CHAR", "value":" " },

    { "direction":"tables", "name":"EDITPOS", "optional":false }

  ]

};

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Did you try using ""

"value":"$(vTeste)" },

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

Did you try using ""

"value":"$(vTeste)" },

Anonymous
Not applicable

You could also try the following:

LET vTeste = chr(34)&'0000453822'&chr(34);


The expression above will set variable vTeste to "0000453822".


Hope it helps!