Convert SAPSCRIPT forms to PDF

We need to do a report that can generate several pdfs from a payment run (SAP-FI), so we need to have one pdf  for each payment in the run (they are in SAPSCRIPT form).
The program that we use is copy of "J_1AF012" and the we use "SX_OBJECT_CONVERT_OTF_PDF" function to obtain the pdf form, but the changes that we did in the standard were:
a) in the "OPEN_SAPSCRIPT"
*&      Form  OPEN_SAPSCRIPT
      text                                                           *
FORM OPEN_SAPSCRIPT.
  ITCPO-TDIMMED    = '*'.              " kz sofort drucken
  ITCPO-TDDELETE   = '*'.              " kz freigbe nach Druck
  ITCPO-TDLIFETIME = '7'.              " verfalltage
  ITCPO-TDPREVIEW  = 'X'.              " druckansicht
Setting the options
  w_options-tdcopies = 1 ."Number of copies
  w_options-tdnoprev = c_x."No print preview
  w_options-tdgetotf = c_x."Return of OTF table
  w_options-tddest =   c_locl."Spool: Output device
  CALL FUNCTION 'OPEN_FORM'            " open form for output
       EXPORTING FORM    = S_FORM
                 DIALOG  = 'X'
                 LANGUAGE = 'S'
               OPTIONS = ITCPO
                 OPTIONS = w_options
                DEVICE  = 'PRINTER'
                 DEVICE  = c_printer
       IMPORTING
                 RESULT  = W_RES.
ENDFORM.                               " OPEN_SAPSCRIPT
b) In the "CLOSE_SAPSCRIPT" :
FORM CLOSE_SAPSCRIPT.
  C_ORDEN = C_ORDEN + 1.
  shift C_ORDEN left deleting leading space.
  CONCATENATE C_PATH C_NAME1 C_ORDEN C_EXTENSION INTO C_NAME.
  CALL FUNCTION 'CLOSE_FORM'
  IMPORTING
          RESULT = w_res
          TABLES
                otfdata = i_otf
          EXCEPTIONS
                unopened = 1
                bad_pageformat_for_print = 2
                send_error = 3
                spool_error = 4
                codepage = 5
                OTHERS= 6.
  IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
c) And we added these functions:
Converting OTF data to single line
  LOOP AT i_otf INTO w_otf.
        CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
                                              INTO w_pdf.
        APPEND w_pdf TO i_content_txt.
  ENDLOOP.
Converting to PDF Format
  CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
  EXPORTING
            format_src = c_otf
            format_dst = c_pdf
            devtype = c_printer
        CHANGING
            transfer_bin = w_transfer_bin
            content_txt = i_content_txt
            content_bin = i_content_bin
            objhead = i_objhead
            len = v_len_in
        EXCEPTIONS
            err_conv_failed = 1
        OTHERS = 2.
  v_size = v_len_in.
Downloading the PDF File
  CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
            bin_filesize = v_size
            filename = c_name
            filetype = c_bin
        TABLES
            data_tab = i_content_bin.
When we run the program the error is a dump with:
"DBIF_RSQL_INVALID_CURSOR
CX_SY_OPEN_SQL_DB        "
and aparenttly is due to the cursor in BKPF table is closed (or missing) in some of those functions.
We use the "open_form" and "close_form" for each payment document, and we could generate only the first pdf and then the program cancel (to the second pdf) with this mentioned error.
We are on R/3 4.70, 620, and Informix Database.
Please, could you kindly help us???
Best regards,

Hola Grisel!
Estoy tratando de armar en pdf las órdenes de pago, pudiste hacerlo? Como lo lograste?
Gracias de antemano por cualquier info que me puedas brindar.
Saludos
Eduardo Puricelli
Hi Grisel,
I'm trying to build in pdf payment orders, could you? As you did it?
Thanks in advance for any info you can give me.
Greetings
Eduardo Puricelli

Similar Messages

  • Problem in converting smart form into PDF

    HI Experts,
                      I am using a Function Module CONVERT_OTF for converting smart form into pdf file for send it to with attachment.
    But i got a error when i am using that FM.
    Runtime Errors         CONVT_NO_NUMBER
    unable to interpret *292 as a no.
    Is that because my file size too large about 13 pages of PDF?
    and when i run it for other smart forms which have 2 or 3 pages of PDF, its working perfectly.
    can anyone tell what is problem with that FM?
    Thanks
    Shakun

    Hi,
    I had the similar issue and after analysis I have that this is the issue by not passing the IMPORTING parameter of the Function Module "BIN_FILESIZE". Please try to pass some variable to this paramter and then this will be completely rectified.
    DATA ; v_filesize     TYPE i.
    *--Convert OTF data to PDF data
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = v_filesize
        TABLES
          otf                   = it_otfdata
          lines                 = it_pdfdata
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          OTHERS                = 5.
    Please verify whether this reolves the problem for you.
    Regards,
    SRinivas

  • Why can i not convert a form to PDF when I have an active account and it wants me to sign up for an upgrade?

    Why can i not convert a form to PDF when I have an active account and it wants me to sign up for an upgrade? This just started!!!!!!!!

    Hi EdAAK,
    I've checked your account, and see no issues with your subscription. So, if you're using a web browser, please log out, clear the browser cache, and then log back in to https://cloud.acrobat.com. And, if you're using Reader, make sure that you're logged in—you should see your name listed in the upper-right corner. If not, click the Sign In link and then sign in with your user name and password.
    Please let us know how it goes.
    Best,
    Sara

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • Convert XFA form to PDF document

    Within a process, I have form defined as a xfa variable and user can fill it in workspace and also include attachment when submitting the form.
    Then after the form is processed, approved by manager I need to convert it to a pdf(which should contain attachments) and save it to a folder. how can I do that?
    Thanks.

    There is another way but it's a manual process and it's a HACK. Using this process will basically kill any XFA or JS functionality that was in the form previously. So proceed at your own risk...
    Use a tool that can view and edit the internals of a "static" LiveCycle PDF form (i.e. Windjack's PDFCanOpener).
    Delete the XFA dictionary
    Do a SaveAs to a new form name.
    Close the form
    Re-open the form and then you should be able to edit the form with the Acroform tools.
    Note: This WILL NOT work with dynamic forms.
    Sabian

  • How to convert Infopath forms into pdf or word ?

    I have an urgent requirement. I need to covert approx 50k infopath forms into pdf/word.
    Is there any way to convert it without using a third party software?
    Is this possible via Powershell script ? 

    Not with Microsoft tools. This would be something supplied by a 3rd party, if available at all.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Convert InfoPath form to PDF issues

    Hello,
    We have some web based InfoPath forms hosted in a MOSS 2007 SharePoint environment. Users who have Acrobat professional installed on their computers are having problems converting the forms when using the Adobe PDF Toolbar in IE. There are two problems that the users are seeing.
    First, individual text fields appear to black out the field. If the user selects the highlight fields option in Reader or Acrobat when they open the saved PDF, then the fields are no longer blacked out. It looks like the conversion is interperating the background color of the fields to be black. On the form there is no background color for the fields.
    The second issue some users are experiencing is that the converted PDF looks to cut off the right side of the form, or throws off the layout of the form (table columns are shifted). The table shifting issue is probably related to the InfoPath form layout, but the cut off issue seems a bit odd. For most users the form scales to fit on the PDF page, but some users get a cut off form.
    Has anyone seen either of these issues before, or found a resolution for either? Thank you ahead of time for any assistance.

    Infopath forms contain multiple components. The InfoPath .xsn file defines the data structure, appearance, and behavior of finished forms (.xml files).
    To properly convert I would suggest using LiveCycle Designer (not the Web Capture in Acrobat). Designer will convert your .xsn file and extract the necessary components.

  • Converting HTML Forms to PDF - Field Names

    When I use Adobe 8 to convert and HTML form to PDF all the field names in the resulting PDF have the crazy long names that are jumble of letters and numbers. So I always have to go back through and manually rename every field because I'm using another program to autopopulate the fields with data. Is there any way to get Acrobat to automatically name the fields in the PDF the same as they are named in the form either using the "name" or "id" properties of the HTML fields? I don't understand why this isn't the default behaviour to begin with.

    The reason this is done is due to a fundamental difference between HTML forms and Acrobat forms. In HTML forms, fields with the same name do not necessarily share the same value, whereas in Acrobat forms they do.
    In the conversion process, Acrobat gives each field a unique name, but also sets a field's mapping name to the name the field had in the original HTML form. This is so that if the PDF form is used to submit as "HTML", then the original field names will be used and any server process that is capable of dealing with the HTML form is capable of dealing with the resulting PDF form. So be aware that if you want to use your modified form to submit to a web server using the "HTML" format, the new field names that you set will not be used. What will be used are the hidden mapping names.
    Unfortunately, I don't think there's anything you can do about any of this to make it work like you want.
    George

  • Convert SAPScript form to Adobe ?

    Hello guys ...
    Is it possible to convert a SAPScript form (like MEDRUCK) to Adobe form?
    Or is this migrate only from SMARTFORM to Adobe ?  thanks!!  Sil

    hi
    good
    go through this link
    INTRESTING FECT REGARDING JETFORM-->TO ADOBE.
    Re: jetforms to adobe.
    Re: WIll Adobe Forms replace SapScripts
    thanks
    mrutyun^

  • Convert FormsCentral form to PDF form

    Can I export or convert an existing FormsCentral form into an adobe acrobat Pro fillable form?

    We currently do not support creating a PDF form. This has been a very common request (we are the Acrobat team so it isn't a surprising one ). PDF form creation is defintely on our roadmap this year.
    Thanks for the feedback,
    Randy

  • Convert SAPScript to PDF - sample report needed

    Hi Experts,
    I need a sample report which convert SAPScript form to PDF. I tried several samples in this forum but it did not work.
    Thanks!
    - Anthony -

    Hi,
    Check with the [Convert SAP script to PDF|http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417400)ID0384864750DB01011562107177693234End?rid=/library/uuid/49e15474-0e01-0010-9cba-e62df8244556&overridelayout=true]
    Hope this helps you.
    Regards,
    Rajani

  • Help with converting form to pdf

    i try to convert a form to pdf and it changes from 1 page to 2 with extra boxes

    Hi,
    Could you please share your form with [email protected], so that I can investigate what happening in your form?
    Thanks,
    Ying

  • Convert sapscripts to pdf

    hi,
    I want to convert SAPscript to Adobe PDF format and also want to store that PDF file to my local drive.
    I dont want to do it by program RSTXPDFT4. it should generate the PDF file automatically.
    If any one knows please help me.

    put like this
      call function 'CLOSE_FORM'
        importing
          result                   = result
          rdi_result               = rdi
        tables
          otfdata                  = otf_table
        exceptions
          unopened                 = 1
          bad_pageformat_for_print = 2
          others                   = 3.
      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 'CONVERT_OTF'
    exporting
       format                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
      importing
        bin_filesize                = len_out
    *   BIN_FILE                    =
      tables
        otf                         = otf_table
        lines                       = pdf
    * 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.
    clear: file.
    call function 'GUI_DOWNLOAD'
      exporting
        bin_filesize                    = len_out
        filename                        = 'C:/TESTING07.PDF'
        filetype                        = 'BIN'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    * IMPORTING
    *   FILELENGTH                      =
      tables
        data_tab                        = pdf
    *   FIELDNAMES                      =
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards
    Prabhu

  • Re: convert sapscript to pdf

    HI friends ,
      i am not getting my sapscript form in PDF eventhough i am using RSTXPDFT4 ,am getting PDF oly as No of record : 6
    to Raguram :
    u hav used 'SSF_FUNCTION_MODULE_NAME' but hope this will be only for SMARTFORMS,am i right?
    shan

    hi,
       it seems that none of the value get passed thru 'te_otf_table' which is of type ITCOO.
    i think it shld b of type SSFCRESCL.
    this is how my codlooks like:
    REPORT  Z243_SSRIPT_PRACT.
    TABLES : ZPURCHASEHEADER.
    DATA: IT_TAB LIKE TABLE OF ZPURCHASEHEADER WITH HEADER LINE.
    DATA: IT_PURCHASEDETAIL LIKE TABLE OF ZPURCHASEDETAILS WITH HEADER LINE.
    DATA: BIN_SIZE TYPE I,
          JOBOUTPUT TYPE SSFCRESCL,
         it_result like table of itcoo,"JOBOUTPUT-OTFDATA
          OTF LIKE TABLE OF ITCOO,
          DOC LIKE TABLE OF DOCS,
          TLINES LIKE TABLE OF TLINE.
    SELECTION-SCREEN : BEGIN OF SCREEN 9001.
       PARAMETERS  PUR_NO LIKE ZPURCHASEHEADER-PURCHASENO.
    SELECTION-SCREEN : END OF SCREEN 9001.
    CALL SELECTION-SCREEN 9001.
      SELECT * FROM ZPURCHASEHEADER INTO  IT_TAB
                                     WHERE PURCHASENO = PUR_NO.
      ENDSELECT.
      SELECT * FROM ZPURCHASEDETAILS INTO IT_PURCHASEDETAIL
                                     WHERE PURCHASENO = PUR_NO.
      ENDSELECT.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'Z243_SAPS_PRAC'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'PUR_DET'
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT                        = 'INFORMATION'
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
       WINDOW                         = 'WINDOW4'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
      ELEMENT                        = 1
      FUNCTION                       = 2
      TYPE                           = 3
      UNOPENED                       = 4
      UNSTARTED                      = 5
      WINDOW                         = 6.
    CALL FUNCTION 'CLOSE_FORM'
    TABLES
       OTFDATA                        = OTF
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
    IMPORTING
       BIN_FILESIZE                 = BIN_SIZE
      TABLES
        OTF                          = otf
        DOCTAB_ARCHIVE               = DOC
        LINES                        = TLINES.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          BIN_FILESIZE                  = BIN_SIZE
          FILENAME                      = 'C:\siva\SStest.pdf'
          FILETYPE                      = 'BIN'
        TABLES
          DATA_TAB                      = TLINES.
    * Open PDF
    DATA: PROGRAM LIKE SOXPC-PATH.
    CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
      EXPORTING
        DOCTYPE = 'PDF'
      IMPORTING
        PATHNAME = PROGRAM
      EXCEPTIONS
        PATH_NOT_FOUND = 1
        PROGRAM_NOT_FOUND = 2
        NO_BATCH = 3
        X_ERROR = 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 'WS_EXECUTE'
      EXPORTING
        COMMANDLINE = 'C:\siva\SStest.pdf'
        PROGRAM     = PROGRAM
      EXCEPTIONS
        FRONTEND_ERROR = 1
        NO_BATCH = 2
        PROG_NOT_FOUND = 3
        ILLEGAL_OPTION = 4
        GUI_REFUSE_EXECUTE = 5
        OTHERS = 6.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    pls help to solve this issue
    shan
    Message was edited by:
            sivakumar palaniswamy

  • Convert Coldfusion Flash form to PDF?

    Is it possible to convert a Coldfusion flash based form to a PDF form? I've tried it using Coldfusion 8 and Adobe Professional 8, but all I end up with is a blank PDF. It works just fine for a basic HTML based form. Is there some technical reason this doesn't work?... Because it seems rather stupid that ADOBE Coldfusion and ADOBE Acrobat don't work together properly.

    It's an internal form, so i don't have any link.  But the form is constructed using the standard flash form tags... example:<br /><br /><cfform name="form" action="exampleform.cfm" format="Flash"><br /><cfformitem><br /><cfformgroup><br /><cfinput><br /><cfselect><br />          <br />The entire form is mostly just a mix of those tags.  Pretty standard stuff, but Adobe 8 Professional simply won't convert the form to PDF.  Or, actually, it does but the form is blank.  I'm usually just left with the graphic from the top of the page which likes outside the <cfform> tags.

Maybe you are looking for

  • Why this code is not working??? java script

    gen_validatorv2.js      JavaScript Form Validator Version 2.0.2      Copyright 2003 JavaScript-coder.com. All rights reserved.      You use this script in your Web pages, provided these opening credit lines are kept intact.      The Form validation s

  • Is there a time limit for how long a free form can be used/accessed?

    Is there a time limit for how long a free form that is created can be used/accessed, or is it soely dependent upon when the 50 respondent max has been reached?  I am creating a form now, that will likely be distributed in early January, and I want it

  • How to pass pricing type using BAPI_SALESORDER_CHANGE

    Hi all, How will we use BAPI_SALESORDER_CHANGE  to re-price the orders. There is parameter LOGIC_SWITCH  which can be used to export the pricing type. But what all are the other parameters we should pass? Has anybody worked in such a context.?

  • White screen and black outlines for the icons!!!

    Please help, My daughters phone has been going wrong for a couple of wks. i have had error 507 messages and have had to force the reboot twice. But today its something new... all the icons and applications are now just a black outline on a white scre

  • Strange Rollover Behavior

    I have developed a portfolio site that features a series of rollover thumbnails. When the mouse rolls over the thumb, it colorizes and opens a movie that features a two frame movie symbol that has a larger image. Everything works great until you go t