cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic function to write PDF in the KM

Former Member
0 Kudos

Hello Experts,

we need to write in KM some pdf files starting from Web Service's binary output.

The Web Service is producted by an RFC (SAP ECC).

I'd like to use a webDynpro application, so I created an adaptive web service model to catch the web service. It works fine, but the output of the web service is a binary Table.

I would like to know:

- If in the portal exists something similar to GUI_DWONLOAD (a standard function in ECC), or something that can convert a binary table into a pdf file

- If is possible to use a WEBDYNPRO to create an automatic service that two times per day calls a webService and generates a PDF in the km (so I don't need any GUI)

Thanks in Advance

Accepted Solutions (0)

Answers (3)

Answers (3)

nikhil_bose
Active Contributor
0 Kudos

if in the portal exists something similar to GUI_DWONLOAD (a standard function in ECC), or something that can convert a binary table into a pdf file

Yes. It is possible through WD.

Thread: [Creating Tables in PDF|]

[Sample Applications|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2064] [original link is broken] [original link is broken] [original link is broken];

If is possible to use a WEBDYNPRO to create an automatic service that two times per day calls a webService and generates a PDF in the km (so I don't need any GUI)

Yes. It is also possible. Use a java class which calls the service and can be included in WD.

I hope it can be configured as portal service too.

Former Member
0 Kudos

Hi,

Wrt the first question: check out the documentation for the FileDownload element.

For the second question I would not use Web Dynpro because this is a UI framework. You need an app without a UI. NWDS has excellent templates (wizards) for creating a simple J2EE app that you can deploy to the server. Add timers and logic for printing the docs.

Good luck.

Roelof

Former Member
0 Kudos

Hi Knibbe,

thanks for your answer..

For the second question you answered that I may use a simple J2EE application, but I remind you that I'm calling an external WebService. With web dynpro I can call it simply addinga new Model, but how can I call it using a J2EE application??

Best Regards

Former Member
0 Kudos

Hi,

I haven't done that before. If you use Web Dynpro without an interface you will have the same problem.

This is an example I found. testing is the package that contains the generated webservice, LoanRequestor is the name of the service you will have genarated.

try { // Call Web Service Operation

testing.LoanRequestorService service = new testing.LoanRequestorService();

testing.LoanRequestorPortType port = service.getLoanRequestorPort();

// TODO initialize WS operation arguments here

testing.ProcessApplication requestLoanMessage = null;

// TODO process result here

testing.ProcessApplicationResponse result = port.loanRequestorOperation(requestLoanMessage);

System.out.println("Result = "+result);

} catch (Exception ex) {

// TODO handle custom exceptions here

}

Good luck,

Roelof

Former Member
0 Kudos

Could someone helps us??