How to send a ALV graphic through SBWP

Hi,
I am new to SAP and newly started SAP PP. We are sending a Z report through SBWP to senior team of the organization. But now new requirement generated to send the ALV graphic instead of detail report.
Is it possible to send through standard?.
If possible, can you please explains the steps.
Thanks;
Malka

Hi Siraj
I do not have a ready sample with me; however, here can be a logical sequencing of steps which you can follow to achieve this:
1) Define a custom PF STATUS in the ALV with the SEND Button
2) In the User Command routine for ALV, code for SEND
3) See how standard ALV - EXPORT to EXCEL Works - Debug and find the steps to generate an EXCEL - in the SEND Functionality
4) Once Excel is downloaded, create a SOFM document for the same - Check the method CREATE of object SOFM on the coding required to do it
5) Generate the SOFM Object Instance using the document created and calling FM SWO_INVOKE
6) Now you have the run time instance of the report output as a document
7) Define a custom Business object and a custom workflow based on that object
8) Define a custom event with the event parameter of type SOFM
9) From your SEND routine of the report -> trigger the event and pass the SOFM Instance of the excel as event parameter
10) Workflow will have this object via binding from event to workflow container
11) In the decision step to approver, bind this to _ATTACH_OBJECTS
For each of these, you will find some  link already on SCN.
Hope this helps.
Once you have the solution, by the above steps or a better one, do remember to create a document on SCN in order to help others - this is a valid requirement and it would be good to have a ready reckoner :-)
regards,
Modak

Similar Messages

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • How to send a smartform result through mail?

    How to send a smartform result through mail?

    HI,
    YOu can convert the output of Smartform into a attachment say PDF file & then send it across through mail.
    Refer following program:
    <a href="http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm">http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm</a>
    Best regards,
    Prashant

  • How to send a ALV report as a workitem

    Hi All,
    How to send a ALV report to the SAP Inbox for approval.
    Requirement: When the reviewer executes the report and click on send button.
    It will go to the approver for report approval.
    How to send a report when reviewer click on the send button.
    I am unable to find a solution when the user click on the send button the report will go to the approver.
    Please help me out on this...
    Regards,
    Siraj,
    +918008322278.

    Hi Siraj
    I do not have a ready sample with me; however, here can be a logical sequencing of steps which you can follow to achieve this:
    1) Define a custom PF STATUS in the ALV with the SEND Button
    2) In the User Command routine for ALV, code for SEND
    3) See how standard ALV - EXPORT to EXCEL Works - Debug and find the steps to generate an EXCEL - in the SEND Functionality
    4) Once Excel is downloaded, create a SOFM document for the same - Check the method CREATE of object SOFM on the coding required to do it
    5) Generate the SOFM Object Instance using the document created and calling FM SWO_INVOKE
    6) Now you have the run time instance of the report output as a document
    7) Define a custom Business object and a custom workflow based on that object
    8) Define a custom event with the event parameter of type SOFM
    9) From your SEND routine of the report -> trigger the event and pass the SOFM Instance of the excel as event parameter
    10) Workflow will have this object via binding from event to workflow container
    11) In the decision step to approver, bind this to _ATTACH_OBJECTS
    For each of these, you will find some  link already on SCN.
    Hope this helps.
    Once you have the solution, by the above steps or a better one, do remember to create a document on SCN in order to help others - this is a valid requirement and it would be good to have a ready reckoner :-)
    regards,
    Modak

  • Urgent ...how to send output of sap through mail

    Could you please guide me how to send output of SAP Script  through mail in PDF format.
    Thanks in Advance....
    Regards,
    Kumar.

    *& Report  ZSPOOLTOPDF                                                 *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program must be run as a background job in-order for the write *
    *& commands to create a Spool request rather than be displayed on      *
    *& screen                                                              *
    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver,
               p_sender LIKE somlreci1-receiver,
                   p_delspl  AS CHECKBOX.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Write statement to represent report output. Spool request is created
    if write statement is executed in background. This could also be an
    ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    Alternative way could be to submit another program and store spool
    id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
           to sap-spool
           spool parameters   %_print
           archive parameters %_print
           without spool dynpro
           and return.
    Get spool id from program called above
    IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
        if p_delspl EQ 'X'.
          PERFORM delete_spool.
        endif.
        IF sy-sysid = c_dev.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
        ENDIF.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
          FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    regards,
    venkat

  • How to send the ALV report output by automated email.

    Hi All,
    Can any one advice how to send ALV report output by automated email.
    Thanks in advance.
    Vikram.
    Edited by: vikram mallavaram. on Oct 13, 2011 3:26 PM
    Moderator message: FAQ, please search for previous discussions of this topic.
    Edited by: Thomas Zloch on Oct 13, 2011 3:27 PM

    Hi Ramya,
    Check the links below :
    http://wiki.sdn.sap.com/wiki/display/Snippets/Sending+Mail
    http://wiki.sdn.sap.com/wiki/display/Snippets/AbapEMAILProgram
    http://wiki.sdn.sap.com/wiki/display/ABAP/SendMessagetoExternalemailidandSAPUseridvia+ABAP
    They will explain you to send an email.
    Regards,
    Kittu

  • HOW TO SEND THE REPORTS AND  THROUGH XI TO NON -SAP SYSTEM

    Hi Experts,
                 I want to know how to send the reports and  smartform through xi to another system. All the post blogs are   just explaning only about the FILE-TO-FILE, FILE-TO-IDOCS scenarios only.

    Hi,
    XI is the middleware that to be used to transfer the data between various systems and even you could design the Business Processes with it.
    In R/3 the smartforms, are generally converted to PDF and then  have to send it across to Non SAP systems. Similarly you can convert the smartforms to pdf format and keep it on application server. XI will pick up that pdf and will send it to Non SAP system either as mail or as an attachments.
    ABAP reports are normally used to re-present the data. If you need to transfer this data across the Non SAP systems then you have the IDOCs to be generated, RFC or ABAP Proxy to integrate this data with Non SAP system.
    XI is not restricted only upto file to file or file to IDOC scenarios. It have enormous capabilities to involve various Business Processes as well integrate various SAP or Non SAP systems.
    If need anymore  specific details, please let us know.
    Thanks
    Swarup

  • How to send songs from iphone through whatsapp

    I don't know how to send songs from iphone 5 through whatsapp?
    can someone help please.

    you don't not a feature on iphones.
    songs are meant to be sync with itunes.

  • How to send Messages to JMS through ABAP

    Hi,
    I have to send messages to JMS through abap, how to do it.
    step by step is helpful

    Hi,
           You will have to write proxy to Jms to transfer data from R/3 to receiever via JMS.
    Follow this blogs it will be helpfull :
    Re: Proxy->XI->JMS
    For configuring receiver JMS:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    For configuring ABAP proxies etc:
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Thanks,
    Arijit Guha.

  • How to send an ALV to Spool

    Dear all,
    Could you please help, my requirement is to send an ALV report as a PDF attachement to a list of email address. My plan is to send the ALV to spool and read it from there and email it. However I have a problem in as much as the ALV is not being sent to spool, furthermore I also get print dialog popup when running the report. Can you please help, i am using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY and  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' I have browsed here and there are several questions on this topic but they do not address the issue of sending the file to the spool. The partial code is below
    DATA:i_t001 TYPE t001 OCCURS 0,
         pdf    LIKE tline OCCURS 0,
         g_spool   TYPE tsp01-rqident,
         g_program TYPE sy-repid VALUE sy-repid.
    TYPE-POOLS:slis.
    DATA: w_print TYPE slis_print_alv,
          w_print_ctrl TYPE alv_s_pctl.
    PARAMETERS: p_file TYPE string.
    INITIALIZATION.
      p_file = 'H:\TEST_gh.pdf'.
    START-OF-SELECTION.
      rp-def-time-period.
      help1 = behrs DIV 24.
      bdate = ldate - help1.
      help1 = behrs MOD 24.
      help2 = ltime(2) - help1.
      IF help2 LT 0.
        bdate = bdate - 1.
        btime = ltime.
        btime(2) = 24 + help2.
      ELSE.
        btime = ltime.
        btime(2) = help2.
      ENDIF.
      pn-begps = ldate - 1.
      pn-endps = ldate.
    GET pernr.
      loop at p0007 where begda le ldate and endda ge ldate.  "
      endloop.                                              
    * überprüft Arbeitszeitplanregel
    * CHECK schkz.
      CHECK p0007-schkz IN schkz.
      CHECK p0007-zterf IN zterf.        
      CALL FUNCTION 'HR_SEL_STAT_CHECK'
           EXPORTING
                get_pernr    =  pernr-pernr
                get_ldate    =  ldate
                get_bdate    =  bdate
                get_btime    =  btime
                get_psp_flag =  psp_flag
                get_ltime    =  ltime
    *    IMPORTING
    *         NO_PERMIT    =
           TABLES
                get_p0000    =  p0000
                get_p0001    =  p0001
                get_p0002    =  p0002
                get_p0050    =  p0050
                get_p0007    =  p0007
                data_tab     =  data_tab.
    *   End-of-Selection                                                   *
    END-OF-SELECTION.
      loop at data_tab into ls_data_tab.
        ls_data_tab-total_records = '1'.
        ls_data_tab-kostl = p0001-kostl.
        Append ls_data_tab to lt_data_tab.
      endloop.
      DESCRIBE TABLE data_tab LINES lines.
      CALL FUNCTION 'HR_GET_ERROR_LIST'
        TABLES
          error      = errors
          errortexts = errortexts
        EXCEPTIONS
          no_errors  = 1
          OTHERS     = 2.
      IF lines EQ 0 AND sy-subrc EQ 1.
        MESSAGE i050.
        STOP.
      ENDIF.
      LOOP AT errors.
        READ TABLE data_tab WITH KEY errors-pernr.
        IF sy-subrc EQ 0.
          DELETE data_tab INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
      g_repid = sy-repid.
    * fill field catalog for output
      PERFORM fill_fcat USING  fcat
                               g_repid.
    * Listheader
      PERFORM fill_header USING header_alv_wa
                                header_alv.
      FIELD-SYMBOLS <lwa_fcat> like line of fcat.
      LOOP AT fcat ASSIGNING <lwa_fcat>.
        IF <lwa_fcat>-fieldname = 'TOTAL_RECORDS'.
          <lwa_fcat>-do_sum    = 'X'.
        ENDIF.
      ENDLOOP.
    *Right, sort the table and produce sub totals
      wa_sort-spos      = 18.
      wa_sort-fieldname = 'KOSTL'.
      wa_sort-up        = 'X'.
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
    * Layout for REUSE_ALV_GRID_DISPLAY
      s_layout-colwidth_optimize = 'X'.
      s_layout-zebra             = 'X'.
      s_layout-no_author         = 'X'.
    w_print-print = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = g_repid
        "      i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command = 'USER_COMMAND'  
          i_callback_top_of_page  = 'TOP_OF_PAGE'
          is_layout               = s_layout           
          it_fieldcat             = fcat
          it_sort                 = it_sort
          i_save                  = 'A'                       
          i_structure_name        = MY_STRUCTURE'
          is_print                = w_print
        TABLES
          t_outtab                = lt_data_tab
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
    ***=====================================================================*
        g_spool = sy-spono.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid = g_spool
          TABLES
            pdf         = pdf.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename = p_file
              filetype = 'BIN'
            TABLES
              data_tab = pdf.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
                i_callback_program      = g_repid
              "      i_callback_pf_status_set = 'SET_PF_STATUS'
                i_callback_user_command = 'USER_COMMAND'  
                i_callback_top_of_page  = 'TOP_OF_PAGE'
                is_layout               = s_layout           
                it_fieldcat             = fcat
                it_sort                 = it_sort
                i_save                  = 'A'                 
                i_structure_name        = MY_STRUCTURE'
              TABLES
                t_outtab                = lt_data_tab
              EXCEPTIONS
                program_error           = 1.
                ENDIF.
          endif.
        endif.

    Hi Andy ,
    write this code before calling "CONVERT_ABAPSPOOLJOB_2_PDF"
    CALL FUNCTION 'SET_PRINT_PARAMETERS'
         EXPORTING
           destination = 'LOCL' " Printer
           layout      = 'X_65_512/2' "Format "X_65_255
           line_count  = '65' "Line Count
           line_size   = '1024'. "Line Size
    Regards ,
    Yogendra Bhaskar

  • In solman 4.0 how to send message to SAP through service desk

    Dear all,
            I have configured service desk functionality, My requirement is from service desk how to send message to SAP.
    Regards,
    Pavan.

    Hi,
    Following the steps:
    &#131;Basic configuration - RFC Connections to SAP
    Check if the RFC Connectino SAPOSS is working properly
    Check if load distribution group is set to EWA
    The RFC Connections:
    - SAP-OSS (Send Message to SAP)
    - SAP-OSS-LIST-O01 (Update Message from SAP)
    will be created automatically by the system with a user which has been assigned
    previously.
    IMG Path: SAP Web Application Server | SAP Web Application Server | SAP Solution Manager| Basic Settings | SAP Solution Manager System | Connection to SAP | Assign user for forwarding Service Desk Message
    With transaction SM59 you can adjust the RFC connections.
    - For further information on SAP R/3 Front-end connections, see SAP Notes: 33135, 766505, 24177
    - To forward Service Desk notifications and Issues to SAP, you need to assign a user to the SAPNet R/3
    Front-end connection to SAP.
    Activities:
    - 1. From the SAP Solution Manager (transaction SOLUTION_MANAGER), choose (Edit-> Global Settings.
    - 2. Choose Display<->Change.
    - 3. For SAP Service Marketplace, specify http://service.sap.com as the URL.
    - 4. In the Connection to SAP tab, specify SAPOSS as the RFC destination. Note that the entry is casesensitive.
    - 5. For User forwading messages, enter a valid user and a password. This user will require all the authorizations for SAPNet R/3 Front-end for your customer number.
    - 6. Save your changes.
    The system automatically generates the following RFC destinations and assigns the S-User and password you specified: SAP-OSS, SAP-OSS-LIST-O01
    Good Lucky!

  • How to send POST HTTP Request through PI .

    Hi ,
    I am trying to send a XML mesage at HTTP server from SAP PI 7.1 .
    but not able to , reason is HTTP guy telling me is that ,i am sending a get request through SAP PI 7.1 and it should be POST.
    Where to change this this thing , so that only post request should go.
    There is one more thing , i am facing following request only in Quality . In Development request is going as Post and every thing running fine ...
    Regards
    PS

    It was always HTTP from our end , some config was missing at HTTP guys end , which solve the problem ..
    So there was no issue at PI end.

  • How to send alert email notification through graphical mapping ?

    Hi,
    I want to send an email notification whenever there is an exception raised while doing graphical mapping.
    However my requirements are as follows :
    1. We want to use email adpater sending emails
    2. We don't want to go for BPM approach, to achieve the above requirement
    3. We don't want to connect to any alert framewok.
    I appreciate your early reply.
    Thanks
    Ganesh

    Hey
    >>whenever there is an exception raised while doing graphical mapping.
    as said earlier this is not possible without configuring alerts.
    yeah,if u know the reasons beforehand that why exceptions can be be triggered in mapping,then u can use conditional receiver determination,for e.g suppose u know that you will get a mapping exception if value of tag <OrdersID>=000,then u can use this condition in conditional receiver determination and send a mail to concerned party,but this won't work if u don't know beforehand as to under what conditions the exception will be  triggered in mapping.
    i would vote for configuring alerts as its the most suited way to handle this
    thanx
    Aamir

  • How to send the alv list display to spool

    Hi all,
    I am executing a program in foreground. My requirement is sending alv list output to spool. When i execute the smae program in background mode the SAP is handling the spool output in hierarchial list display. How to get the same output in foreground also.
    Thanks and Regards,
    Vijay.

    Hi max,
    I think my question is not clear.
    when I execute my report in background mode, I can able to see the output in the spool.
    But when I execute the same report in foreground no spool output is getting generated.
    To handle this I am calling some function modules like RSPO_OPEN_SPOOLREQUEST , RSPO_WRITE_SPOOLREQUEST,  RSPO_WRITE_SPOOLREQUEST. But by using this i cannot able to get the desired output in alv list display format. what to do to get my desired output.
    Thanks and Regards,
    Vijay.

  • How to: Send out e-mails through a 3rd party mail host?

    Hi,
    We would like to send out e-mail campaign from our CRM system.
    But we would not like to risc being blacklisted as spammer, so we would like to send out the e-mails using a 3rd party mail host provider.
    Our sales department already use our CRM system for sending out their sales related e-mails.
    They use our corporate exchange server for that.
    So the scenario is:
    I have created a smtp node in trx scot, and liked it to our domain *company.com
    This node points to our corporate mail host. All our normal users use this domain.
    All our campaign e-mails from CRM should be send using another mail host as described before.
    According to note 455140, I don't see that I can create a new smtp node in scot.
    And link this one to our new e-mail domain *company-news.com and the external mail host.
    How do I send these e-mails to a specific mail host when the sender is a specific domain e.g. company-news.com?
    My Exchange server guys say that they can't redirect specific mails send from our CRM system.
    They can only redirect all mails that are send from our CRM system, but then all the e-mails from our sales reps are also send through a 3rd party mail host.
    Does anyone have battled with this before, and how did you solve it?
    best regards
    Michael Wolff Knudsen

    We bought a new Exchange server, version 2007 just for CRM. This Exchange version can tunnel the e-mail to our 3rd party vendor, and they can send out the e-mails so neither one of us gets spammed.

Maybe you are looking for