Skip to Content

XML transformation - GLM alternative solutions

Hi guys,

question is simple.

I've already created a solution using office documents and ObjectOrientation LifeStyle....but I would like the smartest solution...

Do you think it is possible to create a label like this one below, from an XML file ?

I mean using only an XSLT transformation calling. I read about creating XSLT from XML with a software support like Dreamweaver or something else like that one, but I would like the easiest solution to be mantained in the years and to be integrated with SAP.

A solution using SAP HANA XS features would be ok as well :) perhaps an HTML page, running on the web server compiled dynamically. Anyone with experiences?

I recently implemented something with XS but only to query data on SAP, throughout XS web server, viewing from an internet browser.

A label is something different.

Thanks for your attention.

ghs-label-lg.jpg (163.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    May 05, 2017 at 08:00 PM

    Roberto, not sure I understand the question... XML format is basically data (but I'm sure you already know that :) ). On your screenshot, I see several images (icons, company logo, barcode). Obviously that represents a challenge. I'm guessing if you include image information in XML it'd have to be binary and then you'd need something to interpret and present it correctly. I don't think XSLT or even HANA provide this kind of functionality...

    Also it's not clear where exactly are you expecting this label as a result (web site? SAP? printer?). You might want to elaborate on the requirement.

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded

    • Interactive means that a form is issued with an interactive capability, meaning there can be some input fields that a user can input using Adobe Acrobat Reader for instance, maybe digitally sign the form, attach files, and this data is stored inside the same PDF (there are further ABAP classes to read the input if needed).

      Free forms are those forms which don't have this interactive capability, they can just be sent, displayed, printed, but not modified after their initial generation. But they can be built using all possible rendering features (transferring images, texts from ABAP is NOT "interactive").

      Adobe forms can be rendered in a variety of formats, like PCL, PostScript, which can be sent to printers directly. But I'm not an expert for that.

  • avatar image
    Former Member
    May 15, 2017 at 08:58 AM

    That is absolutely possible. You could render e.g. an HTML page from the content of your XML file using XSLT. As for the images, the HTML IMG tag accepts base64 data in the following notation. Try the following example:

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAvCAIAAAAgvHDMAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAScwAAEnMBjCK5B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HiE5yqSq46uwjuY/WQROF5o8+CgY0x4II08nEUeSCNOFYEwqdWTC7x4yE9I1mjts+8frwSn3AiIWofIHJXdZLZaB1obQxeWRe8KSqmVn3ex5W8eE+6lM4pP31OczO0/J3JEsBr9crt8M5ux3oEM6J7joHPbOKLSIoHoYkbVGTERKLYVlDx05mHOSzKb28T5GCGljrxcQuCOuheg+DLro6KbppR/6e9tPB4rzv55SV/8Z7B8LyjbfSWz3CvfeEZgp3Egzs9TTH3A/aZAtiGfK1apVHa73eFwVFRWyyprS8qrenp6qP/xOpnFDekt4Fo1QeMh3NepJXQ0F2bGX0TCrahmX1Jc+Nazmf4+x7mhmyX0A553mrE8XlEeXORZBK9UAkZ5SxFfOGww/O8sNlFT8XD9Cfk4wYxuuAfXJHpPPu4oovHGcbVwK0BHc0BozB3A+BLV7KnLOLY7tnFHbMf3SQOHM8xuLFxRkL8QJNUYRPXNE0WwTmE2m6mvmw9mdIMQ5Ze1eAmgJx+GV5CXuDpvhsGNAY7cam1P+BoXd1as+w93h/Ykj/70ALizkRcX0CXaAkFJTY18cHAIUA+25pPZ5q1DrbnMbKELmgVCsVAsSb3/wIcx4MaCR+j1nlG8H1L0h3PIfWnAHechD/kI7Pf51aNG45+Wci9ktlpCEISsvFIklppMJhKQ2oGhAJ6Bxscpig7eRz/kQE8miBTbTrJH8UUP/rg7HxY2mt4ONwxe+fgE9FBrSlQS/hLSQ4A8BBC/nuCB9KrBqroGqawsMoVD45PHOCCgyM6Ryl/fOWOuvMANg2dBWqPy4RhoxYhWPE4TwKgqE7+0qkRWpn+sx3NbK1ck5ZdWtWglsnJ84KBuewN4sRtmaHAwly0MZnWeLCbuVXZziwQaTfcfuUcC0N3d09mptlimf1w5Xzjlhi2Gh4eFYmk2WyyVlsxvZXcep9ymwAuvr6+PJObwpGl+mYPbW8b4+H8BeuMLWXg5MOgAAAAASUVORK5CYII=" />

    The binary data is an example I just generated and would be replaced with the base64 string in your XML file. You can set the src attribute using xsl:attribute.

    <img>
    <xsl:attribute name="src">
    <xsl:value-of select="concat('data:image/jpg;base64,',xPath)" />
    </xsl:attribute>
    </img>
    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Peter.

      I thought about XML/XSLT/HTML because it seems to me a low-level solution without using any other software or external web-application.

      I could use transformation in sap and an HTML template in the MIME repository but I think it will not be so easy to manage a label with features like the ones you see above.

      Adobe Forms seems a good tool, even if it will need some work on. How would you do act for this business requirement?

      Thanks , regards!

  • Oct 12, 2017 at 01:28 PM

    Dear,

    thanks all.

    I think Jelena Perfiljeva and Sandra Rossi gave me the best answer because the ADS solution seems to be very powerful for this kind of solution. I mean, as you can see the output label, we're not talking about a simple report-list output, with a table and some data. There are full dynamics features including GIF images with transparency, text with auto-size, database connection data , render time, page size, hiding components conditionally, etc..

    With Adobe Forms I can use javascript features and ABAP for industry 4.0 features .

    That means a lot if we talk about environment reliability. My only limit was that Intermec Printers, that it's quite like trying to tame a T-rex. There's no driver in SAP working well with those printers. If it works , it takes much more time than direct print from a local application with the local configured intermec, and I'm not going to tell you about problems managing images transparency.

    So I choose to print using adobe reader and local windows driver configuration. Other problem: there's no way to launch adobe reader DC from a local workstation in a remote server. My goal was to launch adobe reader DC exe centrally in a server, without opening in the local workstation, with the printer's driver configured in local on server-side, but it's not possible.

    Adobe DC runs in background process and doesn't seem to be controlled. Then I struggled against creating an auto-pdf printing on the document ready phase, without saving file on the workstation (we don't like saving files). I had to use javascript and it seems to work-well.

    Now the situation for printing out pdf is so complicated because of the Trexintermec, but normally, with a PDF compatible print there shouldn't be any problems to use SAP print spool managing system.

    With Adobe Forms I solved the auto-size text problem, setting 0 to font-size. But it's not all, because to see this feature you need to put an X for the DYNAMIC parameter of the AdobeForms input structure sfpdocparams (even if it's not an interactive form). It's still not all. You need to set an X for the Preview data and get_pdf mode active on.

    With these settings you finally obtain a pdf content printable, but only using Adobe reader, because auto-text size won't work if you open this PDF with others readers or if you print it directly without passing from adobe reader. Every technology has its limitation but I think that XML solution without any others free license productive software, is not available.

    That's the output application:

    I'd like to receive others experiences.

    Thanks for your time!

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 08, 2017 at 07:10 AM

    Dear Robert

    do you use EHS GLM? Normally such labels (as shown by you) is generated using EHS and then is printed using WWI.

    IN te current SAP set up there is a potential set up available to generate such labels (using EHS) not using WWI but other techniques. Up to now. I have never seen anybody who succeeded to use the new option

    Conclusion: To generate such labels you should use the noraml EJHS WWI set up. And here we do not have an "XML" part

    But the statements are correct. Using XML and by using "transformations" (which are part of standard SAP) you can generate such a label (e.g. as well direct in pdf file etc.)

    Check eg. https://www.ibm.com/developerworks/library/x-xmlxsltpdf/index.html

    https://wiki.scn.sap.com/wiki/display/ABAP/Transformations

    https://wiki.scn.sap.com/wiki/display/ABAP/XML+XSLT+with+ABAP

    For XML / XSLT transformations: you will find lot of informations in internet

    C.B.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 12, 2017 at 05:28 AM

    Hello Roberto,

    Not sure if it helps but there in one application in SAP called Environmental Compliance 3.0, in that application we create reports in a similar fashion of using XML and XSLT transformation with a pre defined pdf layouts for Adobe Document Server.

    Thanks and Regards

    Jayakumar

    Add comment
    10|10000 characters needed characters exceeded