{"id":409,"date":"2010-01-22T17:16:54","date_gmt":"2010-01-22T15:16:54","guid":{"rendered":"http:\/\/websha.de\/xstepcafe\/?p=409"},"modified":"2018-06-01T06:45:22","modified_gmt":"2018-06-01T04:45:22","slug":"setting-up-an-offline-environment-for-stylesheet-development","status":"publish","type":"post","link":"https:\/\/websha.de\/xstepcafe\/2010\/01\/22\/setting-up-an-offline-environment-for-stylesheet-development\/","title":{"rendered":"Setting up an Offline Environment for Stylesheet Development"},"content":{"rendered":"<p>Once you have decided to enhance your PI Sheet with additional functionality using XSL\/CSS you will find out that it is not so easy and quick to test your result using the ERP system itself (Downloading, uploading, maybe changing MIME types,&#8230;) It would be so much easier\u00a0to try your changes on a local filesystem and use your Internet Explorer directly to check the look and feel of your changes. Let me explain how you can do this.<\/p>\n<p><!--more--><\/p>\n<h1>Getting the Files<\/h1>\n<p>First you need to create a folder on your local filesystem where you will put all the files. Then you need to get your content. I would love to deliver this as a package here but I believe I would get into trouble because of intellectual property issues (especially with the images). therefore I describe how to get them:<\/p>\n<h2>Stylesheets<\/h2>\n<p>The stylesheets you either get directly from you ERP system:<\/p>\n<ul>\n<li>Call transaction SMW0 and select &#8216;Binary data&#8230;&#8217;<\/li>\n<li>Choose package CMX_POC and execute<\/li>\n<li>Find the files which start with &#8216;PMC_STY_&#8217;<\/li>\n<li>Download them one by one (Shift-F7)<\/li>\n<\/ul>\n<p>Or you get them from the download area on the service marketplace:<\/p>\n<ul>\n<li><a href=\"http:\/\/service.sap.com\/manufacturing\">http:\/\/service.sap.com\/manufacturing<\/a> \u2192 Downloads \u2192 Browser-based PI Sheet \/ Manufacturing Cockpit<\/li>\n<li>Get the package according to your used ERP release<\/li>\n<\/ul>\n<h2>Images<\/h2>\n<p>Without the images the result would not look very good so you need to download them as well from your ERP system (no other location). Choose alle images of package CMX_POC which start with\u00a0&#8216;PMC_IMG&#8217;<\/p>\n<h2>Sample XML Data Files<\/h2>\n<p>To test your stylesheets you need of course also some test XML data. My suggestion is to choose some of your usual PI Sheet examples and the download them like this:<\/p>\n<ul>\n<li>Note the control recipe number<\/li>\n<li>Call transaction OAER<\/li>\n<li>Enter\n<ul>\n<li>Class name: POC_PIDOC<\/li>\n<li>Class type: OT<\/li>\n<li>Object key: &lt;the complete control recipe number&gt;<\/li>\n<\/ul>\n<\/li>\n<li>After execution expand the folder &#8216;General documents&#8217; and find the file &#8216;data.xml&#8217;<\/li>\n<li>Double click on that file (browser opens the XML file)<\/li>\n<li>In the browser save the file in the folder you have created. I recommend to name it differently (e.g. the control recipe number or something which is more meaningful)<\/li>\n<\/ul>\n<h1>Renaming the Files<\/h1>\n<p>First you should leave the original stylesheet files like they are and copy them with a new filename. If you got your sytlesheet files from the service market place then you need to remove the &#8216;TML_&#8217; part of the filename.<\/p>\n<p>In the XSL stylesheet you will find a lot of references which uses a location like &#8216;SAPR3-WR-&#8230;&#8217;. You could now change these references to point to your CSS or image files but then you would need to reverse this when you want to implement your new XSL file.<\/p>\n<p>A better way is to rename all XSL, CSS, JS\u00a0and image files by adding the prefix &#8221;SAPR3-WR-&#8216;. This way the stylesheet will be able to load all your resources and you can easily upload the XSL to ERP later.<\/p>\n<h1>Adjusting your Data XML<\/h1>\n<p>The last step is to include a small coding part into your data XML file(s) between the XML start statement and the DOCUMENT tag:<\/p>\n<blockquote>\n<pre>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n<span style=\"color: #ff0000;\">&lt;?xml-stylesheet type=\"text\/xsl\" href=\"SAPR3-WR-PMC_STY_EDEFAULTXIE6.XSL\" ?&gt;\r\n<\/span>&lt;DOCUMENT ...<\/pre>\n<\/blockquote>\n<p>Of course you need to specify the filename of\u00a0your XSL stylesheet in that section.<\/p>\n<p>Now all you have to do is double-click your XML file and look at your PI Sheet!<\/p>\n<h1>Limitations<\/h1>\n<p>Of course you cannot expect that everything will work like in the real PI Sheet. Here are some things that will not work:<\/p>\n<ul>\n<li>SAP text symbols that are used to specify some standard texts like &#8216;Phase&#8217;, &#8216;Table&#8217; or &#8216;Instruction&#8217;.<br \/>\nIn the stylesheet these look like &#8216;&lt;!&#8211; #text-007(SAPLPOC_MAIN)# &#8211;&gt;&#8217;. You could of course change thos in the XSL manually but then again you&#8217;ll have to revert that back when you want to upload the XSL again to ERP.<\/li>\n<li>Dropdown lists<br \/>\nThere the entries are stored in the XML like &#8216;&lt;!&#8211;#char-PPPI_FINAL_ISSUE:value(X)#&#8211;&gt;&#8217; . The actual value is taken during runtime from the ERP backend<\/li>\n<li>Buttons (function calls)<\/li>\n<li>Calculations<\/li>\n<\/ul>\n<p>Most probably I did not catch all. But the bottom line is that you will be able to easily and quickly check how your changes in the XSL will look like.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once you have decided to enhance your PI Sheet with additional functionality using XSL\/CSS you will find out that it is not so easy and quick to test your result using the ERP system itself (Downloading, uploading, maybe changing MIME types,&#8230;) It would be so much easier\u00a0to try your changes on a local filesystem and [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[52,72],"tags":[55,40,54],"_links":{"self":[{"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/posts\/409"}],"collection":[{"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":20,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":878,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/posts\/409\/revisions\/878"}],"wp:attachment":[{"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/websha.de\/xstepcafe\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}