cancel
Showing results for 
Search instead for 
Did you mean: 

How to get PDF file from R/3 and display in a WD application

Former Member
0 Kudos

Hi ,

I have a WD application which will call an R/3 RFC that returns a binary PDF file (smartform) (actually it is in the form of an internal table structure like TLINE).

How do I do this in a WD application?

Regards

Rahul

Accepted Solutions (1)

Accepted Solutions (1)

former_member185029
Active Contributor
0 Kudos

Hello Rahul,

There is no way to accept data in the form of PDF from RFC.

You will have to write that logic in WebDynpro itself.

There are readymade jar files awailable for exporting data into PDF.

Ashutosh

Former Member
0 Kudos

Hi Ashutosh,

I have an application where the below BAPI is displaying the smartform in ABAP .

The output is taken from a TLINE table which consists of the special characters.

The requirement is to display this smartform from Webdynpro Java but the output is not correctly displayed in WD java because WD Java is not able to handle the special characters.

*********************BAPI**************************

FUNCTION information_details

*"----

-


""Local Interface:

*" IMPORTING

*" VALUE(SPOOLNO) TYPE ZSMART-SPOOL_ID OPTIONAL

*" EXPORTING

*" VALUE(RETURN) TYPE BAPIRETURN

*" TABLES

*" PDFDATA STRUCTURE TLINE OPTIONAL

*"----

-


DATA: v_spoolid TYPE tsp01-rqident.

  • vspool(10) VALUE '4904'.

DATA otf LIKE itcoo OCCURS 100 WITH HEADER LINE.

DATA cancel.

DATA pdf LIKE tline OCCURS 100 WITH HEADER LINE.

DATA doctab LIKE docs OCCURS 1 WITH HEADER LINE.

DATA: numbytes TYPE i,

arc_idx LIKE toa_dara,

pdfspoolid LIKE tsp01-rqident,

jobname LIKE tbtcjob-jobname,

jobcount LIKE tbtcjob-jobcount.

spoolno = '4904'.

v_spoolid = spoolno.

*SPOOLNO = 4904.

CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = v_spoolid

  • NO_DIALOG = 'X'

  • DST_DEVICE =

pdf_destination = 'C:File.pdf'

IMPORTING

pdf_bytecount = numbytes

pdf_spoolid = pdfspoolid

  • OTF_PAGECOUNT =

btc_jobname = jobname

btc_jobcount = jobcount

TABLES

pdf = pdfdata[]

EXCEPTIONS

err_no_otf_spooljob = 1

err_no_spooljob = 2

err_no_permission = 3

err_conv_not_possible = 4

err_bad_dstdevice = 5

user_cancelled = 6

err_spoolerror = 7

err_temseerror = 8

err_btcjob_open_failed = 9

err_btcjob_submit_failed = 10

err_btcjob_close_failed = 11.

ENDFUNCTION.

************************output***********************************

%P DF-1.3##%âãÏÓ##2 0 obj##/WinAnsiEncoding##endobj##3 0 obj##<<##%Devtype HPLJIIID Font COURIER

normal Lang EN##/Type /Font##/Subtype/ Type1##/BaseFont /Courier##/Name /F001##/Encoding 2 0

R##>>##endobj##4 0 obj##<<##/Type /FontDescriptor##/Ascent 720##/CapHeight 660

0.1. /Descent -270##/Flags 32##/FontBBox ##/FontName /Helvetica##/

ItalicAngle 0##/StemV 105##>>##endobj##5 0 obj##<<##% Devtype HPLJIIID Font HELVE

************************************************************************************

Can anyone please let me know the approach to solve this error??

Thanks in advance..

Answers (2)

Answers (2)

Former Member
0 Kudos

solved

Clemenss
Active Contributor
0 Kudos

Hi sharma,

please let me and the others know how you solved it, thank you.

Regards

Clemens

Former Member
0 Kudos

Hi

I am having the same problem as you.

Has your problem resolved.

Please reply.

Thanks

Prajakta