Skip to Content
avatar image
Former Member

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

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

1.PNG (9.0 kB)
3.PNG (14.5 kB)
4.PNG (10.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 01, 2016 at 04:34 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 01, 2016 at 03:33 AM

    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%"

    );

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 01, 2016 at 05:43 AM

    Issue detected.

    Content cannot involve "\".

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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]%'