SAP MII 14.0 Tag Query Findings

Hi Everyone,
We has just migrated from 12.2 to 14.0 MII, we did not got any issue in BLS or any Queries. The only issue we faced was the tag Query. So, after migrating from 12.2 to 14.0 we need to re load the Tag query and save it after migration to 14.0 otherwise it will not work as expected.
Am sharing as many of us may be working for Migration of MII 12.2 to 14.0, this may be useful.

Where are you querying the data from?
For example, if you're reading tags from an OSISOFT PI Historian, the "mask" attribute should be tag='AB*'
Note the single quotes!
The mask value in PCo queries is dependent on the "source" system masking procedure and format.

Similar Messages

  • MII 11.5 and PCo 2.1 and Tag Query Error

    Hi,
    I have KEPWare OPC server configured with a single tag, and with the OPC Client open.  I have PCo 2.1 configured with a single agent, and 'legacy' ticked with port 9001.  I have a UDS connector pointing to port 9001, and a tag query in 'currentwrite' mode, and can successfully write a value from the query editor (within MII 11.5) to KEPWare, when tested directly within the MII query editor.
    However, when I call the same tag query from within an MII transaction, and set 'TagName.1' and 'TagValue.1' to the values I want, I get the following error:
    "An item with the same key has already been added. at SAP.Manufacturing.Connectivity.Protocol.Custom.PCoQueryRequestHandler.ProcessRequest(Object handler)"
    I see this error in the PCo log.
    Interesting thing is, that within the transaction editor, when I select the underlying tag query, and the editor asks to generate the XML, and I say Yes, the underlying tag query runs fine (I can see the value getting updated within KEPWare).
    I've also tried with/without subscription items in PCo, plus different settings for 'Cache Mode' in PCo, plus using fully qualified tag name (ie: channel.device.tag as KEPWare sees it), etc, but in all cases I get the above error.
    Any ideas?

    Hi Diana,
    I upgraded to PCo V2.1.4.2, still same issue.  And yes, the data server (UDC) is checked as "Writable"!!
    As mentioned, the tag query runs fine in both "Current" mode and "CurrentWrite" mode.  Only when I call the same query from a transaction do I see this error.  Excerpt from Runner Log below;
    2011-02-23 15:20:32,390 [ServletExec: request: time=1298434832343, uri=/Lighthammer/Runner]
    ERROR  Runner - [9FA68944-67CE-824D-3FA6-D96023119ECE][ERROR]:
    IlluminatorQuery: An item with the same key has already been added. TMP0794C967-0F69-8F04-568C-CD037815D1D0
    2011-02-23 15:20:32,453 [ServletExec: request: time=1298434832343, uri=/Lighthammer/Runner]
    ERROR  Runner - [9FA68944-67CE-824D-3FA6-D96023119ECE][ERROR]:
    ACTION FAILED: End Action IllumTagQuery_0 : () TMP0794C967-0F69-8F04-568C-CD037815D1D0
    If I leave the transaction Tag Query action (that calls the underlying tag query) without any assignment to TagValue.1, then there is no error, and the error as set in the aunderlying tag query is used.  But as soon as I assign values to TagValue.1 inside the transaction, I get the error.  I've tried passing a value via a local paramater etc, same issue.
    Regards
    Kevin.

  • SAP UI5 Chart using SAP MII Query template

    Hi All, I am new to SAP UI5. I am trying to create SAP UI5 chart using SAP MII Query template. could anyone please tell me how to pass the Query Template as input to the SAPUI5 Chart? If possible please share sample code for doing so Regards Praveen Reddy

    Hi,
    If you want to embed UI5 objects in an IRPT here is a very simple code snippet:
    <HTML>
    <HEAD>
      <TITLE>TestUI5</TITLE>
    <SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid,i5SPCChart"></SCRIPT>
      <SCRIPT>
      var Grid = new com.sap.xmii.grid.init.i5Grid(SpecifyDisplayTemplateHere, SpecifyQueryTemplateHere);
      Grid.setGridWidth("640px");
      Grid.setGridHeight("400px");
      Grid.draw("div1");
      </SCRIPT>
    </HEAD>
    <BOD
      <DIV id="div1"/>
    </BODY>
    </HTML>

  • Tag Query error when assigning mode in Link Editor

    Hi,
    I am receiving the following error when I run a transaction that contains a Tag query.  In my transaction I have set the tag query mode to be defined by a local property via the link editor.  Then when I execute the transaction I get the following error:
    "[ERROR] [TAG_QUERY_WRITE_TAG]com.sap.xmii.Illuminator.logging.LHException: Mode parameter was not found or is malformed"
    I am on version 12.1.8 Build(43).
    I import the project into MII 12.1.4 Build(53) and the transaction works as expected.
    In the new verson of MII is there a bug utilizing the link editor to set mode?  Or is there a specific way it wants the mode linked. (e.g. specific case)
    Additional details:
    I am trying to use the CurrentWrite mode.  I have tried setting Current mode via the link editor and that isn't working either. 
    Any suggestions?
    Thanks,
    Justin

    Hi Mike,
    Please correct me if I understand the logic incorrectly.  But here is what I am thinking....
    I have configured my transaction to have this flow:
    String_List_To_XML_Sequence --> Repeater_TagValues  -->  TAG_QUERY_WRITE_TAG
    The String_List_To_XML_Sequence would contain String_List_To_XML_Parser_TagValues & String_List_To_XML_Parser_TagNames.
    With this flow the logic would say that I will be running a seperate tag query for each tag value.  So if I have 100 tag values that I want to send, I will run 100 tag queries.  This doesn't seem the most efficient.  Also if this is how you were thinking I would configure the transaction then I could use the following links:
    Target Xpath: TAG_QUERY_WRITE_TAG.TagValue.1
    Expression: String_List_To_XML_Parser_TagValues.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    Target Xpath: TAG_QUERY_WRITE_TAG.TagName.1
    Expression: String_List_To_XML_Parser_TagNames.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    With this configuration updating 10 tags takes 2 seconds:
    [INFO] Statistics [Load = 35 ms msec, Parse = 35 ms, Execution = 2015 ms, Total = 2067 ms]
    With my old configuration updating 10 tags took 700 ms. (original transaction on 12.1.4 Build (53)
    [INFO] Statistics [Load = 11.137 msec, Parse = 224.113 msec, Execution = 451.78 msec, Total = 736.62 msec]
    Please let me know if I interpreted your thoughts incorrectly.
    If there is a way to utilize only 1 Tag Query, then I am not sure how the transaction flow should be configured.
    Thanks for your time,
    Justin
    Edited by: Justin M Brown on Jul 14, 2011 7:29 PM
    Edited by: Justin M Brown on Jul 14, 2011 7:33 PM

  • Tag Query Error

    Hi,
    I am executing a tag query and I keep getting the following error -
    OperationList [ERROR] - Error Message: Pending requests found, current request will be retried at a later date
    OperationList [ERROR] - Error updating
    com.sap.xmii.applet.common.ResultModelException: Error Message: Pending requests found, current request will be retried at a later date
         at com.sap.xmii.applet.common.BaseApplet.getResultModel(BaseApplet.java:1089)
    Can somebody explain what would be the cause of such an error and how to fix it?
    Regards,
    Chanti.

    Actually, they have to be run in isolation because I can't load both projects in the OPC server at the same time. So, I can run the related MII applications only one at a time. But heres something I found in the UDS logs -
    [P:4192, T:5000,       UDS, ] 0x0     HRESULT: 0x80070057 [Invalid at the top level of the document.
    ]     [Connection.cpp @ 1024, CLHOpcDaConnection::FinalGetMetadata]
    [P:4192, T:5000,       UDS, RETHROW] 0x0     Rethrowing exception.     [Connection.cpp @ 1130, CLHOpcDaConnection::FinalGetMetadata]
    [P:4192, T:5000,       UDS, RETHROW] 0x0     Rethrowing exception over COM.     [tagUtil/lhds2Connection.h @ 1427, lhds::LHDSConnectionImpl<class CLHOpcDaConnection>::GetMetadata]
    [P:4192, T:5000,       UDS, ] 0x0     Caught exception over a COM boundry.     [tagUtil/lhds2NamespaceMode.h @ 174, lhds::LHDSTagListModeImpl<class CLHOpcDaDSTagList>::LookUpDescription]
    [P:4192, T:5000,       UDS, HANDLED] 0x0     Handled exception.     [tagUtil/lhds2NamespaceMode.h @ 177, lhds::LHDSTagListModeImpl<class CLHOpcDaDSTagList>::LookUpDescription]
    Does it make sense?

  • Tag query - Rowcount Property

    Hi,
    We are using SAP MII 12.1.5 ( build 83).
    We have been connecting to a PI historian to get data and performing some calculations.
    Since the client gives more important on the accuracy of data, we are using the history event mode.
    ( With history event , we could not get the results as expected)
    While querying a particular tag, the value is not as expected.
    After doing all the testing, We found out the For the particular period PI has some where around 18000 rows. and we are only getting 9999 rows since we have specified this in the tag query row count.
    In the transaction I tried to increase the rowcount to 20000. It is not working.
    The maximum count is 10000. After that the query gives unknown error Java LH exception.
    Is there a limitation on the rowcount property?
    If we fix the row count for a certain limit and the query returns more than those number of rows,  how to get all data?
    I am sure handling these huge number of rows is not a very good thing to do. But the algorithm to calculate the end result requires each and every data as registered in PI.
    Any input is appreciated.
    Thanks in Advance,
    Kishore kumar P S

    Hi Mike,
    We have initially told about the performance issues if we go with this approach.
    But once we have shown the demo last week, they agreed with the modified approach.
    Now we are using the Statistics with TOT.  Still the totalizer value is not taking effect.
    As I know from the help docs, the totalizer factor is used to change the from one unit to another unit.
    the help Doc says
    "The area under the curve (effectively a "totalizer" value) can be calculated by multiplying the time-weighted average by the width of the time interval in seconds.  However, quite often, the instrument or measurement is in different units (perhaps gallons per minute versus per second), and the TotalizerFactor parameter can be used to perform the correction."
    But there is no effect on the totalizer value. There is one more point in totalizer value is depend upon the connector. We are using the UDC connector. Currently I am not getting anything on this connector type.
    Any inputs will be appreciated.
    Thanks & Regards,
    Kishore kumar P S

  • To Retrive Folder List in SAP MII 12.0

    Is there any option available in SAP MII 12.0 to retrieve List of Folders Available same as like Folder List Query in 11.5.

    Hello,
    try an XML Query with the following URL:
    /XMII/Illuminator?Mode=TransactionFolderList&Server=XacuteConnector&Content-Type=text/xml
    Filter the result by its "ParentPath" column to get a list of folders inside a provided parent folder. Make sure that you have increased the default query row count of 100 to get all folders on your system.
    Hope this helps - good luck!
    Matthias
    Edited by: Michael Appleby on Jan 5, 2011 2:38 PM

  • SAP MII SSC UI CUSTOMIZATION

    In SAP MII SSC (Self Service Composition Dashboard),
    There is some issue I am facing while doing some customization on the UI of SSC.
    I added two UI5 drop down with Dynamic Data Source and my requirement is populating the second drop down
    as per the selected value of the first drop-down.For that what I need to get the instance of first drop down
    along with its selected value and then pass it as a parameter in query so that the second drop down can be populated.
    The constraint lies in
    1)Getting instance of the drop down to get the selected
    I have tried adding some custom code to get the drop down instance but no help.Here is the part of the customized added
    code
    This is not giving any error but not working.
    Please help.

    Hi Swapna,
    In SSCE, if you click on the first dropdown in design, the events are given in the properties.
    You can put your change method name in onSelect.
    Let's say you put the method name handleChange in onSelect. In the custom code area, the method will be generated for you.
    In the method implementation you can call the getSelectedKey to retrieve the selected value.
    function handleChange(){
    alert(DropdownBox0_c0c0.getSelectedKey());
    You can also refer to the how to guide for UIElements
    MII 15.0 - Self Service Composition Environment - Integration of UI Elements
    Regards,
    Pooja

  • Barcode and PDF document printing in SAP MII

    Hi All,
    I am using SAP MII 15.0, one of my requirement is to print the Barcode and PDF file automatically.
    I have came across the link below which tells to print the label
    http://scn.sap.com/community/manufacturing/mii/blog/2014/08/17/industrial-label-printing-with-mii
    In the above document, I can send only the string as a message in the PCo query CALL SEND(address=’127.0.0.1’, port=’20000’, message=’Hello World’);
    Is that possible to send the document to the printer?
    I am using the PDF action block.Can any one tell me how to print the document automatically?
    Also, if my printer is connected to client, how it can be printed from client PC?
    Regards
    G.P

    Hi chris,
    I have to do via SAP MII and their is no other option.
    In the above document, I can send only the string as a message in the PCo query
    CALL SEND(address=’127.0.0.1’, port=’20000’, message=’Hello World’);
    Is that possible to send the document from MII?
    Is there any command like below for pushing the document to the printer so that it will be useful?
    CALL SEND(address=’127.0.0.1’, port=’20000’, message=’Hello World’);
    Also please let me know any idea of printer used, which will help ?
    Regards
    G.P

  • SAP MII 15.0:HANA as a back-end ! Distributed Architecture

    Dear MII Consultants & Architects,
    I have a query here regarding SAP MII 15.0 when it is deployed as de-centralized.
    Lets say there are 3 Plants.Each plant needs a local MII system.
    How a local MII system will interact with HANA if HANA is a central entity?
    Will all the local MII installations which have their respective SQL/Oracle do a SLT replication with HANA?
    Regards,
    Muddassar

    There's not just a single way to interact between MII & HANA; there are many options that are available so that we can support the underlying business scenario in the best way.  For options and architectures that support them have a look here:
    SAP MII, HANA/ESP and Lumira (Technical)
    I also have a technical architectures deck that I can share with you if you like just email me directly for it.
    Please let me know what you think of my post about MII & HANA,
    Sam

  • Error using a tag query

    We have a tag query that works in our sandbox environment, but not in dev.  I loaded the same JDBC drivers on both systems.
    The project was exported from the sandbox, and imported into dev.
    I have verified the Data Server set up is identical in both environments.  Connection status in both environments is identical - running, same number of connections, etc.
    When I try to run the query on sandbox in workbench, the query returns data.  I get this error on the dev system -
    SQL error has occurred on query java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'tag'.
    Detailed error -
    java.lang.Exception: SQL error has occurred on query [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'publicgrouptag'.
         at com.sap.xmii.Illuminator.gui.workbench.populators.IlluminatorPopulator.get(IlluminatorPopulator.java:114)
         at com.sap.xmii.Illuminator.gui.workbench.populators.TagListPopulator.get(TagListPopulator.java:47)
         at com.sap.xmii.Illuminator.gui.workbench.components.desktop.custom.TagQueryBuilderPanel$6.construct(TagQueryBuilderPanel.java:723)
         at com.sap.lhcommon.gui.ThreadCreator$2.run(ThreadCreator.java:94)
         at java.lang.Thread.run(Unknown Source)
    Any suggestions??

    One of your included JDBC driver archives has a class that matches the path provided by the JDBCDriver setting for the data server (likely the sqljdbc.jar file).
    If you take the JDBCDriver setting: 
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    and replace the periods for sub directories and add a .class on the end you'll have:
    com\microsoft\sqlserver\jdbc\SQLServerDriver.class
    So if you unpacked the jar file you'd find this java class (and the other ones included with the driver).
    Do you get the same error about 'publicgrouptag' and 'tag' objects when you test a tag query request for GroupList mode?  These tables/views would be used by the underlying queries used to populate the tag details tab in the WB.  Do you see these tables or view within the SQL Server?  Does the sa user have appropriate permissions?

  • NWDI Support Information for SAP MII

    Hi,
    The SAP MII application version 12.1 and beyond has integration with NWDI to manage query templates, display templates, transactions, and web pages. Does anyone know the correct component so the OSS tickets get directed to the right support groups?
    Any introduction information / links would help regarding transports as well.
    Thanks,
    Kevin

    Hello Kevin
    It is fine to raise a message in MFG-MII, and it will get rerouted to BC-CTS-DI if needed.
    The following article may be useful;
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0348c15-6ee6-2c10-f7a0-89c0fc2099ec?quicklink=index&overridelayout=true
    Thanks
    Kenny

  • Modes and Methods in Tag Query and SQL Query

    Hi,
    Can someone explain me about the modes available in <b>TAG Query and SQL Query.</b>
    TAG Query has modes such as <b>Current, CurrentWrite, GroupList, History, HistoryEvent, ModeList, Statistics and TagList</b>
    SQL Query i still have doubt on <b>FixedQuery with output , Modelist and TableList</b>
    I also need to know why methods are used?
    Thanks in advance
    Regards
    Muzammil

    I'll try to  explain to the best of my knowledge :
    <u><b>TagQuery</b></u>
    <b>Current</b> : Gives you the current value of the Tag you are reading.
    <b>CurrentWrite</b> : Let you write a Value as the Current Value of the Tag.
    <b>GroupList</b> : Generally Tags are grouped under different groups. Returns you the name of the Groups.
    <b>From the xMII Help Document :</b>
    <b>History</b> : History Mode returns interpolated data.  Interpolation can be accomplished by specifying either the # of rows desired or the retrieval resolution.  If the mode is "History" and a value is provided for the Resolution parameter (which is in seconds), the connector will retrieve evenly-spaced values starting at the beginning of the time interval, up to the maximum # of rows specified in the RowCount parameter.  If no value is provided for the Resolution parameter, the connector will return an evenly-spaced number of values based on the value of the RowCount parameter.
    For example, if the time interval is 1 hour, Resolution is 15, and RowCount is 240, the connector will return evenly spaced values each 15 seconds, up to 240 values (which would span the entire hour).
    If the time interval is 1 hour, Resolution is not provided or is set to zero, and RowCount is 120, the connector would return 120 evenly spaced values, at an effective interval of 30 seconds.
    <b>HistoryEvent Mode</b> : The connector can provide historical values "as they were stored" the database.  This mode provides no interpolation of values.
    <b>Statistics Mode</b> : When retrieving data for statistical calculations, the connector utilizes the same techniques as in the "HistoryEvent"  mode.  It is important to note that the first two returning columns in the HistoryEvent query must be the timestamp and the value, in that order.  The SAP xMII Statistical processor expects that order, or errors will occur.  This ensures precision of statistical measurements, particularly time-weighted average, by using the exact storage time and values from the historical database.  The SAP xMII system provides the statistical calculations.
    <b>Modelist</b> : Basically returns the modes of the Query Available. The Data returned is same as the data in the Modes list in the Quert Template Editor.
    <b>Taglist</b> : Returns all the Tags in the Datasource.
    <u><b>SQL Query</b></u>
    <b>Modelist</b> : Same as above.
    <b>TableList</b> : List of all the tables in the database to which the connector connects.
    Again from SAP xMII Help Documentation :
    <b>FixedQueryWithOutput</b> : This mode is used to execute an Oracle stored procedure or function that returns a REF CURSOR as output.  The position of the REF CURSOR is marked by a "?" in the query.  For example:
    <b>Create a table.</b>
    <i>create table usage (id int, name varchar(50));
    insert into usage (id, name) values (1, 'test1');
    insert into usage (id, name) values (2, 'test2');
    insert into usage (id, name) values (3, 'test3');
    insert into usage (id, name) values (4, 'test4');
    insert into usage (id, name) values (5, 'test5');
    insert into usage (id, name) values (6, 'test6');
    insert into usage (id, name) values (7, 'test7');
    insert into usage (id, name) values (8, 'test8');</i>
    <b>Define the stored procedure.</b>
    <i>DROP PACKAGE foopkg;
    CREATE PACKAGE foopkg IS
      TYPE cursortype is ref cursor;
      PROCEDURE test (mycursor in out cursortype);
    END foopkg;
    CREATE PACKAGE BODY foopkg IS
      PROCEDURE test (mycursor in out cursortype) AS
      BEGIN
         open mycursor for select * from usage;
      END;
    END foopkg;
    </i>
    Define a query template for calling the stored procedure.  Enter the following in the FixedQuery tab:
    <b>call foopkg.test(?)</b>
    This template returns all rows from the Usage table.

  • Writing a Tag query

    Hi all,
    I need to write complex select statements on Tag database.
    Can anyone please let me know how and where in query template to write.
    Thanks
    Ravi Kumar.

    Once setting up the UDS connection as above, you'll need to connect your datasource to the exposed port of the UDS using a "OLEDB Connector", port must match that of the SAP UDS.
    from there you can simply drop a PI tag query into the query template to extract data.
    SELECT "tag", "time", "_index", "value", "status", "questionable", "substituted", "annotated", "annotations" FROM "piarchive".."picomp2" WHERE tag = 'sinusoid' AND time BETWEEN '-1h' AND ''

  • Two new sample applications based on SAP MII available on SDN

    I am glad to inform everyone that the following new SAP MII based sample applications have been release on SDN:
    1. Plant Data Collection(PDC) of Production Confirmation for shop floor operators:
    This application is designed to provide shop-floor operators a simple, intuitive and effective web-based user interface on a touch screen to enter the production performance easily and effectively. It comes with the capabilities to perform time-event production confirmation for both Production and Process Orders and the administrator can choose between two user-management modes for operators.
    To download this application and its documentation goto:
    https://www.sdn.sap.com/irj/scn/manufacturing-tools > Touch Screen Plant Data Collection (PDC) Project and Configuration Files
    2. Quality Control with SAP MII (Using SOA) :
    This represents an excellent show case for the ES bundle "Integration of QM Systems" which we have already delivered.You can use the content to support quality inspection and quality control along the supply chain. This application provides a lean user interface (UI) to retrieve, enter, and display the inspection results on the shop floor using the SAP enterprise services.
    To download this application and its documentation goto:
    https://www.sdn.sap.com/irj/scn/manufacturing-tools > Quality Control with SAP xMII (Using SOA)
    For any query, feedback or clarifications please feel free to contact me through my business card.

    Hello Srinivasa
    The Webservices configuration doc was not part of this project. But we are developing a kind of document for the field to know more about ES . It will be available by April 1 st week ( approx ) . Will update you later.
    If any queries :  contact directly at  karthikeyan.l at sap.com

Maybe you are looking for