Problem in opening an image file sent as attachment in mail

Hi Friends,
I have a requirement of sending a image file (.jpg) through email attachment.
I am getting the attachment using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
But i am unable to open the file in the attachment. It is givin a message 'CAN'T DETERMINE TYPE'.
Can you please provide me a solution .
Regards,
pooja

Read the JPG file as Binary (TYPE BIN) in your read? and write it to the OBJBIN table?
done in the OPEN
  REFRESH w_objbin.
  OPEN DATASET attach FOR INPUT IN BINARY MODE MESSAGE t_mesg.
  IF sy-subrc NE 0.
    WRITE:/ 'Attachment Dataset Open RC ',sy-subrc.
    WRITE:/ 'Message ',t_mesg.
    EXIT.
  ENDIF.
  DO.
    READ DATASET attach INTO wk_rec.
    IF sy-subrc NE 0.
      IF sy-subrc NE 4.
        WRITE:/ 'Attach Dataset Read RC ',sy-subrc.
        WRITE:/ 'Message ',t_mesg.
      ENDIF.
      EXIT.
    ENDIF.
    w_objbin-line = wk_rec.
    APPEND w_objbin.
  ENDDO.
  DESCRIBE TABLE w_objbin LINES w_tab_lines.
  LOOP AT w_objbin INTO wk_rec.
    APPEND wk_rec TO i_objbin.
  ENDLOOP.
Edited by: Paul Chapman on Jun 5, 2008 10:46 AM

Similar Messages

  • I'm using OS 10.6.8 and Mail 4.5. When I receive mails with attachments which are visible the save button doesn't work. Some contacts have problems opening files sent by me using Mail too. This was never a problem on pre-Intel. A real Mac **** up !

    I'm using OS 10.6.8 and Mail 4.5. When I receive mails with attachments which are visible the save button doesn't work. And some contacts occasionally have problems opening files sent by me using Mail too. This was never a problem on pre-Intel Mac. A real Mac **** up ! Any ideas ?

    Can you drag and drop the attachments visible in the email to the Desktop OK or does that fail ?
    Re the sending: Are these recipients on Mac's or PC's as the file type could be an issue, if on Mac's then try setting the Mail Preferences Composing setting to Plain Text not Rich Text and see if that improves things.

  • Publisher hangs when I try to open an image file

    Publisher hangs when I try to open an image file from:
    right-click on image->Change Picture->Change Picture
    The image is on my hard drive.
    It also happens with powerpoint

    Few Questions:
    a. What version of publisher/PowerPoint are you using ?
    b. Are you able to insert this image through Insert -> Image ? Image itself could be corrupt. Try to open it with some other editor ?

  • Opening an Image File

    Hi! I'm trying to open an image file in an application using JFileChooser. As I open the file, I know that the file has already been selected but I don't know how to put it on the correct container. I'm trying to show the image on the upper box such that it would look like it is currently showing the current image and the lower box would show the filmstrip view of the images in the folder. Basically I have a JFrame and then a JPanel1 on the JFrame. I also have another JPanel2 inside the JPanel1 and it is in the place of JPanel1 that I want to put the image. Anyway, I'm stuck as to what should I use to contain the image on the upper box (JPanel1, currently it doesn't work for a JPanel). I can't see the image I'm trying to open. Any idea or help will be appreciated.
    private void openMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openMenuItemActionPerformed
        // TODO add your handling code here:
        //ImageCanvas canvas = new ImageCanvas();
        //JFileChooser chooser = new JFileChooser();
        if (chooser == null)     {
              chooser = new JFileChooser();
              canvas = new ImageCanvas();
              chooser.setDialogTitle("Images");
              chooser.setFileFilter(new ImageFilter());
              //orangePanel.add(chooser);
        chooser.addActionListener(new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent evt) {
                chooserOptionsActionPerformed(evt);
        setVisible(true);
        chooser.showOpenDialog(null);
    }//GEN-LAST:event_openMenuItemActionPerformed
    public class ImageFilter extends FileFilter {
        public boolean accept(File file) {
            if (file.toString().toLowerCase().endsWith("jpg")) {
                return true;
            return false;
        public String getDescription() {
            return "JPEG Files";
    private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_nextButtonActionPerformed
    private void previousButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_previousButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_previousButtonActionPerformed
    private void zoomOutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zoomOutButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_zoomOutButtonActionPerformed
    private void zoomInButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zoomInButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_zoomInButtonActionPerformed
    private void chooserOptionsActionPerformed(java.awt.event.ActionEvent evt)    {
        String command = evt.getActionCommand();
        if (command.equals(JFileChooser.APPROVE_SELECTION))   {
            System.out.println("open was pressed");
            File chosen = chooser.getSelectedFile();
                if (chosen != null && chosen.exists() && chosen.isFile()) {
                    try {
                        ImageIcon icon = new ImageIcon(chosen.toURL());
                        canvas.setImageIcon(icon);
                             getContentPane().validate();
                        setTitle(chosen.getName());
                    } catch (Exception e) {
                        setTitle(e.getLocalizedMessage());
        else if (command.equals(JFileChooser.CANCEL_SELECTION))   {
        //else {
            System.out.println("cancel was pressed");
            chooser.setEnabled(false);
    public class ImageCanvas extends JPanel {
        private ImageIcon imageIcon = null;
        private Dimension size = null;
        public ImageCanvas() {
            setBackground(Color.white);
        public void setImageIcon(ImageIcon icon) {
            this.imageIcon = icon;
            if (icon != null) {
                size = new Dimension(icon.getIconWidth(), icon.getIconHeight());
            repaint();
        public ImageIcon getImageIcon() {
            return this.imageIcon;
        public void paint(Graphics g) {
            super.paint(g);
            if (imageIcon != null) {
                imageIcon.paintIcon(this, g, 0, 0);
        public Dimension getPreferredSize() {
            if (imageIcon == null) {
                return super.getPreferredSize();
            } else {
                return size;
    }Sorry for the code snippets.. I coudn't put the entire code since its too long (netbeans). some lines are just for printing

    1. For Swing components, the method to override is paintComponent, not paint.
    2. Why use ImageIcon when you can paint an Image?
    -- Load the image using ImageIO.read(File input)
    -- For the rest, go through The Java™ Tutorials: [Performing Custom Painting|http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html]
    db

  • How to open a pdf file and then attach it with images

    I am new to Indesign Server.
    I'm currently working on a pdf.
    I have a white blank pdf template.
    that I want to attach/glue it with images.
    How to open a pdf file and then attach it with images.
    Please, help me.
    Thanks.

    First step would be to make yourself familiar with InDesign desktop version.
    Whatever you intend to achieve, do it there manually. (see regular app docs or forums)
    Then try to automate your steps with scripting (see scripting docs or forum)
    If you can do it with a script in the desktop version, that script will likely also run in ID Server. (see server forum).
    If you can specify missing features not achievable thru scripting or manual use, reconsider to write a plugin (this forum).
    A seasoned C++ programmer will need a few months to learn the basics, wade thru tons of documentation etc. Alternatively consider to hire a consultant to do the development work for you.
    Dirk

  • I can't utilize my free Adobe Reader.  Help.  I can't open my PDF files sent to me.  I keep getting

    I can not open my PDF files sent using my Adobe Reader.  I keep gettting prompts to buy Adobe XI and that my free trial period is up.       

    What is your operating system?  What is your Reader version?  What means "can not"?
    Can you post a screenshot of such a message "to buy Adobe XI"?

  • How do I open a Numbers file sent to me that has been converted to Excel?  I already have MS Office for Mac.Ow

    How do I open a Numbers file sent to me that has been converted to Excel?  I already have MS office for Mac, but nothing comes up when I click on the imported file.

    If it indeed has been converted from Numbers to Excel, it will have a .xlsx suffix at the end of the name. Do a Get Info on the file if the suffix doesn't show. Else, it may still be in Numbers format and be unreadable by Excel.
    If it is in the right format, and you don't want to have to do what mende1 has instructed above for every successive file, click on the "Always open with..." option. That will associate the .xlsx suffix to Excel from thereon.

  • I can not open raw image files from my Cannon 5d mark iii with cs6 and my cs6 in mac

    I can not open raw image files from my Cannon 5d mark iii with cs6 and my cs6 in mac

    The Mk III requires an updated version of Camera RAw, so run Help --> Updates and install it.
    Mylenium

  • My x3 phone can't open any image file

    i updated my phone yestrday and after that, my phone cannot open any image files....it says 'no image to display'......now whats wrong with my phone????

    /t5/Xseries/Can-Someone-Help-me/td-p/712783
    Previous Phones: 6600, 7610, 6230, 6230i, 1100, 1112, N70, N73, N95, N95 8GB, 5800XM, 5230, C5, iPhone 3GS, SE Xperia X10, N900, N8, SE Xperia Arc
    Current Phones: Nokia N9, iPhone 4

  • Software to open McDraw image files

    Need Tiger 10.4.11 compatible software to open MacDraw image files created in 1985-88 period that were used in a book I authored.
    Appleworks cannot 'see' them. Any ideas short of tearing a book apart and scanning them.. which would preclude being able to alter them.

    http://www.purgatorydesign.com/Intaglio/
    http://www.eazydraw.com/
    Image files may also be opened by http://www.lemkesoft.com/ 's GraphicConverter if they are non-vector in origin.

  • Opening disk image files in Windows?

    Is there anything, free software or something like MacDrive (which I've never used) that will open disk image files, particularly encypted ones? I keep an encrypted disk image on my thumb drive with important information and I'd like to be able to open it in Windows. I recently came across the open-source TrueCrypt for Linux and Windows, but I would love some kind of software that would work on all three platforms, or at least OS X and Windows.
    Thanks,
    Alan

    PGP works on the Mac. They currently do not have a working version for intel based Macs. Your profile indicates you have a PowerMac so you should be good to go. Download the free trial and check it out.

  • Suddenly cannot open an image file

    PS 7 on a Vista machine with lots of RAM.
    All has been working well for months and suddenly I cannot open any image file or start a new one. Tried re-installing from OEM disc and no improvement. Removed PS7 VIA the Windows utility and re-installed entire application from OEM disc with still no improvement.
    When I try to open or start a new image the blue bar at the top of PS is illuminated, then I click on FILE and then on either NEW or OPEN. At that point everything stops. The drop down menus are grayed out and I cannot close the program by normal means. In order to close it I have to go to Task Manager and close the thing.
    BTW: Sometimes Task Manager shows that the PS EXE application is using 44K and other times it shows about 7K.
    Any suggestions will be happily recieved.  Jack

    I really hate to be a pain, but this has me stumped.
    I tried to go to the preferences as you suggested but the same thing happens there. PS just freezes up and cannot be used at all. Even the red X at the top right of the screeen does nothing. I have to use Task Manager in order to quit the program.
    I have removed PS from my machine VIA the Windows utility and reinstalled it several times with no improvement. I say that, but at one point I was able to open an image but when I tried to add another the system did the freeze up thing as above.
    At some point I began to get sort of an error message during the PS bootup telling me that the PS interface font could not be loaded and that I should reboot my machine. I did that but there has been no change.
    Frankly I cannot afford to buy time from Adobe to fix this so I am relying on you and the other folks on the board to hold my hand through this.
    I thank you for your time and expertise.
    Ralph

  • Some users are experiencing difficulty opening certain docx files sent as email attachments. These files contain content controls to protect data in the document. Could someone please confirm that the content controls are the reason the files won't open.

    Some users are experiencing difficulty opening certain docx files sent as email attachments. These files contain content controls to protect data in the document. Could someone please confirm that the content controls are the reason the files won't open.
    These files open correctly when sent as doc files.
    Thanks

    Congrats to Saeid, Ronen, and Ricardo! Big thank you to all our contributors!
     Transact-SQL Technical Guru - February 2015  
    Saeid Hasani
    T-SQL: How the Order of Elements in the ORDER BY Clause Implemented in the Output Result
    Durval Ramos: "Very well structured and with examples that clarify how a T-SQL statement can change the data output order."
    Richard Mueller: "Good use of Wiki guidelines and great examples."
    Ronen Ariely
    Free E-Books about SQL and Transact-SQL languages
    Richard Mueller: "An excellent collection and a great idea."
    Durval Ramos: "A good initiative. Very useful !!!"
    Ricardo Lacerda
    Declare Cursor (Transact-SQL) versus Window with Over - Running Totals
    - Accumulated Earnings
    Durval Ramos: "The "Window function" sample was well presented, but it was unclear how the chart was generated."
    Richard Mueller: "A new idea that can be very useful. Grammar needs work"
    Also worth a mention were the other entries this month:
    [T-SQL] Retrieve Table List with Number of Rows by
    Emiliano Musso
    Richard Mueller: "Short but sweet solution to basic question."
    Durval Ramos: "A simple T-SQL script, but useful."
    [T-SQL] Search for Missing Values within a Numerical Sequence by
    Emiliano Musso
    Richard Mueller: "Clever solution with good code examples."
    Durval Ramos: "You need add more details about development of the idea and create a "Conclusion" section to easy understanding."
    [T-SQL] Converting Multiple Rows into HTML Format single ROW by
    Maheen Khizar (Bint-e-Adam)
    Durval Ramos: "In some situations, It's need to consume and format HTML tags for a UI, but It's important to remember that Best Practices recommend this formatting process preferably in Presentation Layer"
    Richard Mueller: "A great new idea. Some features need more explanation. Avoid first person."
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How do you open a Numbers file sent from another Mac user with same operating system, i get a pop up that says I'm missing an index.hml file??? HELP PLEASE

    how do you open a Numbers file sent from another Mac user with same operating system, i get a pop up that says I'm missing an index.hml file??? HELP PLEASE

    The operating system may be the same but the Numbers applications are likely different.  You need to get the apps in sync.  Unfortunately, the Numbers (and Pages as well) saga is pretty confusing (and frustrating).  Here's some info from the iWork resident version expert (PeterBreis0807):
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs.

  • I opened a PDFs file that was attached to an email message and now it will not close when I press "Done" as it usually does. Does anyone have a solution to suggest? Thanks.

    I opened a pdf file that was attached to an email message I received and now it will not close when I press "Done" as files usually do. Does anyone have a solution to suggest please? Thanks.

    Try double clicking your home button then force close the stuck PDF by swiping upward. Once you've done that just click the home button again to exit.

Maybe you are looking for