cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice output in b2b shop.

former_member1244286
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member1244286
Participant
0 Kudos

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

Former Member
0 Kudos

Hello Ram,

I have to borrow the solution from one of our stalwarts. The following are the prerequisites.

  1. You have established enhancement framework for modifying the Web Channel application

  2. The invoice has already been output - by means of some output condition (in business sense, the invoice must have been created and output.

  3. 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

http://www.parxlns.com

If you are using https

former_member1244286
Participant
0 Kudos

Hi Eswar,

This demands for more than 10 points. Thank you very much for sharing the solution.

Can you please explain the first point little more detail. what are the steps for establishing enhancement framework for modyfying the webchannel (b2b) application?

Thank you

Ram

prashil
Advisor
Advisor
0 Kudos

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