Download SAP Script as MS word format

Can we download SAP Script in MS word format? If so Please suggest me the way.

I'm not very sure on how it can be achieved, but this can help you.
Spool to word -> http://sap4.com/codigofuente/102/396.html

Similar Messages

  • Can we download SAP Script to a word document  ?

    Is it possible to download the SAP Script to a local Word documnet . and then is it possible to upload the Wrd Doc back to SAP SCript with a new Script name ..?

    Hi
    Hope it will help you.
    <REMOVED BY MODERATOR>
    want to Insert SAP ICONS into from SAP into Word document (OLE) .
    (1) Copy program DD_ADD_PICTURE into your own version called ZDD_ADD_PICTURE. Make sure
    you select all the checkboxes (including GUI Status and screens).
    (2) Paste the modified code at the end of this reply into your ZZ_ADD_PICTURE program.
    (3) Run ZZ_ADD_PICTURE for a range of Icons (e.g. enter Icon name ICON_IN* on the selection screen)
    (4) When you get the result list, type in ok-code EXPO directly in the ok-code
    field (you could also add a button for this function in the GUI status).
    (5) Download all the displayed icons as .gif files into a Windows folder
    that you have created to hold the icon .gif files (e.g. C:SAPICONS)
    (6) Now you can work with the icon files as you would any .gif file. (e.g. In a Word doc, use menu path
    Insert -> Picture -> From file.)
    Here is the code:
    REPORT dd_add_picture.
    TYPE-POOLS: sdydo.
    DATA: do TYPE REF TO cl_dd_document.
    DATA: is_displayed.
    TABLES: icont.
    DATA: BEGIN OF icontab OCCURS 0.
            INCLUDE STRUCTURE icon.
    DATA: END OF icontab.
    select-options: s_icon for icontab-name obligatory.
    SELECT * FROM icon INTO TABLE icontab WHERE locked NE 'X'
                        AND name in s_icon.
    Event Handler Definition, handling changes of GUI fonts, colors,...
    CLASS cl_my_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
          use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
    ENDCLASS.
    DATA: my_handler TYPE REF TO cl_my_event_handler.
    CREATE OBJECT my_handler.
    Call Screen
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      IF is_displayed IS INITIAL.
        SET PF-STATUS 'BRP'.
        SET HANDLER my_handler->use_new_resources.
    create document
        CREATE OBJECT do.
    fill document
        PERFORM dd_add_icon USING do.
    merge document
        CALL METHOD do->merge_document.
    display document .
        CALL METHOD do->display_document
                           EXPORTING  container          = 'HTML'
                           EXCEPTIONS html_display_error = 1.
                                           " do some exception handling ...
        is_displayed = 'X'.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.                       "Beenden
          LEAVE PROGRAM.
        WHEN 'PRN'.
          CALL METHOD do->print_document
                  EXPORTING reuse_control = 'X'.
        WHEN 'PRN_NEW'.
          DATA text TYPE sdydo_text_element.
          CALL METHOD do->initialize_document.
          text = 'Dies Dokument wurde speziell fürs Drucken erstellt!' &
                            ' Druckdatum: '(500).
          CALL METHOD do->add_text EXPORTING
                               text         = text
                               sap_fontsize = cl_dd_area=>large.
          WRITE sy-datum TO text DD/MM/YYYY.
          CALL METHOD do->add_text EXPORTING text = text .
          CALL METHOD do->new_line EXPORTING repeat = 2.
          PERFORM dd_add_icon USING do.
          CALL METHOD do->merge_document.
          CALL METHOD do->print_document.
        WHEN 'EXPO'.
          CALL METHOD do->export_document EXPORTING to_filesystem = 'X'.
      ENDCASE.
      CLEAR sy-ucomm.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  DD_ADD_ICON
          text
    FORM dd_add_icon USING p_do TYPE REF TO cl_dd_document.
      DATA ta TYPE REF TO cl_dd_table_element.
      DATA col1 TYPE REF TO cl_dd_area.
      DATA col2 TYPE REF TO cl_dd_area.
      DATA col3 TYPE REF TO cl_dd_area.
      DATA text TYPE sdydo_text_element.
    set Heading
      text = ' Bilder in Dynamischen Dokumenten'(001).
      CALL METHOD p_do->add_text EXPORTING text = text
                                      sap_style = 'heading'.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->add_table EXPORTING with_heading    = 'X'
                                          no_of_columns     = 3
                                          width             = '100%'
                                          IMPORTING table   = ta.
    set columns
      text = 'Ikone'(011).
      CALL METHOD ta->add_column EXPORTING heading  = text
                                 IMPORTING column   = col1.
    fill table
      LOOP AT icontab.
        SELECT SINGLE * FROM icont WHERE langu = sy-langu
                                   AND   id    = icontab-id.
        CALL METHOD col1->add_icon EXPORTING sap_icon = icontab-name
                                             sap_color = 'LIST_GROUP'.
      ENDLOOP.
    ENDFORM.                               " DD_ADD_ICON
    CLASS cl_my_event_handler IMPLEMENTATION.
    CLASS cl_my_event_handler IMPLEMENTATION.
      METHOD use_new_resources.
        IF is_displayed EQ 'X'.
    initialize document
          CALL METHOD do->initialize_document.
    fill document
          PERFORM dd_add_icon USING do.
    merge document
          CALL METHOD do->merge_document.
    display document
          CALL METHOD do->display_document
                              EXPORTING reuse_control        = 'X'
                                        reuse_registration   = 'X'.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Edited by: Alvaro Tejada Galindo on Feb 18, 2008 6:22 PM

  • To convert Sap Script output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Plese check this sample code from other thread.
    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.
    The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'.

  • Download Sap script output in XL.

    hi all,
    can anybody plz tell me that is there any possibility to download SAP script output in editable XL format? actually i got a new requirement in my company so plz can anybody help me for this?
    regards saurabh.

    Hi, Below code used for convert output into PDF format. May be you can convert into XL.
    In close form, collect output data into OTF format.
        call function 'CLOSE_FORM'
          TABLES
            otfdata                  = it_otfdata
          EXCEPTIONS
            unopened                 = 1
            bad_pageformat_for_print = 2
            send_error               = 3
            others                   = 4.
        if sy-subrc <> 0.
          PERFORM protocol_update.
          retcode = 1.
        endif.
      call function 'CONVERT_OTF'
        EXPORTING
          format                = c_pdf
        IMPORTING
          bin_filesize          = h_size
        TABLES
          otf                   = it_otfdata
          lines                 = it_pdf
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          others                = 4.
      if sy-subrc <> 0.
       MOVE sy-subrc                 TO   h_retcode.
      endif.
      perform table_shift.
    form table_shift.
      describe table it_pdf    lines  hltlines.
      DESCRIBE FIELD IT_PDF    LENGTH FLE1 in character mode.
      DESCRIBE FIELD X_OBJCONT LENGTH FLE2 in character mode.
      clear   x_objcont.
      refresh x_objcont.
      clear off1.
      clear hfeld.
      loop at it_pdf.
        htabix = sy-tabix.
        move it_pdf to hfeld+off1.
        if htabix = hltlines.
          fle1 = strlen( it_pdf ).
        endif.
        off1 = off1 + fle1.
        if off1 ge fle2.
          clear x_objcont.
          x_objcont = hfeld(fle2).
          append x_objcont.
          shift hfeld by fle2 places.
          off1 = off1 - fle2.
        endif.
        if htabix = hltlines.
          if off1 gt 0.
            clear x_objcont.
            x_objcont = hfeld(off1).
            append x_objcont.
          endif.
        endif.
      endloop.
    endform.                    " TABLE_SHIFT

  • Dispalying SAP script output in landscape format

    Hello All,
    Could anyone please tell me the step by step process to display a SAP Script output in landscape format?
    Also is it possible to display a column name in 2 lines if it does not fit into 1 line.
    Regards
    Indrajit.

    Hi,
    Here is the way to print the SAPSCRIPT in landscape ..
    Goto SE71, then give you layout name then press change, then press the Header button(CAP ICON), then you will get the Header infomation, then select the Basic Settings pushbutton, then there we have an option to Print the Layout in  Portrait format or Landscapr format, then select the LANDSCAPR format Radio button then activate it
    Regards
    Sudheer

  • SAP SCRIPT FORMS with UNICODE FORMAT ??

    Hi guru's,
    this is sunny newly joined in sap forum,am ABAP doveloper .
    now am extensivelly working on upgrradation project(4.6B TO ECC6.0) , my work perticularlly on UNICODE
    >> now am working on  SAP SCRIPT FORMS, so could you please let me know how to check the scripts in UNICODE FORMAT .
    >> Is that usefull to check with UCCHECK
    Its urgent
    Best Regards
    Sunny..

    SAP Scripts needs no checks. but you have to keep attention to the fact, that the spoollists must be converted manually by a report written by SAP, and this report is not able to transform sapscripts which are still in the spool. After unicode conversion every sapscript spoollist is lost!

  • Sap Script - numbers to words without function module

    Moderator message - please use a meaningful subject in future.  I've changed it for you this time.  Also, moved to the correct forum
    Hi Friends,
                       In SAP Script how to convert numbers into  words with out using the function module in the driver program.
    examplae 21 kg  as twenty one kg.
    Please help me to solve this problem.
    Thanks in advance.
    Gayathri S
    Edited by: Matt on Nov 5, 2008 9:15 AM

    Hi,
      In the SAP Script, you can call the perform like below:
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    You can create a separate include or use an existing include related to your script and create the above <form> in that <prog>.
    The syntax for creating the form in the include is as below:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    Example:
    In your script,
    /: PERFORM GET_BARCODE IN PROGRAM ABCDE
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    And in the report ABCDE, create the form like this:
    REPORT ABCDE.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY 'PAGE'.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'NEXTPAGE'.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY 'BARCODE'.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = '|'. "First page
    ELSE.
    OUT_PAR-VALUE = '||'. "Next page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this helps.
    Regards,
    Suganya

  • Download sap script

    Hi exeprt,
    I've a form (sapscript) in a SAP system. I need of this form in an other sap system. Is possible download
    it form first system and upload it in the second system ???  I know that in smartform is possible, so is it possible also in sap-script ???
    tks a lot,
    bye.

    Hi,
    use RSTXSCRP for download the script.
    Regards,
    Madhu

  • Problem in PO SAP Script, producing a  PDF  format.

    Hi,
    Description: We have developed a Purchase Order script. Both the Print Program and SAP Script are customised i.e., we are no longer using the standard MEDRUCK. The print preview is fine and when we take a print out the output looks good.
    Problem: When the output type is changes to External Send using the Messages tab in the transaction ME23N, the output is given to a PDF file. In this output the vertical lines are not coming properly. The vertical lines are printed using the VLINE statement of sap script.
    Solution Required for: Could any one please tell me why are we getting this problem and a possible solution for this.
    Code:
    M9   &VLINE&,,&GT_EKPO-EBELP(Z)&,,&VLINE&,,<TX>&GT_EKPO-IDNLF(C14)&</>   
    =    ,,&VLINE&,,<TX>&GT_EKPO-TXZ01(C40)&</>,,&VLINE&,,&GT_EKPO-MENGE(C.0)&
    =    ,,&GT_EKPO-MEINS(3)&,,&VLINE&,,
    =  &GT_EKPO-NETPR(9.2)&                 
    =    ,,&VLINE&,,&GT_EKPO-NETWR(9.2)&,,&VLINE&                           
    Thanks and Regards,
    Raghavendra Goutham.
    NOTE: Helpfull answers will be rewarded definitely.

    Hi,
    Best practise is 1st you FRAME the window with boxes.........
    Example.....
    /*   BEGIN OF CHANGE LDEEPAK 09/12/2005.
    /:   IF &VBDKR-VBTYP& = 'O' OR &VBDKR-VBTYP& = 'S' OR &VBDKR-VBTYP& = '6'.
    /:   BOX YPOS '0.0' CM WIDTH '25.4' CM HEIGHT '0.85' CM FRAME 4 TW
    /:   BOX YPOS '0' CM XPOS '4.4'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
    /:   BOX YPOS '0' CM XPOS '8.35'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
    /:   BOX YPOS '0' CM XPOS '11.6'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
    /:   BOX YPOS '0' CM XPOS '19.65'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
    B     <K>CUSTOMER NO.</>            <K> CONTRACT NO. / SALES ORDER NO.</>
    =     <K>  ORIGINAL INVOICE NO.</>  ,,<K>  CUSTOMER PO.</>
    =                               ,,,,<K>TERMS</>
    /:   BOX YPOS '3.25'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
    /:   BOX YPOS '5.1'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
    /:   BOX YPOS '6.95'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
    /:   BOX YPOS '8.85'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
    /:   BOX YPOS '10.6'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
    Like this you can give commands.
    Later you can code for getting the values in to window.
    Here while populating the values you need to use TABS to place the value in correct position.
    Thanks.
    If this helps you reward with points.
    Message was edited by: Deepak333 k

  • Downloading Smartforms Output into MS Word format

    Hi,
    Is there any way to download Smartform Output data in to MS Word.?...like the way we download Smartform data into PDF format.
    is there any FM available to handle this like CONVERT_OTF, CONVERT_OTF_2_PDF in case of PDF.
    Full points for useful answers.
    Thanks,
    Sree.

    Check these links
    https://forums.sdn.sap.com/click.jspa?searchID=15917117&messageID=4709514
    https://forums.sdn.sap.com/click.jspa?searchID=15917117&messageID=2950348
    Thanks,
    Phani.

  • Converting sap script output into pdf format?

    Hi all,
    I have modified the standard purchase order script form MEDRUCK . Now i need to generate the output into pdf format.
    This is not only limited to  spool requests , But also  when the user creates the purchase  order and clicks on print or print preview the output should be in pdf format.
    Please help on where and what code has to be written for this requirement?
    Thanks, 
    Aravind.

    Hi
    I don't know which is your release, but I don't think it's possible to create a preview in pdf format, but u can create a pdf file instead of the spool and then open it automatically, this is an example:
    - A) Open form
    IF P_PDF = 'X'.
              XDEVICE        = 'PRINTER'.
    * Get OTF
              ITCPO-TDGETOTF = 'X'.
          ENDIF.
          CALL FUNCTION 'OPEN_FORM'
               EXPORTING
                    DEVICE                      = XDEVICE
                    DIALOG                      = 'X'
                    FORM                        = 'ZFI_CL_EC_MOVI'
                    OPTIONS                     = ITCPO
                    MAIL_SENDER                 = LVS_SENDER
                    MAIL_RECIPIENT              = LVS_RECIPIENT
               EXCEPTIONS
                    CANCELED                    = 1
                    DEVICE                      = 2
                    FORM                        = 3
                    OPTIONS                     = 4
                    UNCLOSED                    = 5
                    MAIL_OPTIONS                = 6
                    ARCHIVE_ERROR               = 7
                    INVALID_FAX_NUMBER          = 8
                    MORE_PARAMS_NEEDED_IN_BATCH = 9
                    SPOOL_ERROR                 = 10
                    OTHERS                      = 11.
          IF SY-SUBRC <> 0.
            EXIT.
          ENDIF.
    B) Close FORM
    CALL FUNCTION 'CLOSE_FORM'
             TABLES
                  OTFDATA                  = T_OTF
             EXCEPTIONS
                  UNOPENED                 = 1
                  BAD_PAGEFORMAT_FOR_PRINT = 2
                  SEND_ERROR               = 3
                  SPOOL_ERROR              = 4
                  OTHERS                   = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
        ELSE.
          PERFORM DOWNLOAD_PDF.
        ENDIF.
    C) Create PDF and open it:
    FORM DOWNLOAD_PDF.
      DATA: BIN_FILESIZE TYPE I.
      DATA: T_FILE_PDF     TYPE STANDARD TABLE OF TLINE,
            DOCTAB_ARCHIVE TYPE STANDARD TABLE OF  DOCS.
      DATA: FILE_TABLE     TYPE FILETABLE WITH HEADER LINE.
      DATA: RC          TYPE I,
            USER_ACTION TYPE I.
      DATA: TITLE    TYPE STRING,
            FILENAME TYPE STRING.
      CHECK P_PDF = 'X'.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
           IMPORTING
                BIN_FILESIZE           = BIN_FILESIZE
           TABLES
                OTF                    = T_OTF
                DOCTAB_ARCHIVE         = DOCTAB_ARCHIVE
                LINES                  = T_FILE_PDF
           EXCEPTIONS
                ERR_CONV_NOT_POSSIBLE  = 1
                ERR_OTF_MC_NOENDMARKER = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
        EXIT.
      ENDIF.
      TITLE = 'Creare File'(T02).
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
         EXPORTING
           WINDOW_TITLE            = TITLE
           DEFAULT_EXTENSION       = '*.pdf'
        CHANGING
          FILE_TABLE              = FILE_TABLE[]
          RC                      = RC
          USER_ACTION             = USER_ACTION
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          OTHERS                  = 4
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        IF USER_ACTION = 9. EXIT. ENDIF.
        IF RC = 1.
          READ TABLE FILE_TABLE INDEX 1.
        ENDIF.
      ENDIF.
      MOVE FILE_TABLE-FILENAME TO FILENAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
           BIN_FILESIZE            = BIN_FILESIZE
           FILENAME                = FILENAME
           FILETYPE                = 'BIN'
        CHANGING
          DATA_TAB                = T_FILE_PDF
        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 I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        MESSAGE S208(00) WITH 'File creato con successo'(S01).
      ENDIF.
      CHECK P_OPEN = 'X'.
      CALL FUNCTION 'CALL_BROWSER'
           EXPORTING
                URL                    = FILE_TABLE-FILENAME
           EXCEPTIONS
                FRONTEND_NOT_SUPPORTED = 1
                FRONTEND_ERROR         = 2
                PROG_NOT_FOUND         = 3
                NO_BATCH               = 4
                UNSPECIFIED_ERROR      = 5
                OTHERS                 = 6.
      IF SY-SUBRC <> 0.
        MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
      ENDIF.
    ENDFORM.                    " DOWNLOAD_PDF
    Max

  • Sap Script-FB02:How to format

    Hi Experts,
    Im trying to format a standard long text in sap. These long texts are created in transaction code FB02.
    An example would be:
    /:DEFINE &TEXTNAME& := '&BKPF-BUKRS()&&BKPF-BELNR(RF0)&&BKPF-GJAHR&'
    /:INCLUDE &TEXTNAME& OBJECT BELEG ID 0001 LANGUAGE &RF140-SPRAS&
    Im trying to format the font etc. Does any anyone know how to do this?
    Thanks,
    Michael

    make use of HTML formatting tags. ex.
    APPEND: '<table border=1 width=80%'     TO lt_contents_txt,
           'cellpadding=1 cellspacing=0>'           TO lt_contents_txt,
           '<tr>'                                   TO lt_contents_txt,
           '<td class=header>PR Number</td>'        TO lt_contents_txt,
           '<td class=header>PR Line Item</td>'     TO lt_contents_txt,
           '<td class=header>Description</td>'      TO lt_contents_txt,
           '<td class=header>PR Release Date</td>'  TO lt_contents_txt,
           '<td class=header>PR Qty</td>'           TO lt_contents_txt,
           '<td class=header>Remaining PR Qty</td>' TO lt_contents_txt,
           '<td class=header>Unit of Measure</td>'  TO lt_contents_txt,
           '<td class=header>Requisitioner</td>'    TO lt_contents_txt,
                '<td class=header>Doc Type</td>'    TO lt_contents_txt,
                '<td class=header>Doc Type Description</td>'    TO lt_contents_txt,
           '</tr>'                                  TO lt_contents_txt.
    lt_contents_txt  is the content of your email
    Edited by: abapGenin on Sep 30, 2010 1:58 PM

  • SAP Script : Amount in Words

    Dear All,
    I am working on bank Check, I need to print the amount value in Words. Amount field  &REGUD-SWNES&, I need to print this amount in words.
    I mean to say that, regud-swnes = 1000.69, I have to print this as One Thousand and 69/100. please advice me, how Can I do that.
    Thanking you.
    with kind Regards
    Venkat.

    hi venkat,
    split the command at decimal and u can design ur code for 69/1000.for displaying 1000 u can use the fm 'SPELL_AMOUNT'.
    sample:
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '1234510'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
      CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                AMOUNT    = PAMOUNT
                CURRENCY  = PWAERS
                FILLER    = SPACE
                LANGUAGE  = 'E'
           IMPORTING
                IN_WORDS  = T_SPELL
           EXCEPTIONS
                NOT_FOUND = 1
                TOO_LARGE = 2
                OTHERS    = 3.
    ENDFORM.              
    reward if helpful.
    regards,
    keerthi.

  • Download sap script logo

    Hi,
    We can upload a graphic logo through SE78 but can we directly download any logo on our PC?
    Please let me know if any one is having any idea.
    thanks,
    shilpa k

    Hi,
    refer this,
    REPORT Z_DUMMY_ATG_3.
    DATA : L_BYTECOUNT TYPE I,
           L_TDBTYPE   LIKE STXBITMAPS-TDBTYPE,
           L_CONTENT   TYPE STANDARD TABLE OF BAPICONTEN INITIAL SIZE 0.
    DATA: GRAPHIC_SIZE TYPE I.
    DATA: BEGIN OF GRAPHIC_TABLE OCCURS 0,
    LINE(255) TYPE X,
    END OF GRAPHIC_TABLE.
    CALL FUNCTION 'SAPSCRIPT_GET_GRAPHIC_BDS'
      EXPORTING
        I_OBJECT       = 'GRAPHICS'
        I_NAME         = 'ZPRUEBA'
        I_ID           = 'BMAP'
        I_BTYPE        = 'BCOL'
      IMPORTING
        E_BYTECOUNT    = L_BYTECOUNT
      TABLES
        CONTENT        = L_CONTENT
      EXCEPTIONS
        NOT_FOUND      = 1
        BDS_GET_FAILED = 2
        BDS_NO_CONTENT = 3
        OTHERS         = 4.
    CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP'
      EXPORTING
        OLD_FORMAT               = 'BDS'
        NEW_FORMAT               = 'BMP'
        BITMAP_FILE_BYTECOUNT_IN = L_BYTECOUNT
      IMPORTING
        BITMAP_FILE_BYTECOUNT    = GRAPHIC_SIZE
      TABLES
        BDS_BITMAP_FILE          = L_CONTENT
        BITMAP_FILE              = GRAPHIC_TABLE
      EXCEPTIONS
        OTHERS                   = 1.
    CALL FUNCTION 'WS_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE            = GRAPHIC_SIZE
        FILENAME                = 'C:\FirmaAsociado.bmp'
        FILETYPE                = 'BIN'
      TABLES
        DATA_TAB                = GRAPHIC_TABLE
      EXCEPTIONS
        INVALID_FILESIZE        = 1
        INVALID_TABLE_WIDTH     = 2
        INVALID_TYPE            = 3
        NO_BATCH                = 4
        UNKNOWN_ERROR           = 5
        GUI_REFUSE_FILETRANSFER = 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.
    Change ZPRUEBA with the image you want to download and C:\FirmaAsociado.bmp with your own path and file
    regards,
    K.Tharani

  • Generate a script letter in MS Word Format

    Hi All,
    Can any one please help me out how we can generate a letter thats been done using SAP Scripts in MS Word format. I mean i have created an offer letter in scripts and wht my requirment is when i run the program generate the letter it must be in MS word format. So that i can save it as word file.
    Thanks & Regards
    Sathish

    Hi Sathish,
    the following link may helpful for you.
    http://help.sap.com/saphelp_erp2004/helpdata/en/d6/0dba8f494511d182b70000e829fbfe/frameset.htm
    Regards
    Bernd

Maybe you are looking for

  • Can you connect 4k monitors to MBA?

    Is it possible to get the full 4k resolution from a 4k monitor connected to a mid 2013 MacBook Air(latest version of Mavericks)? Or do I need to purchase an external graphics card (or a MacBook Pro) perhaps? A mini display port to display port connec

  • Default username and password of Access Manager

    hi, Can any body tell me the default username(amAdmin) and password of Access Manager. thanks in advance dhawanmayur

  • Recovery problem - urgent

    Just used disc 1 of the toshiba recovery cd thing. Was the one that erased everything. Now im trying to reinstall Windows, etc., however when it asks me to locate the drivers and such i put in the cd and dont know what to do. Summary: erased harddriv

  • TS3694 has anyone had error message code 50? If yes, how did you resolve it?

    Hi there, I had restored both my iPhone 4S and iPod touch, and have this error message coming up which is stopping me from downloading purchased music to my pc and devices.

  • [SOLVED]Color Bash Prompt help

    So I have been customizing my arch box and everything has been great except for one problem; the bash color prompt. I am kind of running a color screen where I am using the same shade of green, blues, grays, etc. I would like to continue that with my