Sending zip file(or folder ) from desktop to email attachment

Dear all
I hvae 11 files on my desktop of differnt file type like doc, pdf, xls ...
By using GUI_UPLOAD, i am able to upload one file at a time
Is there any way to upload zip file at once OR folder containing all the files at a single go  OR all the files can be uploaded in a single program.
Is there any class, function module to upload zip file. I am aware of cl_abap_zip but not able to use it.
Ravi
Edited by: ravihsr on Mar 24, 2011 3:05 AM
Edited by: ravihsr on Mar 24, 2011 3:14 AM

Hi
This the code:
REPORT  Z263_EMAIL.
data: T_MAIL_PACK TYPE TABLE OF SOPCKLSTI1,
      T_MAIL_HEAD TYPE TABLE OF SOLISTI1,
      T_MAIL_REC TYPE TABLE OF SOMLRECI1,
      MAIL_HEAD TYPE SODOCCHGI1,
      T_MAILTXT TYPE TABLE OF SOLISTI1,
      WA_MAIL_PACK TYPE SOPCKLSTI1,
      WA_MAIL_HEAD TYPE SOLISTI1,
      WA_MAIL_REC TYPE  SOMLRECI1,
      WA_MAILTXT TYPE SOLISTI1,
      TAB_LINES TYPE I.
*FILLING HEADER
MAIL_HEAD-OBJ_NAME  = 'NEW MAIL TO BE SENT'.
MAIL_HEAD-OBJ_DESCR = 'SUBJECT FOR MAIL'.
WA_MAILTXT-LINE = 'MAIL OUTPUT'.
APPEND WA_MAILTXT TO T_MAILTXT.
WA_MAIL_REC-RECEIVER = '******@****.COM'. "email-id
WA_MAIL_REC-REC_TYPE = 'U'.
APPEND WA_MAIL_REC TO T_MAIL_REC.
DESCRIBE TABLE T_MAILTXT LINES TAB_LINES.
CLEAR WA_MAIL_PACK-TRANSF_BIN.
WA_MAIL_PACK-HEAD_START = 1.
WA_MAIL_PACK-HEAD_NUM = 0.
WA_MAIL_PACK-BODY_START = 1.
WA_MAIL_PACK-BODY_NUM = TAB_LINES.
WA_MAIL_PACK-DOC_TYPE = 'RAW'.
WA_MAIL_PACK-OBJ_NAME = 'C:\Documents and Settings\rmalhotra\Desktop\NEW.RAR'.
APPEND WA_MAIL_PACK TO T_MAIL_PACK.
WA_MAIL_PACK-TRANSF_BIN = 'X'.
WA_MAIL_PACK-HEAD_START = 1.
WA_MAIL_PACK-HEAD_NUM = 1.
WA_MAIL_PACK-BODY_START = 1.
WA_MAIL_PACK-BODY_NUM = TAB_LINES.
WA_MAIL_PACK-DOC_TYPE = 'XLS'.
WA_MAIL_PACK-OBJ_NAME = 'C:\Documents and Settings\rmalhotra\Desktop\a1.xls'.
WA_MAIL_PACK-OBJ_DESCR = 'ORDERS'.
*WA_MAIL_PACK-DOC_SIZE = TAB_LINES * 128.
APPEND WA_MAIL_PACK TO T_MAIL_PACK.
DESCRIBE TABLE gv_objbin LINES tab_lines.
WA_MAIL_PACK-transf_bin = 'X'.
WA_MAIL_PACK-head_start = 1.
WA_MAIL_PACK-head_num = 1.
WA_MAIL_PACK-body_start = 1.
WA_MAIL_PACK-body_num = tab_lines.
WA_MAIL_PACK-doc_type = 'PDF'.
WA_MAIL_PACK-obj_name = 'C:\Documents and Settings\rmalhotra\Desktop\RAGHAV_SMARTFORM.pdf'.
*WA_MAIL_PACK-doc_size = tab_lines * 255.
APPEND WA_MAIL_PACK TO T_MAIL_PACK.
WA_MAIL_PACK-transf_bin = 'X'.
WA_MAIL_PACK-head_start = 1.
WA_MAIL_PACK-head_num = 1.
WA_MAIL_PACK-body_start = 1.
WA_MAIL_PACK-body_num = tab_lines.
WA_MAIL_PACK-doc_type = 'TXT'.
WA_MAIL_PACK-obj_name = 'C:\Documents and Settings\rmalhotra\Desktop\VOTES.TXT'.
*WA_MAIL_PACK-doc_size = tab_lines * 255.
APPEND WA_MAIL_PACK TO T_MAIL_PACK.
WA_MAIL_PACK-transf_bin = 'X'.
WA_MAIL_PACK-head_start = 1.
WA_MAIL_PACK-head_num = 1.
WA_MAIL_PACK-body_start = 1.
WA_MAIL_PACK-body_num = tab_lines.
WA_MAIL_PACK-doc_type = 'DOC'.
WA_MAIL_PACK-obj_name = 'C:\Documents and Settings\rmalhotra\Desktop\TS-MRO-47- Warranty Claim Creation v1.0.doc'.
*WA_MAIL_PACK-doc_size = tab_lines * 255.
APPEND WA_MAIL_PACK TO T_MAIL_PACK.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
  EXPORTING
    DOCUMENT_DATA                    = MAIL_HEAD
  PUT_IN_OUTBOX                    = ' '
   COMMIT_WORK                      = 'X'
IMPORTING
  SENT_TO_ALL                      =
  NEW_OBJECT_ID                    =
  TABLES
    PACKING_LIST                     = T_MAIL_PACK
  OBJECT_HEADER                    =
  CONTENTS_BIN                     =
   CONTENTS_TXT                     = T_MAILTXT
  CONTENTS_HEX                     =
  OBJECT_PARA                      =
  OBJECT_PARB                      =
    RECEIVERS                        = T_MAIL_REC
EXCEPTIONS
   TOO_MANY_RECEIVERS               = 1
   DOCUMENT_NOT_SENT                = 2
   DOCUMENT_TYPE_NOT_EXIST          = 3
   OPERATION_NO_AUTHORIZATION       = 4
   PARAMETER_ERROR                  = 5
   X_ERROR                          = 6
   ENQUEUE_ERROR                    = 7
   OTHERS                           = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT RSCONN01.
Regards
Raghav Malhotra

Similar Messages

  • New user...how do you drag or move or copy a file or folder from the desktop to an external drive?  I have tried dragging and copy/pasting.

    new user...how do you drag or move or copy a file or folder from the desktop to an external drive?  I have tried dragging and copy/pasting.

    My guess the problem you are running into is the drive is formatted for a PC as NTFS. OS X can read files from NTFS however it cannot write to it. Check the formatting on the drive, if it's NTFS then it should be reformatted to Mac OS Extended (Journaled), you can use Disk Utility to do this.
    If you still have a PC and want to share the EHD with the PC and Mac please read MacWorld's Share an external drive between a Mac and a PC article.

  • How do you delete [empty] a single file or folder from "Trash"?

    How do you delete [empty] a single file or folder from "Trash"?
    Can you "securely delete" just 1 item?

    A dangerous and incorrect shell command has been posted in this thread.
    NEVER empty the Trash in the shell (Terminal.) NEVER put anything in the Trash unless you intend to delete it immediately. If you do put something in the Trash and change your mind about deleting it, move it out or use the Put Back contextual menu item. Then empty the remaining items in the Trash as usual.

  • How do I set up my phone to send a file to print from my iphone 5 to my Samsung CLX-4195FW printer?

    How do I set up my phone to send a file to print from my iphone 5 to my Samsung CLX-4195FW printer?

    Read the printer manual.

  • How to send zip file as attachment through email

    Hi All,
    I am having a requirement that I need to download the internal table data into .txt file and I need to zip the text file. And this zip files needs to send to the customer through email.
    I am able download the data into .txt and able to zip the file. But I am not able send the .zip file through email.
    I know that we can send .xls, .txt, .csv and also .ppt, .doc file types we can send as an attachement through abap program. But I don't know about .zip files. Is there any possibilty to send .zip file as an attachment thorugh email.
    Can any one help me how to send a .zip file thorugh email as an attachment. 
    Regards,
    vinod

    hi Vinod,
    Can you please tell me how you have zipped the file.
    I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
    I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
    What I need on the whole is just to reduce the size of the file.
    form ZIP_FILE .
    DATA: lt_data TYPE TABLE OF x255,
          lt_textdata TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
    DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
    *DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
    DATA: lv_file_length TYPE i.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    CREATE OBJECT lo_zip.
    Read the data as a string
    clear lv_content .
    OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
    READ DATASET lv_dsn1 INTO lv_content .
    CLOSE DATASET lv_dsn1.
    lo_zip->add( name = 'sample.TXT' content = lv_content ).
    lv_content = lo_zip->save( ).
    *clear lv_content .
    Conver the xstring content to binary
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = lv_content
    IMPORTING
    output_length = lv_file_length
    TABLES
    binary_tab = lt_data.
    OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT lt_textdata INTO ls_data.
    TRANSFER ls_data TO lv_dsn3.
    ENDLOOP.
    CLOSE DATASET lv_dsn3.
    IF sy-subrc EQ '0'.
        MESSAGE s999(zfi_ap_gl) WITH text-t10.
      ENDIF.
    Can you please help.
    Thanks Aravind

  • Never showing my file and folder in desktop also..

    never showing my file and folder in desktop and hardisk also....how to fix that....

    See http://download.oracle.com/javase/tutorial/uiswing/components/list.html especially the part about the wrap modes and the list renderers.
    For icons look at http://download.oracle.com/javase/6/docs/api/javax/swing/filechooser/FileSystemView.html#getSystemIcon(java.io.File) though I don't think it supports different sizes so you'll have to scale yourself.

  • Move file or folder from al11 to FTP using an FM

    Hi Experts,
                Is it possible to move a  file or folder from al11 to an ftp server using background processing?  If so, what function modules or sample codes can you suggest?  Please help.  Thanks so much.
    Anna
    Edited by: Anna Bechayda on Apr 28, 2008 5:10 AM

    Hello Anna
    Basically your report executed as batch job needs to exectue an external OS command (i.e. a FTP put or mput command).
    The details for executing the FTP command depend on your OS. For a customer whose SAP system was running on a Windows server the batch job created a small FTP script which was then executed by the external OS command (FTP command of Windows server) using fm SXPG_COMMAND_EXECUTE.
    Regards
      Uwe

  • I can't open a jpg file directly from an Outlook email attachment into Photoshop CC.

    When I try to open a jpg file directly from an Outlook email attachment into Photoshop CC I get this error message " Photyoshop CC.exe - Entry Point not found" with this string:

    I don't think I have ever been able to open an image directly from Outlook into Photoshop.  What you can do, is drag from outlook to desktop, and then from desktop into Photoshop.  Or, if seeing the windows at the same time is a problem, drag onto desktop, then minimise everything, and drag onto the Photoshop icon (if you have a Photoshop shortcut on your desktop).

  • How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC

    How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC

    i have some voice samples in Music file .how to share those files? or plz tel me where to store the voice samples

  • How to properly get folders, files into Dreamweaver Defined Site Folder from desktop

    I, obviously am a new Dreamweaver user, and I need to know
    the proper way of going about getting a folder, files, ect. from my
    hard drive into my Dreamweaver defined site folder. I understand
    how to insert an image from my hard drive into DW and it shows up
    in my site folder in the Files Panel. More specifically, using
    Lightbox2, after downloading Lightbox and placing those elements in
    a new folder on my hard drive, what is the proper way to get that
    folder into my site folder?
    Also, how can I properly add images to an images folder in my
    site folder in DW for possible later use, without inserting them on
    the page. I know by inserting them on the page from a folder on my
    hard drive, Dreamweaver prompts me for DW to recognize them. I
    would like to know how I can get them in there and DW to recognize
    them without actually inserting them on my page.
    And can and how can I move files, images, pages from one site
    to another? or should I? Thanks, if anyone can help me with these
    file moving questions.

    To restate courtney's explanation, *anything* that you paste
    into the site's
    local root folder will appear in DW's File panel, and will be
    considered by
    DW to be a part of the site.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "courtney (n h c)" <[email protected]>
    wrote in message
    news:[email protected]...
    > assuming you're on Windows, if you want to move files
    from one place on
    > your hard drive into your site folder, just use Windows
    Explorer.
    >
    > but keep in mind that this would not be the ideal way to
    move files within
    > the site folder from one place another. for example, say
    you have a page
    > and you want to move it into a folder, you should do
    that in Dreamweaver
    > because it will update the links for you in any files
    that link to the
    > page you're moving.
    >
    > Rock Artist wrote:
    >> I, obviously am a new Dreamweaver user, and I need
    to know the proper way
    >> of going about getting a folder, files, ect. from my
    hard drive into my
    >> Dreamweaver defined site folder. I understand how to
    insert an image from
    >> my hard drive into DW and it shows up in my site
    folder in the Files
    >> Panel. More specifically, using Lightbox2, after
    downloading Lightbox and
    >> placing those elements in a new folder on my hard
    drive, what is the
    >> proper way to get that folder into my site folder?
    Also, how can I
    >> properly add images to an images folder in my site
    folder in DW for
    >> possible later use, without inserting them on the
    page. I know by
    >> inserting them on the page from a folder on my hard
    drive, Dreamweaver
    >> prompts me for DW to recognize them. I would like to
    know how I can get
    >> them in there and DW to recognize them without
    actually inserting them on
    >> my page.
    >>
    >> And can and how can I move files, images, pages from
    one site to
    >> another? or should I? Thanks, if anyone can help me
    with these file
    >> moving questions.
    >>

  • Files in folder on desktop are invisible

    Every time I move a folder from one macbook to another macbooks desktop the files in the folder becomes invisible! I have a wireless network via airport extreme. I connect to server ›my other macbook‹ and drop the folder on my other macbooks desktop. If I ›browse‹ over to my other macbook I can see the folder fine with all its content, but when I am physically on my other macbook the folder is empty! Opening that folder in application ›whatsize‹ I see the files. So what is going on here?
    A bit of trial and error shows that it is only happening when I place the folder on my other macbooks desktop. If I place the folder in another location on my other macbook everything is working just fine. Sometimes ›one out of five maybe‹ when moving a folder of files from one macbook to my other macbook a few files will be visible while the others remain invisible to the Finder.
    I have gone around the problem by zipping the folder first and then unzipping it on my other macbooks desktop, this way all files are visible in the folder on my other macbook.
    Not an end of the world problem but I would like to learn how to fix this problem.
    Thanks,
    Fridge

    There has been a problem with Finder properly updating the contents of folders, especially those on the Desktop, pretty much forever in Tiger. The first time I saw it was when Tiger was new and people would unzip a folder on the Desktop, open the folder and see....nothing. The files were actually all there and could be viewed perfectly well from Terminal, for instance, but Finder didn't show them. As I recall, people took to creating a new folder or dragging an existing file inside the "blank" folder and the contents would magically appear. Sometimes you can force the Finder to update by relaunching it. Or, as you discovered, don't send things to the Desktop.
    Francine
    Francine
    Schwieder

  • I have imported a Zip file, mp3 music to desktop. How do I move it into iTunes?? I have tried drag/drop, import to library, both without success. Can anyone help, please.

    I have imported a Zip files, mp3 music to my Desktop. How do I move it into iTunes. I have tried d/drop and also Import to Library without success. Can anyone help, please?

    Many thanks to Limnos and King Penguin.
    I have discovered! I needed software to Unzip and was directed to Stuffit from the App Store. Suddenly it is simple.
    Download Zip File to Desktop.
    rt>  Zip        >Open with.....     >Stuffit     Progress Bar: 'Expanding' follows. Then a blue folder (manilla) returns to Desktop.
    Open iTunes     >File     >Import to Library      From drop down select  the now expanded contents of Zip file, then     >OPEN    
    iTunes takes over and imports -  Job's Done!! 
    Thanks again

  • Running CS5 with Mavericks 10.9.2, if I open a raw file into bridge from desktop any changes I make and click done ( i.e convert to b

    CS5 issues with Mavericks 10.9.2

    Thanks for getting in touch, part of my message was cut off! My problem is when I open up a raw file from desktop into bridge edit the raw image click done sending it back to the desktop as a raw file those changes do not appear on the desktop image. I've tried making an obvious change to an image making it b&w but again that does'nt appear on the desktop image, as mentioned I'm running CS5 with Mavericks 10.9.2.
    Any advice would be greatly appreciated.
    Phil.

  • How to export data to .csv and send that file to folder using sql commands?

    Really hoping someone can provide some code sample or point me in the right direction (with examples using sql).
    I am using oracle 11g with plsql developer. My requirement is that the data retrieval should be automatic. That means when query a data in oracle table , the data should be convert into .csv file and then it should send that to some specific folder.
    Example: Assume that student_sub1 table have all students subject1 data.when i write a query like select * from student_sub1 where student=1, the student1 data should convert into .csv file and then the .csv file should go to student1 folder.
    Hence I am requesting you to suggest me how write a sql code to convert the data into .csv file and to create a folder to send that file using oracle.
    Your inputs helps me alot.
    Thanks in advance!!!!
    Waiting for your replies.... Cheers

    981145 wrote:
    Really hoping someone can provide some code sample or point me in the right direction (with examples using sql).
    I am using oracle 11g with plsql developer. My requirement is that the data retrieval should be automatic. That means when query a data in oracle table , the data should be convert into .csv file and then it should send that to some specific folder.
    Example: Assume that student_sub1 table have all students subject1 data.when i write a query like select * from student_sub1 where student=1, the student1 data should convert into .csv file and then the .csv file should go to student1 folder.
    Hence I am requesting you to suggest me how write a sql code to convert the data into .csv file and to create a folder to send that file using oracle.
    Your inputs helps me alot.
    Thanks in advance!!!!
    Waiting for your replies.... CheersSET COLSEP ,
    spool student1.csv
    select * from student_sub1 where student=1;
    spool off
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ
    Handle:     981145
    Status Level:     Newbie
    Registered:     Jan 10, 2013
    Total Posts:     25
    Total Questions:     10 (8 unresolved)
    I extend my condolences to you since you rarely get answers to your questions here.

  • How to send Zip files as attachments !! Very urgent, Please help!

    I am sending PDF files as attachments using java mail (it works fine). But now my requirement is to zip the PDFs and send them as attachments instead of actual PDF's. But i don't know how to achieve that. does java mail API support zip attachment facilities? I have looked in activation API also, but i couldn't find anything helpful. even i searched the forums, but no clue. Please, anybody help me about this, it's very urgent.
    thanks
    sri

    Check the first "if". If I specify an attachment, then a myme multipart doby is created: one for text and the other for the attachemnt I use this myme ovbject only for attachemnts, because some ISPs have problems and report error in email format if the attachemnet is missing and it contains only text and no attachment.
    static public void send(String to,
         String from,
         String host,
         String smtpPort,
         String subject,
         String body,
         String fileAttachment,
         String attachmentMimeType,
         String username,
         String password,
         String debug)
    throws Exception
         // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         props.put("mail.smtp.port", smtpPort);
         props.put("mail.smtp.timeout","5000");
         props.put("mail.debug", debug);
         Session session = null;
         if (username != null && password != null)
              props.put("mail.smtp.auth", "true");
              MyPasswordAuthenticator auth = new MyPasswordAuthenticator(username, password);
              session = Session.getDefaultInstance(props,auth);
         else
              session = Session.getDefaultInstance(props, null);
         //session.setDebug(true);
         // create a message
         MimeMessage message = new MimeMessage(session);
         message.setFrom(new InternetAddress(from));
         InternetAddress[] address = InternetAddress.parse(to, false);
         message.setRecipients(Message.RecipientType.TO, address);
         message.setSubject(subject);
         message.setSentDate(new Date());
         // create the message part
         if ( fileAttachment != null && fileAttachment != "NO" )
              MimeBodyPart messageBodyPart = new MimeBodyPart();
              //fill message
              messageBodyPart.setText(body);
              //Multipart multipart = new MimeMultipart();
              Multipart multipart = new MimeMultipart("alternative");
              multipart.addBodyPart(messageBodyPart);
              // Part two is attachment
              System.out.println("----->fileAttachment DISTINTO de NULL");
              messageBodyPart = new MimeBodyPart();
              FileDataSource fds = new FileDataSource(fileAttachment);
              messageBodyPart.setDataHandler( new DataHandler(fds));
              messageBodyPart.setFileName(fileAttachment); //<-- El archivo atachado.
              multipart.addBodyPart(messageBodyPart);
              //EN DESARROLLO el envio de attachment!!          
              // Put parts in message
              message.setContent(multipart);
         } else { //Envio es solamente TEXTO
              message.setText(body);
         // send the message
         Transport.send(message);
    Regards,
    Vladimir

Maybe you are looking for

  • How can I get Made In Chelsea from itunes when it is not available on my countries store?

    I want to buy and download the Made in Chelsea seasons. But on Itunes Australia, where I am, its not available. It is however available on the British Itunes but of course its in pounds. It there any way to get Made in Chelsea off Itunes? Or will I h

  • The Attempt to burn disc failed.  The burn failed because of a medium write error.

    When trying to burn a CD, I'm getting an error that reads:The Attempt to burn disc failed.  The burn failed because of a medium write error.  I experienced this message before and took my Macbook in to the store and the the genius was stumped but whe

  • How to find out insertion time of records in an oracle table

    Hi everybody, I have a table with about 50,000 records in my Oracle database and there is a date column which shows the date that each record get inserted to the table, for example 04-Aug-13. Is there any way that I can find out what time each record

  • Demoting 2003 domain controllers

    Hi Guys, We have been running in a mixed mode domain for a while now (2003 and 2008r2) and I have been given the go-ahead to demote the 2003 DC's. Now before I demote them I want to be sure that these servers are being used for anything, i.e ldap ser

  • Wi-Fi Music Sync/Firewall Issue

    I have been struggling with the Wifi Music Sync on my new Blackberry Torch for almost two weeks.  After I uninstalled my third-party firewall (CA Security Suite) and doing a fresh install of BlackBerry Desktop and re-installing Wifi Music Sync on the