Skip to Content
Author's profile photo Paolo Romano

SAP PO: How to handle offline adobe form without the standard task

This solution comes handy if you need an alternative way to send asynchronous adobe offline form, either in  BPM scenario or

PI scenario.

In this case you don’t need to care for the response by the receiver of the mail and you can persist the email as message in SAP PI, giving you more control and monitoring features, e.g. by using PI based alerts or SolMan message flow monitoring.

Let’s go through the step-by-step solution:

1 – Get libraries from JAVA AS

Get the following libraries from your JAVA AS Instance:

sap.com~tc~ecm~api.jar

tc~pdf~object.jar

pdfobject_j2ee_container.jar

2 – Deploy the Adobe Form as ECM Content

Follow the standard documentation:

Using Adobe Offline Forms – Modeling Processes with Process Composer – SAP Library

3 – Build the WebService to compose the Adobe form with the analytic data

This is the tricky part: you’ve to build and deploy a WebService on SAP JAVA AS which will take care of the adobe composition part.

You must create a DC EJB Components with the following required DC:

– tc/ecm(ECM_CORE)

– tc/pdf/object(FRAMEWORK)

– tc/wd/api(WD-RUNTIME)

Create the EJB with two input fields and one output field:

– template(String) –>The name of the form deployed in ECM repository

– data(String)        –>the XML input data for PDF Form encoded in base64

– return(String)    –>the Adobe Offline compiled form in base64

In attach you can find the sample code: getPDFTemplate.txt

Deploy your service on the JAVA AS and check it using the WSNavigator; take the response and parse it using an online base64 converter such as

http://www.motobit.com/util/base64-decoder-encoder.asp

4 – Use SAP PI Javamapping to map from Adobe Interactive data to Adobe compiled form

You should import the PDF data as external message in your SAP PI ESR, then build a java mapping in the following way:

Snap 2014-02-16 at 18.41.36.png

In attach you can find the sample code for the PI Java Mapping which will do the job.

Please note that you have to put the libraries described above as external libraries in the same SWC of your java mapping inside the ESR.

Inside the java mapping you call the WS getPDFTemplate you deployed in preceding step by using a PI communication channel of a Business System of

your choice( in my case BC_BPM).


Once you have the PDF form done and compiled you can easily manage it as an attachment via email using PI,


Of course, the same result could be achieved in an easier way in ABAP, but here is all managed internally in your PO instance.


Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jun Wu
      Jun Wu

      Hi Paolo,

      great work.

      one question, for those lib, why not using the standard DC dependency?

      Best regards,

      Jun

      Author's profile photo Paolo Romano
      Paolo Romano
      Blog Post Author

      Hi Jun,

      thanks for your interest; I use effectively the DC dependency for the WS as you can see above, but the java mapping is  a standalone java application which must be saved as external library in PI ESR where you have to save also as external library any additional library you eventually used beyond the java mapping standard ones.

      Best regards

      Paolo

      Author's profile photo Former Member
      Former Member

      Hi Paolo,

      Very informative blog..

      Thanks for sharing.

      I am just curious to know if we can extend this functionality to receive the inputs added by the receiver in adobe interactive form.

      Regards,

      Sweetu