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
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:
2 – Deploy the Adobe Form as ECM Content
Follow the standard documentation:
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:
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
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:
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.