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,…) It would be so much easier to 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.
Getting the Files
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:
Stylesheets
The stylesheets you either get directly from you ERP system:
- Call transaction SMW0 and select ‘Binary data…’
- Choose package CMX_POC and execute
- Find the files which start with ‘PMC_STY_’
- Download them one by one (Shift-F7)
Or you get them from the download area on the service marketplace:
- http://service.sap.com/manufacturing → Downloads → Browser-based PI Sheet / Manufacturing Cockpit
- Get the package according to your used ERP release
Images
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 ‘PMC_IMG’
Sample XML Data Files
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:
- Note the control recipe number
- Call transaction OAER
- Enter
- Class name: POC_PIDOC
- Class type: OT
- Object key: <the complete control recipe number>
- After execution expand the folder ‘General documents’ and find the file ‘data.xml’
- Double click on that file (browser opens the XML file)
- 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)
Renaming the Files
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 ‘TML_’ part of the filename.
In the XSL stylesheet you will find a lot of references which uses a location like ‘SAPR3-WR-…’. 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.
A better way is to rename all XSL, CSS, JS and image files by adding the prefix ”SAPR3-WR-‘. This way the stylesheet will be able to load all your resources and you can easily upload the XSL to ERP later.
Adjusting your Data XML
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:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="SAPR3-WR-PMC_STY_EDEFAULTXIE6.XSL" ?>
<DOCUMENT ...
Of course you need to specify the filename of your XSL stylesheet in that section.
Now all you have to do is double-click your XML file and look at your PI Sheet!
Limitations
Of course you cannot expect that everything will work like in the real PI Sheet. Here are some things that will not work:
- SAP text symbols that are used to specify some standard texts like ‘Phase’, ‘Table’ or ‘Instruction’.
In the stylesheet these look like ‘<!– #text-007(SAPLPOC_MAIN)# –>’. You could of course change thos in the XSL manually but then again you’ll have to revert that back when you want to upload the XSL again to ERP. - Dropdown lists
There the entries are stored in the XML like ‘<!–#char-PPPI_FINAL_ISSUE:value(X)#–>’ . The actual value is taken during runtime from the ERP backend - Buttons (function calls)
- Calculations
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.
Setting up an Offline Environment for Stylesheet Development,Please rate the article: |
Hi Arne,
When enter values in Xsteps PI sheet without saving the screen exit the screen should get the warning mesaage that you have not saved the data. But it allows to exit the screen without any message. then how to proceed to get a message . please guide.
Thanks,
Reni
We are having PI sheet working perfectly fine when w elogin using LOGIN pad.
But when we are trying using web portal internet explorer ,we facing issues and PI sheet is not opening in edit mode.
Please guide.
Arne,
Is there a way in the style sheet to display each phase in it’s own tab, so that the PI sheet is displayed as a series of tabs?
Sure! But it is not like setting a switch – it has to be coded all the way through in a completely new stylesheet. XSL in combination with HTML and Javascript is very powerful, but it is not easy to implement (no debugging,…)
Hello Arne,
works perfect (small change with the red marked file => SAPR3-WR-PMC_STY_DEFAULTXIE6.XSL =>no E before EDEFAULTXIE6 in standard, it works of course if your file is named with E….)
best regards
Peter
Well that is an example of the enhanced stylesheet which came in ERP EhP2 (Additional icons in the phase header). But of course this is just an example…