cancel
Showing results for 
Search instead for 
Did you mean: 

RFC_READ_TABLE Error

Former Member
0 Kudos

Hi all,

I'm pretty sure this is an easy one...

I'm getting RFC Execution Error: One of the field names in the SELECT clause was not recognized while doing a RFC_READ_TABLE call to AUFK, I'm doing the same with another couple of tables and haven't had any problems with those.

I'm defining a inputXML something like this:

<?xml version="1.0" encoding="UTF-8"?><Row>

<item><FIELDNAME>AUFNR</FIELDNAME></item>

</Row>

And mapping it with RFC_TABLE_READ>TABLES>FIELDS>item

I'm setting SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item/TEXT} with something like "WERKS='XX'"

I do this query in SE16 and works just find.

Any help would be really appreciated.. Thx

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Tony,

do you assign your input XML with the Link-Type "ASSIGN XML"? When you select in the Link-Editor your Transaction.inputXML{/Row/item} as source

and SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS/item} as your destination, then select Link-Type "Assign XML".

This should resolve your problem.

Regards

Pedro

Former Member
0 Kudos

Pedro,

I have tried with both assign and append XML and it doesn't work. It's weird since I have made it work for many other tables.

Regards

Tony

Former Member
0 Kudos

This is How the link looks:

- <Assign xsi:type="Assign">

<Name />

<Description />

<To>SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/QUERY_TABLE}</To>

<From>"AUFK"</From>

</Assign>

- <Assign xsi:type="AssignXml">

<Name />

<Description />

<To>SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS/item}</To>

<From>Transaction.OXML{/Row/item}</From>

</Assign>

- <Assign xsi:type="Assign">

<Name />

<Description />

<To>SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item/TEXT}</To>

<From>"WERKS='166'"</From>

</Assign>

This is how the Transaction.OXML looks:

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

- <Row>

- <item>

<FIELDNAME>AUFNR</FIELDNAME>

<OFFSET />

<LENGTH />

<TYPE />

<FIELDTEXT />

</item>

- <item>

<FIELDNAME>WERKS</FIELDNAME>

<OFFSET />

<LENGTH />

<TYPE />

<FIELDTEXT />

</item>

</Row>

Former Member
0 Kudos

Tony,

please try directly on the JCO Actionblock the following:

SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/QUERY_TABLE} = "AUFK"

SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS/item/FIELDNAME} = "AUFNR"

SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item/TEXT} =" WERKS EQ 'XXXX'"

Please remember that the WERKS need 4 digits. Let me know the result.

Regards

Pedro

agentry_src
Active Contributor
0 Kudos

Hi Tony,

You may want to substitute EQ for your equal sign. SAP is somewhat forgiving for using arithmetic operators, but is inconsistent. Try to use EQ, CP, GT, GE, LT, LE, NE where possible. It may not be your problem, but it will likely prevent errors down the road when your table queries get more complex.

Good luck,

Mike

Answers (1)

Answers (1)

Former Member
0 Kudos

SE16's fine but were you able to do this in SE37?

For OPTIONS/Text try a "(WERKS='XX')" instead.

For the fields are you assigning XML or Appending?

Appending is what needs to be done in this case.

If it still doesn't work ,similar issue has been answered numerous times recently and I would suggest a search as well.