cancel
Showing results for 
Search instead for 
Did you mean: 

- webdynpro and PDF file

Former Member
0 Kudos

Hi experts,

I really need your help to solve an problem.

I have to show a pdf file through web dynpro java.

I did it in the portal DEV and there I am getting tha data from DEV R/3 environment and creating the PDF file correctly but, unfortunatelly, when I am getting the data from QAS R/3 environment, I am not be able to get the pdf file, and I am receiveing the following

message There was an error while trying to parse an image.

In both environments I am receiving from R/3 TLine (tdformat + tdline), after that I am extracting

missing spaces, doing a string and using the method getBytes to convert this string to bytes and showing it calling an external window in web dynpro.

Some idea why it's not running properly in QAS but it's running correctly in DEV?

What could I do to solve it?

Best wishes,

Nelson Duarte.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

Since its working fine on DEV Server but not on QA Server, It would be helpful if you go ahead and compare the environment for botht the servers

thanks & REgards

HArsimran

Former Member
0 Kudos

Hi Harsimran Kaur and Santhosh Edla,

I'd like to thank you for your suggestions, they are very helpfull.

The problem was solved in the following way: in the RFC the ABAPER did an "XSTRING" and

export it. In the web dynpro application I got this xtring and use it in this way:

byte[] pdfContent = zcbi.getOutput().getP_Bin_File(); //line that get the "xtring" from RFC.

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent, DWebResourceType.PDF);

wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL), "Report View", true).open();

Thank for your attention and help.

Nelson.

Answers (1)

Answers (1)

Former Member
0 Kudos

Where are you getting the error(parsing an image).

At the R/3 end(while executing RFC) or at the portal end??