Skip to Content

Print Forms in SAP UI5

Hi Experts,

I was creating some sample Apps in UI5 and was wondering whether we can include print forms with this. In SAP GUI we can use SAPscript/Smartform/Adobe Forms and in WDA we use Adobe Forms. Similarly is there any way to implement print forms with UI5.

Regards,

Rahul Muraleedharan.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 18, 2013 at 12:53 PM

    Hi Rahul,

    I have also the same requirement. Have you got any solution or concept to do the same.

    Please update here.

    Regards,

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Bhavesh,

      The way i implemented my solution is to call the adobe form without viewing it.

      You will get the form in one of the returning parameters as raw string.

      You need to convert the Raw string into Xstring.

      Then create a MIME object from that Xstring.

      Embed the MIME file in you UI5 application.

  • avatar image
    Former Member
    Aug 22, 2013 at 09:32 AM

    Hi Rahul,

    I dont't know Adobe Forms etc., but if you simply want to print a HTML-Form, you can include a custom css style sheet which will be used if the form is printed via the browser.

    Include it this way:

    <link rel="stylesheet" type="text/css" href="print.css" media="print" />

    In this stylesheet you could set all elements invisible except the form elements, and give the form a style that fit your needs.

    To print the page you can use this simple javascript:

    window.print()

    Hope this helps 😉

    Greets,

    Ben

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ben,

      I was not actually looking for a JavaScript PDF library. Instead I am on the search of a solution put forward as a standard practice by SAP, since these kind of requirements are very often when we develop an User Interface in UI5 with ECC/CRM as back-end.

      We can consume the components from ECC through GW Odata for developing the app in UI5. Now we can say that this is a well proposed solution from SAP. Similarly I am checking on the possibilities of developing print forms in applications developed in UI5.

      Regards,

      Rahul Muraleedharan.

  • Dec 03, 2015 at 01:16 PM

    This thread is now locked against Necromancy and Hijacking.  Please create your own Discussion marked as a Question instead of resurrecting the dead or hijacking someone else's thread.

    Regards, Mike (Moderator)

    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2013 at 08:56 AM

    In my opinion you can build the form using the SAPUI5 UI controls as i find there is a Form UI control

    https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.commons.form.Form.html

    Is that what you were looking for?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jimmy,

      Thanks for the reply!

      But the one I am referring to is entirely different from that you have suggested. Pardon me if my question was not clear. I am referring to the Print Forms like Adobe Forms in WDA. The one that you have suggested is just a UI control, in which we can place the fields on the screen in a specific form layout. What I need is a way to take the print/fax or email a document say for example, commercial invoice, just on a button click.

      Regards,

      Rahul Muraleedharan.

  • avatar image
    Former Member
    Jul 30, 2015 at 04:54 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 03, 2015 at 11:23 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded