cancel
Showing results for 
Search instead for 
Did you mean: 

Saving SAPSCRIPT to a PDF file using ADS

Former Member
0 Kudos

Hello,

I had posted this message on thread but i was adviced to post it here.

I need to know whether a SAPSCRIPT (Work Order) in SAP ECC ABAP can be saved as a PDF form if ADS is installed and Configured?

We have a 3rd party converter installed on users desktop which converts it into PDF so when user goes to IW32 to print WO, they get a print pop-up and they select this 3rd party converter which gives them the option to save it as PDF file.

We need to know (since we have ADS installed/configured), whether it is possible to save this SAPSCRIPT WO to PDF instead of using this 3rd party tool? We dont want people to install the 3rd party converter since we have over 5000 users.

Any help is appreciated.

Thanks

WR

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Replying to Sandya about printing ( ¥ 1000 is displaying as # 1000.) I had a similar problem printing Hebrew comments; if the form is defined as Hebrew it will print both Hebrew and English correctly, if it is defined as English the Hebrew becomes illegible. Try defining your form as Japanese.

OttoGold
Active Contributor
0 Kudos

Hello again,

what is the result of the thread? Imho everything important has been said already.

You can get a PDF file from smartform through the OTF conversion or you can create a brand new Adobe form (rewrite/ replace smartform) and use ADS to create a form for you. Note there is a big difference in the content of the resulting files. The result of ADS has an inetrnal structure (in some cases, not all), that makes the result really a form (you can separate data and the template) but the result of OTF conversion is just a binary...

Regards Otto

Former Member
0 Kudos

Hi,

I am facing some other kind of proble with PDF converstion using OTF.

While i am converting SAP script form in to PDF by using FM * CONVERT_OTF*, I displaying total amount in Japan currency Yen (¥). but it is converting special char as # in PDF.

Ex: ¥ 1000 is displaying as # 1000.

Plz help me out.

aidan_black
Active Contributor
0 Kudos

Hi Sandya,

This is most likely that this is due to the device type used in the PDf conversion. Try using Unicode device type PDFUC or SWINCF for the PDF conversion as per SAP Note #999712.

Regards,

Aidan

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Hi try this below coding

data: binfilesize type i.

data: pdftab type table of tline with header line.

data: i_itcpp like itcpp.

  • DATA: i_zinv_spool LIKE zinv_spool OCCURS 0 WITH HEADER LINE.

  • CLEAR i_zinv_spool. REFRESH i_zinv_spool.

data: g_t_otfdata type standard table of itcoo with header line.

  • DATA filename TYPE string.

call function 'CLOSE_FORM'

  • IMPORTING

  • RESULT = i_itcpp

tables

otfdata = g_t_otfdata[]

exceptions

others = 1.

if sy-subrc ne 0.

retcode = sy-subrc.

perform protocol_update.

endif.

call function 'CONVERT_OTF'

exporting

format = 'PDF'

  • MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '

  • COPYNUMBER = 0

  • ASCII_BIDI_VIS2LOG = ' '

  • PDF_DELETE_OTFTAB = ' '

importing

bin_filesize = binfilesize

  • BIN_FILE =

tables

otf = g_t_otfdata[]

lines = pdftab[]

  • EXCEPTIONS

  • ERR_MAX_LINEWIDTH = 1

  • ERR_FORMAT = 2

  • ERR_CONV_NOT_POSSIBLE = 3

  • ERR_BAD_OTF = 4

  • OTHERS = 5

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

call function 'GUI_DOWNLOAD'

exporting

bin_filesize = binfilesize

filename = filename

filetype = 'BIN'

tables

data_tab = pdftab[]

Thanks & Regards,

Vallamuthu.M

Former Member
0 Kudos

Hi Vallamuthu,

Thanks for the code. But our argument here is, when we have ADS (which is Adobe product for PDF) configured, why cant we use it to save Sapscript as PDF when other 3rd party tools which is installed as a printer can do it?

I guess Sandra replied that ADS is not a converter and it only prints so i beleive we cannot save/download a sapscript work order as a PDF with ADS ..

Thank you again.

WR

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Yes, what sandra says is correct ADS is not a converter. I'm aslo faced the same problem. that's what i' using the program ie which is i given by you.

Thanks & Regards,

Vallamuthu.M

Sandra_Rossi
Active Contributor
0 Kudos

I read your other thread, but I don't understand why you absolutely want to use ADS to convert a sapscript!

ADS is just to generate a PDF from an XDP (the document template) and XML data (that means you should re-create a form, so just create the interactive form!)

Solution by Otto (CONVERT_OTF) is just fine.

Former Member
0 Kudos

Hi Sandra,

Well we already have ADS configured in the system and we want to know whether it provides any functionality to Save a Sapscript/WO as a PDF. When other 3rd party converters can do this, why not ADS?

Using a Convert PDF function module will involve programmatic conversion or save as, can ADS not provide the same?

I hope i am explaining correctly:

User is in IW32, enters a Work Order, hit enter to display (this is sapscript), click the Order -> Print Order. A small window asking the printers/output device pops-up. If user selects LOCL, then all printers defined on users desktop/computer shows up. If user selects any Desktop printer, it prints a PDF. If user selects this 3rd Party PDF converter, it gives option Save As (.PDF). This is what we want - We want that users dont have to select this 3rd party converter since we have to install it on every PC. So we are thinking if ADS offers anything that can act as a Converter and maybe we can define a printer or output device with this converter function or something so users can save as PDF these sapscript work orders.

I hope this is clear. If you still think we cannot use ADS as a PDF converter (so we can save as..) then we will close this thread.

Regards

WR

Sandra_Rossi
Active Contributor
0 Kudos

Well, ADS is not a converter (as far as I know). It is used to generate PDFs from interactive forms (SFP transaction in ABAP). As I said the input format is XFP, XML.

Note: you may display a PDF from smart form preview (!PDF okcode), but it doesn't work for SAPscript preview if I remember well. So, a little modification of the standard to make it available in SAPscript preview...