cancel
Showing results for 
Search instead for 
Did you mean: 

MII component SSCE --- i5ValueHelp issue on MES Table STORAGE_LOCATION

EasonLing
Explorer
0 Kudos

Dear MII experts,

Currently, i am customizing a report via MII SSCE for customer. MII version 15.1.0.3.

  • Scenario A:

I created a textfiled as a input and a value help for this textfield.

Value help bind with a SQL.

SELECT TOP 10 * FROM STORAGE_LOCATION

When i click the value help button for this field, i got this issue in the console:

Triggered ajaxError handler. The ajax status was: 200 ajax error was: SyntaxError: Unexpected token G

  • Scenario B:

Update the SQL and create 2 input parameters in value help.

SELECT TOP 10 * FROM STORAGE_LOCATION

WHERE SITE='[Param.1]' and STORAGE_LOCATION like '%[Param.2]%'

Param.1 SITE

Param.2 SL

When i click the value help button for this field, i still get this issue in the console:

Triggered ajaxError handler. The ajax status was: 200 ajax error was: SyntaxError: Unexpected token G

When i input a C in the SL field, i will get "Unexpected token G". But input a D, it will get the result.

When i input a whole storage location start with C, like C1A2. It will also show the result.

For other MES tables in WIP schema, SCCE gets no error.


Could you please give some suggestions that how i can resolve this issue? Thanks~

Best regards,

Eason Ling

Accepted Solutions (1)

Accepted Solutions (1)

wizzhi
Employee
Employee
0 Kudos

Hi Eason,

Could you share the system that we can test? As you mentioned only one special table have this issue... Might be some control characters in column name not properly escaped...

BTW, the statement

SELECT TOP 10 * FROM STORAGE_LOCATION

WHERE SITE='[Param.1]' and STORAGE_LOCATION like '%[Param.2]%'

seems missing column name in where expression.

Thanks & Best Regards,

George Wen | 温忠智

MII Dev | Manufactturing | Suit Engineering | Product Innovation

SAP Labs I 1001 Chenghui road I 201203 Shanghai I China

EasonLing
Explorer
0 Kudos

Hello George,

Thanks for your response.

I emailed you my sql and i5 value help. It is the customer's system i am working with, so in the mail i mentioned MES URL.

The column name is the same as the table name. (STORAGE_LOCATION)

Best regards,

Eason

wizzhi
Employee
Employee
0 Kudos

Hi Eason,

As discussed, the issue is caused by backslash "\" in your content. Please file a CSS ticket for this issue of Illuminator service.

Thanks & Best Regards,

George Wen | 温忠智

MII Dev | Manufactturing | Suit Engineering | Product Innovation

SAP Labs I 1001 Chenghui road I 201203 Shanghai I China

EasonLing
Explorer
0 Kudos

Thanks George,

0000078938 2016 is create for follow up.

Best regards,

Eason

Answers (2)

Answers (2)

EasonLing
Explorer
0 Kudos

Issue detected.

Content cannot involve "\".

EasonLing
Explorer
0 Kudos

Possible workaround is replace this backslash.

SELECT A.STORAGE_LOCATION AS "库位",

REPLACE(A.DESCRIPTION,'\','-') AS "库位描述"

FROM STORAGE_LOCATION A

WHERE A.SITE='[Param.1]' and A.STORAGE_LOCATION like '%[Param.2]%'

EasonLing
Explorer
0 Kudos

Currently, what i can do is to customize my own value help function for this field, which i don't think is a efficient way.

Why other MES tables won't get this "Triggered ajaxError handler. The ajax status was: 200 ajax error was: SyntaxError: Unexpected token G" error?


ERROR comes from :

ceController.js

com.sap.ce = {controller : function() {this.miiUI5Objects = {};

this.addObject = function(

    cellId,

    object

) {this.miiUI5Objects[cellId] = object};

this.deleteObject = function(cellId) {if(

    this.miiUI5Objects[cellId] != undefined & & this.miiUI5Objects[cellId] != NULL

) {this.miiUI5Objects[cellId].destroy();

this.miiUI5Objects[cellId] = null}};

this.deleteAllObjects = function() {for(

    var cellId IN this.miiUI5Objects

) {if(

    isObjectNotNull(this.miiUI5Objects[cellId])

) {this.miiUI5Objects[cellId].destroy() }}this.miiUI5Objects = {}};

this.updateUI5Objects = function() {for(

    KEY IN this.miiUI5Objects

) {var obj = this.miiUI5Objects[key];

if(

    obj = = NULL

) {continue}if(

    obj instanceof com.sap.xmii.chart.hchart.i5Chart ||(

        eval("com.sap.xmii.chart.hchart.i5SPCChart") != = undefined & & obj instanceof com.sap.xmii.chart.hchart.i5SPCChart

    )

) {var divId = obj.chartPosId;

if(

    jQuery.sap.byId(divId) . height() != NULL & & jQuery.sap.byId(divId) . height() > 0

) {obj.setChartHeight(

    jQuery.sap.byId(divId) . height()

) }else{continue}try{obj.update(FALSE) }catch(err) {console.log(

    "An error has occured " + err.name + " - " + err.message

) }}else{if(

    eval("com.sap.xmii.ssce") != = undefined & & eval("com.sap.xmii.ssce.PICTree") != = undefined & & obj instanceof com.sap.xmii.ssce.PICTree

) {if(

    ceController.miiUI5Objects[key].uiObject & & ceController.miiUI5Objects[key].uiObject instanceof sap.ui.commons.Tree

) {if(

    ssceLayout & & ssceLayout.isDesign

) {ceController.miiUI5Objects[key].uiObject.setHeight(

    jQuery.sap.byId(KEY) . height() - 55 + "px"

) }else{ceController.miiUI5Objects[key].uiObject.setHeight(

    jQuery.sap.byId(KEY) . height() - 25 + "px"

) }}else{if(

    ceController.miiUI5Objects[key].uiObject & & ceController.miiUI5Objects[key].uiObject instanceof sap.ui.vbm.GeoMap

) {ceController.miiUI5Objects[key].uiObject.setHeight(

    jQuery.sap.byId(KEY) . height()

) }}}}}}}};

ceController = new com.sap.ce.controller();

$(window) . bind(

    "load",

    function() {ceController.updateUI5Objects() }

);

$(document) . ajaxError(

    function(

        C,

        B,

        D,

        A

    ) {console.log(

        "Triggered ajaxError handler. The ajax status was: " + B.status + " ajax error was: " + A

    );

if(

    B.status = = 200 & & B.responseText != NULL & & B.responseText.match(

        / < html > / gi

    ) != NULL

) {document.body.innerHTML = B.responseText;

if(

    B.responseText.match(

        / id = \"logonForm\" / gi

    ) != NULL

) {window.location.reload(TRUE) }}else{if(

    B.status != 404 & & B.responseText != NULL & & B.responseText.match(

        / < html > / gi

    ) != NULL

) {document.body.innerHTML = B.responseText}}}

);

jQuery.sap.byId("progressBar") . css(

    "max-width",

    "55%"

);