Skip to Content
0
Jul 20, 2012 at 02:54 PM

WebService Scenario - SqlCall fails

33 Views

Hi all,

i've got a webservice scenario with a for-each atom inside and a sql-call atom between it, like this:

| vBIU.bfd | <For-Each> | sqlCall | <Join> | Final | End

Follows bellow my input message:

<?xml version="1.0" encoding="utf-8" ?>

<GetNewDocEntry xmlns="http://tempuri.org/" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms">

<query>

<row>

<TableName>OINV</TableName>

<DocEntry>43</DocEntry>

</row>

<row>

<TableName>OINV</TableName>

<DocEntry>42</DocEntry>

</row>

</query>

</GetNewDocEntry>

My query at sqlCall atom:

#SELECT DOCENTRY FROM '$[TableName]' WHERE U_REFCODE = $[DocEntry]

Well, my goal is use the tags TableName and DocEntry as parameters at Sql Call, that's my problem. I've tried using a local variable(Xpath) at sql call atom, with syntax $string(variablename), but returned 'NaN'. So, i've tried with syntax $[elementName], according B1IF's help, that's bring me the value of the first element matched, cool worked!!!....for my suprise only works with non string values!!! If I use between single quotes like my sample above, brings me the correct value but between single quotes and the query fails. Please somebody help me!!!