on 08-21-2013 3:08 PM
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.
Hi Rahul,
I have also the same requirement. Have you got any solution or concept to do the same.
Please update here.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Thanks for the info! I suppose the print that you are referring to, is the usual print that is available in web pages, which will print the currently displayed page as it is. My requirement is quite different.
Consider a scenario in which I have created small webshop using UI5. Now the customers log in to this webapp and buys different products. When his shopping is completed, the system will generate the invoice (with all the details of the items purchased, customer address, item price, quantity, net price, ship to address) of the purchase as a PDF and if needed he can print/download it. It will be really great if you could throw some light on this.
Regards,
Rahul Muraleedharan.
Hey Rahul,
thx for clarification.
I think what you need is a javascript pdf library like jsPDF (http://parall.ax/products/jspdf).
You can use such a library on serverside (in an xsjs) to generate the invoice-PDF and save it to a database-table.
Next step would be to offer the a download-link to the document.
Alternatively you could send the document directly to the browser, but maybe It's a good Idea to archieve the invoices
I've not done this before, but I'm pretty sure that it's possible this way. (At least I've used a 3rd party zip-library to create zip-files on serverside and send them to the browser - without big problems...)
Greets,
Ben
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.