Who i send my alv reprot to fax

can u plz tell me i have a alv report who i can send it ot fax

hi ,
     Check this program it might help u
How can you send a fax from within ABAP/4 programs? 
The following program shows you how to send a fax from within ABAP/4. The report is delivered
in the standard system and is used in Transaction SCOM for the function "Send test fax".
Only the method via the call of SAPscript with DEVICE='TELEFAX', described below, ensures the
generation of a correct transmission request, independent of the R/3 release and of the used
fax server solution and its configuration.
The regular printing (for example, with NEW-PAGE PRINT ON...) on an output device created in
the spool administration of the device class 'Telefax' does generally not work!
REPORT RSKSENDF MESSAGE-ID SK.
Test report to send a test fax
sends a fax to the number <TO_CNTRY>-<TO_NMBER>
containing an automatically generated message text.
TABLES: USR03.
PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
FROM_USR(30) TYPE C DEFAULT SY-UNAME,
TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
SAPscript content ITAB
DATA: BEGIN OF TEST_DOC OCCURS 10.
INCLUDE STRUCTURE TLINE.
DATA: END OF TEST_DOC.
SAPscript header struct
DATA BEGIN OF HEADER.
INCLUDE STRUCTURE THEAD.
DATA END OF HEADER.
INITIALIZATION.
get county from user addres in usr03
system->user profile->user address
check if not empty
SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
IF SY-SUBRC = 0 AND USR03-LAND1 <> SPACE.
TO_CNTRY = USR03-LAND1.
ENDIF.
START-OF-SELECTION.
PERFORM FILL_UP_TEST_DOC.
PERFORM SHOW_TEST_DOC.
AT PF08.
PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
TO_NMBER.
AT SELECTION-SCREEN ON TO_NMBER.
PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
*& Form CHECK_NUMBER
FORM CHECK_NUMBER USING
COUNTRY
NUMBER.
DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
LEN LIKE SY-FDPOS.
FIELD-SYMBOLS <P>.
windows GUI push the ? from mandatory input instead
of overwriting it
LEN = STRLEN( TO_NMBER ).
IF LEN > 1.
SUBTRACT 1 FROM LEN.
ASSIGN TO_NMBER+LEN(1) TO <P>.
IF <P> = '?'.
<P> = SPACE.
ENDIF.
ENDIF.
official check FM
CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
EXPORTING
COUNTRY = COUNTRY
NUMBER = NUMBER
SERVICE = SERVICE.
on old 21?/22? release you may have to handle the
exception
because the Function uses RAISE instead of
MESSAGE... RAISING....
ENDFORM. " CHECK_NUMBER
*& Form FILL_UP_TEST_DOC
fills test text in itab TEST_DOC *
real life example needs to get real life data *
FORM FILL_UP_TEST_DOC.
DATA: DATUM(12) TYPE C,
UZEIT(10) TYPE C.
SAPscript initialization
of course, you may want to set a few parameter
(FORM,LAYOUT,....)
CALL FUNCTION 'INIT_TEXT'
EXPORTING
ID = 'ST '
LANGUAGE = SY-LANGU
NAME = 'FOO-BAR'
OBJECT = 'TEXT'
IMPORTING
HEADER = HEADER
TABLES
LINES = TEST_DOC
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
MESSAGE A400 WITH 'INIT_TEXT'.
ENDIF.
PERFORM ADD_EMPTY_LINE.
WRITE: SY-DATUM TO DATUM.
WRITE: SY-UZEIT TO UZEIT.
PERFORM ADD_LINES USING 'This is test Telefax'(001)
DATUM UZEIT.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
PERFORM ADD_LINES USING 'Fax number: & &'(004)
TO_CNTRY TO_NMBER.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING
'This is a test fax send by Report RSKSENDF'(005)
SPACE SPACE.
PERFORM ADD_LINES USING 'on SAP system & '(006)
SY-SYSID SPACE.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING
'the quick brown fox jumps over the lazy dog.'(101)
SPACE SAPCE.
PERFORM ADD_LINES USING
'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
SPACE SAPCE.
PERFORM ADD_EMPTY_LINE.
PERFORM ADD_LINES USING 'End of test'(007) SPACE
SPACE.
ENDFORM. " FILL_UP_TEST_DOC
*& Form ADD_LINES
printf a line an appends it in test_doc *
--> cformat format.
--> p1 param1
--> p2 param2
FORM ADD_LINES USING CFORMAT P1 P2.
TEST_DOC-TDFORMAT = '/'.
TEST_DOC-TDLINE = CFORMAT.
IF TEST_DOC-TDLINE CA '&'.
REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
IF TEST_DOC-TDLINE CA '&'.
REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
ENDIF.
ENDIF.
APPEND TEST_DOC.
ENDFORM. " ADD_LINES
*& Form ADD_EMPTY_LINE
appends an empty line to test_doc *
FORM ADD_EMPTY_LINE.
TEST_DOC-TDFORMAT = '/'.
CLEAR TEST_DOC-TDLINE.
APPEND TEST_DOC.
ENDFORM. " ADD_EMPTY_LINE
*& Form SHOW_TEST_DOC
lists the test doc for aproval *
*>>>> this is for fun only because PRINT_TEXT also
offers a preview *
FORM SHOW_TEST_DOC.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
WRITE: / 'Test fax would look like this:'(020).
ULINE.
SKIP.
LOOP AT TEST_DOC.
IF TEST_DOC-TDLINE <> SPACE.
WRITE:/ TEST_DOC-TDLINE.
ELSE.
SKIP.
ENDIF.
ENDLOOP.
SKIP.
ULINE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE: 'Press PF8 to send it'(021).
ENDFORM. " SHOW_TEST_DOC
*& Form SEND_FAX
send fax by calling SAPscript *
Note: Instead of using PRINT_TEXT you may also *
call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
this allows you to use a similar program structure *
as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
OFF *
FORM SEND_FAX
TABLES DOC2FAX STRUCTURE TEST_DOC
USING COUNTRY
NUMBER.
DATA: SID(5) TYPE N.
DATA BEGIN OF POPT.
INCLUDE STRUCTURE ITCPO.
DATA END OF POPT.
DATA BEGIN OF PRES.
INCLUDE STRUCTURE ITCPP.
DATA END OF PRES.
CLEAR POPT.
POPT-TDCOPIES = 1. " one copy
POPT-TDDEST = " done internaly by script,
POPT-TDPRINTER = " do not fill !!!
POPT-TDNEWID = 'X'. " do not reuse old spool request
POPT-TDDATASET = 'TEST'(022). " fill as you want
POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
POPT-TDIMMED = 'X'. " send now
POPT-TDLIFETIME = 8. " keep 8 days in spool
POPT-TDTELENUM = NUMBER. " number without country code
POPT-TDTELELAND = COUNTRY. " country of recipient
POPT-TDCOVER = 'test fax'(024).
POPT-TDCOVTITLE = 'test fax'(024).
POPT-TDIEXIT = 'X'.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'TELEFAX' "<<< here we say: fax it !
DIALOG = 'X'
HEADER = HEADER
OPTIONS = POPT
IMPORTING
RESULT = PRES
TABLES
LINES = DOC2FAX
EXCEPTIONS
OTHERS = 01.
do not bother with exception in sample code
CANCELED = 01
DEVICE = 02
FORM = 03
OPTIONS = 04
UNCLOSED = 05
UNKNOWN = 06
FORMAT = 07
TEXTFORMAT = 08
EXTERNAL = 09.
IF SY-SUBRC = 0.
arriving here means we could send:
SID = PRES-TDSPOOLID.
IF SID > '00000'.
MESSAGE S433 WITH SID.
ENDIF.
LEAVE .
ELSE.
do not bother with exception in sample code
MESSAGE A400 WITH 'PRIN_TEXT'.
ENDIF.
ENDFORM. " SEND_FAX
reward if helpful.

Similar Messages

  • 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

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

  • 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

  • Personalized txt message alerts based on who is sending it?

    Is there anyway on the Iphone to set different text message alerts based on who is sending the text? I am a sysadmin and currently I have our servers sending txt message alerts to my corp phone. I'd like set it to send to my iphone with the caveat of giving a different alert sound then other text messages sent by other people.
    I just got my iphone yesterday, so please forgive me if there is an easy solution.

    In short, no. You can change ring tones for various people however; no individual group alerts.

  • Requirement of sending Sapscript through mail and fax

    I need help in code for sending sapscript through email or fax as the data is maintained in customer master table . If anybody has done so please help. I do not want to use CONVERT_OTF function and SO...API1 function.

    Check the following code it may help u.
    ***INCLUDE RVADOPFO .
    DATA: LVS_ITCPO         TYPE   ITCPO,
          LVF_DEVICE(30)    TYPE   C,
          LVF_DIALOG(1)     TYPE   C   VALUE ' ',
          LVS_RECIPIENT     LIKE   SWOTOBJID,
          LVS_SENDER        LIKE   SWOTOBJID,
          LVS_SNAST         TYPE   SNAST,
          LVF_PROGRAM       LIKE   SY-REPID,
          LVS_COMM_TYPE     TYPE   AD_COMM,
          LVS_COMM_VALUES   TYPE   SZADR_COMM_VALUES.
    reset return code
      RETCODE = 0.
    if there is a communication strategy used ...
      IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
      ... use stratagy to get communication type
        CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
             EXPORTING
                  STRATEGY           = NAST-TCODE
                ADDRESS_TYPE       =
                ADDRESS_NUMBER     = VBDKA-ADRNR
                PERSON_NUMBER      = VBDKA-ADRNP
                  ADDRESS_NUMBER     = ADDR_KEY-ADDRNUMBER
                  PERSON_NUMBER      = ADDR_KEY-PERSNUMBER
             IMPORTING
                  COMM_TYPE          = LVS_COMM_TYPE
                  COMM_VALUES        = LVS_COMM_VALUES
           TABLES
                STRATEGY_TABLE     =
             EXCEPTIONS
                  ADDRESS_NOT_EXIST  = 1
                  PERSON_NOT_EXIST   = 2
                  NO_COMM_TYPE_FOUND = 3
                  INTERNAL_ERROR     = 4
                  PARAMETER_ERROR    = 5
                  OTHERS             = 6.
        IF SY-SUBRC <> 0.
          retcode = sy-subrc.
          SYST-MSGTY = 'E'.
          perform protocol_update.
        ENDIF.
      ENDIF.
    convert communication data
      MOVE-CORRESPONDING NAST TO LVS_SNAST.
      MOVE SY-REPID           TO LVF_PROGRAM.
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
           EXPORTING
                PI_COMM_TYPE              = LVS_COMM_TYPE
                PI_COMM_VALUES            = LVS_COMM_VALUES
                PI_SCREEN                 = US_SCREEN
              PI_NEWID                  =
                PI_COUNTRY                = US_COUNTRY
                PI_REPID                  = LVF_PROGRAM
                PI_SNAST                  = LVS_SNAST
           IMPORTING
                PE_ITCPO                  = LVS_ITCPO
                PE_DEVICE                 = LVF_DEVICE
                PE_MAIL_RECIPIENT         = LVS_RECIPIENT
                PE_MAIL_SENDER            = LVS_SENDER
           EXCEPTIONS
                COMM_TYPE_NOT_SUPPORTED   = 1
                RECIPIENT_CREATION_FAILED = 2
                SENDER_CREATION_FAILED    = 3
                OTHERS                    = 4.
      IF SY-SUBRC <> 0.
        RETCODE = SY-SUBRC.
        SYST-MSGTY = 'E'.
        PERFORM PROTOCOL_UPDATE.
      ENDIF.
      check retcode eq 0.
    if there is no communication type
      IF  LVS_COMM_TYPE IS INITIAL.
      set device
        CASE NAST-NACHA.
          WHEN '1'.
            LVF_DEVICE = 'PRINTER'.
          WHEN '2'.
            LVF_DEVICE = 'TELEFAX'.
            LVS_ITCPO-TDTELENUM = NAST-TELFX.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
            LVS_ITCPO-TDFAXUSER  = NAST-USNAM.
          WHEN '3'.
            LVF_DEVICE = 'TELETEX'.
            LVS_ITCPO-TDTELENUM = NAST-TELTX.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
         WHEN '4'.
            LVF_DEVICE = 'TELEX'.
            LVS_ITCPO-TDTELENUM = NAST-TELX1.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
          WHEN OTHERS.
            LVF_DEVICE = 'PRINTER'.
        ENDCASE.
      ENDIF.
    fill structure itcpo
      ITCPO = LVS_ITCPO.
    open form
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
              APPLICATION        = 'TX'
                ARCHIVE_INDEX      = TOA_DARA
                ARCHIVE_PARAMS     = ARC_PARAMS
                DEVICE             = LVF_DEVICE
                DIALOG             = ' '
                FORM               = TNAPR-FONAM
                LANGUAGE           = NAST-SPRAS
                OPTIONS            = LVS_ITCPO
                MAIL_SENDER        = LVS_SENDER
                MAIL_RECIPIENT     = LVS_RECIPIENT
              MAIL_APPL_OBJECT   = ' '
              RAW_DATA_INTERFACE = '*'
         IMPORTING
              LANGUAGE           =
              NEW_ARCHIVE_PARAMS =
              RESULT             =
           EXCEPTIONS
                CANCELED           = 1
                DEVICE             = 2
                FORM               = 3
                OPTIONS            = 4
                UNCLOSED           = 5
                MAIL_OPTIONS       = 6
                ARCHIVE_ERROR      = 7
                OTHERS             = 8.
      IF SY-SUBRC NE 0.
        CASE SY-SUBRC.
          WHEN 7.
            RETCODE = SY-SUBRC.
            SYST-MSGID = 'VN'.
            SYST-MSGNO = '096'.
            SYST-MSGTY = 'E'.
            SYST-MSGV1 = NAST-KSCHL.
            SYST-MSGV2 = NAST-KAPPL.
            PERFORM PROTOCOL_UPDATE.
          WHEN OTHERS.
            RETCODE = SY-SUBRC.
            PERFORM PROTOCOL_UPDATE.
        ENDCASE.
      ENDIF.
      SET COUNTRY US_COUNTRY.
    Regards

  • Plz send me alv report

    could any body send me alv report functional, tech specs,
    plz send me if possible

    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    Check these links for sample reports.
    http://www.erpgenie.com/abap/code/abap28.htm
    ALV REPORTS
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919

  • Feedback form - specify who the sender is.

    Hello,
    I have a dreamweaver form that allows the user to fill in
    contact information and comments. When the form sends, it uses the
    "name" field as the sender info when I check it in my email
    account. It works properly on my email account through my domain
    name as well as a hotmail account. However, my client (who the form
    needs to be sent to) has an AOL account (don't ask me why!). When
    the form is sent to AOL it comes through as "unknown sender." I
    would like to specify who the sender is... even if it always says
    "Form @ domain.com" Is there a hidden field that I can enter in the
    HTML that specifies who the sender is? I can't seem to find
    anything that works.
    Your help is MUCH appreciated!
    Thank you!

    Are you saying that you are missing the FROM column in the Inbox view? If so there is a small icon at the far right end of the header that you click to select what columns to display.
    If you have dragged the FROM column to the left and hid it and now only see 3 dots where that column should be, hover your mouse up where the divider for the FROM and SUBJECT columns are and when you see a double headed arrow appears click and drag to the right to reveal the column.

  • ALV - is there a way to automatically send the ALV via e-mail

    Hi,
    I have a requirement to automatically send the ALV to an e-mail address.
    Is this possible to do by just using the ALV methods available ?
    Cheers
    Colin.

    Hi Colin,
    Check the weblog:
    /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    Check these link..
    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/789. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Have a look at below code:
    REPORT ZSENDEXTERNAL.
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
    DATA: DOC_CHNG LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Creation of the document to be sent
    File Name
    DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    Mail Subject
    DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
    Mail Contents
    OBJTXT = 'Minimum bid : $250000'.
    APPEND OBJTXT.
    OBJTXT = 'A representation of the pictures up for auction'.
    APPEND OBJTXT.
    OBJTXT = 'was included as attachment.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    Creation of the document attachment
    (Assume that the data in OBJBIN is in BMP format)
    *OBJBIN = ' O/ '. APPEND OBJBIN.
    *OBJBIN = ' | '. APPEND OBJBIN.
    *OBJBIN = ' /  '. APPEND OBJBIN.
    *DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    *OBJHEAD = 'PICTURE.BMP'.
    *APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
    *OBJPACK-TRANSF_BIN = 'X'.
    *OBJPACK-HEAD_START = 1.
    *OBJPACK-HEAD_NUM = 1.
    *OBJPACK-BODY_START = 1.
    *OBJPACK-BODY_NUM = TAB_LINES.
    *OBJPACK-DOC_TYPE = 'BMP'.
    *OBJPACK-OBJ_NAME = 'PICTURE'.
    *OBJPACK-OBJ_DESCR = 'Representation of object 138'.
    *OBJPACK-DOC_SIZE = TAB_LINES * 255.
    *APPEND OBJPACK.
    Completing the recipient list
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    *RECLIST-RECEIVER = 'SAPUSERNAME'.
    *RECLIST-REC_TYPE = 'P'.
    *APPEND RECLIST.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    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.
    CASE SY-SUBRC.
    WHEN 0.
    WRITE: / 'Result of the send process:'.
    LOOP AT RECLIST.
    WRITE: / RECLIST-RECEIVER(48), ':'.
    IF RECLIST-RETRN_CODE = 0.
    WRITE 'The document was sent'.
    ELSE.
    WRITE 'The document could not be sent'.
    ENDIF.
    ENDLOOP.
    WHEN 1.
    WRITE: / 'No authorization for sending to the specified number',
    'of recipients'.
    WHEN 2.
    WRITE: / 'Document could not be sent to any recipient'.
    WHEN 4.
    WRITE: / 'No send authorization'.
    WHEN OTHERS.
    WRITE: / 'Error occurred while sending'.
    ENDCASE.
    Reward points if this Helps.
    Manish

  • Sending an ALV List screen output to SPOOL

    Hi Guru's,
         I am working with a standard transaction FBWE. In this transaction we are displaying a remittance list
    using ALV LIST.  Now the requirement is I need to send this ALV List output to SPOOL.
                   1. Please tell me how to send an ALV List output to Spool.
                   2. This transaction is having only one user exit, as per my investigation I can not use
                       this user exit. Can anybody tell me the alternative way for this.
    Thanks,
    Ravi

    You can using the SUBMIT along with spool options
    Read the SUBMIT help.

  • How to send the PDF file to FAX will the nast table updates

    Hi all,
    How to send the PDF file to FAX. Will the nast table updates ( which fields updates ).
    Need is once fax is send for that delivery, again it should not fax again. Will the nast table helps to check the sent fax.
    Please give me sutable suggessions....

    Have you checked Forums » Community Discussions » Code Snippets 
    I believe there were some examples on converting/sending PDF.
    Or check FM 'SO_DOCUMENT_SEND_API1' and documentation for it.

  • I am getting the message that my email password and/or username is not correct. It is correct! I am the only one who cannot send or receive emails...I am the only one using a mac.

    I am getting the message that my email password and/or username is not correct. They are both correct! I am the only one who cannot send or receive emails...I am the only one using a mac. i use mac mail and it is my companies server. I took my computer and iPhone to the Apple store...4 hours later they said that couldn't figure out why it wasn't working.  Any suggestions???? I am also not able to log into the C-Panel...

    Same here! Happened yesterday to me on New iPad and iPhone 4S. On iPad I managed to correct it by removing the account and activating it again as an Exchange account...I have mail and calendar OK!
    On the iPhone nothing seems to  work!
    Facts:
    1. everything worked perfectly for years!
    2. I have the 2-step authentication deactivated  on my google account so it cannot be this one.
    3. On desktop everything works just fine, on iPad everything is OK with Exchange account added (after Google removed support for Exchange account access I CAN ONLY HAVE ONE DEVICE with Google Exchange account, so doing the same on the iPhone does not work!)
    4. Tried to remove and add the account again - no results.
    5. Tried to remove and add as Google, as Exchange, as Other account - I get calendar but no mail!!!
    6. Tried to reboot between remove/add accounts - no results.
    7. Tried to ("reset settings") reset the device - no results.
    8. Tried to add as POP account and I it worked - I get mail but I do not need POP as I am using zounds of mail with labels and need to be working on an IMAP account
    9. To make things even more complicated...I have another account which works perfectly!!!!!
    Anyone out there having a clue?

  • I cannot see who the sender is of emails

    while working on my email, I hit something and now have cannot view who the sender of the email is

    Are you saying that you are missing the FROM column in the Inbox view? If so there is a small icon at the far right end of the header that you click to select what columns to display.
    If you have dragged the FROM column to the left and hid it and now only see 3 dots where that column should be, hover your mouse up where the divider for the FROM and SUBJECT columns are and when you see a double headed arrow appears click and drag to the right to reveal the column.

  • We r use for one Apple ID use for 2 iPhone , so how I know other person ph call to who? Chat to who and send photo to who?

    We r use for one Apple ID use for 2 iPhone , so how I know other person ph call to who? Chat to who and send photo to who?

    n0 tHinG br0
    juS a cLoUd busTuP
    cHiLl
    x
    (or whatever)

Maybe you are looking for

  • One solution to iTunes 8.1 upgrade problems.

    Okay, so I got an error message earlier and a bunch of time seeing if I could fix it but I read something in another thread and I’ll be damned if it didn’t work. Earlier, I wrote: +I updated to iTunes 8.1 earlier today if only... if only I had seen t

  • ATV gen2...possible caching problem

    First off...I am using both aTV gen1 and aTV gen2 in my home off of an Airport Extreme (Dual-Band) with the aTV gen2 hooked up via Ethernet to the router. Now, Netflix and Youtube, and streaming music and TV shows from iTunes works flawlessly. And wh

  • PDF Output Settings for Word Email Merge?

    Hi all, I'm using Acrobat X's integration in Word to do an email merge of PDFs. There are images in my template that need their quality maintained. So far, I've been unable to find a setting that affects the "Merge to Adobe PDF" script. I've created

  • Strange device permanently logged into my account ...

    Hi, Question: Is there a temporary file on the server in my skype accout? I mean, an obsolete file that should have been deleted at the end of one of the skype sessions? And if yes, then is this file causing me problems calling certain overseas numbe

  • Different levels of a dimension

    I am having problems with measures based on different levels of a dimension. The situation is: I have a product dimension with 2 levels (category and detail) and a client dimension. I want a measure with the number of distinct clients wich buys each