cancel
Showing results for 
Search instead for 
Did you mean: 

PDF Issue

Former Member
0 Kudos

Hi all,

I have created a report..this report when executed will give the o/p in a PDF format of PO details ...this report will take PO number as input ..this is working fine in GUI mode...when i placed this report in the ITS whenever i give a PO number to it it is going to dump...In dump i didnt find how to solve it...please help..

My report will take input as PO Number and when executed it will open the PO Details in PDF format...

The logic i have written is creating the PDF file in the SAP Work dir and opening the created PDF file from the SAP Work Dir...will this effect any where????

As my report is working fine in GUI and NOT ITS what exactly do i need to chnage..

Dump shows as ::

<b>ShrtText

Access not possible using 'NULL' object reference.

What happened?

Error in ABAP application program.

The current ABAP program "CL_GUI_FRONTEND_SERVICES======CP" had to be

terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

Error analysis

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL', was

neither

caught nor passed along using a RAISING clause, in the procedure

"GET_SAPGUI_WORKDIR" "(METHOD)"

.

Since the caller of the procedure could not have expected this exception

to occur, the running program was terminated.

The reason for the exception is:

Attempt to access a component using 'NULL' object reference (points

to nothing).

An object reference must point to an object (an instance of a class)

before you can use it to access components (variable:

"CL_GUI_FRONTEND_SERVICES=>HANDLE").

Either the reference has not yet been set, or it has been reset to

'NULL' by a CLEAR statement.</b>

I am unable to find a solution please help...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

maybe this is not supported by the webgui - yet. What is your release incl. Support Package level?

best regards

Tobias

Message was edited by:

Tobias Gomer

Former Member
0 Kudos

Thanks for ur reply..

So what solution do u prefer..

athavanraja
Active Contributor
0 Kudos

are you showing it in a htm control or openning as a pdf in adobe pdf viewer application

Former Member
0 Kudos

Hi,

I do not have a solution, but some ideas

I just checked the method CL_GUI_FRONTEND_SERVICES=>GET_SAPGUI_WORKDIR. Works fine using the WebGUI.

What does happen, when you test this method?

In addition I would check whether it is possible not to use a download mechanism but the HTML Viewer Control for displaying the PDF document. That was suggested by Durairaj already.

best regards

Tobias

Former Member
0 Kudos

Hi Durairaj Athavan Raja,

In GUI i have done coding.. just to open a adobe PDF file with PO details..i have chnaged nothing with regard to ITS..

My client has no issue to open in HTML or in PDF ...

Pls help

Actually i am writing the code to open a PDF file..for that i am creating PDF file in SAP Work Dir..DO u prefer any other method to open directly PDF file instead of creating the file in SAP Work dir...

If u want i can send u my code..pls mention ur mail ID...

.

Former Member
0 Kudos

Hi,

I want to help but in order to do so, I need information about the problem.

What is about testing the method? Didn't see a reply yet.

My EMail account is tobias.gomer"AT"sap.com, please send me your

code!

regards

Tobias

Message was edited by:

Tobias Gomer

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I have worked on the same requirment i could get it please see the below code.

Use this FM. If you need any more information let me know.

MIME_TYPE = 'application/pdf'.

clear DATA_LEN.

DATA_LEN = numbytes.

CALL FUNCTION 'ALEWEB_DOWNLOAD'

EXPORTING

DATA_LEN = numbytes

MIME_TYPE = MIME_TYPE

DATA_TYPE = 'RAW'

TABLES

DATA_TAB = ITAB2

EXCEPTIONS

ITS_NOT_AVAILABLE = 1

OTHERS = 2.