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

SD Document Conversion to PDF

Former Member
0 Likes
628

Hi friends,

I am writing an Z program to convert SD documents, Quote/Order/Invoice Etc to PDF.

the problem is that, it is not creating New spool request everytime I make a call to processing program(printing program defined in configuration).

I am finding the processing program and then calling the FORM with that program e.g.

PERFORM (tnapr-ronam) IN PROGRAM (tnapr-pgnam)

USING wa_subrc wa_screen IF FOUND.

This create a New spool request for the first time. but if tried to re-print same document , same spool request is used.

Please Help me.

Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
590

It sounds like the field ITCPO-TDNEWID has to be set to 'X'. This will give you a new spool request even if another is open with the same characteristics.

Read only

0 Likes
590

I knew about this that I had to pass ITCPO-TDNEWID with 'X' for New Spool request,

but where in the printing program I can pass usder defined print parameters.

Read only

0 Likes
590

Not sure how you can set it with your defined scenario.

Are you populating the NAST structure before your PERFORM to the print routine? You might be able to fake out the system by thinking you are generating a unique spool request. If it is unique, it won't merge with the existing open request.

Can't remember the exact fields that make the request unique. I think they include NAST-DSUF1 and NAST-DSUF2. Try putting a unique value (like a timestamp) in NAST-DSUF2 before the call.