SAP MII BP

download SAP MII BP

of 28

Transcript of SAP MII BP

  • 8/6/2019 SAP MII BP

    1/28

    SAP Manufac t ur ing In tegrat ionand In te l l igenc e 12.X BestPrac t ice Gu ide

    Applies to:

    SAP Manufacturing Integration and Intelligence (MII) versions 12.0 and 12.1

    Summary

    This guide identifies approaches for the most flexible and best performing MII applications.

    Author: SAP MII Field Enablement and Support Teams

    Company: SAP

    Created on: July 15, 2009

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    2/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Table of Contents

    Introduction ......................................................................................................................................................... 4Architecture ......................................................................................................................................................... 4

    SAP NetWeaver .............................................................................................................................................. 4MII Integration Architecture ............................................................................................................................. 5SAP MII Single Plant Architecture .................................................................................................................. 6SAP MII Enterprise Architecture ..................................................................................................................... 7SAP MII Enterprise Architecture for Regional Landscapes ............................................................................ 8SAP MII Single Central Landscapes (General DONTs) ................................................................................. 8

    Server Configuration Best Practices ................................................................................................................... 9Web Servers ................................................................................................................................................... 9Web Applications ............................................................................................................................................ 9

    Definitions .................................................................................................................................................................... 9Deployment Strategies ................................................................................................................................................. 9

    Installation & Migration .................................................................................................................................... 9Recommendations ....................................................................................................................................................... 9Performing the Upgrade ............................................................................................................................................. 10

    Application Transports ...................................................................................................................................... 10Source Control in MII 12.1 ............................................................................................................................ 10

    Application Design Best Practices .................................................................................................................... 12Naming Convention Best Practices .............................................................................................................. 12

    MII Objects ................................................................................................................................................................. 12JavaScript and Web Related ...................................................................................................................................... 12Projects ...................................................................................................................................................................... 12Data Servers .............................................................................................................................................................. 13

    Project Best Practices ................................................................................................................................... 13Project Definition ........................................................................................................................................................ 13Commonality in Project Organization ......................................................................................................................... 13Project DOs and DONTs ........................................................................................................................................... 14

    Structure DOs & DONTs .............................................................................................................................. 15Presentation DOs & DONTs ........................................................................................................................ 15Behavior DOs & DONTs............................................................................................................................... 17Transaction DOs & DONTs .......................................................................................................................... 19

    Other MII Best Practices ................................................................................................................................... 22Querying & Caching ...................................................................................................................................... 22Session Variables ......................................................................................................................................... 24

    Log Management .............................................................................................................................................. 25Applet Debugging .......................................................................................................................................... 25

    Go Live! Check List ........................................................................................................................................... 26Final Application Readiness Check List ........................................................................................................ 26Final Application Click-Through .................................................................................................................... 26

    ReferencesMore Help! .................................................................................................................................. 27

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    3/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Copyright ........................................................................................................................................................... 28

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    4/28

  • 8/6/2019 SAP MII BP

    5/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    MII Integration Architecture

    MII integrates with manufacturing systems and SAP ERP Central Component (ECC) or R/3 connecting theshop floor operation level and enterprise data. This allows you to monitor your operations and resolvemanufacturing exceptions in real time.

    MII offers comprehensive pre-integration to virtually all elements of SAP ERP and the NetWeavertechnology stack. Content and services created in the MII environment are exposed to the entire enterpriseas services via NetWeaver. All MII services can be utilized by other NetWeaver components (PI, Portal, and

    Visual Composer). Visualizations can be exposed through SAP Portal, and content delivery throughMicrosoft SharePoint is also supported.

    Access to 100% of ERP functionality integration is supported through 3rd Party Middleware/EAI products aswell.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    6/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    SAP MII Single Plant Architecture

    In the single plant example below, an MII server is installed on the plant network to provide operationalintegration and visibility for production personnel. At most plants, MII connects to data sources, datahistorians, control systems, etc. that can generate very large data volumes. With MII located at the plant,there is minimal performance impact with respect to the wide area network (WAN). In the event of a WANoutage or ERP maintenance, MII can continue to operate while disconnected from ERP.

    Connecting to plant data sources can be a complex combination of software and network choices. Firewalls,

    ports, routers, UDS, DNS, OLEDB, OPCDA/OPCHDA, O/S, hardware, and security are some commonfactors among the many considerations when making the connections. The subject is narrow in focus, butbroad in complexity and for the purposes of this document, out of scope. Nonetheless, those connections willbe necessary in your architecture.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    7/28

  • 8/6/2019 SAP MII BP

    8/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    SAP MII Enterprise Architecture for Regional Landscapes

    When there are clusters of plants with a common datacenter or several small plants in a small geographicarea, a single MII instance can support more than one plant effectively. From an MII central instance, thecomments above in the Multi-Plant context still apply.

    SAP MII Single Central Landscapes (General DONTs)

    Often for cost considerations, a single central MII server (without plant MII servers) is suggested as thearchitecture. Initially it can be used to demonstrate a Proof of Concept though performance can besubstantially degraded by accessing large datasets across the WAN. Others have used this architecture fora simplified GUI based on ECC (or other central data sources). The main consideration is to have the MIIserver close to the main sources of data. Usually, that means at the plant near the manufacturing data(MES, data historians, etc.). Consider carefully the WAN loading, data time zone implications, scalability,disconnected operation capability, and response time when deciding upon your architecture.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    9/28

  • 8/6/2019 SAP MII BP

    10/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Performing the Upgrade

    An upgrade should follow the Plan-Build-Run methodology found on http://service.sap.com/upgrade .

    Follow the specific MII upgrade procedures in the Upgrade Master Guide on http://service.sap.com/instguides.

    Begin with the development instance in your landscape. Once upgraded, the development server should bethoroughly tested before the upgrade is performed on the production instance. The recommended time forthis testing period depends on the developed application, but at a minimum should include a complete clickthrough of the entire application and its functionality.

    If you have any issues with your SAP MII server instance during the installation,please consult the NetWeaver logs first before contacting support. If you haveissues when migrating, please consult the migration log first before contactingsupport.

    Once the upgraded development server has been validated, repeat the procedure for the productionenvironment. This should be done per your companys production server upgrade procedures as far asnotification of system downtime and scheduling as to not interfere with your production.

    If virtual server connections were used for server to server connectivity between corporate and plantinstances, then note the LegacyURL check box in the Data Server configuration. When the legacy box ischecked then a connection to an older version of the MII product can be made.

    Application Transports

    Organizations should follow the previously mentioned server configurations and landscape best practices.When transporting an application from a development to a test/QA environment, the administrator shouldexport a project (see Project Best Practices) and save the zipped project to a safe location. After completing

    the backup, the administrator will simply import the project into the test/QA system. Projects and their folderswork as an insert/update to the database. For example, if a project already exists the system will just updatethe project with what has changed. If the project is nonexistent, then it will do an insertion. Deletion onlyoccurs manually. The procedure will then be repeated for the production environment. Applications should beclicked through and the NetWeaver logs should be checked to verify all MII objects are working correctly.

    Source Control in MII 12.1

    In MII 12.1, the Source Control Service can help you have a smoother development process by managingand coordinating multiple developers work for a solution. This feature is focused on managed version controlof MII content. Activities are used to group changes for versioned content. A developer can check in anActivity, check out Activities, view version history on an MII object, revert back to a previous version andsynchronize different versions.

    Source Control is set up first in NetWeaver Development Infrastructure (NWDI). For more information onNWDI, please visit http://help.sap.com/NetWeaver. An administrator must configure it in the Source ControlService category in MII.

    In order to modify the NWDI User Configuration screen in MII, the user must have aSAP XMII Super Admin role and belong to the NWDI Developer Group.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

    http://service.sap.com/upgradehttp://service.sap.com/instguideshttp://help.sap.com/netweaverhttp://help.sap.com/netweaverhttp://service.sap.com/instguideshttp://service.sap.com/upgrade
  • 8/6/2019 SAP MII BP

    11/28

  • 8/6/2019 SAP MII BP

    12/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Application Design Best Practices

    Naming Convention Best Practices

    Naming conventions are one of the most important aspects when developing MII applications. Namingconventions may differ from the ones below to due strict company standards or regulations. However, it isvery important to be very consistent when using meaningful naming conventions.

    MII Objects

    All templates should be named in the following manner:

    For example a Shift Detail Query template would be named:

    ShiftDetailQuery, where Shift Detail is the specific implementation and Query identifies the object as aquery object. Developers should use the Camel Case notation for MII objects in this example (first letter of aword is capitalized in an identifier). Other examples are:

    ShiftDetailTransaction

    ShiftDetailChart

    ShiftDetailGrid

    Keep in mind that template names are always provided as fully qualified paths, so the directory structure,which includes the project name and subfolders, carries additional information regarding the template as inthis example:

    CompanyABC/Metrics/OEE/ShiftDetailQuery

    Good naming conventions will make it easier for developers to find and check outcorresponding objects when using MII 12.1 Content Management features. See theApplication Transport section.

    JavaScript and Web Related

    Consider the creation of JavaScript variables to reference the Applet object, Display Object, and QueryObject as follows (using the Pascal case naming convention where first word is not capitalized but otherwords are capitalized):

    var myApplet = document.iGrid;

    var myGrid = myApplet.getGridObject();

    var myQuery = myApplet.getQueryObject();

    Naming an applet in an IRPT or HTML page that corresponds to its object is another good practice. Forexample:

    This describes the applets purpose when troubleshooting a page. At a quick glance, a developer can see

    that the iGrid applet displays values for asset utilization. Also, if the applet has an issue, a developer canlook at the Java Console and see what errors are thrown for a particular applet.

    Projects

    Projects should be either named after the company or the company division (which depends on how manyMII applications are present). Folders and sub folders should be named for applications and functional areas.

    Example:

    CompanyDivision\AppName1\FunctionalSet1

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    13/28

  • 8/6/2019 SAP MII BP

    14/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    In MII 12.1, the Content Management functionality provides change managementfeatures which track modifications to files including items in the common folder in theproject.

    Project DOs and DONTs

    DO/DONT Task Why?

    DO Create a Common Project for objects shared acrossProjects. A Common folder can be created within aProject itself for content shared at the project level.

    Leveraging a CommonProject or folder promotesreuse, consistency,eliminates duplication,and saves developmenttime (and disk space!).

    DO Mirror the folder structure on the Catalog, Web, andMeta-Inf tabs to the greatest extent possible.

    Consistency in structurehelps developers locateneeded MII objects.

    DO Use good naming conventions when namingprojects and folders.

    See Naming Conventionsfor more information.

    DO Load the appropriate template, and use the Save Asfunction to save the template to the desiredapplication directory, where content specificchanges can then be made.

    Templates in a commonfolder will insure commoncolors, font style andsizes, and properties forall newly developedcontent.

    DO Create reusable content that allows for dynamicquery and transactional capabilities of MII.

    Promotes more flexibleand less redundantcontent.

    DO Create a folder structure in a project for eachfunctional area of an MII web application.

    Example:

    CompanyDivision\AppName1\FunctionalSet1

    Provides organization andstructure to the

    application itself.

    DONT Create a separate folder for queries, a separatefolder for charts, a separate folder for grids, etc., butrather group related objects within the same folder.

    It is much easier to findthe components of anapplication when storedas a functional area ratherthan by object type.

    DONT Leave old unnecessary backups of MII objects andfolders in your projects. Extra unused content andfolders can lead toconfusing, incorrect linksin display templates andweb pages.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    15/28

  • 8/6/2019 SAP MII BP

    16/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    DO/DONT Task Why?

    DONT Attempt to manipulate applets via CSS. Although applets can be displayedinside HTML, applets are renderedindependently of HTML.

    DONT Use inline CSS within a web page;instead use an external style sheet orone defined within the web page header.

    Constraining styles to a global,reusable style sheet allows astreamlined approach toimplementing and if necessarytroubleshooting CSS. There areexceptions to this rule, but usingexternal style sheet is generallyrecommended.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    17/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Behavior DOs & DONTs

    Behaviordefines the dynamic interactivity and creation of objects in a web page, which should be defined inan external JavaScript library (.js). Where appropriate, create common libraries relative to specificfunctionality of the web application.

    DO/DONT Task Why?

    DO Develop data driven pages (ex. IRPTpages) in an application rather than HTMLpages when necessary.

    Dynamic web pages improveapplication flexibility and robustness.Less hard coded functionality alsoreduces application maintenance.

    DO All variables need to be declared; it is goodpractice to declare them at the top of afunction. Avoid using key or reserved wordswhen naming the variables.

    Most scripting languages require that allvariables be declared. Even thoughJavaScript does not require thiscompliancy, consistency inprogramming eases futuredevelopment.

    DO Provide proper documenting andcommenting of all relative code. Try to usecomments to explain the why and not thehow.

    Commenting code eases futuredevelopment and promotes team levelreusability of functionality.

    DO Consider the creation of JavaScriptvariables to reference the Applet object,Display Object, and Query Object.

    var myApplet = document.iGrid;var myGrid = myApplet.getGridObject();var myQuery =myApplet.getQueryObject();

    DO Use the MII Script Assistant to generate anddetermine correct query/display objectmethods and properties.

    The MII Script Assistant is the premiertool to reference applet methods. Thestandalone version can be used as aquick reference to ensure adherence to

    the proper JavaScript syntax. In MII12.1, the Workbench contains built-inscript and applet assistants which arerecommended for use.

    DO Utilize Session Properties for staticproperties.

    See the Session Variables section.

    DO Utilize URL properties when passing valuesfrom page to page.

    URL properties are more efficient thatSession properties in this scenario. Seethe Session Variables section.

    DONT Do not use JavaScript functions dealing withapplets within the of a webdocument; instead define them in a block located in the of aweb page or in a separate .js file.

    It is recommended that the tag be located between the tags.

    DONT Do not use ASP, VBScript, or Jscript tointeract with the applets.

    JavaScript is the only documented andsupported scripting language forinterfacing with the applets.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    18/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    With JavaScript, there are various techniques available, as well as language features, to properly handle anyproblems. Performing Error Handling with Web Page Generation (especially with JavaScript):

    DO/DONT Task Why?

    Generic JavaScript

    DO Use the MII Workbench or a web pageeditor to edit Web pages.

    To avoid the potential typo or other errorsat design time.

    DO Check everything before proceeding. Thatis, validate an object, method call andassignment of variable and so forth beforeutilizing them. Use alert to raise warningsor errors.

    This avoids any errors associated withworking with an object that has not beeninstantiated or a call to a method thatdoes not exist or assignment value that isnot valid.

    DO Handle all exceptions by using thetry/catch/finally statement in JavaScript.This statement encloses a block of code inwhich an exception, like a runtime error,may occur. The catch clause outlines howthe error will be handled, and the finallyblock includes code that is alwaysexecuted.

    The try/catch/finally code tries to executea block of code and control is passed tothe catch block if it does not executesuccessfully. The catch block is skipped ifno errors occur. The finally blockexecutes after the try and catch blocksfinish.

    JavaScript with MII

    DO Use executeCommand method inJavaScript when interact with iCommandApplet, such as:

    if (document.Applet.executeCommand()) {

    alert(Successful);

    } else {

    alert(Failed with error: +document.Applet.getLastError());

    }

    This method is used to execute thecommand associated with the iCommandapplet's query template. It returns true ona success, and false if an error occurred.

    DO Use .getLastError() method inJavaScript when interact with iCommandApplet. (see prior example)

    This method is used to return a stringdescribing the last error associated with acall to the executeCommand() method.

    DO Use the following query object methods toprovide query status:

    isDataValid();

    getLastStatusCode();

    getStatusMessage();

    isDataValid(); is a validity flag thatshows "true" or "false."

    getLastStatusCode(); shows anumeric status code.

    getStatusMessage(); shows the lastmessage.

    DO Use the appropriate method to updateobjects with an underlying time basedquery.

    In the case of a time-based query, therefresh() method will update the start andend dates based on the current time lessthe duration/duration units, but theupdateChart (iGrid, iSPCChart, etc.)method will use the specified dates.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    19/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Transaction DOs & DONTs

    DO/DONT Task Why?

    DO Create modular transactions that are assimplistic as possible and yet meetrequirements. (* See DONT section forexceptions to this regarding XML documents)

    Smaller and simplertransactions are easier todebug and unit test.Developers should considerthe size and impact of theirtransactions.

    DO Use default values for debugging transactions. Setting default values allow adeveloper to initially testtransactions and removeissues before issues arefound in run time.

    DO Leverage Reference Documents. Helps avoid linking mistakesand aids in buildingtransactions.

    DO Document action blocks used in BusinessLogic and their respective segments with ameaningful description and name.

    Makes it easier for users tounderstand, troubleshoot andrework a transaction.

    DO For complex transactions, it is helpful to havean empty segment at the beginning of eachbranch with a detailed description of what thatpart of the transaction does.

    Quick glance gives user anidea of what the followingactions will be accomplishing.

    DO Avoid unnecessary file I/O that is used fordebugging.

    Disk I/O is expensive andusing a Tracer can be mucheasier to follow.

    DO Use a transactional Boolean property such asDebugFlag in a Conditional action block in thesequence immediately before doing theXMLSavers to allow for easy debugging.

    Allows for dynamic interactionof debugging user selection.Saves on processing time bynot running debug actionsevery time a transaction is

    queried.

    DO Use error handling messages when dealingwith SAP data sources and other sources aswell.

    Helps in troubleshooting dataaccess problems easily andefficiently.

    DO Use the reference arrows on action blocks fora visual indicator of incoming and outgoingparameter assignments.

    Easy method of quicklydetermining an actionsconfiguration.

    DO Leverage XPath functionality when loopingthrough a dataset within a transaction.

    XPath can dramaticallyincrease performance gainsfor looping conditions.

    DO Use the MII protocol identifiers (server://, db://,

    web://) rather than using fully qualified pathswhen accessing and publishing files.

    Transportation issues can

    impact the application whenC:/ is not the same in yourdifferent MII landscapes.

    DO Declare date parameters in the nativeDateTime format (not as a string).

    Will make date-timecalculations much easier andfaster.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    20/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

    DO/DONT Task Why?

    DONT Pass large XML segments from transaction totransaction and from action block to actionblock.

    A copy of the XML getscreated for each handoff.Large XML documents cannegatively affect performance.In 12.1, use SharedProperties to avoid duplicatinglarge XML documents.

    DONT Use large XML documents as default valuesfor ease in linking and debugging.

    The large XML documents willbe saved as part of thetransaction and can adverselyaffect load time andperformance. Use smallreference versions fordebugging or clear defaultsafter debugging is complete.

    DONT Replicate action blocks under the True/Falsebranches of a conditional. Instead, declarelocal variables to hold the values calculatedunder each condition. Add a third branch in

    which the necessary action blocks can call thereference variables.

    Simplifies the logic in atransaction; also improvesprocessing time whenquerying a transaction.

  • 8/6/2019 SAP MII BP

    21/28

  • 8/6/2019 SAP MII BP

    22/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

    DO/DONT Task Why?

    DO Handle exceptions in the responsedocument received from the calledfunction module when use SAP ERPInterface Actions such as JRA, JCO,WAS, BC interface actions.

    The SAP ERP Interface actions areused to send XML messages to andfrom SAP. Depending on the type offunctions (BAPI, RFC, etc.), returnerrors and specific error messages maybe in different paths within the XML,particularly in custom built function

    modules. There are different types ofmessage returns (errors, warnings,informational messages, and success),and each response can have one ormore return messages. Exceptionhandling should be processed based onthese specific message returns.

    Tips and Tricks for Building ERP Interfaces in MII document providing information on using interfacesbetween ECC and MII transactions

    Optimizing Business Logic Transactions with XPath reference on SAP Developer Network showingoptimization techniques for XML manipulation using XPath

    Other MII Best PracticesThe following points are general MII functionality suggestions that should be used in order to achieve the fullpotential of the product. These points will also be helpful in fine tuning the performance of MII for maximumusability and response time.

    Querying & Caching

    Properly used query caching in the MII environment greatly improves the efficiency of your MII application.

    The two main things to keep in mind when setting the query cache duration is the volatility of the data storedin the data source and the resolution at which the user requires the data to be viewed. Since the level ofvolatility is not consistent for all values across a system it is important to know the business process in placein order to accurately set your cache.

    Use the MII cache where the data values change once a day or even once a week. In this situation, the datacoming back from the data source (e.g. data warehouse) may take longer than the user cares to wait for theirreports. The large data set result leads to performance complaints and people becoming discouraged fromusing the interface. The solution would be to set the cache duration for a longer period of time to increaseperformance; however, there can be a data problem with setting the cache for long time durations. Thequery cache on your query may be set for twenty hours to accommodate people in different time zones.Depending on the users time zone, they might still get information from the previous day. The link below willremove all of the cached values ensuring that there arent any dataset values from the previous day.

    To clear the MII system cache via a URL servlet call to the MII server use:/XMII/Illuminator?Service=QueryCaching&Mode=ClearCache

    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 frequent calls to the data source. For example, the list of plants will typically not changeduring the day or even during the week so it may be ok to query the system for this list of plants in themorning via a transaction and then store the results to the MII cache. Then when the user, via the web pageinterface will not have to wait for this list of plants but rather will get them back instantly via the MII cache.

    Remember not to get discouraged with incorrect cache duration settings as this is specific to a businessprocess and theres no concrete method for specifying them but rather they are based off of the GUIrequirements.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/bpx-community/manufacturing/Tips%20and%20Tricks%20for%20Building%20ERP%20Interfaces%20in%20MII.pdfhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e339015e-0b01-0010-a4b8-f35ed792273bhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e339015e-0b01-0010-a4b8-f35ed792273bhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/bpx-community/manufacturing/Tips%20and%20Tricks%20for%20Building%20ERP%20Interfaces%20in%20MII.pdf
  • 8/6/2019 SAP MII BP

    23/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    DO/DONT Task Why?

    DO Query for data that is needed and notfor full tables.

    Minimizes load on the server andonly displays what is necessary forthe user to see.

    DO Enable query caching after theapplication has been developed.

    Avoid issues during development;This will help to eliminate incorrectquery issues due to the query

    results stored in the MII cache.DO Use caching where the data values

    change once a day or even once aweek.

    Greatly improves response time ofdata as well as minimizing load onthe server.

    DO Create custom views in the databaseinstead of writing complex queries inMII.

    Data manipulation at or near thedata source can be faster thanthrough MII query capabilities.Databases can perform joins andfilters faster.

    DO Design query templates with flexibility inmind by using Param.x and start dates& end dates (SD/ED).

    Queries can be robust and reusablewhen parameters are utilized.

    DONT Use date ranges (time sensitive) whencaching a query. Query caching will notwork.

    The reason behind this is to preventlarge quantities of repetitive datafrom being stored in the MII cache.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    24/28

  • 8/6/2019 SAP MII BP

    25/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Log Management

    Log management is now done using the NetWeaver logs. All log files are stored in the NetWeaver database.Access the log files using the NetWeaver Web Interface.

    To use the web interface, simply type in the URL for your environment:(http://:/nwa). With correct permissions, this will take you to the SAP

    NetWeaver Administrator page and from there you will find a link for logs and traces. Forviewing MII logs, a user must have either NetWeaver read-only log roles ofSAP_JAVA_NWADMIN_LOGVIEWER_ONLY or SAP_JAVA_NWADMIN_CENTRAL_READONLY.

    For more information on NetWeaver log functionality, you can go to http://help.sap.com/NetWeaver .

    DO/DONT Task Why?

    DO Filter logs by MII content and severitygreater than or equal to Warning.

    These settings allow anadministrator to quickly see on MIIlogs and traces.

    DO Set severity top level log/tracer level toError for both Categories and Tracing

    when configuring the MII logs in NWA.

    This configuration rule will helpadministrators consistently be able

    to view severity levels in anorganized way.

    Applet Debugging

    It is recommended to use applet debugging techniques to resolve any user interface issues that arise. Onegeneral technique is to right click on the applet and view the query template and display template settings.The display template settings can be modified and updated in real time, however they will not be saved oncethe session is ended. Also by right clicking the applet, you can view the underlying data as HTML to view thevalues that populate the applet. Viewing the data as XML allows you to see the Rowsets/Rowset/Rowformat that is used by MII. To do this simply right click the applet > Data > View Details + CTRL button. In12.1, you can use the right click steps and then select the Export Raw Data as XML option.

    Another technique to troubleshoot applet problems is to use the Java Console to show the actions that eachapplet makes. Using the following line in an HTML/IRPT page, allows a developer to trace applet queries anddata posting (query time in milliseconds).

    To receive more information in the Java Console, a developer can use the Debug parameter to see how longa query loads, query row count, date formats, and many more pieces of applet information.

    Using good naming conventions for your web pages applets will make it easier tofind the corresponding information in the Java Console when Trace/Debugparameters are turned on.

    In MII 12.1, the applet debugging option is built into the applet toolbar in anHTML/IRPT page. When the debug parameter is on, the applet will then write debugmessages to the browsers Java Console. A simple refresh of the page will allowthe console to be populated with the debug messages.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

    http://help.sap.com/netweaverhttp://help.sap.com/netweaver
  • 8/6/2019 SAP MII BP

    26/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Go Live! Check List

    Final Application Readiness Check List

    Make sure the log settings (Log ManagementLog Configuration) are set to either Warning or Error.

    If using any UDS type connections, make sure that any Debug settings have been turned off.

    Perform full application backup, including system and user configuration, all application contentincluding query and display templates, web content, business logic services transactions, referencedocs and schedules.

    Eliminate any unused, empty backup, or temp folders in any of the pertinent content locations.

    Eliminate any backup files or debugging content files found in any of the pertinent content locations.

    Make sure that any transactions using unnecessary XMLSaver action blocks for debugging purposesare either disabled with a false conditional block or are removed from the TRX.

    Comment out or remove any unnecessary debug type JavaScript alert messages from the webpages.

    Correct any non-relative page links in the web content, especially for fully qualified URLs.

    Look for APPLET definitions that contain non-standard attributes, proper format for iChart is asfollows: CODEBASE="/XMII/Classes" CODE="iChart" ARCHIVE="illum8.zip"

    Review Business Logic schedules; remove unnecessary ones and adjusting time intervalconfigurations where applicable.

    Final Application Click-Through

    For the click-through exercise, use an actual client imaged PC so as to emulate the user experienceand expose any potential authentication problems.

    Do not log-in with the Admin user, but effectively test the authentication and authorization by usingone or more configured user accounts.

    When using additional login accounts to test various levels of security and content make sure toclose all open browsers to ensure a fresh login session.

    Monitor the Sun Java Console during the site click-through looking for pages that may have potentialissues.

    Watch for errors in the browsers status bar, including potential script errors. This can be enhancedby using the Internet Explorer Advanced setting for browsing: Display a notification about everyscript error.

    While doing the click-through periodically check the NetWeaver logs using NetWeaver Administrator.

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG

  • 8/6/2019 SAP MII BP

    27/28

  • 8/6/2019 SAP MII BP

    28/28

    SAP Manufacturing Integration and Intelligence 12.X Best Practice Guide

    Copyright

    Copyright 2009 SAP AG. All rights reserved.

    No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.The information contained herein may be changed without prior notice.

    Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

    Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

    IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

    Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

    Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe SystemsIncorporated in the United States and/or other countries.

    Oracle is a registered trademark of Oracle Corporation.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

    Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks ofCitrix Systems, Inc.

    HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts

    Institute of Technology.

    Java is a registered trademark of Sun Microsystems, Inc.

    JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented byNetscape.

    SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentionedherein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

    Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, andother Business Objects products and services mentioned herein as well as their respective logos are trademarks or registeredtrademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

    All other product and service names mentioned are the trademarks of their respective companies. Data contained in this documentserves informational purposes only. National product specifications may vary.

    These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAPGroup") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or

    omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in theexpress warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting anadditional warranty.