on 09-05-2008 3:55 PM
Hi Gurus,
B2B with the Ecc 6.0 as backed. we have a smart form as an output to the Invoice in ECC. so In ECC for a Invoice document when they chose the ouput - a PDF page opens. I need the same PDF output in E-commerce B2B.
Customers in b2b application will search for Invoices look at the display of invoices. then they need to have a Print option which will bring the PDF file for m ECC.
Any one have an Idea How we can achive this.
Thank you.
Ram
Hi Eswar,
Thank you for the solution. I assigned full points. Little more explanation on some of those steps would be really appreciated.
Thank you
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ram,
I have to borrow the solution from one of our stalwarts. The following are the prerequisites.
You have established enhancement framework for modifying the Web Channel application
The invoice has already been output - by means of some output condition (in business sense, the invoice must have been created and output.
If not, you must generate the output condition using program.
In this kind of situation, the Invoice will be available in spool. There are function modules available to read spool output and convert that into PDF output.
See
Function group - STXW
Modules
CONVERT_OTFSPOOLJOB_2_PDF
CONVERT_OTF_2_PDF - most promising
Since invoice is a sensitive document, it should never be copies as PDF file to a folder and linked tothe web. Instead, the PDF output must be directly streamed to the Java layer as binary stream. Get the total length of the output.
The output from say the Java action can be written to a "ZinvoicePDF.jsp". In the action set the output type to PDF.
response.setContentType("application/pdf");
response.setContentLength(reportBytes.length);
...
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(reportBytes, 0, reportBytes.length);
ouputStream.flush();
ouputStream.close();
Note: This code is not complete in any sense, but gives you an idea of what should be done to stream a PDF output.
The link to the Invoice is assumed to trigger a custom action class that executes the custom function module that will get the PDF output (output parameter - binary output) of the invoice number passed.
This approach has been followed at several customer locations and PDF generated.
Points to note If you are using HTTPS to output the PDF files, then look out for issues around the display of PDF files in IE.
Easwar Ram
If you are using https
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
I think this can be achieved if you create a hyper link as "Print Invoice" and redirects it to the page which can call the smart form to show up the invoice in PDF format.
Also you have open source api's which will help you to convert the defined text into format.
Hope it helps.
Regards,
Prashil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.