Converting output of script to pdf

DEAR ALL,
i am trying to convert output of zscript to pdf, the zscript is assign to standard tcode: J1IP, and uses zprogram, i am using otf_convert function module .the program  is activated, but while executing it give the error msg " OTF end command // missing
in OTF data "  .What does this message no mean " TD030".......

try the following code in close_form
  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.
*****************TAKING THE DOWNLOAD
  SET COUNTRY space.
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
   EXPORTING
     i_otf                    = g_t_otfdata[]
   EXCEPTIONS
     acrobat_not_registered   = 1
     convert_otf_to_pdf_error = 2
     download_error           = 3
     acrobat_not_started      = 4
     cntl_error               = 5
     OTHERS                   = 6.
***************************DOWNLOADING THE PDF DATA******************
  CONCATENATE file_path vbco3-vbeln text-002 INTO filename.
  CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
  bin_filesize = binfilesize
  filename = filename
  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 = pdftab[]
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.
lv_tabix = lv_tabix + 1.

Similar Messages

  • Convert Script to PDF using RVADOPFO, w/o using spool and send via email

    I want to convert output type script to pdf using the standard include RVADOPFO in the program. The output type is defined as medium '5' and comm starategy is also defined as INT(email) as want to send the output via email.
    Now the Include RVADOPFO contains ADDR_KEY-ADDRNUMBER & ADDR_KEY-PERSNUMBER. Where to maintain this info and how to pass in the include..below code is in the include..
    IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
      ... use stratagy to get communication type
        CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
             EXPORTING
                  STRATEGY           = NAST-TCODE
                ADDRESS_TYPE       =
                ADDRESS_NUMBER     = VBDKA-ADRNR
                PERSON_NUMBER      = VBDKA-ADRNP
                  ADDRESS_NUMBER     = ADDR_KEY-ADDRNUMBER
                  PERSON_NUMBER      = ADDR_KEY-PERSNUMBER
             IMPORTING
                  COMM_TYPE          = LVS_COMM_TYPE
                  COMM_VALUES        = LVS_COMM_VALUES
           TABLES
                STRATEGY_TABLE     =
             EXCEPTIONS
                  ADDRESS_NOT_EXIST  = 1
                  PERSON_NOT_EXIST   = 2
                  NO_COMM_TYPE_FOUND = 3
                  INTERNAL_ERROR     = 4
                  PARAMETER_ERROR    = 5
                  OTHERS             = 6.
    Please provide solution asap. Thanks in advance

    Hi,
    Check this links:
    Sending Mail from SAP
    https://wiki.sdn.sap.com/wiki/display/sandbox/SendMailwithPDFAttachment?showChildren=false#children
    Thanks.

  • Convert sap script to pdf and send mail before close_form

    hi experts,
    I am converting a sap script to PDF and then sending that pdf to vendor mail ids.
    I am getting the Data for the conversion of pdf From close_form.But it contains the data for all the vendors . But i have to Send the mail to the specific vendors.For ex if my script output has 5 sheets each with different vendors . I have to send  1 sheet as a pdf mail for that particular vendor. so,1 sheet each for 5 differrent vendors . But the data i get from close_form is the data for all the 5 vendors. How to split the data ?. can any one help me on this issue.
    with thanks in advance,
    syed

    Hi,
        Change your driver program so that it calls the script n no of times .. and every time send mail to particular vendor ..
        Loop at vendors.
         call the form ...
         send mail ...
        endloop ...
    Regards,
    Srini.

  • Runtime error while trying to convert script to pdf and sending in mail

    Hi all,
    I m trying to convert the standard script into pdf using convert_otf fm and trying to send it as an attachment using 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    I m using fm 'SSF_FUNCTION_MODULE_NAME' to get the function module name.
    But i m getting a runtime error while executing the program..
    Can anyone help me in this issue please.
    Thanks in advance,
    Ashok

    Hi Ramesh,
    I m getting an runtime error function module not found. I ll paste the code here.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = lf_formname
        IMPORTING
          fm_name            = lf_fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc = 0.
    error handling ent_retco = sy-subrc.
    perform protocol_update_i.
      ENDIF.
      ls_control_param-getotf = 'X'.
      DATA: l_document_output_info TYPE ssfcrespd,
            l_job_output_info TYPE ssfcrescl,
            l_job_output_options TYPE ssfcresop.
    check ent_retco eq 0.
      CALL FUNCTION 'lf_fm_name'
      EXPORTING
        archive_index = toa_dara
        archive_parameters = arc_params
        control_parameters = ls_control_param
        mail_recipient = ls_recipient
        mail_sender = ls_sender
        output_options = ls_composer_param
        user_settings = ' '
        zxekko = l_doc-xekko
        zxpekko = l_doc-xpekko
    zxaend = l_doc-xaend
        IMPORTING
          document_output_info = l_document_output_info
          job_output_info = l_job_output_info
          job_output_options = l_job_output_options
          TABLES
            l_xekpo = l_doc-xekpo[]
            l_xekpa = l_doc-xekpa[]
            l_xpekpo = l_doc-xpekpo[]
            l_xeket = l_doc-xeket[]
            l_xtkomv = l_doc-xtkomv[]
            l_xekkn = l_doc-xekkn[]
            l_xekek = l_doc-xekek[]
            l_xaend = l_doc-xaend[]
            l_xkomk = l_xkomk
            EXCEPTIONS
              formatting_error = 1
              internal_error = 2
              send_error = 3
              user_canceled = 4
              OTHERS = 5.
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = v_len_in
        TABLES
          otf                   = l_job_output_info-otfdata
          lines                 = tb_pdf
        EXCEPTIONS
          err_max_linewidth     = 0
          err_format            = 1
          err_conv_not_possible = 2
          OTHERS                = 3.

  • Conversion of QC21 sap script to pdf

    Hello Experts
    I was working on QC21 sap script layout,got guidance from u guys & i managed to finish.
    now can anyone tell me how to convert the sap script to pdf format?
    Kash

    Hi,
    if u wish to automate the process, then u can write the following code...
    DATA: V_PRINT_PARMS LIKE PRI_PARAMS.
    DATA: V_PDFSPOOLID TYPE TSP01-RQIDENT,
              V_RQIDENT TYPE TSP01-RQIDENT.
    DATA: V_RQ2NAME TYPE STRING.
    DATA: T_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA: T_RSPAR TYPE STANDARD TABLE OF RSPARAMS.
    To Setup The Print Parameters
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        AUTHORITY   = SPACE
        COPIES    = '1'
        COVER_PAGE    = SPACE
        DATA_SET     = SPACE
        DEPARTMENT      = SPACE
        DESTINATION    = SPACE
        EXPIRATION     = '1'
        IMMEDIATELY     = SPACE
        LAYOUT     = SPACE
        MODE       = SPACE
        NEW_LIST_ID    = 'X'
        NO_DIALOG      = 'X'
        USER     = SY-UNAME
      IMPORTING
        OUT_PARAMETERS     = V_PRINT_PARMS.
    IF SY-SUBRC EQ 0.
    Submit Program & Store Spool ID Into Memory
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          CURR_REPORT     = 'RQCAAP01'
        TABLES
          SELECTION_TABLE = T_RSPAR.
    ENDIF.
    SUBMIT RQCAAP01 VIA SELECTION-SCREEN TO SAP-SPOOL WITHOUT SPOOL DYNPRO
               SPOOL PARAMETERS V_PRINT_PARMS
               WITH SELECTION-TABLE T_RSPAR
               AND RETURN.
    Retrieving Spool ID From TSP01 Table
    CONCATENATE V_RQ2NAME SY-UNAME INTO V_RQ2NAME.
    SELECT * FROM TSP01
    WHERE RQ2NAME EQ V_RQ2NAME ORDER BY RQCRETIME DESCENDING.
      V_RQIDENT = TSP01-RQIDENT.
      EXIT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      CLEAR V_RQIDENT.
    ENDIF.
    To Convert Spool ID To PDF Format
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
      EXPORTING
        SRC_SPOOLID              = V_RQIDENT
      TABLES
        PDF                      = T_PDF.
    IF SY-SUBRC EQ 0.
    To Download The File In PDF Format
    to get file name and location for saving
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE         = 'Select The Path Where The PDF Should Be Saved'
          DEFAULT_FILE_NAME    = 'Certificate Of Analysis.PDF'
        CHANGING
          FILENAME             = v_filename
          PATH                 = v_filepath
          FULLPATH             = v_fullpath.
    To download the PDF file
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = v_fullpath
          FILETYPE                = 'BIN'
        TABLES
          DATA_TAB                = T_PDF.
    ENDIF.
    I hope this resolves ur issue...
    Regards,
    Radhika

  • How to convert sap script to pdf and send it as email attachment

    hi,
    my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
    thanks in advance

    Hi
    See this sample code and after that use the fun module to send the mail
    SO_NEW_DOCUMENT_ATT_SEND_API1
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    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
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    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.
    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.
    If you r using this function module check it once....
    call function 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
    follow this link for sample program.
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
    check...
    How to send smart form via email
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
    Regards
    Anji

  • Smartform/Sap script output to Text file/PDF/WORD

    Hi,
    I need to download/transfer the output of smartforms/sap script to text file/pdf file or word file.How do i do that?
    Do I need to create a new output device?
    thnx in advance
    chirantan

    Hi,
    Go through the following Code
    Mail a sapscript
    SAPscript: Autotmatically e-mail as PDF
    How to convert sapscript(Purchage order) inot pdf format & send in  mail
    Check the following Code
    REPORT ZRICH_0003.
    DATA: ITCPO LIKE ITCPO,
          TAB_LINES LIKE SY-TABIX.
    Variables for EMAIL functionality
    DATA: MAILDATA   LIKE SODOCCHGI1.
    DATA: MAILPACK   LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: MAILHEAD   LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: MAILBIN    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILTXT    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: MAILREC    LIKE SOMLREC90 OCCURS 0  WITH HEADER LINE.
    DATA: SOLISTI1   LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    PERFORM SEND_FORM_VIA_EMAIL.
          FORM  SEND_FORM_VIA_EMAIL                                      *
    FORM  SEND_FORM_VIA_EMAIL.
      CLEAR:    MAILDATA, MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
      REFRESH:  MAILTXT, MAILBIN, MAILPACK, MAILHEAD, MAILREC.
    Creation of the document to be sent File Name
      MAILDATA-OBJ_NAME = 'TEST'.
    Mail Subject
      MAILDATA-OBJ_DESCR = 'Subject'.
    Mail Contents
      MAILTXT-LINE = 'Here is your file'.
      APPEND MAILTXT.
    Prepare Packing List
      PERFORM PREPARE_PACKING_LIST.
    Set recipient - email address here!!!
      MAILREC-RECEIVER = '[email protected]'.
      MAILREC-REC_TYPE  = 'U'.
      APPEND MAILREC.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = MAILDATA
                PUT_IN_OUTBOX              = ' '
           TABLES
                PACKING_LIST               = MAILPACK
                OBJECT_HEADER              = MAILHEAD
                CONTENTS_BIN               = MAILBIN
                CONTENTS_TXT               = MAILTXT
                RECEIVERS                  = MAILREC
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    ENDFORM.
         Form  PREPARE_PACKING_LIST
    FORM PREPARE_PACKING_LIST.
      CLEAR:    MAILPACK, MAILBIN, MAILHEAD.
      REFRESH:  MAILPACK, MAILBIN, MAILHEAD.
      DESCRIBE TABLE MAILTXT LINES TAB_LINES.
      READ TABLE MAILTXT INDEX TAB_LINES.
      MAILDATA-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( MAILTXT ).
    Creation of the entry for the compressed document
      CLEAR MAILPACK-TRANSF_BIN.
      MAILPACK-HEAD_START = 1.
      MAILPACK-HEAD_NUM = 0.
      MAILPACK-BODY_START = 1.
      MAILPACK-BODY_NUM = TAB_LINES.
      MAILPACK-DOC_TYPE = 'RAW'.
      APPEND MAILPACK.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form.  just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
      PERFORM GET_OTF_CODE.
      LOOP AT SOLISTI1.
        MOVE-CORRESPONDING SOLISTI1 TO MAILBIN.
        APPEND MAILBIN.
      ENDLOOP.
      DESCRIBE TABLE MAILBIN LINES TAB_LINES.
      MAILHEAD = 'TEST.OTF'.
      APPEND MAILHEAD.
    Creation of the entry for the compressed attachment
      MAILPACK-TRANSF_BIN = 'X'.
      MAILPACK-HEAD_START = 1.
      MAILPACK-HEAD_NUM = 1.
      MAILPACK-BODY_START = 1.
      MAILPACK-BODY_NUM = TAB_LINES.
      MAILPACK-DOC_TYPE = 'OTF'.
      MAILPACK-OBJ_NAME = 'TEST'.
      MAILPACK-OBJ_DESCR = 'Subject'.
      MAILPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND MAILPACK.
    ENDFORM.
         Form  GET_OTF_CODE
    FORM  GET_OTF_CODE.
      DATA: BEGIN OF OTF OCCURS 0.
              INCLUDE STRUCTURE ITCOO .
      DATA: END OF OTF.
      DATA: ITCPO LIKE ITCPO.
      DATA: ITCPP LIKE ITCPP.
      CLEAR ITCPO.
      ITCPO-TDGETOTF = 'X'.
    Start writing OTF code
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                FORM     = 'ZTEST_FORM'
                LANGUAGE = SY-LANGU
                OPTIONS  = ITCPO
                DIALOG   = ' '
           EXCEPTIONS
                OTHERS   = 1.
      CALL FUNCTION 'START_FORM'
           EXCEPTIONS
                ERROR_MESSAGE = 01
                OTHERS        = 02.
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                WINDOW        = 'MAIN'
           EXCEPTIONS
                ERROR_MESSAGE = 01
                OTHERS        = 02.
    Close up Form and get OTF code
      CALL FUNCTION 'END_FORM'
           EXCEPTIONS
                ERROR_MESSAGE = 01
                OTHERS        = 02.
      MOVE-CORRESPONDING ITCPO TO ITCPP.
      CALL FUNCTION 'CLOSE_FORM'
           IMPORTING
                RESULT  = ITCPP
           TABLES
                OTFDATA = OTF
           EXCEPTIONS
                OTHERS  = 1.
    Move OTF code to structure SOLI form email
      CLEAR SOLISTI1. REFRESH SOLISTI1.
      LOOP AT OTF.
        SOLISTI1-LINE = OTF.
        APPEND SOLISTI1.
      ENDLOOP.
    ENDFORM.
    Regards
    Sreeni

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • Is Any Body Tell Me How to Creat a Script Form(converting script into pdf)

    waiting for u r responce, pls help me in this concernd

    Welcome to SDN.
    If you want to conver SCRIPT to PDF format check this link -
    hi, hoe to convert script form into pdf format
    how to convert script into PDF
    If you want to convert it to Adobe Forms refer this -
    Adobe Forms
    Regards,
    Amit
    Reward all helpful replies.

  • Dynamicaly how to convert script to pdf

    Hi All,
      I have a requirement ,at single time execution of a print program it will display script to pdf file. In this print program many layouts are there. In this case how to do .Please help me.
    Thanks
    Raghava

    hi
    check these links
    [https://www.sdn.sap.com/irj/scn/forums]
    [OTF  -> PDF;
    regards
    rajye
    pls close the thread if its resolved.

  • Converting many numbers files to PDFs?

    Hi everyone!
    I would like to convert many Numbers files to PDF documents. Every Numbers document should be a new PDF with the same name!
    I even tried to write a workflow file with Automator, but I dont get the "create a PDF"-part running.
    Furthermore I googled for 2 hours, but all scripts I found do not work with the latest Numbers version...
    Please help me... Maybe one of you have a Apple Script or a solution using Automator?
    OS X 10.9.3
    Numbers Version 3.2 (1861)

    Dear Lori,
    promptUser =false, see below.
    Does not work.
    All programs that might disturbe PDF output removed from computer.
    Does not work.
    I am now investing some evenings into Word-VBA, making a script loop through the subdirectories over several levels (does Acrobat do that anyway?)...
    Does not work.
    Not yet.
    It will have to...
    best regards,
    Boris
    <?xml version="1.0" encoding="UTF-8"?>
    <Workflow xmlns="http://ns.adobe.com/acrobat/workflow/2012" title="ZOPtest ORT" description="" majorVersion="1" minorVersion="0">
    <Sources defaultCommand="WorkflowPlaybackSelectFolder">
      <Folder path="/nas02/quinsee$/Fachabteilung/ZOP/Standards/Standards NCH"/>
    </Sources>
    <Group label="Unbenannt">
      <Command name="Scan:OPT" pauseBefore="false" promptUser="false">
       <Items>
        <Item name="ApplyMRC" type="boolean" value="false"/>
        <Item name="BkgrRemove" type="integer" value="0"/>
        <Item name="ColorCompression" type="integer" value="4"/>
        <Item name="Descreen" type="boolean" value="false"/>
        <Item name="Deskew" type="boolean" value="false"/>
        <Item name="Format" type="integer" value="1"/>
        <Item name="Language" type="integer" value="-1"/>
        <Item name="MonoCompression" type="integer" value="1"/>
        <Item name="QualityLevel" type="integer" value="1"/>
        <Item name="TextSharpen" type="integer" value="0"/>
        <Item name="doOCR" type="boolean" value="false"/>
       </Items>
      </Command>
    </Group>
    </Workflow>

  • Script to PDF format

    Dear all,
    I am converting script to PDF format, after convention other than English text is problem.
    (English is text is visible and other language text is converting into symbol) how to solve this problem.
    When I am taking a printout or print preview it is ok.
    Thanks in advance
    Regards
    Manohar

    Hi Manohar,
    You have to log on in the environment specific to the language to see the output correctly. Eg: if ur script has japanese font you have to login in japanese environment to get it right in the PDF format.
    Regards,
    Sookshma

  • Script to pdf to email????

    I have to convert a script to pdf format and then download it to presentation server and then send  it as an attachment by email ( to the external mail ids).
    please help me with this.
    waiting in anitcipation.
    regards.
    suki.

    Use...HRHAP_DOC_CONVERT_SMF_TO_PDF or SX_OBJECT_CONVERT_OTF_PDF
    or CONVERT_OTF_2_PDF to convert data to PDF...
    Use the below code to send an email...
    FUNCTION Z_SEND_EMAIL.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(SENDER) LIKE  SOUD3-USRNAM
    *"     VALUE(SUBJECT) LIKE  SOOD1-OBJDES
    *"     REFERENCE(SUPPRESS_COMMIT) TYPE  CHAR01 DEFAULT ''
    *"  TABLES
    *"      RECEIVERS
    *"      EMAIL_TEXT STRUCTURE  SOLI OPTIONAL
    *"  EXCEPTIONS
    *"      ACTIVE_USER_NOT_EXIST
    *"      COMMUNICATION_FAILURE
    *"      COMPONENT_NOT_AVAILABLE
    *"      FOLDER_NOT_EXIST
    *"      FOLDER_NO_AUTHORIZATION
    *"      FORWARDER_NOT_EXIST
    *"      NOTE_NOT_EXIST
    *"      OBJECT_NOT_EXIST
    *"      OBJECT_NOT_SENT
    *"      OBJECT_NO_AUTHORIZATION
    *"      OBJECT_TYPE_NOT_EXIST
    *"      OPERATION_NO_AUTHORIZATION
    *"      OWNER_NOT_EXIST
    *"      PARAMETER_ERROR
    *"      SUBSTITUTE_NOT_ACTIVE
    *"      SUBSTITUTE_NOT_DEFINED
    *"      SYSTEM_FAILURE
    *"      TOO_MUCH_RECEIVERS
    *"      USER_NOT_EXIST
    *"      ORIGINATOR_NOT_EXIST
    *"      X_ERROR
    *"      OTHERS
    Modification Log: (Please Flag all changes with the Correction Number)
    Date(MMDDYYYY) Programmer    Corr. #       TM ID
    Description:
    3/18/04        SpechtBN      D81K900520  Updated function module call
                                             for so_object_send, exception
                                             handling and commit work.
    03/02/2005     miranddn      D81K910999  Add option to suppress
    COMMIT WORK statement. Interfering with form outputs. Entered as
    optional parameter so that objects using this function can remain
    unchanged and the function will behave normally for them.
      CLEAR:   T_OBJECT_HD_CHANGE,
               T_USER,
               T_OBJCONT,
               T_OBJHEAD,
               T_OBJPARA,
               T_OBJPARB,
               T_RECEIVERS.
      REFRESH: T_OBJCONT,
               T_OBJHEAD,
               T_OBJPARA,
               T_OBJPARB,
               T_RECEIVERS.
    determine receivers:
      LOOP AT RECEIVERS.
        T_RECEIVERS-RCDAT         = SY-DATUM.
        T_RECEIVERS-RECESC        = 'U'.
        T_RECEIVERS-RECNAM        = 'U-'.
        T_RECEIVERS-RECEXTNAM     = RECEIVERS.
        T_RECEIVERS-SNDART        = 'INT'.
        T_RECEIVERS-SNDPRI        = 1.
        T_RECEIVERS-DELIVER       = 'X'.
        T_RECEIVERS-READ          = 'X'.
        T_RECEIVERS-ADR_NAME      = RECEIVERS.
        T_RECEIVERS-SORTFIELD     = RECEIVERS.
        T_RECEIVERS-SORTCLASS     = 5.
        T_RECEIVERS-SNDCP         = ' '.   " not a copy to ...
        APPEND T_RECEIVERS.
      ENDLOOP.
    Message Header (including subject)
      T_OBJECT_HD_CHANGE-OBJLA  = SY-LANGU.
      T_OBJECT_HD_CHANGE-OBJNAM = 'MESSAGE'.
    Subject
      T_OBJECT_HD_CHANGE-OBJDES = SUBJECT.
      T_OBJECT_HD_CHANGE-OBJSNS = 'S'." sensitivity Std,Func,Priv. S,F,P
      T_OBJECT_HD_CHANGE-VMTYP  = 'R'.     "object type T = transaction
      T_OBJECT_HD_CHANGE-ACNAM  = 'U'.
    Sender
      IF SENDER = SPACE.
        T_USER-SAPNAM             = SY-UNAME.
      ELSE.
        T_USER-SAPNAM             = SENDER.
      ENDIF.
      CALL FUNCTION 'SO_NAME_CONVERT'
        EXPORTING
          NAME_IN  = T_USER
        IMPORTING
          NAME_OUT = T_USER
        EXCEPTIONS
          OTHERS   = 8.
      IF SY-SUBRC NE 0.
        T_USER-SAPNAM      = 'SPECHTBN'.
      ENDIF.
      T_OBJPARA-NAME            = 'MESSAGE'.
      T_OBJPARA-LOW             = SY-DATUM.
      APPEND T_OBJPARA.
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
      FOLDER_ID                        = ' '
      FORWARDER                        = ' '
      OBJECT_FL_CHANGE                 = ' '
        OBJECT_HD_CHANGE                 = t_object_hd_change
      OBJECT_ID                        = ' '
        OBJECT_TYPE                      = 'RAW'
      OUTBOX_FLAG                      = ' '
        OWNER                            = SENDER
      STORE_FLAG                       = ' '
      DELETE_FLAG                      = ' '
      SENDER                           = ' '
      CHECK_SEND_AUTHORITY             = ' '
      CHECK_ALREADY_SENT               = ' '
      GIVE_OBJECT_BACK                 =
      ORIGINATOR                       = ' '
      ORIGINATOR_TYPE                  = 'J'
      LINK_FOLDER_ID                   = ' '
      SEND_REQUEST_OID                 = ' '
    IMPORTING
      OBJECT_ID_NEW                    =
      SENT_TO_ALL                      =
      ALL_BINDING_DONE                 =
      OFFICE_OBJECT_KEY                =
      ORIGINATOR_ID                    =
      E_SEND_REQUEST_OID               =
        TABLES
          OBJCONT                          = email_text
          OBJHEAD                          = t_objhead
          OBJPARA                          = t_objpara
          OBJPARB                          = t_objparb
          RECEIVERS                        = t_receivers
      PACKING_LIST                     =
      ATT_CONT                         =
      ATT_HEAD                         =
      NOTE_TEXT                        =
      LINK_LIST                        =
      APPLICATION_OBJECT               =
       EXCEPTIONS
         ACTIVE_USER_NOT_EXIST            = 1
         COMMUNICATION_FAILURE            = 2
         COMPONENT_NOT_AVAILABLE          = 3
         FOLDER_NOT_EXIST                 = 4
         FOLDER_NO_AUTHORIZATION          = 5
         FORWARDER_NOT_EXIST              = 6
         NOTE_NOT_EXIST                   = 7
         OBJECT_NOT_EXIST                 = 8
         OBJECT_NOT_SENT                  = 9
         OBJECT_NO_AUTHORIZATION          = 10
         OBJECT_TYPE_NOT_EXIST            = 11
         OPERATION_NO_AUTHORIZATION       = 12
         OWNER_NOT_EXIST                  = 13
         PARAMETER_ERROR                  = 14
         SUBSTITUTE_NOT_ACTIVE            = 15
         SUBSTITUTE_NOT_DEFINED           = 16
         SYSTEM_FAILURE                   = 17
         TOO_MUCH_RECEIVERS               = 18
         USER_NOT_EXIST                   = 19
         ORIGINATOR_NOT_EXIST             = 20
         X_ERROR                          = 21
         OTHERS                           = 22
      IF SY-SUBRC <> 0.
        case sy-subrc.
          when 1.
            raise ACTIVE_USER_NOT_EXIST.
          when 2.
            raise COMMUNICATION_FAILURE.
          when 3.
            raise COMPONENT_NOT_AVAILABLE.
          when 4.
            raise FOLDER_NOT_EXIST.
          when 5.
            raise FOLDER_NO_AUTHORIZATION.
          when 6.
            raise FORWARDER_NOT_EXIST.
          when 7.
            raise NOTE_NOT_EXIST.
          when 8.
            raise OBJECT_NOT_EXIST.
          when 9.
            raise OBJECT_NOT_SENT.
          when 10.
            raise OBJECT_NO_AUTHORIZATION.
          when 11.
            raise OBJECT_TYPE_NOT_EXIST.
          when 12.
            raise OPERATION_NO_AUTHORIZATION.
          when 13.
            raise OWNER_NOT_EXIST.
          when 14.
            raise PARAMETER_ERROR.
          when 15.
            raise SUBSTITUTE_NOT_ACTIVE.
          when 16.
            raise SUBSTITUTE_NOT_DEFINED.
          when 17.
            raise SYSTEM_FAILURE.
          when 18.
            raise TOO_MUCH_RECEIVERS.
          when 19.
            raise USER_NOT_EXIST.
          when 20.
            raise ORIGINATOR_NOT_EXIST.
          when 21.
            raise X_ERROR.
          when 22.
            raise OTHERS.
        endcase.
      ENDIF.
    Begin of D81K910999
    if suppress_commit is initial.
      commit work.
    else.
    Do nothing
    endif.
    End of D81K910999
    ENDFUNCTION.

  • Need to convert a SAP Script to Smart Form

    Hello,
    I need to convert a SAP script to a Smart form.
    I am aware of converting it but have a question abt print program?
    Can the print program which is currently attached to the SAP script supprot the Smart form?
    Could some one let me know if i can use the same program or need to do some modifications in it?
    Pointa rewareded if useful.
    Thanks,
    Krishna

    hi
    t-code smartforms
    utilities->migrate sapscript
    check the link below it provides steps to convert sap scripts to smartforms
    http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
    Check these threads.
    Smartforms -> sapscript
    Re: Convert SapScript to Smartforms ?
    regards.
    Kiran Sure

  • Converting the spool request to PDF format

    Dear All ,
    I am using RSTXPDF4 to convert a spool request to PDF format , when I execute this program by giving the spool number and dstdevic as Local , its giving   the message as " Spool request XXXXX with PDF data created ".
    But the problem is when I open this spool request its printing the Junk characters ..!!!
    What could be the problem ?
    Please give me the solution for this...
    Thanks in advance.

    Hi Prem ,
    I have checked the tranx SCOT there I have  found the following settings..
    Output  Dev Type              USE
    format
    PCL     HPLJIIID     Not Yet Used in Node Maintenance
    PDF     PDF1             Already Used in Node Maintenance
    PS     POST2             Not Yet Used in Node Maintenance
    TXT     ASCIIPRI     Already Used in Node Maintenance
    Is this OK ...or am I need to do any changes in the settings...??
    One more thing when I tries to give this PDF1 Dev type in my RSTXPDF4 input parameters its not taking !!!
    Please help...

Maybe you are looking for

  • Err. 1001, 1461, 1475

    I have a C code calling a Stored Procedure with NO CURSORS in it. The prog. runs in background and keeps a connection open to DB. After few days, I keep getting those errors on a particular line of SP. There are othere C programs linked with this cod

  • GRAC AC 10 CUP E-Mail Notification for Role Owner to approve

    Hello Experts , I have my CUP working in such a way that role owners are able to go to their Inbox in UI>My Home . However I would like to send E-mail into their Inbox . Right now we are getting the e-mail only at the end of the request when the requ

  • Goldengate Director admin connect crash weblogic server

    Hi I am running the golden gate director on 64 bit windows 2008R2. I have fired up the goldengate admin server. I have two issues. 1) When I connect to localhost:9001/acon with weblogic for the header and left hand panel i get 403 forbidden error. ri

  • Help with backing up music

    I want to back up my purchaced music on a cd. I already did back up 2 songs. But when I wanted to back up another song at a different time it said I need a blank disc. There has got to be another way of backing up on a disc and not wasting space on a

  • Where did Oil Paint Go?

    I have a Mac and use Photoshop CC 2014. Why can't I find Oil Paint?