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

Create Postscript with extra comment lines

Former Member
0 Likes
1,569

Hi all,

Hope anyone can help me out on this subject.

Our customer sent's its formatted invoices to a partner firm that prints them. The partner needs to receive postscript files with some lines of comment at the top. These comments are command instruction on how to print and handle the invoice. I.e. paper type, folding, priority etc.

<b>Any ideas on how to get specific comment lines in the postscript file?</b>

My own idea is to add comments to the OTF, but I don't know if they will be transferred to the postscript file.

Btw I would rather add the comments within the smartform.

Additional info:

- SAP R/3 Enterprise (6.20)

- The invoices are printed through a Z-program, which is an adjusted copy of RLB_INVOICE.

- The invoice is formatted using a smartform

Thanks,

Hans van der Kooij

9 REPLIES 9
Read only

Former Member
0 Likes
1,331

I Would suggest to create a standard text (IF the text is static) in so10 and then include the standard text in the smartformlayout itself.

Regards,

Ravi

Read only

0 Likes
1,331

Ravi,

Thanks for your reply, but the tekst should be a comment and not to be printed at all. So I can't use your option.

Read only

Former Member
0 Likes
1,331

HI

Once if u hav added the required commentary lines to the OTF u can convert it to post script using this FM

<b>OTF_POSTSCRIPT</b>

Read only

0 Likes
1,331

Ganesh,

Thanks for your reply, but FM OTF_POSTSCRIPT is empty. There is some comment on using RSPO_PROCESS_DIALOG_JOB instead, but that FM requires a spool ID which I do not (yet) have.

BTW Using the spool in this way is not a such good option, because we have high volumes which I don't want to add to the spool first, get the spool ID and then convert it to postscript.

RSPO_PROCESS_DIALOG_JOB uses "CALL 'C_RSPO_PROCESS_DIALOG'". Maybe anyone who knows a better system CALL (to use with an OTF)?.

Regards Hans

Read only

Former Member
0 Likes
1,331

Hi

how about trying this FM

<b>RSPO_OUTPUT_POSTSCRIPT</b>

Read only

0 Likes
1,331

Ganesh,

I'm not sure about this FM. It uses an untyped tables parameter POSTSCRIPT_DATA. This data is send to the spool. So it looks like it sents postscript to the spool, not OTF.

But I'll give it try and get back to you.

Thanks

Read only

0 Likes
1,331

Ganesh,

We tried RSPO_OUTPUT_POSTSCRIPT and also tried function module SX_OBJECT_CONVERT_OTF_PRT (as mentioned by <a href="http://help.sap.com/saphelp_45b/helpdata/en/08/e043c4c18711d2a27b00a0c943858e/content.htm">SAP Help on Formats</a>). Both functions have a performance not good enough for high volume printing (they write a PS file to the server somewhere and then read it again).

So we still need a another solution:

- I.e. Can we add commands to the OTF before convertion to PS?

- Is there another high performance solution.

Read only

sridhar_k1
Active Contributor
0 Likes
1,331

If your postscript comments going to be constant or have few variations then using HEX ENDHEX migth help

Post script comment begin with %, it's hex value is 25, convert all characters after % to hex, for Ex: if your comment is %ABC, it's hex equivalent is 25414243

add the following lines to a standerd text in SO10:

/: HEX TYPE POST

/* following line is hex equivalent of %ABC,

/ 25414243

/: ENDHEX

Include the standard text into ur smartform header window.

The comment lines appear after about 200 lines in the postscript file.

If you need to add comment lines after first line of the postscript file, best way is to modify the postscript file using a unix script before sending it to the partner. u don't need to do any coding in smartform if u choose to use unix script.

Regards

Sridhar

Read only

0 Likes
1,331

Sridhar,

We are now going to try your solution. We have tried a simular trick by adding comments to the OTF. But had no good result so far. Hope your solution will have a better result.

Regards

Hans