Question

I'm using .Net Sap Connector 3 and function "RFC_READ_TABLE" to read PA0001 table data.

Where condition I'm using seem stupid, but it's only to explain that my problem is the length of this expression.

If I use:

MANDT = '100' OR MANDT = '100' OR MANDT = '100' OR MANDT = '100'

it work. But if I use

MANDT = '100' OR MANDT = '100' OR MANDT = '100' OR MANDT = '100' OR MANDT = '100'

I have this exception: "A condition specified dynamically has an unexpected format".

I tried to break the string with the character ~ and specify this character as a separator

function.SetValue ("DELIMITER", "~")

but the problem persists

Help me!

No correct solution

OTHER TIPS

Adding OP's comment as an answer to help future visitors:

OPTIONS line has a 72 char limitation, so if one has a long condition the solution would be to split it into several lines:

inputTableOptions = function.GetTable("OPTIONS"); 
string[] aWhere = sWhereExpression.Split("~".ToCharArray()); foreach (string cond in aWhere) { inputTableOptions.Append(); 
inputTableOptions.SetValue("TEXT", cond);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top