Please tell me How to send   excel file content  to   MAILBOX

Hello ,
Can anybody tell me how to send  Excel  file  data to  Mailbox

Hi,
Check this sample code.
INITIALIZATION .
CLASS cl_abap_char_utilities DEFINITION LOAD.
gf_etb = cl_abap_char_utilities=>horizontal_tab. "For horrizontal tab
gf_cr = cl_abap_char_utilities=>cr_lf. "For enter
gf_lf = cl_abap_char_utilities=>newline. "For new line
Declaration
  DATA:    lwa_hd_change TYPE sood1,
           lt_objcont    TYPE STANDARD TABLE OF soli,
           lwa_objcont   TYPE soli,
           lt_receivers  TYPE STANDARD TABLE OF soos1,
           lwa_receivers TYPE soos1 ,
           lt_att_cont   TYPE STANDARD TABLE OF soli,
           lwa_att_cont  TYPE soli,
           lt_packing    TYPE STANDARD TABLE OF soxpl,
           lwa_packing   TYPE soxpl,
           lf_sent       TYPE sonv-flag,
           lf_size       TYPE i.
  CONSTANTS: lc_obj(11)  TYPE c VALUE 'BOMSouthco',
             lc_desc(20) TYPE c VALUE 'BOM Download',
             lc_lang(1)  TYPE c VALUE 'E',
             lc_raw(3)   TYPE c VALUE 'RAW',
             lc_net(1)   TYPE c VALUE 'U',
             lc_mail(4)  TYPE c VALUE 'MAIL',
             lc_xls(3)   TYPE c VALUE 'XLS',
             lc_ext(3)   TYPE c VALUE 'EXT'.
Passing values to the strutures used in SO_OBJECT_SEND function module
  lwa_hd_change-objla      = lc_lang.
  lwa_hd_change-objnam     = lc_obj.
  lwa_hd_change-objdes     = lc_desc.
  lwa_hd_change-objlen     = 255.
  lwa_objcont-line = text-t29.
  APPEND lwa_objcont TO lt_objcont.
  CLEAR lwa_objcont.
  lwa_receivers-recextnam  = text-t31.
  lwa_receivers-recesc     = lc_net.
  lwa_receivers-sndart     = lc_mail.
  lwa_receivers-sndex      = 'X'.
  lwa_receivers-sndpri     = 1.
  lwa_receivers-mailstatus = 'E'.
  APPEND lwa_receivers TO lt_receivers.
  CLEAR lwa_receivers.
  lwa_receivers-recextnam  = text-t30.
  lwa_receivers-recesc     = lc_net.
  lwa_receivers-sndart     = lc_mail.
  lwa_receivers-sndex      = 'X'.
  lwa_receivers-sndpri     = 1.
  lwa_receivers-mailstatus = 'E'.
  APPEND lwa_receivers TO lt_receivers.
  CLEAR lwa_receivers.
Passing values for the attachment file
  LOOP AT gt_output INTO gwa_output.
    CONCATENATE gf_lf  gwa_output-matnr  gf_etb  gwa_output-idnrk  gf_etb
                gwa_output-type   gf_etb  gwa_output-menge   gf_etb
                gwa_output-meins  gf_etb  gwa_output-comp    gf_etb
      INTO lwa_att_cont-line.
    APPEND lwa_att_cont TO lt_att_cont.
    CLEAR lwa_att_cont.
  ENDLOOP.
  CHECK lt_att_cont IS NOT INITIAL.
  DESCRIBE TABLE lt_att_cont LINES lf_size.
  lwa_packing-transf_bin = ' '.
  lwa_packing-head_start = 1.
  lwa_packing-head_num   = 0.
  lwa_packing-body_start = 1.
  lwa_packing-body_num   = lf_size.
  lwa_packing-file_ext   = lc_xls.
  lwa_packing-objlen     = lf_size * 255.
  lwa_packing-objtp      = lc_ext.
  lwa_packing-objdes     = lc_desc.
  lwa_packing-objnam     = lc_obj.
  APPEND lwa_packing TO lt_packing.
  CLEAR lwa_packing.
  CHECK gf_error IS NOT INITIAL. "Check if unix file is written
FM to send email to the intended recipients
  CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
      object_hd_change           = lwa_hd_change
      object_type                = lc_raw
    IMPORTING
      sent_to_all                = lf_sent
    TABLES
      objcont                    = lt_objcont
      receivers                  = lt_receivers
      packing_list               = lt_packing
      att_cont                   = lt_att_cont
    EXCEPTIONS
      active_user_not_exist      = 1
      communication_failure      = 2
      component_not_available    = 3
      folder_not_exist           = 4
      folder_no_authorization    = 5
      forwarder_not_exist        = 6
      note_not_exist             = 7
      object_not_exist           = 8
      object_not_sent            = 9
      object_no_authorization    = 10
      object_type_not_exist      = 11
      operation_no_authorization = 12
      owner_not_exist            = 13
      parameter_error            = 14
      substitute_not_active      = 15
      substitute_not_defined     = 16
      system_failure             = 17
      too_much_receivers         = 18
      user_not_exist             = 19
      originator_not_exist       = 20
      x_error                    = 21
      OTHERS                     = 22.
  IF sy-subrc = 0.
    MESSAGE s004 WITH text-t34.
  ENDIF.
  COMMIT WORK.
Reward if helpful.
Regards,
Ramya

Similar Messages

  • Hi Everyone, i lost my KN presentation that i spent a day with my boss to finish it. I lost it by mistakenly shutting down my Macbook pro. Can anyone please tell me how to recover the files back as i'm really2 in trouble and my job depends on it...

    Hi Everyone,
    I lost my KN presentation that i spent a day with my boss to finish it. I lost it by mistakenly shutting down my Macbook pro. Can anyone please tell me how to recover the files back as i'm really2 in trouble and my job depends on it...
    hmmm...how i hate myself for being such a careless person...
    PLEASE HELP ME...
    Thank you in advance.
    Keynotes '09
    Version 5.1.1 (1034)

    How exactly did you shut down your laptop? Not a hard restart (holding down the power button), I hope... if that's the case, then it is extremely unlikely the file is still intact on your computer. If it is, it would be an image on your RAM, and it is time-and-resource-intensive to recover it if it is even there. RAM memory is disposable and always being written over. Sorry dude...
    If it wasn't a hard restart, Keynote should have made a backup, unless you 'Force Close'd it.
    It really all depends on how your mac was shut down.

  • I have finally set up a group in my contacts. Can anyone please tell me how to send an email to the entire group? running Mavericks on iMac

    I have finally set up a group in my contacts. Can anyone please tell me how to send an email to the entire group? running Mavericks on iMac

    Drag the entire group into the To: field of a new message. The group is in your Address Book. You've used a name for it, like My Group. You can simply start typing "My Group" in that To: field and it should appear in a context menu.

  • Hello, I recently bought an iPad Air. Can anyone Please tell me How can in Transfer files like photos and videos from my win 8 computer to ipad ?

    Hello, I recently bought an iPad Air. Can anyone Please tell me How can in Transfer files like photos and videos from my win 8 computer to ipad ?

    Sync photos to iPad
    http://support.apple.com/kb/ht4236

  • How to send the file contents in the application server to ftp server

    Hi,
    how to send the file contents in the application server to ftp server.
    regards,
    sree

    Test SAP FTP functions
    DATA: BEGIN OF MTAB_DATA OCCURS 0,
    LINE(132) TYPE C,
    END OF MTAB_DATA.
    DATA: MC_PASSWORD(20) TYPE C,
    MI_KEY TYPE I VALUE 26101957,
    MI_PWD_LEN TYPE I,
    MI_HANDLE TYPE I.
    START-OF-SELECTION.
    MC_PASSWORD = 'password'.
    DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
    *-- FTP_CONNECT requires an encrypted password to work
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
         ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
         ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
         ID 'DSTLEN' FIELD MI_PWD_LEN.
    CALL FUNCTION 'FTP_CONNECT'
         EXPORTING
           USER            = 'userid'
           PASSWORD        = MC_PASSWORD
           HOST            = 'servername'
           RFC_DESTINATION = 'SAPFTP'
         IMPORTING
           HANDLE          = MI_HANDLE
         EXCEPTIONS
           NOT_CONNECTED   = 1
           OTHERS          = 2.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'FTP_COMMAND'
         EXPORTING
           HANDLE = MI_HANDLE
           COMMAND = 'dir'
         TABLES
           DATA = MTAB_DATA
         EXCEPTIONS
           TCPIP_ERROR = 1
           COMMAND_ERROR = 2
           DATA_ERROR = 3
           OTHERS = 4.
    IF SY-SUBRC = 0.
      LOOP AT MTAB_DATA.
        WRITE: / MTAB_DATA.
      ENDLOOP.
    ELSE.
    do some error checking.
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
         EXPORTING
           HANDLE = MI_HANDLE
         EXCEPTIONS
           OTHERS = 1.
    Execute external commands (FTP Scripts)
    The following code shows the syntax of the FM 'SXPG_COMMAND_EXECUTE'. You pass it the external command created within transaction SM69 and it will execute it.
    DATA: ld_comline 
    LIKE sxpgcolist-name,
            ld_param    LIKE sxpgcolist-parameters,
            ld_status   LIKE extcmdexex-status,
            ld_output   LIKE btcxpm OCCURS 0 WITH HEADER LINE,
            ld_subrc    LIKE sy-subrc.
      REFRESH ld_output.
      MOVE 'FTP_DATA_IN' to ld_comline.         "Maintained using trans SM69
    Execute external command, contained in 'ld_comline'
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
           EXPORTING
                commandname                   = ld_comline
              additional_parameters   = ld_param  "Params passed to script
              operatingsystem              
    = 'UNIX'
           IMPORTING
                status                        = ld_status
           TABLES
                exec_protocol                 = ld_output
           EXCEPTIONS
                no_permission
                     = 1
                command_not_found
                 = 2
                parameters_too_long          
    = 3
                security_risk                
    = 4
                wrong_check_call_interface    = 5
                program_start_error           = 6
                program_termination_error     = 7
                x_error                       = 8
                parameter_expected            = 9
                too_many_parameters           = 10
                illegal_command               = 11
                wrong_asynchronous_parameters = 12
                cant_enq_tbtco_entry
              = 13
                jobcount_generation_error
         = 14
                OTHERS                       
    = 15.
      IF sy-subrc NE 0.
      ENDIF.

  • How to send Excel File using file adapter

    Hello,
    Please could you tell how i can send an excel file using the file adpater?
    thank you.

    Hi hassiba ,
    If u want to doc on creating modules just check the wonderful document.
    How To Create Modules for the J2EE Adapter Engine at service.sap.com. It will clear all the basics of creating Adapter module.
    https://websmp102.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
    Thanks ,
    sekhar.

  • How to transfer excel files(on ftp server) into internal table?

    hello,everyone
    pls tell me how to transfer excel files those on a ftp server into internal table?
    ps.i know the function 'ftp_server_to_r3',it can help to transfer flat file.

    Hi,
    I believe you want to get the data from the FTP Server to R3.
    I am also sending the code. Have a look and it would help you.
    First get the Password and user name and the FTP Server Path where file is stored and FTP Server Host name
    FUNCTION zfi_ftp_get.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_FILENAME) TYPE  C
    *"  TABLES
    *"      T_BLOB STRUCTURE  ZFI_TLM_LENGTH OPTIONAL " is a table type with a field called line of length 992
    *"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
      DATA : i_password(30)     TYPE c,
             i_user(30)         TYPE c,
             i_host(30)         TYPE c,
             i_rfc_destination  TYPE rfcdes-rfcdest,
             i_length           TYPE i,
             i_folder_path(100) TYPE c.
      DATA:   lv_blob_length   TYPE i.
      DATA:   lv_length        TYPE i,  "Password length
              lv_key           TYPE i VALUE 26101957,
              lv_password(30)  TYPE c,
              lv_ftp_handle    TYPE i,
              lv_cmd(80)       TYPE c.
      DATA: BEGIN OF result OCCURS 0,
            line(100) TYPE c,
            END OF result.
      TYPES: BEGIN OF ty_dummy,
             line(392) TYPE c,
           END   OF ty_dummy.
      DATA: lt_dummy TYPE TABLE OF ty_dummy,
            ls_dummy LIKE LINE  OF lt_dummy.
      i_password        = 'vnhdh'.
      i_user            = 'sdkgd'.
      i_host            = 'sbnksbg'.
      i_rfc_destination = 'SAPFTP'.
      i_length          = '992'.
      i_folder_path     = '/hioj/hohjk/hh'.
      lv_length = STRLEN( i_password ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = i_password
          sourcelen   = lv_length
          key         = lv_key
        IMPORTING
          destination = lv_password.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = i_user
          password        = lv_password
          host            = i_host
          rfc_destination = i_rfc_destination
        IMPORTING
          handle          = lv_ftp_handle
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc = 1.
        return-type = 'E' .
        return-message = 'FTP Connection not Successful'.
        APPEND return.
      ELSEIF sy-subrc = 2.
        return-type = 'E' .
        return-message = 'FTP Connection not Successful'.
        APPEND return.
      ELSEIF sy-subrc EQ 0.
        return-type = 'S' .
        return-message = 'FTP Connection Successful'.
        APPEND return.
        CONCATENATE 'cd' i_folder_path INTO lv_cmd SEPARATED BY space.
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = lv_ftp_handle
            command       = lv_cmd
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        IF sy-subrc = 1.
          return-type = 'E' .
          return-message = 'Command Error Occured during open of FTP Folder'.
          APPEND return.
        ELSEIF sy-subrc = 2.
          return-type = 'E' .
          return-message = 'TCIP Error Occured during open of FTP Folder'.
          APPEND return.
        ELSE.
          REFRESH t_blob.
          lv_blob_length = 992.
          TRANSLATE i_filename TO LOWER CASE.
          CALL FUNCTION 'FTP_SERVER_TO_R3'
            EXPORTING
              handle      = lv_ftp_handle
              fname       = i_filename         
            IMPORTING
              blob_length = lv_blob_length
            TABLES
              blob        = lt_dummy.
          t_blob[] = lt_dummy[].
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Regards
    Sajid
    Edited by: shaik sajid on Nov 16, 2010 7:25 AM

  • How to send image file through mail without   any attachment

    Plz tell  me how to send image file through mail without any attachment  ( i mean not converting  that image into pdf or any format )  i want to send that text or image  through mail .

    Hi Sandeep,
    I think you can setup the type of email in Shared office Settings in transaction S016.
    There is an option called <Preset document classes>
    You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
    http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
    Haven't tried it though.
    Regards,
    Siddhesh

  • How to send a file to a web service

    I am developing a web service application which needs to accept a CAD model as input. Would any one tell me how to send a file from a client application to service provider.
    thanks in advance

    You can use mime encoding inside your SOAP request, something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <data>
      <file>
        <name>filename.zip</name>
        <content>FVberI0XlJincJEGmcbVyMOGpdWGl1bYB2r1y2vYicHqq0WYuergigzYB20GvMLZ
    Ag9YicHozwLSieOUieDLzgrLCZKncI9dCMvHDg9YicGPdqOVu3vIAMvJDcaOkq0kl0TLExDVCMrZ
    DwfSifnVzNr3yxjLkq0kl1rPDgXLicHdB252zxj0zwqGzNjVBsbmyxnLCKPLDcbqq0WPdqOVqxv0
    l1jVB3qGmIaWifiGl0LUzM8GmsaWifiGpJ4ncNn0yxj0EhjLzG0kndyYzxiGpdWGl1nPEMuGmJyG
    mdaWndiZmYaWmdaWmcbUdqOWmdaWmda0ndi1idaWmdaWig4ncNrYywLSnG0kjsvft0yncG==
    </content>
      </file>
    </data>
    </soap:Body>
    </soap:Envelope>This can even be accomplished from within Pl/Sql. Otherwise you can use the WS-Attachment feature which is (I think) not yet supported by Oracle.
    Regards,
    Michiel

  • How to send a file as an attachment using mailx

    Hi
    Can any one tel me how to send a file as an attachment using mailx command in shell script.
    Thanks,
    Suman.

    Wrong forum where to ask such questions.
    Check this one link:
    http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • C5-03 -how to send music files via bluetooth

    hi
    i've c5-03 mobile
    1.can any one tell me how to send music files via bluetooth
    2.there only mark all option ann no mark several option can any one tell me r there any software updates for this
    Solved!
    Go to Solution.

    PerLs wrote:
    Hi,
    You can do it with the file manager this is how i use to do it. You will find it in menu|applications|office folder
    There is also a possibility to long press on the track and send. Im not sure if C5-03 support this... But go to you music libery and find the track you want then long press on it and press send.the long press method works
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why do i need to do some settings for it ?

    Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why? do i need to do some pre defined  settings to run the cd's and dvd's ?

    A .exe file is a Windows executable. OS X does not run Windows programs. If you need to use .exe files then you will need to install Windows on your Mac:
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • I am not able to convert a pdf file to a xml format using adobe reader 11. please tell me how to do the same!!!

    I have to upload a form in xml format. The file is in pdf format. I am using adobe reader 11. Please tell me how to export to xml format. There is no option for xml.

    Please give us a link to the instructions you are trying to follow.

  • Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    That is a function of the recipient's e-mail software understanding what your software sent.  If it doesn't it will always show as an icon or attachment.   It is also a function of both your internet provider and their internet provider accepting messages of that size, and a function of their download attachment settings in their e-mail program.  There is no way to guarantee it will appear inline in the attachment.   The best you can do is attach with Windows Friendly format.  To do that, use the attach toolbar icon that looks like a paperclip, (View menu -> Customize toolbar if invisible) on Mac OS X Mail when composing the message.   A checkbox appears in the file dialog box's bottom to make it Windows friendly when you navigate to pick the PDF file.  That makes it as universally compatible as possible.  It still may not appear inline, but at least you are less likely to be incompatible.

Maybe you are looking for

  • How to get rid of the old songs from iPhone that do not show up in iTunes?

    Every time I delete my entire iTunes library and sync iPhone with it, my music is still loaded with old songs but do not appear on my iTunes. And when I add new songs to my library, the new songs get mixed with old songs. How to get rid of the old so

  • Signing a document, generates a "Timestamp signature property generation error:    Verification error."

    I am getting this error message when I sign my documents. Especially when I try and create a second or third signature on a document. I have just upgraded to Reader11.0.09 and then when I got the error, I went back to Reader 11.0.08 and then back to

  • No prompt on exit with active downloads

    I remember that I used to be prompted when closing FireFox with active downloads. Not all sites support auto-resume and I frequently find myself needing to restart many downloads. If I recall, there is a setting in about:config you can change so when

  • RSA1 not working

    Hi All, I am facing an issue in switching client in BI 7.0 System. The scenario is that we have a BW system which is built from another BW system by bachup restore method. Intially we had client 200 in which the connection to ECC and CRM system was d

  • Azure RMS

    Dear Sir, I got an experienced for the RMS with iPhone.  I have enrolled an account for RMS evaluation from aadrm portal.  I have registered two acounts for testing purpose.  First of all, I have download the apps from apple store and install it on m