cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Webdynpro Output to PDF format

Former Member
0 Kudos

Hi All,

I have generated a webdynpro application where the view has a selection screen input field. Based on the entries selected and when I click on a push button the output values are populated in the Table view along with the Business Graphs.

The selection criteria and output are populated in the same view.

Now my requirement is to popualate the selection criteria and the output into a PDF form when I do action using a second button element.

Please let me know how to achieve this functionality and also let me know is any other way to achieve this functionality.

I am aware that this can be achieved using ALV but I do not have documentation to fulfill the requirement.

Can anyone provide some links or codelinks on this.

Awaiting for your response.

Thanks & Regards,

Ravi Ganji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

Use ALV you get automatic print option to PDF. No need to write code also.

How to use ALV...

[original link is broken]

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/3133474a-0801-0010-d692-81827814a5a1

Please check this...

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f5/f9dfbe1be4446d8ccf24f210712990/frameset.htm

/people/bv.pillai/blog/2007/01/09/webdynpro-abap-alv-print-versionpdf

Cheers,

Kris.

Former Member
0 Kudos

Hi

I have gone through the links and it looks sound and good and are releated to ALV. Thanks for sharing the links.

Is there any other way to print in PDF format without using ALV ?

My output of my application looks like:

1. Selection screen

Based on the selection screen, my application result output as

Table View and Business Graph.

Note: All are in the same view.

Now I want everything to be converted into PDF. For this action I have created one more button.

Thanks & Regards,

Ravi Ganji

saravanan_narayanan
Active Contributor
0 Kudos

Hello Ravi,

you need adobe/interactive form to print for this. check the following tutorial for interactive forms

[http://wiki.sdn.sap.com/wiki/display/WDABAP/CallAdobeFormthroughABAPWebDynpro]

[http://help.sap.com/saphelp_nw70/helpdata/en/2c/241a427ff6db2ce10000000a1550b0/content.htm]

BR, Saravanan

Former Member
0 Kudos

Hi,

The information provided is abouot integrating forms into webdynpro.

But my requirement is to download/convert the webdynpro output (result) into PDF format .

Thanks & Regards,

Ravi Ganji

ChrisPaine
Active Contributor
0 Kudos

Hi Ravi,

you can't just pump a WDA screen to PDF - there is no functionality to do that.

The best suggestion is to build your own adobe form and pass the data for your business graphic into the form for rendering as a GIF - and build a table in the adobe form to display the data.

Have a look at standard form PTARQ_PRINT_TEAMCALE_FORM - which does this from component HRESS_C_LEA_TEAM_CALENDAR in EhP5.

I'm thinking prior to 7.02 the required functionality might not have been possible, but I'm not 100% sure.

Hope this helps,

Cheers,

Chris

Former Member
0 Kudos

Thanks to all!!

Regards,

Ravi Ganji

Former Member
0 Kudos

Hi Ravi,

Were you able to print the webdynpro view into PDF.

Regards,

Anand

bradp
Active Participant
0 Kudos

Hi Anand,

There is no a solution to this problem. If you want to save the contents of a webdynpro screen to a pdf, what you can do is use the new functionality in WDA which is in Netweaver 7.02 onwards to be able to convert a view to a printable format.

So if you add a button for eg. "Print" then you could use the following code in your component controller to call a printable popup window.

DATA: lo_component   TYPE REF TO if_wd_component,
          lo_application TYPE REF TO if_wd_application.

  lo_component = wd_this->wd_get_api( ).

  lo_application = lo_component->get_application( ).

  lo_application->print_page( ).

Then, when the printer dialog pops up if you have drivers installed to print to PDF then you can save the page to a PDF file.

Hope that helps you with what you are trying to do.

Cheers,

Brad

Former Member
0 Kudos

Hi Brad,

Will try to implement the solution to see if it suits my requirement. Overall looks like a feasible solution. Thanks for your time.

anupam_srivastava2
Participant
0 Kudos

Hi Ravi

where you able to acheive this ?

I am having a simmilar requirment.

regards

Anup

Former Member
0 Kudos

The below code is executable for this:

DATA: lo_component  TYPE REF TO if_wd_component,

           lo_application TYPE REF TO if_wd_application.     

lo_component = wd_comp_controller->wd_get_api( ).     

lo_application = lo_component->get_application( ).     

lo_application->print_page( ).

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ravi,

You could separate the two outputs by giving flexibility to the user to choose the display option. In case the user selects PDF option, you could pass the data to a form (smartform / adobe) and generate the pdf and show in the interactive form UI element (binding a variable of type xstring).

Regards,

Shyam