cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with xMII V12 using SAP JCO

Former Member
0 Kudos

Hi everyone,

I have encountered some problems regarding the SAP JCO action of xMII V12 on a SAP R4.6B system patch 36.

I have used the template "MaterialList.trx", and the connection is established correctly, a response is created, however it seems that the selection criteria (MATLOW, MATHIGH, Plant) are not used. The response is the same no matter what selection is used. Only MAXROWS (part of INPUT of BAPI_MATERIAL_GETLIST) is used correctly.

The same template using on a ERP system (ECC 700 patch 9) throws an error "Type: E Material: Value in field SIGN can only be I, E", although the request XML looks ok.

The results of using the template "MaterialList.trx" using xMII V11.5 on a SAP R4.6B system patch 36 leads to correct results. Using the ERP system (ECC 700 patch 9) response no results at all.

Did anyone experience similar problems?

Thanks and Regards

Michael Otto

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Michael,

I've seen this with version 12 as well, and it appears that something seems to be different in the JCO block handling. It has been formally entered as a bug, especially considering the impact for people migrating 11.5 content into v12, but in the meantime you can just do a "Remove XML" link for each of the various selection tables in the Request document. Start by selecting MaterialGetList.Request{/BAPI_MATERIAL_GETLIST/TABLES/DISTRIBUTIONCHANNELSELECTION} in the MaterialGetList action block links, select the Remove XML radio button and press Add. Continue this process until the Type E messages stop happening and you get the desired results back.

Best Regards,

Jeremy Good

Former Member
0 Kudos

Hi Jeremy,

thank you for this hint. I have added the "Remove XML" and now the Type E message has disappeared and data is shown when connecting to the ERP system.

However...similar to the SAP R/3 request now on the ERP request the selection criteria is not correctly evaluated. Example:

Selection: Material no. "T-HTB100 to T-HTB102", MaxRows = 5.

Response: Material no. "T-HTB100, T-HTB101, T-HTB102", but also "3300-820, 3300-900" which do not correspond to the criteria.

Selection: Material no. "T-HTB100 to T-HTB105", MaxRows = 5.

Response: Material no. "T-HTB100, T-HTB101, T-HTB103, T-HTB104, T-HTB105", however T-HTB102 is missing.

Changing the selection criteria more than 2 times and then executing the applet does not change the response anymore, the response of the last selection remains. Is there a refresh / clear missing?

Best regards

Michael

Former Member
0 Kudos

Michael/Jeremy:

Be sure to enter a customer support/service ticket on this issue so the developers can look into it.

- Rick

jcgood25
Active Contributor
0 Kudos

Just to clarify Rick's note - I personally entered a bug about 11.5 JCO vs. 12.0 JCO behavior a few weeks ago because we observed this during a version 12.0 boot camp that we hosted here in Exton.

The order of links assigned in the JCO block does matter - are they in a proper order that you are not doing an assignment into a section of the xml document and then removing it later?

Trace out the RequestXML object in a sequence after the JCO action call to see that the document being sent to ERP is being formulated according to your links and let me know what you find.

Also, what type of applet are you using and what JavaScript methods are you using to effect the changes to your XacuteQuery template?

Regards,

Jeremy

Former Member
0 Kudos

Hi Jeremy,

here are some details.

I created the following links:

MaxRows = 5

DISTRIBUTIONCHANNELSELECTION - <<REMOVE>>

MATERIALSHORTDESCSEL - <<REMOVE>>

MATNRSELECTION - SIGN=I, OPTION=BT, MATLOW=T-HTB100, MATHIGH=T-HTB100

PLANTSELECTION - SIGN=I, OPTION=EQ, MATLOW=1100, MATHIGH=1100

SALESORGANISATIONSELECTION - <<REMOVE>>

STORAGELOCATIONSELECT - <<REMOVE>>

The resulting RequestXML looks ok:

- <BAPI_MATERIAL_GETLIST>

- <INPUT>

<MAXROWS>5</MAXROWS>

</INPUT>

- <TABLES>

+ <MANUFACTURERPARTNUMB>

+ <MATNRLIST>

- <MATNRSELECTION>

- <item>

<SIGN>I</SIGN>

<OPTION>BT</OPTION>

<MATNR_LOW>T-HBT100</MATNR_LOW>

<MATNR_HIGH>T-HBT100</MATNR_HIGH>

</item>

</MATNRSELECTION>

- <PLANTSELECTION>

- <item>

<SIGN>I</SIGN>

<OPTION>EQ</OPTION>

<PLANT_LOW>1100</PLANT_LOW>

<PLANT_HIGH>1100</PLANT_HIGH>

</item>

</PLANTSELECTION>

+ <RETURN>

</TABLES>

</BAPI_MATERIAL_GETLIST>

Howwever, in the ResponseXML other materials are retrieved, and there is another interesting thing. I have removed the Table MATERIALSHORTDESCSEL from the request, however in the ResponseXML it shows up again with exclusion selection. I think this was the case in xMII 11.5, too.

- <BAPI_MATERIAL_GETLIST>

- <INPUT>

<MAXROWS>5</MAXROWS>

</INPUT>

- <TABLES>

<DISTRIBUTIONCHANNELSELECTION />

+ <MANUFACTURERPARTNUMB>

- <MATERIALSHORTDESCSEL>

- <item>

<SIGN>E</SIGN>

<OPTION>CP</OPTION>

<DESCR_LOW>*</DESCR_LOW>

<DESCR_HIGH />

</item>

</MATERIALSHORTDESCSEL>

- <MATNRLIST>

- <item>

<MATERIAL>102-130</MATERIAL>

<MATL_DESC>Hexagon head screw M10</MATL_DESC>

<MATERIAL_EXTERNAL />

<MATERIAL_GUID />

<MATERIAL_VERSION />

</item>

- <item>

<MATERIAL>102-200</MATERIAL>

<MATL_DESC>Fly wheel W-102</MATL_DESC>

<MATERIAL_EXTERNAL />

<MATERIAL_GUID />

<MATERIAL_VERSION />

</item>

- <item>

<MATERIAL>102-210</MATERIAL>

<MATL_DESC>Slug for fly wheel--sphere-cast</MATL_DESC>

<MATERIAL_EXTERNAL />

<MATERIAL_GUID />

<MATERIAL_VERSION />

</item>

- <item>

<MATERIAL>3300-820</MATERIAL>

<MATL_DESC>MSI High Gloss Lacquer Paint - Silver</MATL_DESC>

<MATERIAL_EXTERNAL />

<MATERIAL_GUID />

<MATERIAL_VERSION />

</item>

- <item>

<MATERIAL>3300-900</MATERIAL>

<MATL_DESC>MSI Deluxe Gas Cap - Black</MATL_DESC>

<MATERIAL_EXTERNAL />

<MATERIAL_GUID />

<MATERIAL_VERSION />

</item>

</MATNRLIST>

- <MATNRSELECTION>

- <item>

<SIGN>I</SIGN>

<OPTION>BT</OPTION>

<MATNR_LOW>T-HBT100</MATNR_LOW>

<MATNR_HIGH>T-HBT100</MATNR_HIGH>

</item>

</MATNRSELECTION>

- <PLANTSELECTION>

- <item>

<SIGN>I</SIGN>

<OPTION>EQ</OPTION>

<PLANT_LOW>1100</PLANT_LOW>

<PLANT_HIGH>1100</PLANT_HIGH>

</item>

</PLANTSELECTION>

- <RETURN>

- <item>

<TYPE>W</TYPE>

<ID>MM</ID>

<NUMBER>354</NUMBER>

<MESSAGE>Other entries also exist for the selection criterion</MESSAGE>

<LOG_NO />

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1 />

<MESSAGE_V2 />

<MESSAGE_V3 />

<MESSAGE_V4 />

<PARAMETER />

<ROW>0</ROW>

<FIELD />

<SYSTEM />

</item>

</RETURN>

<SALESORGANISATIONSELECTION />

<STORAGELOCATIONSELECT />

</TABLES>

</BAPI_MATERIAL_GETLIST>

I am using an iGrid (illum8.zip) to show the result. The JS sets 4 fields and calls refresh.

MatListTran.getQueryObject().setParam(1,inPlant.value);

MatListTran.getQueryObject().setParam(2,inMatLow.value);

MatListTran.getQueryObject().setParam(3,inMatHigh.value);

MatListTran.getQueryObject().setParam(4,inMatRows.value);

MatListTran.refresh();

Best regards

Michael

jcgood25
Active Contributor
0 Kudos

Michael,

An SAP system I have a connection to actually contains the same T-HTB100 through T-HTB105 range, but when I ask for the range between these two materials I get all 5 and not the extra ones you were seeing (maybe because they don't exist). I also noticed from your last post was that you asked for a range between T-HTB100 and T-HTB100 - was this intentional? Maybe you should ask for EQ T-HTB100 and not BT or did you mean to use BT 100 to 105?

Unless you have query caching enabled for the XacuteQuery template underneath the MatListTran iGrid applet there shouldn't be anything wrong with your script that would make it not return new information from the BAPI. Are you seeing any errors in the browser's Java console?

Let me know if you have any updates to this and you can export your working transaction from the Workbench and email it to me off-list. I'll take a look at it and see if I notice anything out of the ordinary.

Regards,

Jeremy Good

Former Member
0 Kudos

Hi Jeremy,

indeed the ERP sap system is an IDES system, so you may have the same results. The range T-HTB100 to T-HTB100 is actually one of my many tries. I have also selected other ranges like T-HTB100 to T-HTB102 which should response to "T-HTB100, T-HTB101 and T-HTB102" but returns two other materials as well, which do not fullfill the selection.

I will mail you the trx I am using. I will also try some other templates and see how they are working.

Thanks for your help so far !

Regards,

Michael

jcgood25
Active Contributor
0 Kudos

Michael,

I took a look at the files you sent me and you didn't remove all of the nested tables in the RequestXML document object. MANUFACTURERPARTNUMB is not removed. I ran your page against an IDES system and I did in fact see items being returned other than the range your web page used, but adding the missing remove links seemed to do the trick.

Regards,

Jeremy Good

Former Member
0 Kudos

Jeremy,

indeed I did only remove those links containing "SIGN". After removing MANUFACTUREPARTNUMB the response is correct! I tried the IDES ERP as well as the SAP R4.6B, and both systems returned the correct materials. This was quite tricky, thank you very much for your time and help!

Best regards

Michael

jcgood25
Active Contributor
0 Kudos

Glad to help!

I was also just informed that the root of this issue with 12.0 (so that it works like 11.5) needing all of the RemoveXML assignments has been identified and will be addressed in a subsequent update.

Best Regards,

Jeremy Good

Answers (0)