Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting Script To PDF (Error Message)

Former Member
0 Likes
2,942

Hello everyone,

I have written a piece of code which will convert SAP

spool files into their PDF equivalent. However, it

keeps crashing when trying to convert a file which

contains no data. I get the error message:

Spool request 16503 contains no SAPscript data

Message no. TD030

Can anyone tell me how I can trap this error no that

the user does not see this.

Cheers

Andy

3 REPLIES 3
Read only

Former Member
0 Likes
1,129

If you are using any tables and assigning them to function modules with no error handling techniques, this might occur.

jus check the structure or table, where u load the data from spool is initial. then terminate the usage of the FMs.

some thing like :

if not it_itab is initial.

....continue your code........

endif.

regards,

Sandeep Josyula

*Mark helpful answer

Read only

Former Member
0 Likes
1,129

Hi,

check for table contents before passing to FM

to convert spool to pDF by this way you can

elimate the error message

if not itab[] is initial.

call function CONVERT_ABAPSPOOLJOB_2_PDF

CONVERT_OTFSPOOLJOB_2_PDF

endif.

Regards

amole

Read only

0 Likes
1,129

Thanks guys, but this is the problem, the internal

table is not empty.

I think the error message appears when the spool file

is not a SAPscript. How can I check this before trying

to convert?