cancel
Showing results for 
Search instead for 
Did you mean: 

Xpath issue after upgrade from 11.5 to 12.2

Former Member
0 Kudos

I have a query that functions correctly on my old xMII 11.5 box but does not function on 12.2. I am making a JCO function to call data from RFC_Read_table. I am attempting to put additional parameters into the Options field, there was a limitation in 11.5 of 70 characters on this, not sure if this is still an issue. In order to get around this a second field was defined, so my query looks a bit like this (my copy and paste function is broken it seems)

JCO Function

Jcofunction.Request(/RFC_READ_TABLE/TABLES/OPTIONS/item[1]/TEXT} = "PARAMETER1 ="" " & Repeater_1.Output(/LOT) & """"

Jcofunction.Request(/RFC_READ_TABLE/TABLES/OPTIONS/item[#2#]/TEXT} = "PARAMETER2 = XYZ"

I recieve the following error back

[ERROR] Uncaught exception from Jcofunction, No nodes found in variable 'Jcofunction.Request' and xpath: "/RFC_READ_TABLE/TABLES/OPTIONS/item[#2#]/TEXT XML Was .....

Anybody have any ideas on what could be causing this ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There can be two issues.

1. XML is not as per the Xpath

2. The RFC is getting issue and not creating output. Probably you get the trace at st22.

3. set the transaction attribute LegacyProcessingMode = true.

Regards,

Creativeweblogo

Answers (5)

Answers (5)

swaroop_anasane
Active Contributor
0 Kudos

Hi alister,

Are you dealing with some kind of migration? If yes you might want to check on prefixes that mii ammends to the folders/projects that already exists on target system.

Thanks,

Swaroop

Former Member
0 Kudos

Hi Thanks for the replies,

Yes it is an upgrade, I checked the paths versus the old version, I couldn't see any change that should cause an issue. I have also built a stand alone transaction with just the block at issue and the required blocks to make the connection, I get the same error.

[#2#] works in version 11.5, I have tried removing the hashes to resolve this, but it does not help the error.

A server restart doesn't seem to change the outcome of the error either.

It honestly seems like something has changed regarding sending the second options field in version 12. I have also upgraded from 12.2 sp2 to SP5 but it has not resolved the issue.

Here is a full error I'm getting back

[INFO] Started Execution: '03/18/2014 10:32:10'

[ERROR] [Func_GetChar] Link ('Func_GetChar.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item[2]/TEXT}' [Assign] from ""and VAEDATUM >= '20110122'"") execution threw an exception. Exception: [No nodes found in variable 'Func_GetChar.Request' and xpath: "/RFC_READ_TABLE/TABLES/OPTIONS/item[2]/TEXT" XML was:<?xml version="1.0" encoding="UTF-8"?><RFC_READ_TABLE><INPUT><DELIMITER> </DELIMITER><NO_DATA> </NO_DATA><QUERY_TABLE/><ROWCOUNT>0</ROWCOUNT><ROWSKIPS>0</ROWSKIPS></INPUT><TABLES><DATA><item><WA/></item></DATA><FIELDS><item><FIELDNAME/><OFFSET/><LENGTH/><TYPE/><FIELDTEXT/></item></FIELDS><OPTIONS><item><TEXT>PRUEFLOS = '004123456' and VWERKS LIKE 'AB01'</TEXT></item></OPTIONS></TABLES></RFC_READ_TABLE>]

[WARN] [Func_GetChar] Rolling back "Func_GetChar.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item[1]/TEXT}" to [[xml:<?xml version="1.0" encoding="UTF-8"?><RFC_READ_TABLE>

<INPUT>

<DELIMITER> </DELIMITER>

<NO_DATA> </NO_DATA>

<QUERY_TABLE/>

<ROWCOUNT>0</ROWCOUNT>

<ROWSKIPS>0</ROWSKIPS>

</INPUT>

<TABLES>

<DATA>

<item>

<WA/>

</item>

</DATA>

<FIELDS>

<item>

<FIELDNAME/>

<OFFSET/>

<LENGTH/>

<TYPE/>

<FIELDTEXT/>

</item>

</FIELDS>

<OPTIONS>

<item>

<TEXT>PRUEFLOS = '004123456' and VWERKS LIKE 'AB01’</TEXT>

</item>

</OPTIONS>

</TABLES>

</RFC_READ_TABLE>]]

[ERROR] [Func_GetChar] Action: Runtime threw an exception. Exception: [No nodes found in variable 'Func_GetChar.Request' and xpath: "/RFC_READ_TABLE/TABLES/OPTIONS/item[2]/TEXT" XML was:<?xml version="1.0" encoding="UTF-8"?><RFC_READ_TABLE><INPUT><DELIMITER> </DELIMITER><NO_DATA> </NO_DATA><QUERY_TABLE/><ROWCOUNT>0</ROWCOUNT><ROWSKIPS>0</ROWSKIPS></INPUT><TABLES><DATA><item><WA/></item></DATA><FIELDS><item><FIELDNAME/><OFFSET/><LENGTH/><TYPE/><FIELDTEXT/></item></FIELDS><OPTIONS><item><TEXT>PRUEFLOS = '004123456' and VWERKS LIKE 'AB01'</TEXT></item></OPTIONS></TABLES></RFC_READ_TABLE>]

[ERROR] [Write_File_0]WriteFile error:

[WARN] [Write_File_0] Skipping execution of output links due to action failure.

[INFO] Transaction Completed '03/18/2014 10:32:10'

[INFO] Statistics [Load = 11 ms msec, Parse = 11 ms, Execution = 63 ms, Total = 105 ms]

saumya_govil
Active Contributor
0 Kudos

Hi Alister,

Not sure if I completely understand your question, but can partly answer it. The 70 char limit in the Options field that you mentioned in the original question can be overcome by sending data in a form of a table instead of a simple text. For e.g. instead of sending options like a text in the RFC_READ_TABLE.Request{/RFC_READ_TABLE/TABLES/OPTIONS/item/TEXT}, create a table like:

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

<item>

  <TEXT>MATNR = 'XXX'</TEXT>

</item>

<item>

  <TEXT>WERKS = 'YYY'</TEXT>

</item>

<item>

  <TEXT>CHARG= 'ZZZ'</TEXT>

</item>

</OPTIONS>

Regarding the XPATH issue, I see in MII 12.2 that we need to compare dynamic values in XPath using '#'. So a comparision like:

Local.Data_XML{//Data[Field1='#Local.Field2#']}

Hope this helps!

Regards,

Saumya Govil

Former Member
0 Kudos

Hi Alister,

I guess you are getting the error due to "[#2#]". is that link really dynamic? if no then you have to pass it as you have passed it in the above like "[2]"

Hope it will help you.

Regards,

Suman

0 Kudos

Did you get the solution to this problem ? We are facing the same problem but system restart seems to be resolving it.

Former Member
0 Kudos

Thank you for the help, unfortunately Generating the request/response documents made no difference.

Rajib, LegacyProcessingMode = true is set, but it also made no difference I'm afraid.

Looking at the problem logically, I can run the exact same query in MII 11.5 without issue, I'm thinking the problem is along one of these lines

-  Error handling MII 12.2 is picking up an error that 11.5 was missing, doesn't seem too likely to me, maybe its possible some of the nodes do not have data though.

- As its the same system I am running against I believe there is no change in how RFC is handled by the ECC 6 system, but maybe how MII interacts has changed somehow ?

- There has been some change to xpath or xml handling in MII that is possibly causing the issue.

I do also have custom fields defined for this query, prehaps there is something at fault here ?

HariCS23
Contributor
0 Kudos

Hi Alister, Try loading RFC proxies again for the JCO action block at design time and execute.

Thanks

Hari

Former Member
0 Kudos

Thanks for the reply Hari, do you mean I should generate the XML documentation again for the block ? I did this just now, unfortunately it had no effect, still getting the same error.

HariCS23
Contributor
0 Kudos

Right click on your Jco action block --> Configure --> make sure all the seeting are good like Connection alias and credentials alias -> Ok-->Say OK to do you want to generate request/response documents?.

They try to execute your Transaction and see what happens.

Hope this helpls.

Thanks

Hari