SDN Contribution

SAP xMII Best Practices Guide

Applies to:
SAP xMII 11.0 to 11.5

Summary
Due to the varying functionality and flexibility of design with xMII, it is beneficial to have a best practices guide on using xMII, structuring the XHTML/HTML/IRPT and editing JavaScript & CSS in a standard manner. This guide will help to point out various approaches when using xMII to allow for the most flexibility and greater performance of your application.

Author(s): xMII Field Enablement and Support Teams Company: SAP Labs, LLC Created on: 11 January 2007

© 2006 SAP AG

1

Table of Contents
Introduction ..................................................................................................................................................... 3 1 Architecture............................................................................................................................................. 3 1.1 1.2 1.3 2 xMII Integration Architecture ........................................................................................................ 3 SAP xMII Single Plant/Region Architecture ................................................................................. 4 SAP xMII Enterprise Architecture................................................................................................. 5

Server Configuration Best Practices ....................................................................................................... 6 2.1 2.2 2.2.1 2.2.2 2.3 Web Servers ................................................................................................................................ 6 Web Applications ......................................................................................................................... 6 Definitions ............................................................................................................................... 6 Deployment Strategies ............................................................................................................ 6 Installation & Migration................................................................................................................. 7

3

Application Design Best Practices .........................................................................................................11 3.1 3.2 3.3 3.4 3.5 3.6 Structure DOs & DON’Ts ............................................................................................................11 Presentation DOs & DON’Ts.......................................................................................................12 Behavior DOs & DON’Ts ............................................................................................................13 Application Directory Structure....................................................................................................14 Default Templates.......................................................................................................................14 Naming Convention Suggestions................................................................................................14

4

General xMII Best Practices...................................................................................................................15 4.1 4.2 4.3 Business Logic............................................................................................................................15 Querying & Caching....................................................................................................................16 Session Variables .......................................................................................................................18

5 6 7 8 9 10

Shop Floor Integration............................................................................................................................19 NetWeaver (BI, XI, EP, VC) Integration .................................................................................................20 Mobile Applications ................................................................................................................................20 Security ..................................................................................................................................................20 Error Handling ........................................................................................................................................21 Go Live! Check List ............................................................................................................................24 10.1 10.2 Final Application Readiness Check List ......................................................................................24 Final Application Click-Through ..................................................................................................25 References…More Help!...................................................................................................................26

11

Copyright........................................................................................................................................................27

© 2006 SAP AG

2

This document will show some high level techniques that should be followed in order to achieve a standardized use of the product and for future troubleshooting and organization. and Visual Composer). 1 1.1 Architecture xMII Integration Architecture SAP xApp Manufacturing Integration and Intelligence (xMII) integrates with manufacturing systems and mySAP ERP Central Component or R/3 to connect the operation level and enterprise data. In a NetWeaver environment. structuring the XHTML/HTML/IRPT content. xMII offers comprehensive “pre-integration” to virtually all elements of SAP ERP and the NetWeaver technology stack. Content and services created in the xMII environment are exposed to the entire enterprise as services via NetWeaver. and content delivery through Microsoft SharePoint is also supported. This allows you to monitor your operations and resolve manufacturing exceptions in real time. as well as editing JavaScript and CSS in a standard manner. © 2006 SAP AG 3 . Visualizations can be exposed through SAP Portal. Portal. it is beneficial to have a best practices guide on using xMII. Support access to 100% of ERP functionality integration through 3rd Party Middleware/EAI products as well.Introduction Due to the varying functionality and flexibility of design with SAP xMII. All xMII services can be utilized by other NetWeaver components (XI.

having an xMII server at each plant allows you the option of running in a disconnected mode in case of wide area network (WAN) outage or ERP maintenance. a single site xMII server is installed on the plant network to provide operational integration and visibility for production personnel. are operational and required at each plant. In addition. The data volume generated from some of these targets is very high and transferring it across the network may impact performance. such as control systems and process historians. One of the reasons for having xMII server at each plant is that most of the applications xMII interacts with and connects to. © 2006 SAP AG 4 .2 SAP xMII Single Plant/Region Architecture In the single plant example below.1.

An additional xMII corporate server can then be used to aggregate and compare multi-site data to provide plant-to-plant or divisional views and analytics for a complete Balanced Scorecard or best-of-class comparison.3 SAP xMII Enterprise Architecture In the multi-plant example below. each plant site has an xMII server. © 2006 SAP AG 5 .1.

1 Web Applications Definitions Web Application – a web based application that is developed using SAP xMII. there should be a common directory located underneath each location for common. In general for each web server you should have the following directories with corresponding names <root>\Inetpub\wwwroot\<CompanyName> <root>\Lighthammer\Illuminator\Templates\<CompanyName> <root>\Lighthammer\Xacute\Transactions\<CompanyName> In addition to the three base company name directories. under the templates directory.1 Server Configuration Best Practices Web Servers It is recommended that each xMII project should have at least two servers. . Microsoft IIS Web Application Server – the back-end servlet engine used to supplement the functions of a web application. All requests to the web site are redirected to ServletExec for handling.2 2. 2. such as date selection dialogs Common graphics and other images Standard display objects. Using common objects promotes team development and standardization. & Prod) configuration and installations should be identical for fast and easy promotion and deployment from the development to the production environment. such as drop down iBrowser objects for web forms Common Business Logic transactions across application (file I/O.2. a Development and Production server. The two server (Dev.2 2. A Business Logic transaction directory with the same name should also be created for each web server under the transactions directory. 2. D:. and the xMII product runs within ServletExec.2 Deployment Strategies Each web server should have a separate web site configured in IIS that will be used for the installation of xMII. reusable objects.an equipment list query) Common user input objects. Examples of common objects are as follows: • • • • • • • Common queries across many applications (e.the installation disk drive letter such as C:. and provides project team members with reusable content. should be created for each web server. etc. Web Server – the machine that is to host the xMII software. helps maintains application consistency. Corresponding xMII template directories. with the same names. New Atlanta’s ServletExec <root> .) Reusable JavaScript library files Cascading Style Sheets (CSS) © 2006 SAP AG 6 . The ServletExec Java Servlet engine will be installed for that specific web site. then the Default Web Site can be used for ease of configuration and administration. etc. xMII should be installed on the drive of the machine where IIS is installed. If the web server has only one web site configured. e-mail messaging. Individual developed application directories should be installed below the root of the web site.g. an optional QA instance is also preferred.2.

and security through the use of their associated administration and configuration screens. Illuminator.A web site administrator or xMII lead architect should control the content of common directories. or in the Xacute directories other than Templates and Business Logic transactions.com under xApps -> SAP xApp Manufacturing Integration and Intelligence) should be reviewed and fully understood BEFORE anything is done. users. time periods. Content examples provided through SDN will be developed using this theme as a basis for development. Recommendations The installation and upgrade procedures guide in the help documentation (http://help. © 2006 SAP AG 7 . This includes all custom action blocks. customized themes. Each instance of SAP xMII should have at least a development and a production instance. The upgrade should begin with the corporate instance and then rollout to each of the plants. roles. The web administrator should also control the modification and maintenance of the configuration files found in the following directory locations: <root>\Lighthammer\Security\sysconf\ <root>\Lighthammer\Security\sysconf\userdata <root>\Lighthammer\Illuminator\Conf <root>\Lighthammer\Illuminator\SysConf The above paths contain files which control servers. customized style sheets. custom reference documents. Information about all customization should be recorded.3 Installation & Migration Installation Recommendations The recommendations in this section require careful consideration. The development instance should be upgraded and fully tested prior to the production instance. It is also a recommendation to have a full backup of your development and production instances made before the upgrade is performed. and should not be ignored without first understanding the implications.sap. 2. There should be a submittal and approval process before common objects are available to all application developers. and any other customization done on the web root. These files are not to be edited by hand unless directed to do so by an experienced technical support representative. custom SVA/SVG images. The standard xMII “Classic” theme (black background) should be selected during install in order to keep the development and any future support consistent with legacy installations.

The recommended time for this testing period will vary depending upon the developed application.log * If you begin to have issues with your SAP xMII server instance please consult these logs first before contacting support.x version of business logic is Java based and will require you to convert your . There are also logs stored on the server indicating the status of the migration. The development server should be thoroughly tested before the upgrade is performed on the production instance.log. © 2006 SAP AG 8 . There is a backup configuration stored on the installation drive of the Illuminator server.NET code to Java before your action blocks will work. The automatic backup performed by the upgrade is located in the following directory: <root>\Illuminator_backup_Date_Time The upgrade log files are located in: <root>\Lighthammer\Logs Migration.log. The 11.5. but not limited to. Follow the upgrade procedures specified in the product help documentation on http://help. and SAP_xMII_Install_Date_Time. These should be checked if you run into any issues before support is contacted. but at a minimum should include a complete click through of the entire application and its functionality.com under xApps -> SAP xApp Manufacturing Integration and Intelligence.sap.5. CMSSecurityMigration. the following locations: <root>\Inetpub\wwwroot\Illuminator\* <root>\Lighthammer\Illuminator\Templates\* <root>\Lighthammer\Illuminator\Properties\* <root>\Lighthammer\Illuminator\Conf <root>\Lighthammer\Illuminator\SysConf <root>\Lighthammer\Xacute\AnimatedObjects\* <root>\Lighthammer\Xacute\Components\* <root>\Lighthammer\Xacute\Globals\* <root>\Lighthammer\Xacute\ReferenceDocuments\* <root>\Lighthammer\Xacute\SVGObjects\* <root>\Lighthammer\Xacute\Transactions\* Performing the Upgrade (How to Upgrade Lighthammer Illuminator) Begin with the development instance of your corporate server.Please be aware that custom action blocks written in .x and newer versions. Typical directories for customization are.NET will not work with the 11.

Each of these instances should go through a similar validation process that was performed on the corporate instance.Once the development server has been upgraded and validated repeat the procedure for the production environment. If virtual server connections were used for server to server connectivity between corporate and plant instances note the LegacyURL check box in the Data Server configuration. When the legacy box is checked then a connection to an older version of the product can be made. Below is a procedural flowchart of the upgrade process: Review Product Documentation Upgrade the Corporate Development instance Test and Validate Application Content Upgrade Corporate Instance Update Development Instance at Each Plant Test and Validate Application Content Upgrade Each Corresponding Plant © 2006 SAP AG 9 . This should be done per your company’s production server upgrade procedures as far as notification of system downtime and scheduling as to not interfere with your production. While the production server upgrade is taking place it is ok to move ahead with upgrading the development instances at each of your plants. Once the operation of the server is validated it is ok to upgrade the corresponding production instance.

© 2006 SAP AG 10 .0. If your migration does fail then revert back to the 10.Migration Failure Recovery Recommendations Please note that the backup configuration xml files are still in 10.1. Be sure that when you reinstall 10.1 reinstallation and retry your 11. A proposed work around for this would be to have an IIS server that the page could post to that would support the ASP capabilities.x migration.x that you do not copy over the backed-up configuration files.x installation and copy your backup xml files over your 10. Caveats for Future Release Compatibility ASP pages will not allow for multi-platform capabilities found inherent with the Web AS architecture in version 12.x environment.x format and cannot simply be copied into the 11.

js"/> </head> <body> <!-.3 Application Design Best Practices Standard web page templates should be created and used as a starting point for all new web page development. 3. ***Note: The standard xMII “Classic” theme (black background) should be selected during install in order to keep the development and any future support consistent with legacy installations.01 Transitional//EN" "http://www.dtd"> <html> <head> <title>PAGE TITLE HERE</title> <meta http-equiv="Content-Type" content="text/html.irpt.). All styles should reside in an external cascading stylesheet library (. etc. . Presentation component defines the visual aspect of a web page via cascading styles applied to HTML objects.jsp.css"> <script type="text/javascript" src="/CompanyName /Common/UtilFunctions.01 Transitional standard Define all JavaScript blocks using <script type=”text/javascript”></script> Why? HTML 4. charset=utf-8"> <meta http-equiv="Expires" content="0"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Pragma" content="no-cache"> <link rel="stylesheet" type="text/css" href="/CompanyName/Common/CompanyName. To maintain consistency.w3. Content examples provided through SDN will be developed using this theme as a basis for development.js).PAGE CONTENT HERE --> </body> </html> Each web page should be interpreted as three separate components: Structure component defines the initial objects of a web page (.1 Structure DOs & DON’Ts DO/DON’T DO Task Define a document type definition (DTD) using the W3C HTML 4.htm. .org/TR/html4/loose. create common libraries relative to specific functionality of the web application. which should be defined in an external JavaScript library (.css).01 Transitional DTD is the standard that supports APPLET tags DO W3C has deprecated the usage of <script language=”javascript”></script> © 2006 SAP AG 11 . web pages should contain references to common Cascading Style Sheets. Refer to the sample page syntax below: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. Behavior component defines the dynamic interactivity and creation of objects in a web page. Where appropriate.

it is not possible to predict applet behavior or the order in which they load on a page. printable format when user events are not needed. applets are rendered independently of HTML. the standard default stylesheet (<root>\Inetpub\wwwroot\Illuminator\StyleSheets\cms. button click event) rather than synchronizing via <body onload=”myFunction(). typically caused my manual editing. rather define the height and width as pixels or other measurement.2 Presentation DOs & DON’Ts A common cascading stylesheet library should be used to keep the same look and feel between web pages within the xMII web application. Take advantage of the supplied xMII Productivity Wizards to assist in the applet code generation. For a project starting point.DO/DON’T DO Task Use <servlet> tags for displaying data instead of an applet in a static. all text fonts and sizes should be selected from the Style dropdown. Evaluate each xMII Applet definition. 3. A high occurrence of user-error has been identified within illegal applet definitions. size. Java applets are embedded objects.css) can be copied to the Common project directory underneath the webroot and should be managed by the web administrator or lead architect. When defined as a percentage. the browser windows size changes the div size which could interfere with the applet rendering correctly. If you are using FrontPage. which are entirely independent of the document.”> or from the loading of another applet. and weight. Therefore. DON’T Use inline CSS within a web page. DO/DON’T DON’T Task Attempt to manipulate applets via CSS Why? Although applets can be displayed inside HTML. and not by directly choosing font. instead use an external style sheet or one defined within the web page header © 2006 SAP AG 12 . Constraining styles to a global. reusable style sheet allows a streamlined approach to implementing and if necessary troubleshooting CSS. Why? Servlets are recommended for use with non-Java (Standard Edition) mobile devices. DO DO DON’T Do not place applets in a <div> tag with height and width as a percentage. Drive multiple applet loading from xMII applet events (Selection events.

3.getGridObject(). DON’T JavaScript is the only documented and supported scripting language for interfacing with the applets. var myQuery = myApplet. instead define them in a <script/> block located in the <head/> of a web page or in a separate js file. var myApplet = document. DO Use the xMII Script Assistant to generate and determine correct query/display object methods and properties. Even though JavaScript does not require this compliancy. it is good practice to declare them at the top of a function unless where necessary otherwise. or Jscript to interact with the applets. Display Object. Provide proper documenting and commenting of all relative code. DO DO Consider the creation of JavaScript variables to reference the Applet object.iGrid. Do not use ASP. VBScript. © 2006 SAP AG 13 . and Query Object. The standalone version can be used as a quick reference to ensure adherence to the proper JavaScript syntax. Commenting code eases future development and promotes team level reusability of functionality.3 Behavior DOs & DON’Ts DO/DON’T DO Task All variables need to be declared. DON’T Do not use JavaScript functions dealing with applets within the <body> of a web document. consistency in programming eases future development. var myGrid = myApplet.getQueryObject(). Avoid using key or reserved words when naming the variables. Why? Most scripting languages require that all variables be declared. W3C recommends that the <script> tag be located between the <head> tags. The xMII Script Assistant is the premier tool to reference applet methods.

and Query identifies the object as a query object. For example. Example: <root>\Inetpub\wwwroot\CompanyName\AppName1\FunctionalSet1 <root>\Inetpub\wwwroot\CompanyName\AppName1\FunctionalSet2 <root>\Inetpub\wwwroot\CompanyName\AppName2\FunctionalSet1 <root>\Inetpub\wwwroot\CompanyName\AppName2\FunctionalSet2 <root>\Inetpub\wwwroot\CompanyName\AppName2\FunctionalSet3 3. the web administrator should make the xml files Read-Only to preserve the standards and to prevent inadvertent developer Save (instead of Save As) errors. When a new template is needed.6 Naming Convention Suggestions All query templates should be named in the following manner: <SpecificPurpose>Query For example a Shift Detail Query template would be named: ShiftDetailQuery. iGrid. application team members should load the appropriate default theme template. When using the Display Template Editor and creating a New template. Do not make changes to the default system templates located in the Defaults template folder. For iGrids. Once the company desired default theme templates have been created.5 Default Templates xMII provides a set of default templates that are used as a foundation for controlling the typical look and feel of the applet visual properties. string. but when including the full path of the template would read CompanyABC/Metrics/OEE/ShiftDetailQuery and would classify the ShiftDetailQuery as a component of the OEE Metric for CompanyABC. and properties for all newly developed content. Keep in mind that template names are always provided as fully qualified paths. iBrowser. the simple name could remain ShiftDetailQuery. iCharts. where content specific changes can then be made. SPC Charts and Ticker display templates. © 2006 SAP AG 14 . where Shift Detail is the specific implementation. if the ShiftDetailQuery template was located in a project path such as CompanyABC/Metrics/OEE/. The Writer Role security can also be adjusted so that only the web administrator role has the ability to change the Default Theme templates. and boolean properties to the various configuration parameters available for the corresponding iChart. substitute the appropriate object type for “Query” in the template name.3. font style and sizes. Note: the iGrid is autodefaulted to the xMII default template (/Defaults/iGrid). etc. and use the Save As function to save the template to the desired application directory. these default templates assign the color. so the directory structure itself carries additional information that does not need to be reiterated in the specific template name itself. These default templates are located in <root>\Lighthammer\Illuminator\Templates\Defaults.4 Application Directory Structure A web folder should be created for each functional area of an xMII web application to provide organization and structure to the application itself. In addition to those provided the display templates similar to the following list should be created and used to create the appropriate applet types such as: <root>\Lighthammer\Illuminator\Templates\CompanyName\DefaultTheme\iChart <root>\Lighthammer \Illuminator\Templates\CompanyName\DefaultTheme\iGrid <root>\Lighthammer \Illuminator\Templates\CompanyName\DefaultTheme\iSPCChart These template themes will insure common colors. 3.

DO Use error handling messages when dealing with SAP data sources and other sources as well. Add a third branch in which the necessary action blocks can call the reference variables.1 Business Logic DO/DON’T DO Task Document action blocks used in Business Logic and their respective segments with a meaningful description and name. Instead. Avoid unnecessary that are used for debugging. it is helpful to have an empty segment at the beginning of each branch with a detailed description of what that part of the transaction does. Helps in troubleshooting data access problems easily and efficiently Easy method of quickly determining an action’s configuration DO Use a transactional Boolean property such as ‘DebugFlag’ in a Conditional action block in the sequence immediately before doing the XMLSavers to allow for easy debugging. For complex transactions. troubleshoot and rework a transaction. also improves processing time when querying a transaction DON’T Will make date-time calculations much easier and faster. These points will also be helpful in fine tuning the performance of xMII for maximum usability and response time. Why? Makes it easier for users to understand. Saves on processing time by not running debug actions every time a transaction is queried. Allows for dynamic interaction of debugging user selection. DO DO Disk I/O is expensive and using a Tracer can be much easier to follow. 4. Declare date parameters as Strings instead of the native DateTime format. Optimizing Business Logic Transactions with XPath – reference on SAP Developer Network showing optimization techniques for XML manipulation using XPath © 2006 SAP AG 15 . Simplifies the logic in a transaction. DO Reference arrows on action blocks for a visual of incoming and outgoing parameter assignments DON’T Replicate action blocks under the True/False branches of a conditional. declare local variables to hold the values calculated under each condition. Quick glance gives user an idea of what the following actions will be accomplishing.4 General xMII Best Practices The following points are general xMII functionality suggestions that should be used in order to achieve the full potential of the product.

leading to performance complaints and people becoming discouraged from using the interface. In order to prevent this situation from occurring it is possible to clear the xMII system cache via a URL servlet call to the xMII server: http://<ServerName>/Lighthammer/Illuminator?Service=QueryCaching&Mode=ClearCache This will remove all of the cached values ensuring that there aren’t any dataset values from the previous day. depending on your business process. A slightly different situation for using the xMII cache is where the data values change once a day or even once a week such as with Business Information Warehouse (BI or BW). represents the current batch. it may be ok to cache the results for half an hour. It may only change every couple of hours. when used properly. It represents a value that is constantly changing from second to second. In addition to this servlet call it is possible to pre-charge the cache for the day by running a transaction that will make the © 2006 SAP AG 16 . In this situation the data coming back from the warehouse may take longer than the user cares to wait for their reports. To circumvent this problem the cache duration can be set for multiple hours or even days before the information stored is set to expire. Additionally the need to query this data-source multiple times for the same data values will almost certainly arise. Worst case scenario for this would be data coming back that was 59 minutes old but in the case of current batch this may be alright for the front end. For the case of Tag_A let’s say that there is a page that is displaying the total number of bottles produced versus the total number of bottles rejected and then their difference as shown below: Figure 1: Bar chart of piece counts at various stages on the production line. Imagine the scenario where every morning at 8am the BW system has finished being loaded with the data from the previous day. However. Rather the query can be cached for a couple of minutes to save the PI system from handling a lot of queries and it will still yield enough information about the process to be useful. in order to accommodate people in different time zones. Since the level of volatility is not consistent for all values across a system it is important to know the business process in place in order to accurately set your cache. For introductory knowledge of the xMII cache please read in the information contained in the xMII help docs under DataServices -> Query Templates -> Query Editor Overview -> Query Editor. For the Tag_B type information about current batch. If the query is made before noon that day there will not be a problem but if the query happens at 1pm and someone performs the query at 8:30am the following day they will still get information from the previous day. There is typically no need to query the PI system every time that this applet is loaded on a page for up to the second counts. The two main things to keep in mind when setting the query cache duration is the volatility of the data stored in the data source and the resolution that the user requires the data to be viewed at. can greatly improve the efficiency of your xMII application. represents a count of bottles through the production line. The query cache on your query is set for 20 hours.4. if the query is for some back end system you may not wish to cache it at all. However there can be a problem with setting the cache for long time durations. For example look at two hypothetical tags that exist in a Plant Information (PI) system: Tag_A. Tag_B.2 Querying & Caching Query caching in the xMII environment.

Greatly improves response time of data as well as minimizing load on the server. DON’T Use date ranges when caching a query. © 2006 SAP AG 17 . DO Use caching where the data values change once a day or even once a week. Why? Minimizes load on the server and only displays what is necessary for the user to see. via the web page interface will not have to wait for this list of plants but rather will get them back instantly via the xMII cache. DO Enable query caching after the application has been developed. DO/DON’T DO Task Query for data that is needed and not for full tables. Remember not to get discouraged with incorrect cache duration settings as this is specific to a business process and there’s no concrete method for specifying them but rather is based off of the GUI requirements. An example of this situation would be a plant list from ERP. Query caching will not work. The list of plants will typically not change during the day or even during the week so it may be ok to query the system for this list of plants in the morning via a transaction and then store the results to the xMII cache. Avoid issues during development. The reason behind this is to prevent large quantities of repetitive data from being stored in the xMII cache.“frequent” calls to the data source. Then when the user. This will help to eliminate incorrect query issues due to the query results stored in the xMII cache.

IRPT pages via the URL. http://<servername>/CompanyName/App1/mypage. DO DO The method can be accessed via JavaScript when an applet is on a page. Machine. DO Set session variables via an applet’s PARAM attributes. You can hide the applet by setting its height and width attributes to 1 so it’s not viewable to a user.4. These can then be accessed through the IRPT pages created. Why? Session variables are only available and accessible via the IRPT pages. © 2006 SAP AG 18 . DO Use the getPropertyValue(“NAME”) method of an applet to read a session variable. and Language and can be viewed with http://<servername>/Lighthammer/PropertyAccessServlet?Mode=List HTTP Request variables can also be passed into . Use the setPropertyValue(“NAME”. FullName.3 Session Variables Session variables can be used to store specific data regarding the user and the current login session that is active. "VALUE") method of an applet to set a session variable. IllumLoginRoles.e. These new parameters would be available on user login. Very easy method of extracting either preset or custom session variables. Use the User Management Editor to create new session variables and assign values to them. Passing variables via PARAMs is useful when not using IRPT pages and only HTML since HTML can’t handle it through the URL. IllumLoginName. The default variables are: Description. but these are only usable by that page because they are not in the actual session (i. DO/DON’T DO Task Use the IRPT pages to access the Illuminator session variables.irpt?OrderNum=123&RowNum=100).

humidity. but they also provide the means to retrieve data in a consistent fashion. as well as the connector specific documentation that identifies any vendor specific behavior or characteristics. weights Digital/Discrete: limit switches. levels. © 2006 SAP AG 19 . All of the tags and respective data found in these tag based systems are exposed by the xMII connectors without requiring specialized knowledge about the underlying queries necessary to retrieve the desired information. or vendor specific API or SDK data connectors.5 Shop Floor Integration Process Historians are widely used in manufacturing and other industries to record real-time process data from the shop floor. connecting through a relational database interface. motors on/off. lot id SAP xMII provides connectivity to a large number of historian software packages. irregardless of the specific software package delivered by the vendor. are as follows: Analog: temperature. These connectors provide not only the necessary means to interface with the underlying process historian. flow-rates. either utilizing a relational database or a combination of relational database and compressed archive files. batch id. Examples of these process data points. material id. pressure. OleDB. commonly referred to as tagnames. The xMII connectors dynamically expose the tags with namespace browsing modes such as: GroupList: hierarchical tree structure for logical grouping of associated tagnames – not all historians implement this capability TagList: list of tagnames and their corresponding description The xMII connectors return data from the underlying historian with tag query modes such as: Current: live tag value History: time series interpolated tag values HistoryEvent: time series raw tag values Statistics: interval based statistical tag results from raw tag values Please refer to the xMII documentation for additional information concerning query properties that are specific to ‘TagQuery’ query templates. discrete level sensors String: product id.

XI.6 NetWeaver (BI. VC) Integration How to Integrate xMII with the Business Information Warehouse – SAP Developer Network document highlighting the process for integrating xMII with BI Calling Services and Queries in SAP xMII 11.5 from ABAP How to Integrate SAP xApp Manufacturing Integration and Intelligence -SAP xMII with Visual Composer – SAP Developer Network document highlighting the process for integrating xMII with Visual Composer How to Send an IDoc from the SAP R3 Enterprise to the SAP xMII IDOC Listener 7 Mobile Applications How to configure the xMII Server and xMII Pages for Mobile Devices – SAP Developer Network document that discusses the process for viewing xMII content on mobile devices. 8 Security Setting up Single Sign on between xMII & Enterprise Portal © 2006 SAP AG 20 . EP.

JavaScript with xMII DO Use executeCommand method in JavaScript when interact with iCommand Applet. DO DO Use try/catch/finally statement in JavaScript.getLastError()). With xMII Transactions. errors or exceptions are a fact of life for application developers. The try/catch/finally code tries to execute a block of code and control is passed to the catch block if it does not execute successfully. To avoid the potential typo or other errors at design time. may occur.Applet.Applet. } else { alert(“Failed with error: “ + document. The finally block executes after the try and catch blocks finish. © 2006 SAP AG 21 . there are various techniques available. This statement encloses a block of code in which an exception.executeCommand()) { alert(“Successful”). Performing Error Handling with Web Page Generation (Especially on JavaScript): DO/DON’T Task Why? Generic JavaScript DO Use Web page editor such as FrontPage. as well as language features. Check everything before proceeding. The disconnected nature of Web application development leaves many points where errors can and do occur. Use alert to raise warnings or errors. and the finally block includes code that is always executed. such as: if (document. (see prior example) This method is used to return a string describing the last error associated with a call to the executeCommand() method. It returns true on a success. } DO Use . This method is used to execute the command associated with the iCommand applet's query template. like a runtime error. The catch block is skipped if no errors occur. That is. and false if an error occurred.9 Error Handling Regardless of skill level. The catch clause outlines how the error will be handled. method call and assignment of variable and so forth before utilizing them. The key is gracefully handling any unexpected (or expected) errors to control the user experience.getLastError() method in JavaScript when interact with iCommand Applet. DreamWeaver to edit Web pages. there are several actions available to properly handle the errors occurred in the run of business logics. to properly handle any problems. With JavaScript. validate an object. This avoids any errors associated with working with an object that has not been instantiated or a call to a method that does not exist or assignment value that is not valid.

On a non-recoverable. This type of message is used to add additional information on an incomplete result set. without the need to handle the result as a nonrecoverable. the Termination Message is used as the error message returned by the transaction. or fatal. DO Use Event Logger Action to record important events and errors within a transaction. Terminate Transaction action is extremely helpful when testing specific sequences of actions. DO Use xMII Informational Message Action if you want SAP xMII to handle the output of a transaction as an informational message. © 2006 SAP AG 22 . or fatal.DO/DON’T DO Task Use the following query object methods to provide query status: isDataValid(). The Event Logger Action allows developer to create an entry in the User Log. without having to execute the entire transaction. Fatal Message action is designed to create an SAP xMII document with a single failure message. Why? isDataValid(). or to add context to a data set. When configured to Terminate With error. SAP xMII assumes a single message will be returned. getStatusMessage(). Informational Message action is designed to create add one or more informational messages to an SAP xMII document. User can define the event type and message. It can also be used in conjunction with a conditional action to terminate the execution of the transaction provided that a specific condition is met. This can be a useful way to record important events and errors within a transaction. error. DO Use xMII Terminate Transaction Action to terminate a transaction at a specific point in the execution with Termination Message specified. The general log is also a good place to find typical debugging information. shows the last message." getLastStatusCode(). Performing Error Handling with xMII Transactions: DO/DON’T DO Task User Trace Action and trace log or other logs to debug at the development time. Why? The Tracer action is used to help in debugging. error. is a validity flag that shows "true" or "false. getLastStatusCode(). shows a numeric status code. getStatusMessage(). Trace logs provide step-by-step information. DO Use xMII Fatal Error Action if you want SAP xMII to handle the output of a transaction as a fatal error.

© 2006 SAP AG 23 . return errors and specific error messages may be in different paths within the XML. RFC. Why? If a Terminate Transaction Action is encountered within the configured transaction. Exception handling should be processed based on these specific message returns. WAS. DO Handle exceptions in the response document received from the called function module when use SAP ERP Interface Actions such as JCO. informational messages. warnings. and success). the configured termination message will be returned to the LastErrorMessage property. The SAP ERP Interface actions are used to send XML messages to and from SAP. BC interface actions. Depending on the type of functions (BAPI. There are different types of message returns (errors. particularly in custom built function modules.DO/DON’T DO Task Use LastErrorMessage Property to debug and error handle since it will contain the response message from the configured Transaction Call.). etc. and each response can have one or more return messages.

10 10. If using any UDS type connections. especially for fully qualified URLs. Correct any non-relative page links in the web content. Comment out or remove any unnecessary debug type JavaScript alert messages from the web pages. Look for APPLET definitions that contain non-standard attributes. remove unnecessary ones and adjusting time interval configurations where applicable. including system and user configuration.1 Go Live! Check List Final Application Readiness Check List Make sure the log settings (Log Management…Log Configuration) are set to either Warning or Error. Make sure that any transactions using unnecessary XMLSaver action blocks for debugging purposes are either disabled with a false conditional block or are removed from the TRX. web content. business logic services transactions. © 2006 SAP AG 24 . proper format for iChart is as follows: CODEBASE="/Illuminator/Classes" CODE="iChart" ARCHIVE="illum8.zip" Review Business Logic schedules. all application content including query and display templates. reference docs and schedules. Perform full application backup. Eliminate any backup files or debugging content files found in any of the pertinent content locations. Eliminate any unused or empty backup or temp folders in any of the pertinent content locations. make sure that any Debug settings have been turned off.

When using additional login accounts to test various levels of security and content make sure to close all open browsers to ensure a fresh login session. but effectively test the authentication and authorization by using a configured user account. or periodically check the Logs using the appropriate viewer page. Watch for errors in the browser’s status bar. This can be enhanced by using the Internet Explorer Advanced setting for browsing: ‘Display a notification about every script error’. While doing the click-through either use the interactive Log Monitor application (Log Management section in the Menu). Monitor the Sun Java Console during the site click-through looking for pages that may have potential issues. instead use an actual client imaged PC so as to emulate the user experience and expose any potential authentication problems.10. including potential script errors.2 Final Application Click-Through Do not use http://localhost to reference the server for the click-through exercise. © 2006 SAP AG 25 . Do not log-in with the Admin user.

sdn. moderated discussion forums.” (https://www. consultants. © 2006 SAP AG 26 . expert blogs.NET. an extensive eLearning catalog.sap.com) “SAP Developer Network (SDN) is an active online community where ABAP. .com/saphelp_xmii115/helpdata/en/index.sap. etc. xMII: http://help.sap. SAP Developer Network (http://www. and other cuttingedge technologies converge to form a resource and collaboration channel for SAP developers.11 References…More Help! The following outline will document the many available resources to resolve problems. SAP Service Marketplace (http://service. Java.sdn.com/irj/sdn/about) SAP Help Portal (http://help. integrators. You can search and browse for help guides dealing with virtually every component of SAP ranging from xApps to R/3. and business analysts. RFCs.htm Interface Repository (IFR) (http://ifr.com) A collection of all published SAP interfaces which are in agreement with W3C standards. find relevant information and simply to find additional information regarding a certain SAP component or product. IDOCs.com) A great source for web-based documentation that covers all SAP Solutions.com) The focus of this site is to provide a source for many portals that can deliver information on specific content. exclusive downloads and code samples. and active.sap.sap. as well as the definitions of each attribute associated with them.sap. SDN hosts a technical library. This source is great for viewing the structure of BAPIs.

Sweden. VideoFrame. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. Java is a registered trademark of Sun Microsystems. and PowerPoint are registered trademarks of Microsoft Corporation. Nothing herein should be construed as constituting an additional warranty. i5/OS. MVS/ESA. OS/2. OSF/1. zSeries. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. All other product and service names mentioned are the trademarks of their respective companies. except if such damages were caused by SAP intentionally or grossly negligent. OS/400. MaxDB is a trademark of MySQL AB. Inc. HTML. DB2 Universal Database. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services. World Wide Web Consortium. and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. AS/400. AFP. if any. used under license for technology invented and implemented by Netscape. the implied warranties of merchantability. xApps. links or other items contained within these materials. indirect. OS/390. The information contained herein may be changed without prior notice. Citrix. and SAP Group shall not be liable for errors or omissions with respect to the materials. including but not limited to. R/3. MetaFrame. mySAP. SAP. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. or consequential damages that may result from the use of these materials. X/Open. XHTML and W3C are trademarks or registered trademarks of W3C®. iSeries. PostScript. SAP shall not be liable for damages of any kind including without limitation direct. Tivoli. or non-infringement. DB2.. XML. © 2006 SAP AG 27 . WinFrame.com. Microsoft. z/OS. SAP does not warrant the accuracy or completeness of the information. text. Intelligent Miner. mySAP. fitness for a particular purpose. UNIX. graphics. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Inc. Massachusetts Institute of Technology. S/390. SAP does not warrant the correctness and completeness of the Code given herein. AIX. xApp. and SAP shall not be liable for errors or damages caused by the usage of the Code. Data contained in this document serves informational purposes only. pSeries. Outlook. without representation or warranty of any kind. These materials are provided “as is” without a warranty of any kind.Copyright © Copyright 2006 SAP AG. ICA. Netfinity. Adobe. the Adobe logo. Windows. POWER. All rights reserved. Informix. Parallel Sysplex. Oracle is a registered trademark of Oracle Corporation. special. National product specifications may vary. SAP NetWeaver. Program Neighborhood. WebSphere. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only. and Motif are registered trademarks of the Open Group. and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. JavaScript is a registered trademark of Sun Microsystems. POWER5. These materials are subject to change without notice. and MultiWin are trademarks or registered trademarks of Citrix Systems. Acrobat. xSeries. either express or implied. OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Inc. Any software coding and/or code lines/strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. IBM.

Sign up to vote on this title
UsefulNot useful