cancel
Showing results for 
Search instead for 
Did you mean: 

Getting and Printing A PDF Document From R/3 Using Web Dynpro

Former Member
0 Kudos

I would like specific information on getting and printing a document residing R/3 using web dynpro. My environment is Netweaver 04s SR2, an it will not include ITS or the ABAP stack. It connects to remote R/3. I will not be using Adobe Interactive Forms. I only need get/render/print the doc. My question is in 3 parts.

1) Getting the PDF from R/3

a) In terms of the RFC ABAP module, how should it return the pdf (a table?)

b) How should the document be stored within the Component Controller context

for display.

2) Converting the R/3 returned binary into a form that is renderable within

Web Dynpro. (Does the Form UI Element Require it to be converting and if so

what is the best way to do this)

3) Printing the PDF from the corresponding iView in the portal. (If I am using the

form ui element to display it, how can printing be initiated in the portal)

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bob

Can you just let me how you are retrieving the pdf from R/3 ? Which RFC you are using?

I guess you must be getting the pdf in some table. You need to iterate it, and copy the entire content, byte by byte in a byte array. Create a IWDCachedWebResource from this byte array of WDWebResourceType.PDF and get the URL of the resource genetrated. Set some context attribute of type string to this URL value. On your view place a IFrame UI element and bind the source property to the context attribute where you are setting the URL. Your PDF content will be rendered in the IFrame.

Hope this of any use to you.

Regards

kk.

Former Member
0 Kudos

Thanks. I think this should work. Yes the pdf is generated on the r/3 side and will probably be a table but this is not written yet. I have heard there can be some difficulty in converting from table to binary. This is R/3 4.6c environment. What is the best format in which to return the pdf?

If a table is used to hold the data will the pdf be returned as a String or binary Type and what is the best way to iterate and perform the binary copy to the byte array so that the data is kept in tact?

Former Member
0 Kudos

Hi,

In webdynpro there s a fecility to convert the general data to PDF by uisng th InterativeForm UI Element.

This for u need to do the following things.

1. Need to configure the ADS(Adobe document services) in your VA(Visual Admin).

2. Once ADS is configured we can utilize the UI element Interactiveform It has contain the Adobedesigner by using this we can design the PDF and binding with the model nodes.

3. Develop the Function module in the r/3 side and import into WD side and those are created as Model nodes and we canutilize in the 2 step.

4.When u run the application u can display the pdf with how u design ur PDF form.

This is generally doing the PDF by using PDF.

Or do u think any other way post ur issues.

Thanks,

Lohi.

Former Member
0 Kudos

Hi Lohitha,

For this approach, what is the best format the r/3 pdf document needs to be returned as from the r/3 bapi in order for the pdf document to be rendered in the form UI element? I need to confirm that ADS is available w/o license costs as I only need to print the pdf document and not build the pdf. I also need to confirm from IView it can be printed in the portal using the form UI element WD View.

Thanks,

Bob