FTP File need in BIN format not in TEXT to be send in email as attachment

Dear All,
<H3>Currrent Working Scenrio:- Program uploading from the desktop (zip file) in bin and attaching and sendng through mail. Its working fine. Below is the code to upload file from desktop</H3>
data: DATA_TAB TYPE STANDARD TABLE OF T_XLINE,
         name(80) type c value 'c:\abc\desktop\abc.zip'.
CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
      FILENAME   = NAME
      FILETYPE   = 'BIN'
    IMPORTING
      FILELENGTH = SIZE
    CHANGING
      DATA_TAB   = DATA_TAB.
<h3>Now Current Requirement is to upload file from ftp and send mail as an attachment.</h3>
Instead of using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
<h5>Now i am connecting to FTP and taking file from ftp server and downloading it in form of text. But i need file in BIN format to be send as an attachment with this mail. So i converted text file taken from ftp  to bin by using 'SCMS_TEXT_TO_BINARY'.</h5>
It is sending the folder name but not the files in the zip folder in ftp. Only 1kb file is sent.
Used to Take file from FTP to server
CALL FUNCTION 'FTP_SERVER_TO_R3'
  EXPORTING
    HANDLE               = W_HDL
    FNAME                = WRK_FILE
  CHARACTER_MODE       =
IMPORTING
  BLOB_LENGTH          =
TABLES
  BLOB                 =
    TEXT                 = IT_DOWNLOAD
EXCEPTIONS
   TCPIP_ERROR          = 1
   COMMAND_ERROR        = 2
   DATA_ERROR           = 3
   OTHERS               = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Used to convert text to bin
CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
EXPORTING
  FIRST_LINE            = 0
  LAST_LINE             = 0
  APPEND_TO_TABLE       = ' '
  MIMETYPE              = ' '
  ENCODING              =
IMPORTING
  OUTPUT_LENGTH         =
  TABLES
    TEXT_TAB              = it_download
    BINARY_TAB            = data_tab
EXCEPTIONS
  FAILED                = 1
  OTHERS                = 2
Edited by: Ravi Grover on Apr 7, 2011 12:04 PM

Hi!
Check sample programs:
RSFTP002
RSFTP003
There is a Function Module called: FTP_COMMAND. In this FM you should send the command "bin".
Hope it helps.
Esteban

Similar Messages

  • File './mysql-bin.index' not found on MySql startup on OSX 10.5

    I did a manual setup for the installation of MySql 5.5 on mac OSX 10.5 instead of using .dmg package installer. After following all the installation steps when I started the sql server with sudo mode I got the following error and the server did not start.
    /usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13) 110808 21:22:12 [ERROR] Aborting
    I cannot find ./mysql-bin.index file anywhere in my /usr/local/msql directory.
    Can anyone tell how to get around this problem? Would I be able to overcome this problem if I use dmg installer instead of manual installation?
    Thanks.

    Are you on OSX Desktop or Server? If you're on Server, what happens when you try to start the version of MySQL that was included with OSX server?
    If you're on Desktop, what happens if you install the .dmg package?
    I always like to try the packaged versions first unless there are required features that aren't in them.

  • Need to send external email with attachment for workflow 20000075

    Hello Everyone,
    I am new to W/F, I Need to send external email with attachment for PO Release W/F 20000075. Currently Work item is being sent to SAP inbox of required user based on PO Release strategy configuration in SPRO. I tried to create Send mail step after PO release event but I am not sure how to arrive at Recipient type in send mail step(the mail should be sent to person in the release strategy). Everything looks fine all I need to do is to send external email with attachment instead of sending work item into SAP inbox.
    Your help will be highly appreciated.
    Thanks.

    You can use extended notifications to send an e-mail message with a link to the workitem. Search for extended notifications in SDN.
    Regards,
    Martin

  • ColdFusion 11 on RHEL, All Files in cfusion/bin are NOT executable.

    Installed CF11 on RHEL and all the files in cfusion/bin are set to rw instead of rwx. I've tried both an upgrade install from CF9 and a fresh, clean install after removing CF9. No change. I've also tried both the prod an prod-secure profiles. How do I get around this? I see nothing related to this in documentation for the Linux installer.

    RESOLVED: The CF installer writes a shell script into /tmp and tries to execute at the end of the install. For us, due to server lockdown for PCI DSS, we set the noexec or umask on certain file systems, so the shell script never executed. Remounted /tmp with execute permission until the installation and setup was done. Also had to update the cf_home directory group and user owner as it was mixed between root and the provided runtime user.

  • How i can send an email with attachement of any type format file in form10g

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

  • How i can send an email with attachement of any type format file in form10

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

  • TS1506 My attachment symbol is not visible when I am sending an email. How do I get it back?

    Attachment option is not visible when sending an email through aol.com.

    When you are composing an email tap at the location you want to insert a photo or video. The option to insert comes up. Tap on that and select the photo or video you wish to insert.
    Alternately you can use the Photos app and select up to five photos to insert into an email. Tap select, select the photos and then tap the Share icon. Select Mail and an email will be created. You can then address the email, add a subject and type in content.
    To attach other things like a PDF, Word Doc, etc. you need to use the app that creates or edit seize items. Again select the item you want to email and tap on the Share icon in the appropriate app.

  • My attachments are not showing up when I send an email

    When I send an email with an attachment, people tell me there is not an attachment, but I can see if on my end.

    jenfromthornton wrote:
    It happens with all different types of attchments and I have tried to resend.  It usually only happens when I send am attachment from my work email address to another employee.  Do you think that means its our work server removing the attachment?
    I think that's a good possibility. Has it ever happened between home email addresses? To troubleshoot this, you need to keep track of one attachment, who it was sent to, and where, then try that same attachment from/to another location.

  • I need to reset my security questions but when I send an email to the rescue email it doesn't get to me its the wrong email. help?

    iTunes wont let me download any music and I have over $20 on my account. It says I need to answer my security questions but I don't know the answers. When I try to send an email to the rescue email, it doesn't work. It says the email starts with an "h" but none of my emails start with an "h". I also don't know how to edit the email. Someone please help!

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (111154)

  • Opening bank data files in a PDF format not working, the file defaults to Quicktime and only displays one page.

    Opening bank data files, while logged into the bank or brokerage sites, by clicking on the PDF or file name icon, is supposed to open in PDF format but instead opens only a single page in Quicktime. This also happened several years ago in Leopard and required the removal of Quicktimeplugin.plugin. I have tried doing that in Lion with no success. Any thoughts?

    Gerry Brown wrote:
    "from that page" does not make sense.
    The file exists in a folder on your machine, correct?
    If not, you need to download the file from your bank. Or use "Save as" in the browser.
    No the file is on the Webpage he is visiting.
    @ OP Right click on it and select Save File As. then save it to your HDD. Then open it.

  • How do I download RAW pictures from a Panasonic TZ60 into Elements, keeps telling me file damaged or in format not recognised.

    I have just purchased a Panasonic TZ60 which is producing some good quality pictures. The camera can be set to save picture in jpeg, RAW and jpeg and RAW but I have been unable to download any RAW pictures into either iPhoto or Elements. Both programmes see the file but won't download and comes up with message saying file damaged or not recognised.
    I have tried just transferring RAW picture file to my desktop and then into Elements, still no joy.

    Thanks John
    Missed updating so went in search and found update path and that has resolved and can now pull in RAW, just need to crack iPhoto now and will be happy again.
    Thanks for help
    Garry

  • Need help saving image to SQL as BLOB, then sending as email attachment

    Hi folks,
    These forums have gotten me most of the way through this particular project, but I'm finally stumped...
    First, I'll describe exactly what I'm trying to do: the user chooses an image file client side and the server-side code then converts it to binary data and saves it to SQL. Then as a separate step, an email will be sent out with that image file loaded from the DB as an attachment.
    So I've actually got most of this working. I'm using the O'Reilly MultipartParser class to pull the file input stream from the Request and insert it into SQL BLOB column ("image" datatype). I can successfully send Text attachments by simply converting the binary data back to a string and then using a subclass of DataSource (ByteArrayDataSource) to feed it to the mail object.
    After getting the text documents to work, I then moved on to trying to send images.
    I tried to send images using essentially the same technique as sending text. The image file gets saved to SQL the same way and I then convert the binary data back to a string an attach it. The only difference is that I set the content-type to "image/gif".
    I didn't really expect this to work, however, I am able to "Preview" very simple Gifs (in XP) that I've attached. I cannot "Open" them, though, and I cannot even "Preview" more complicated Gifs.
    So on to my real questions. I didn't really expect that you could simply output binary image data into Text format and simply slap on a ".gif" and expect it to work. Am I right about that? XP's "preview" option seems to read it okay, but I really need to be able to "open" these files.
    So basically I need to know what to DO with that binary data in SQL in order to successfully attach it as a true image file. Is this an encoding issue? MIME type?
    I didn't want to paste all the code but I'll paste the snippet that deals with the attachment section. If you'd like to see any other parts, please just let me know...
    MyBlobObject v_blob = new MyBlobObject(m_cp);  // the getBlobStr() method of this object simply grabs the data from SQL as a String
    DataSource source = new ByteArrayDataSource(v_blob.getBlobStr(),"application/octet-stream");
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setHeader("content-type","image/gif");
    messageBodyPart.setFileName(v_fileName);
    ...Another interesting thing I'm seeing is that when I view the small Gif as text, I see this:
    GIF89a � !� , D ;
    While the file I'm getting from SQL as an attachment looks like this:
    GIF89a ? !? , D ;
    Obviously, the question marks are unknown, but I'm not quite sure why. I outputted the char values as integers and found that the first question mark is 65408 and the second one's value is 65529. Obviously something is getting changed somewhere in the process, but I'm not quite sure how and where.
    anyway, thanks in advance for any advice!

    Nevermind! Of course, I figured it all out after writing that long post.
    I had tried using a byte array instead of the String in the ByteArrayDataSource and it hadn't worked. However once I cleaned up the code a bit I got it working.
    This links has it all...
    http://www.magelang.com/faq/view.jsp?EID=498439
    thanks anyway!

  • I have tried to use File - Export to reduce the size of my pics to send via email and all I get is a blank pic.  How do I reduce the size of the photo and still have the photo?

    I have tried to use File > Export to a folder on my Desk top to reduce the size of my photos and all I get is a blank, grey screen.  How do I reduce the size of my pics so I can email them?

    Where are you getting this screen?  In iPhoto after selecting the File ➙ Export menu option? If that's the case try this:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your Home/() Library/Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your Home()/Library/Caches/com.apple.iPhoto folder. 
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences..
    You can resize photos outside of iPhoto with 3rd party applications like Resize!.
    Click to view full size
    With it you can change both the pixel size and file size of the photo to the size that suits your needs.  For other such apps go to MacUpDate.com and search for "image resize" to get a list of potential candidates.
    OT

  • On my iMac, iMessage is only displaying the text of the person responding to me and not the text I am sending them. I do not have this issue with my iPad or iPhone, how do I fix this? It did work fine last week.

    I have read through some of the message boards and still can't seem to find this issue anywhere. Please help.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • IF WE NEED HELP WITH THE SCRIPTING WHERE WE HAVE TO SEND AN EMAIL OR POST THE QUESTION?ONLY HERE?

    For UCCX 9.X Version
    Regards
    chrysostomos

    YES, ACTUALLY, THIS IS A GOOD PLACE TO POST QUESTIONS ABOUT UCCX SCRIPTING BUT PLEASE STOP SHOUTING UNLESS YOU REALLY, REALLY MEAN IT.
    G.

Maybe you are looking for

  • Cinema Tools Memory Error

    Hello Final Cut Gurus! Okay, so I am using Cinema Tools 3 to reverse telecine a bunch of clips. I am encountering a random error. "There is not enough memory to perform this operation." This error is coming up after the reverse has been running for a

  • Valuation Price issue in PR Approval form

    Hi, We have a PR with multiple line items and different valuation price. But in the PR approval form, the valuation price is showing  only  the line item 1's valuation price, not total valuation price of the all items. Can any one help me how to show

  • Lightbox effect not resizing

    I'm having difficulty getting a pair of Vimeo videos embedded within a Lightbox composition to resize and reposition themselves to the center and within the screen when uploaded to my website. The site in question is http://NYCJazz.com. Click once to

  • How to chnage th user status in QM?

    Hi, I have created a user status profile in QM with 2 statuses ( INIT - initial and RCHA-results changed). Now, I have to record the results, and whenever I do so, and save the results successfully ( using a digital signature) the user status should

  • Charset decoding problem. UTF-8

    Hi, I'm using Jakarta Commons HttpClient and am having trouble reading the response to a GetMethod. // execute method byte[] bytes = method.getResponseBody(); String response = new String(bytes, "UTF-8"); // method.getResponseCharSet() returns "utf-8