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

Issues with SAPSCRIPT & PDF creation

Former Member
0 Likes
590

Requirement: When a particular output type of a billing document is processed, an email is to be generated with PDF attachments.

I have developed a custom program and SAPscript.

But I am facing two major issues here.

1. When processing the output type via RSNAST00, the data gets reflected in the SAPscript. But when the same output type is processed via transaction VF31, no data is passed to the script and the output appears as blank for the fields.

The fields referenced in the script is with the dictionary structure VBRP.

2. The output is converted into PDF using the function CONVERT_OTF. Currently I have one logo in the Script which needs to be replaced with a better one and when that is done, seventh the window size is much bigger, the generated PDF does not open and displays the error 'There was an error opening the document. The file is damaged and could not be repaired.'

If I pass the same internal table to the function GUI_DOWNLOAD and save the file to local PC, the file opens neatly.

Kindly provide with your suggestions.

Thank You.

Ramesh

3 REPLIES 3
Read only

Former Member
0 Likes
542

Is the processing mode you select in VF31 correct?

Also, did you debug and see the issue?

Raj

Read only

0 Likes
542

Thanks Raj.

Yes, the processing mode was correct, The same thing works OK through RSNAST00 program while I encounter error through VF31 transaction.

Read only

0 Likes
542

Is the print program copy of sap standard program? if not, do you have TABLES NAST declared in ur program and use NAST-OBJKY as the doc number.

Regards

Sridhar