SCCM Script Output automation

Hi ,
We are trying to automate SCCM script deployment .
Say i have script and i need to run it in a particular computers  where sccm agents are installed .
Upto my understanding  once the script package is deployed , i will be able to get the error code (success / failure).
But is there any possible we can get the output of the script from the sccm agent computer back to the sccm server.
We tried to save the script output in a file and get it back to sccm server using smb . but in production environment the smb is not always open between computers .
Is there any way we can tackle this problem .
Thanks and Regards

You can do one of two things (using built-in ConfigMgr facilities) depending upon what what exactly is in the output file:
- File collection. This is a feature of software inventory and will literally collect the specified files and return them to the site server.
- MIF files. These are specially formatted files that are collected at the end of a program's execution that return extended information about the program's execution to ConfigMgr.
Without knowing what you are going to do with these files or what's in them, I don't know which is better for your scenario.
Jason | http://blog.configmgrftw.com | @jasonsandys

Similar Messages

  • In Automator, how can I pass a shell script output to Display Notification?

    In Automator, how can I pass a Run shell script output to Display Notification?

    Soemthing like this will work

  • Changes are not reflected in Script output

    Hi All,
    i am facing a problem in SAPscript.
    I have made a Zscript by copying standard script F110_FR_CHEQUE. I have made the changes in the script as per requirement in development client and transported it to testing client to test (As i dont have any data in development client). But, surprisingly, when i run the program and check the output, the changes are not reflected in the script output.
    First i thought that my script was not triggered thats whay i m not getting any change, but later i changed the dimension of one of the window, in which some hard coded text is written, the differece i found was that, window size is changed, but the text written in that window is still same (what was in standard script.) .
    I am using standard texts for hard coding in script. Standard texts have been transported in testing client also.
    please help me in this regard.

    Hi,
    Could you plese Check NACE whether your script is confiugring or not.
    If it is configured well then Check Standard Text is available or not in Test client by open it in SO10.
    Check all the paragrah formats applied to Standard text are transferred to Test client which are in SE72.
    IF it is available in SO10 then debug the print program for that windows any standard conditions are calling to print the text.

  • Convert Script output data to Text(.txt) file & send mail with attachment.

    Hi All,
    Requirement: I shulb be able to conver th Script output data to Text(.text) file & send a maill with attachment with this text file. Formant of text file should be like output of Print priview.
    Plese sugget with Function modules to cover as Text file.
    I am able to converting the Script output data to PDF and sending mail with attachment. So I don't want PDF file now.
    Thanks in advance.

    Hi, Thanks for responst.
    We can convert the Scirpt output to PDF file by using OTF function module and the PDF file looks like Print Privew output.
    Same like this I want Script out in NOTEPAD (.txt). Is that possible, Plz sugget with relavent Function Modules.
    Thanks.

  • 4.0EA1 - Copy/Paste in Script Output window on Mac is not working

    I'm running 4.0.0.12 on MacOS X 10.8.4, and I can't Copy from the "Script Output" window.  What I regularly do is generate some SQL using an SQL query, so I want to copy the output and paste it back into the Worksheet so I can run it.  For example:
    select 'alter tablespace ' || TABLESPACE_NAME || ' begin backup;' from DBA_TABLESPACES;

    This is a known issue and will be addressed for the next EA release.

  • Problem in script output sending mail

    hi ,
    I have a problem sending a mail with script output as attachment . I have searched in the forum for the answers but none is solved my question.
    I am sending the data to the otf and it is getting the otfdata. but it is not showing  the data on the script when it is sent as an attachment to the email , but it is showing only script with null values filled.( means i am getting the mail with attachment but in that attachment there is no data filled in the script send).
    the code is like this ..
    here i am filling the otfdata and i am exporting the otfdata
    CALL FUNCTION 'ZMM_ARRANG_ENTRY_ABR_NATRAB'
        EXPORTING
          i_nast       = nast
          i_fonam      = tnapr-fonam
          i_xscreen    = pi_xscreen
          i_arc_params = arc_params
          i_toa_dara   = toa_dara
        IMPORTING
          e_retcode    = px_retcode
        EXCEPTIONS
          OTHERS       = 1.
      IF ( sy-subrc <> 0 ).                "Fehler
        MOVE sy-subrc TO px_retcode.
        IF ( pi_xscreen = 'X' ).           "Ausgabe auf Bildschirm
          MESSAGE ID     sy-msgid
                  TYPE   sy-msgty
                  NUMBER sy-msgno
                  WITH   sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ELSE.
    *---Import OTFDATA from the memory
        IMPORT  it_otfdata FROM MEMORY ID 'OTF'.
      ENDIF.
      wa_maildata-obj_name = 'EMAIL'.
      wa_maildata-obj_descr = 'Settlement Details'.
    *-----mail contents
      it_mailtext-line = 'Sub-sequent settlement Details'.
      APPEND it_mailtext.
      DESCRIBE TABLE it_mailtext LINES v_lines.
      READ TABLE it_mailtext INDEX v_lines.
      wa_maildata-doc_size = ( v_lines - 1 ) * 255 + STRLEN( it_mailtext ).
    *Creation of the entry for the compressed document
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start = 1.
      it_mailpack-head_num   = 0.
      it_mailpack-body_start = 1.
      it_mailpack-body_num   = v_lines.
      it_mailpack-doc_type   = 'RAW'.
      APPEND it_mailpack.
    *-----Get OTF data
      LOOP AT it_otfdata.
        it_mailcont-line = it_otfdata.
        APPEND it_mailcont.
      ENDLOOP.
    *---Move  OTF data into binary table
      LOOP AT it_mailcont.
        MOVE-CORRESPONDING it_mailcont TO it_mailbin.
        APPEND it_mailbin.
      ENDLOOP.
    *---Get no of lines in Binary data table
      DESCRIBE TABLE it_mailbin LINES v_lines.
    *---Fill name of the header of email
      it_mailhead = 'Subsequent Settlement Details.OTF'.
      APPEND it_mailhead.
    *---Creation of the entry for the compressed attachment
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = v_lines.
      it_mailpack-doc_type     = 'OTF'.
      it_mailpack-obj_name     = 'EMAIL'.
      it_mailpack-obj_descr    = 'Settlement Details'.
      it_mailpack-doc_size     = v_lines * 255.
      APPEND it_mailpack.
    *----Get email address from the address number of vendor
      CALL FUNCTION 'ADDR_GET_REMOTE'
        EXPORTING
          addrnumber = l_adrnum
        TABLES
          adsmtp     = it_adsmtp.
    *----Get mail address
      READ TABLE it_adsmtp WITH KEY remark = 'AP_SUB_SETT'.
      IF sy-subrc = 0.
        it_mailrec-receiver   = it_adsmtp-smtp_addr.
        it_mailrec-rec_type   = 'U'.
        it_mailrec-com_type   = 'EXT'.
        APPEND it_mailrec.
    *---Send email with PDF attachment
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data = wa_maildata
            put_in_outbox = 'X'
            COMMIT_WORK   = 'X'
          TABLES
            packing_list  = it_mailpack
            object_header = it_mailhead
            contents_bin  = it_mailbin
            contents_txt  = it_mailtext
            receivers     = it_mailrec.
      ELSE.
        MESSAGE 'No email id Exist for the vendor' TYPE 'E'.
      ENDIF.
    please suggest me with your valuable answers .
    Regards,
    Venkat Appikonda.

    Hi venkat
    Just check if this helps you.
    The following part of the code does exactly that.
    Selecting details from the spool request table.
      SELECT * FROM tsp01 INTO TABLE tb_spool
               WHERE rqowner = sy-uname.
      IF sy-subrc EQ 0.
        SORT tb_spool DESCENDING BY rqcretime.
        CLEAR : tb_spool.
        READ TABLE tb_spool INDEX 1.
    convert spool into PDF format.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid = tb_spool-rqident
             TABLES
                  PDF         = tb_lines.
      ENDIF.
    After this, on execution we get the below mentioned message.
    This indicates that a PDF of the SAP Script has been created which is in the format u201C132-long stringsu201D.
    In order to send the mail across, the mailing format of the PDF supports u201C255-long stringsu201D. So, the present u201C132-long stringsu201D needs to be converted into u201C255-long stringsu201D. This along with the mail code is mentioned below.
      DATA: lv_receiver(50) TYPE c.
      REFRESH: tb_obj_txt,
               tb_obj_bin,
               tb_obj_head,
               tb_paklist,
               tb_receiver.
      CLEAR: tb_obj_txt,
             tb_obj_bin,
             tb_paklist,
             tb_obj_head,
             tb_receiver.
      CLEAR: tb_adrc.
    IF NOT tb_adrc[] IS INITIAL.
    Reading the address table with the key as address number.
        READ TABLE tb_adrc WITH KEY addrnumber = tb_kna2-adrnr.
        IF sy-subrc EQ 0.
    Vendor Email ID.
          SELECT SINGLE smtp_addr
             FROM adr6
             INTO wf_mailaddr
             WHERE addrnumber = tb_adrc-addrnumber.
          IF sy-subrc EQ 0.
    Moving the mail address to the receiver itab
            MOVE wf_mailaddr TO tb_receiver-receiver.
            tb_receiver-rec_type = text-011.
            APPEND tb_receiver.
          ELSE.
            CONCATENATE text-004 tb_kna2-kunnr text-005 INTO lv_receiver
                                       SEPARATED BY space.
    If pa_call is initial, the receiver ID is printed; else an INVALID E-mail ID    message gets flashed.
            IF pa_call IS INITIAL.
              WRITE :/ lv_receiver.
            ENDIF.
            CLEAR: itab.
            itab-kunnr = tb_kna2-kunnr.
            itab-message = lv_receiver.
            APPEND itab.
            EXIT.   u201CNo mailing for invalid Email id
          ENDIF.
        ENDIF.
      ENDIF.
      wf_name = sy-uname.
      wf_year = tb_main-bldat(4).
      wf_mon = tb_main-bldat+4(2).
    *This FM gives the name of the months. 
    CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                language    = sy-langu
           TABLES
                month_names = tb_months.
      IF sy-subrc EQ 0.
        READ TABLE tb_months WITH KEY mnr = wf_mon.
        IF sy-subrc EQ 0.
          wf_name = tb_months-ktx.
        ENDIF.
      ENDIF.
      CLEAR: tb_contp.
    IF NOT tb_contp[] IS INITIAL.
    *Reading the contp itab as per the customer entered on the selection screen.
        READ TABLE tb_contp WITH KEY bukrs = pa_bukrs
                                     kunnr =  tb_kna2-kunnr.
        IF sy-subrc EQ 0.
        CONCATENATE text-006 text-008 tb_contp-contp text-008 tb_kna2-kunnr
                              text-008 wf_name text-008 wf_year INTO wf_sub.
        ENDIF.
      ELSE.
        CONCATENATE text-006 text-008 tb_kna2-kunnr text-008 wf_name
                                        text-008 wf_year INTO wf_sub.
      ENDIF.
    Subject and Description
      CLEAR wa_docdata.
      wa_docdata-obj_name  = text-007.
      wa_docdata-obj_descr = wf_sub.
      wa_docdata-obj_langu = sy-langu.
    Write main body
      tb_obj_txt = text-009.
      APPEND tb_obj_txt.
      CLEAR tb_obj_txt.
      CLEAR  tb_paklist.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 3.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = 60.
      tb_paklist-doc_type   = text-012.
      APPEND tb_paklist.
      CLEAR  tb_paklist.
    create PDF file
    Transfer the 132-long strings to 255-long strings
      LOOP AT tb_lines.
        TRANSLATE tb_lines USING ' ~'.
        CONCATENATE wf_buffer tb_lines INTO wf_buffer.
      ENDLOOP.
      TRANSLATE wf_buffer USING '~ '.
      DO.
        tb_obj_bin = wf_buffer.
        APPEND tb_obj_bin.
        SHIFT wf_buffer LEFT BY 255 PLACES.
        IF wf_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      DESCRIBE TABLE tb_obj_bin LINES lv_lines.
      READ TABLE tb_obj_bin INDEX lv_lines.
      lv_size = ( lv_lines - 1 ) * 255 + STRLEN( tb_obj_bin ).
    Create attachment notification
      tb_paklist-transf_bin = co_x.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 0.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = lv_lines.
      tb_paklist-doc_type   = text-013.
      tb_paklist-obj_descr  = text-010.
      tb_paklist-obj_name   = text-010.
      tb_paklist-doc_size   = lv_size.
      APPEND tb_paklist.
    *mail the PDF to the receiver.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = wa_docdata
                sender_address             = wf_name
                sender_address_type        = text-014
           TABLES
                packing_list               = tb_paklist
                object_header              = tb_obj_head
                contents_bin               = tb_obj_bin
                contents_txt               = tb_obj_txt
                receivers                  = tb_receiver
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
      IF sy-subrc <> 0.
        CONCATENATE text-003 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ELSE.
        CONCATENATE text-002 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ENDIF.
    Hope this helps.
    Harsh

  • How to print a standard text of 3 pages in the script output?

    Hi all,
    I want to print a standard text as an include in the script output.
    But the standrad text is of 3 pages conataining continuous (some terms and condtitions) text.
    But while executing driver program, I am getting a STOP messgae pop-up saying 'Output is continuous or contains too many pages (>4)'.
    How to get the standard text of 3 pages in the output. The standard text is to be printed at the bottom of the output.
    Thanks,
    Sachin

    Hi ,
    To display standard texts you have to create a include in your script below is the syntax for that:
    INCLUDE name OBJECT name ID name PARAGRAPH name LANGUAGE   name
    Include command is used to include standard text in a form.the text 
    should be already defined by using transaction SO10.
    Here name is the name of text
    ID is used to classify text e.g. SDVD (SD related text) , ST (Standard text)
    OBJECT is used to specify type of object it an be TEXT , DOKU
    LANGUAGE is used to specify language like EN ,if ommited than logon
      language is used
    PARAGRAPH is used to specify the paragraph like C
    e.g. /:INCLUDE mytext OBJECT TEXT ID ST LANGUAGE EN
             Here the standard text created in SO10 with name mytext is
             included in the form in language EN (English)
    Please let me know if you have still any confusion.
    Thanks
    Narendra Vikram Vishwakarma

  • Reg: Script Output in PDF form

    Hai..
    Can anybody tell me how we will get script output
    (P.order output) in PDF format and we need to downlaod this PDF to our local drives. plz tell me the function modules to be used for this requirement and paste the code if any of you worked on this earlier..
    Regards

    Check this link for sample program.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/downloadSAPScriptoutputtoPDF+file.&
    Function Module: CONVERT_OTF
    Regards,
    Maha

  • 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'.

  • PDF format of script output in irregular format

    Hi All,
    I am getting script output in OTF format in 'CLOSE_FORM'
    of standard sales order script.
    This,I am able to send in PDF format as mail attachment by using function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But the alignment and format of data in the attachment doesn't exactly match with original script output.
    Can anyone help me in this regard? Thanks in advance
    - jawahar

    Hi,
        disregard my earlier mail.
       fill itcpo structure and try
      <b> itcpo-tdgetotf = 'X'.    
       xdevice = 'PRINTER'.  </b>   
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                FORM           = TNAPR-FONAM
                LANGUAGE       = NAST-SPRAS
              <b>  OPTIONS        = ITCPO</b>
                ARCHIVE_INDEX  = TOA_DARA
                ARCHIVE_PARAMS = ARC_PARAMS
                DEVICE         = XDEVICE
                DIALOG         = ' '
           IMPORTING
                RESULT         = ITCPP
           EXCEPTIONS
                OTHERS         = 1.
        CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
             EXPORTING
                  FORMAT_SRC      = 'OTF'
                  FORMAT_DST      = 'PDF'
                  DEVTYPE         = 'HPLJ5SI'
             TABLES
                  CONTENT_IN      = CONTENT_IN
                  CONTENT_OUT     = CONTENT_OUT
             EXCEPTIONS
                  ERR_CONV_FAILED = 1
                  OTHERS          = 2.
        OBJBIN[] = CONTENT_OUT[].
    endif.
      DOC_CHNG-OBJ_NAME = TEXT-003.
    doc_chng-obj_descr = text-001.
      CONCATENATE TEXT-002 VBDKR-VBELN "zinvoice14-vessel
                          INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
      IF SY-SYSID NE 'S4P'.
        CONCATENATE DOC_CHNG-OBJ_DESCR TEXT-004 INTO DOC_CHNG-OBJ_DESCR
                                                    SEPARATED BY SPACE.
      ENDIF.
    OBJTXT = 'This is an example of a Sapscript emailed out of SAP'.
    APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Fill the fields of the packing_list for the main document:
    It is a text document
      CLEAR OBJPACK-TRANSF_BIN.
    The document needs no header (head_num = 0)
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 0.
    but it has a body
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
    of type RAW
      OBJPACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
    Create the attachment (the list itself)
      IF NAST-KSCHL NE 'ZSTT'.
        DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    Fill the fields of the packing_list for the attachment:
    It is binary document
        OBJPACK-TRANSF_BIN = 'X'.
    we need no header
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM = 0.
    but a body
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM = TAB_LINES.
    of type ALI
    IF NAST-KSCHL NE 'ZSTT'.
        OBJPACK-DOC_TYPE = 'PDF'.
        OBJPACK-OBJ_NAME = 'Attachment'.
        OBJPACK-OBJ_DESCR = 'PDF file'.
        READ TABLE OBJBIN INDEX TAB_LINES.
        DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
        OBJPACK-DOC_SIZE = DOC_SIZE.
        APPEND OBJPACK.
      ENDIF.
    get E-mail address
    loop at t_tvbdkr.                                          "S4DK966284
      w_name = t_tvbdkr-tdname.                                "S4DK966284
        W_NAME = VBDKR-TDNAME.                                   "S4DK966284
        IF NAST-KSCHL EQ 'ZLEE'." or nast-kschl eq 'ZPRE'.
          PERFORM READ_TEXT USING W_NAME 'Z555' 'VBBK'.
        ENDIF.
        IF SY-SUBRC EQ 0.
          DELETE TDLINES WHERE TDFORMAT EQ '/*'
                          OR TDLINE EQ SPACE.
          LOOP AT TDLINES.
            RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
            RECLIST-RECEIVER = RECIPIENT_INT.
            RECLIST-REC_TYPE = 'U'.
            APPEND RECLIST.
          ENDLOOP.
        if sy-subrc eq 0.                                      "S4DK966284
          exit.                                                "S4DK966284
        endif.                                                 "S4DK966284
        ENDIF.
    endloop.                                                 
      LOOP AT T_TVBDPR.
        CHECK T_TVBDPR-TDNAME+0(10) = VBDKR-TDNAME.              "S4DK966284
        W_NAME = T_TVBDPR-TDNAME.
        IF NAST-KSCHL EQ 'ZLEE'.
          PERFORM READ_TEXT USING W_NAME 'Z558' 'VBBP'.
        ENDIF.
        IF SY-SUBRC EQ 0.
          DELETE TDLINES WHERE TDFORMAT EQ '/*'
                          OR TDLINE EQ SPACE.
          LOOP AT TDLINES.
            RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
            RECLIST-RECEIVER = RECIPIENT_INT.
            RECLIST-REC_TYPE = 'U'.
            APPEND RECLIST.
          ENDLOOP.
        if sy-subrc eq 0.                                      "S4DK966284
          exit.                                                "S4DK966284
        endif.                                                 "S4DK966284
        ENDIF.
      ENDLOOP.
    SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
    FOR SENDING DOCUMENTS WITH ATTACHMENTS
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_CHNG
                PUT_IN_OUTBOX              = 'X'
           IMPORTING
                SENT_TO_ALL                = SENT_TO_ALL
           TABLES
                PACKING_LIST               = OBJPACK
                OBJECT_HEADER              = OBJHEAD
                CONTENTS_BIN               = OBJBIN
                CONTENTS_TXT               = OBJTXT
                RECEIVERS                  = RECLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    Regards
    amole

  • EA1 - Script output loses focus

    Hello out there,
    when starting a query in script mode and then trying to copy a word into the clipboard via doubleclick and CTRL-C, not the word I clicked on is copied but something form the worksheet above.
    When I just left click into the script output, the focus jumps back into the worksheet.
    Marking some text with the mouse lets stay the focus in the script output though...
    I'm using SQL Developer 4.0.0.12.27 with JDK 1.7.0_25 64bit on Windows 7 64bit. (With german localization for both SQLD and Windows, if that matters)
    Regards,
    dhalek

    It's a bug! Thanks for reporting this.

  • 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

  • Report Script output in UTF-8 code with Non-Unicode Application

    Essbase Nation,
    Report Script output (.txt) file is being coded as UTF-8 when the application is set to Non-unicode. This coding creates a signature character in the first line of the text file, which in turn shows up when we import the file into Microsoft Access. Does anyone know how to change the coding of the output file or know who to remove the UTF-8 signature character.
    Any adive is greatly appreciated.
    Thank you.
    Concerned Admin

    You may be able to find a text editor that can do the conversion. Alternatively, I have converted from one encoding to the another programmatically using Java as well.
    Tim Tow
    Applied OLAP, Inc

  • Script output getting suppressed when trying to send email

    Hi,
    I am having an existing report,part of code is given below.
    *data processing.....
          itcpo-tdcovtitle =  z_text.             
          itcpo-tdgetotf   = 'X'.                 
          call function 'OPEN_FORM'               
             exporting                            
                  device             = 'PRINTER'  
                form               = 'LAYOUTSET'
             importing                             
                  result             = x_itcpp_sulph
             exceptions                            
                  canceled           = 1           
                  device             = 2           
                  form               = 3           
                  options            = 4           
                  unclosed           = 5           
                  others             = 6.          
    Data processing ....and writing to script output
      perform entry(zvadin11) using returncode xscreen if found.
         call function 'CLOSE_FORM'         
              importing                     
                    result   = x_itcpp_sulph
              tables                        
                    otfdata  = otf1         
              exceptions                    
                    unopened = 1            
                    others   = 2.    
    So the control will switch from existing report to another program namely zvadin11 and gives script output.
    Now,in my current program i am trying to send script output through Email,for which i am converting script output to OTF data.Then sending the data through mail,using function modules 'SX_OBJECT_CONVERT_OTF_PDF' and 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    I am able to send the data through PDF attachment as required.But i am unable to see Script output.If i comment the OTF related code from open_form and close_form,i am able to see the script output,but i am not getting data into OTF internal table.
    Can i get both the functionalities of seing the script output and also get OTF data for Email.
    Can any one help me?
    Thanks & Regards,
    Seshagiri.M.
    Intelligroup.

    Hi Seshagiri,
    Is yur code that sneds email before 'CLOSE_FORM'?
    Regards,
    Suresh Datti

  • How to restrict Order types KA  and AB in script output form

    How to restrict KA AND AB order types in script output data is coming from  bkpf-blart .
    program is rfkord10.
    and form is f140_acc_stat_1
    in script output i dont want to  display KA AND AB order types ..
    data is coming from standard report.
    i copied form into zform.
    in output it is displaing all order types ..
    is there any solution to restrict above order types.

    Hi
    Check the data structures used in the script
    Since it is account statement of customer it uses the Tables BSID and BSAD in which the field BLART field is there whose values are KA and AB
    check for the structures which are used in the script and in them search for the field BLART in Se11 and accordingly keep the condition
    It will work
    Regards
    Anji

Maybe you are looking for