How to download an image from SAP to my PC?

Hello SAPients.
I know that I can upload an image to SAP using transaction SE78, but now I need the inverse process, I mean, download an image from SAP to my PC. How can I do this?
Thanks in advance for your help.

The following program codes allow you to download SAP images stored in SE78 and the traditional SO10:
*& Report  Z_DOWNLOAD_BDS_GRAPHICS
*& Download image stored in document server
*& Published at ****************
REPORT  z_download_bds_graphics                 .
* Variable declaration
DATA: v_graphic_size TYPE i,
      v_graphic_xstr TYPE xstring,
      v_graphic_conv TYPE i,
      v_graphic_offs TYPE i,
      v_file         TYPE string.
* Table declaration
DATA: BEGIN OF i_graphic_table OCCURS 0,
        line(255) TYPE x,
      END OF i_graphic_table.
DATA: lt_tline type table of tline with header line.
data: l_thead type thead.
* Structure declaration
DATA: st_stxbitmaps       TYPE stxbitmaps.
* Selection screen
PARAMETERS: P_SO10 RADIOBUTTON GROUP RB1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_TDID     LIKE THEAD-TDID DEFAULT 'ADRS',
            p_TDNAME   LIKE THEAD-TDNAME,
            p_TDOBJ    LIKE THEAD-TDOBJECT DEFAULT 'TEXT',
            p_TDSPRA   LIKE THEAD-TDSPRAS DEFAULT 'EN'.
SELECTION-SCREEN END OF BLOCK b2.
PARAMETERS: p_se78 RADIOBUTTON GROUP RB1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_object LIKE st_stxbitmaps-tdobject DEFAULT 'GRAPHICS'
                              MODIF ID abc ,
            p_name   LIKE st_stxbitmaps-tdname,
            p_id     LIKE st_stxbitmaps-tdid DEFAULT 'BMAP'
                              MODIF ID abc ,
            p_type   LIKE st_stxbitmaps-tdbtype.
SELECTION-SCREEN END OF BLOCK b1.
PARAMETERS: p_dir    TYPE localfile DEFAULT 'D:\GIS'.
* At Selection-screen output event
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'ABC' .
      screen-input = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
* At Selection-screen on value-request event
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dir.
  DATA: l_folder TYPE string.
  CALL METHOD cl_gui_frontend_services=>directory_browse
    EXPORTING
      window_title         = 'Select Folder'
      initial_folder       = 'C:\'
    CHANGING
      selected_folder      = l_folder
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  IF sy-subrc = 0.
    p_dir = l_folder.
  ENDIF.
* Start-of-selection event
START-OF-SELECTION.
  IF p_se78 = 'X'.
    st_stxbitmaps-tdobject = p_object.
    st_stxbitmaps-tdname = p_name.
    st_stxbitmaps-tdid = p_id.
    st_stxbitmaps-tdbtype = p_type.
*   Get the bmp image from BDS in hex string format
    CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
      EXPORTING
        p_object       = st_stxbitmaps-tdobject
        p_name         = st_stxbitmaps-tdname
        p_id           = st_stxbitmaps-tdid
        p_btype        = st_stxbitmaps-tdbtype
      RECEIVING
        p_bmp          = v_graphic_xstr
      EXCEPTIONS
        not_found      = 1
        internal_error = 2
        OTHERS         = 3.
    IF sy-subrc = 0.
*     Find the length of hex string
      v_graphic_size = xstrlen( v_graphic_xstr ).
      CHECK v_graphic_size > 0.
      v_graphic_conv = v_graphic_size.
      v_graphic_offs = 0.
*     Populate internal table from this hex string
      WHILE v_graphic_conv > 255.
        i_graphic_table-line = v_graphic_xstr+v_graphic_offs(255).
        APPEND i_graphic_table.
        v_graphic_offs = v_graphic_offs + 255.
        v_graphic_conv = v_graphic_conv - 255.
      ENDWHILE.
     i_graphic_table-line = v_graphic_xstr+v_graphic_offs(v_graphic_conv).
      APPEND i_graphic_table.
*     Prepare file name and file path
      CONCATENATE p_dir '\' p_name '.BMP' INTO v_file.
*     Download image
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = v_graphic_size
          filename                = v_file
          filetype                = 'BIN'
        TABLES
          data_tab                = i_graphic_table
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc = 0.
        WRITE: 'File downloaded successfully'(003), v_file.
      ELSE.
        WRITE: 'Error during file download'(004).
      ENDIF.
    ELSE.
      CASE sy-subrc.
        WHEN 1.
          WRITE: 'Image not found'(005).
        WHEN OTHERS.
          WRITE: 'Error in Image retrieval'(006).
      ENDCASE.
    ENDIF.
  ENDIF. "IF P_SE78 = 'X'.
  IF P_SO10 = 'X'.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
*       CLIENT                        = SY-MANDT
        ID                            = p_TDID
        LANGUAGE                      = p_TDSPRA
        NAME                          = p_TDNAME
        OBJECT                        = p_TDOBJ
*       ARCHIVE_HANDLE                = 0
*       LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        = l_thead
      TABLES
        LINES                         = lt_tline
      EXCEPTIONS
         ID                            = 1
         LANGUAGE                      = 2
         NAME                          = 3
         NOT_FOUND                     = 4
         OBJECT                        = 5
         REFERENCE_CHECK               = 6
         WRONG_ACCESS_TO_ARCHIVE       = 7
         OTHERS                        = 8
    IF SY-SUBRC <> 0.
          WRITE: 'Image not found'(005).
    ENDIF.
CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP'
  EXPORTING
    ITF_HEADER                     = l_thead
    OLD_FORMAT                     = 'ITF'
    NEW_FORMAT                     = 'BMP'
    BITMAP_FILE_BYTECOUNT_IN       = 0
    ITF_BITMAP_TYPE_IN             = '*'
IMPORTING
   BITMAP_FILE_BYTECOUNT          = v_graphic_size
*   ITF_BITMAP_TYPE_OUT            =
  TABLES
    ITF_LINES                      = lt_tline
    BITMAP_FILE                    = i_graphic_table
*   BDS_BITMAP_FILE                =
  EXCEPTIONS
    NO_BITMAP_FILE                 = 1
    FORMAT_NOT_SUPPORTED           = 2
    BITMAP_FILE_NOT_TYPE_X         = 3
    NO_BMP_FILE                    = 4
    BMPERR_INVALID_FORMAT          = 5
    BMPERR_NO_COLORTABLE           = 6
    BMPERR_UNSUP_COMPRESSION       = 7
    BMPERR_CORRUPT_RLE_DATA        = 8
    BMPERR_EOF                     = 9
    BDSERR_INVALID_FORMAT          = 10
    BDSERR_EOF                     = 11
    OTHERS                         = 12
IF SY-SUBRC <> 0.
          WRITE: 'Error in Image Format'(006).
ENDIF.
    if sy-subrc = 0.
      CONCATENATE p_dir '\' p_TDNAME '.BMP' INTO v_file.
*     Download image
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = v_graphic_size
          filename                = v_file
          filetype                = 'BIN'
        TABLES
          data_tab                = i_graphic_table
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc = 0.
        WRITE: 'File downloaded successfully'(003), v_file.
      ELSE.
        WRITE: 'Error during file download'(004).
      ENDIF.
    endif.
  ENDIF.

Similar Messages

  • How to download RAW images from Canon S100 to iPhoto?

    How to download RAW images from Canon S100 to iPhoto?

    You need the Raw compatibility update 3.9:
    http://support.apple.com/kb/DL1473

  • Download an image from sap directories

    Hi all,
    is there anyway that i can download an image from sap directories into an internal table in binary mode?
    than you

    Hi all,
    is there anyway that i can download an image from sap directories into an internal table in binary mode?
    than you

  • How to download an image from java server

    Hi,
       I have created a program which allows me to upload images to Java Server thru Multipart.
    How can i receive an image from server and download it to iPhone app.Is there any way apart from NSURL i can download the image.
    Base64 Encoding & Decoding  seems to be not working.
    Thanks in advance,
      Haritha

    Hi,
       I have created a program which allows me to upload images to Java Server thru Multipart.
    How can i receive an image from server and download it to iPhone app.Is there any way apart from NSURL i can download the image.
    Base64 Encoding & Decoding  seems to be not working.
    Thanks in advance,
      Haritha

  • How can we download target group from sap crm gui

    Hi Experts,
    Please let me know, how to download target group from the SAP CRM GUI . Information: TG having 75000 BPs and using sap crm 7.0
    Thanks in advance..!!
    thanks and regards
    Vinay

    Hi Vinay,
    You can consider below link if you have already not done.
    Export Target Group | SCN
    Also found below note/s which may not be appropriate for the version that you are working, still will give some hints on how to go about it especially when you have more BPs to be downloaded.
    490694 - Target group export from CRM Online to application server
    459913 - Target groups: Exporting BPs to application server
    Rgds
    Hari

  • When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the original file name being replaced during the downloading process?

    When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the file name being changed during this downloading process?

    Hi Glenyse,
    Here are my steps.
    1.  I upload multiple image (jpg) files onto my photo album.
    2.  I select the "sharing" by email option for this album.
    3.  I enter the recipient's email address.
    4.  The recipient receives my message and clicks on the link.
    5.  The recipient accesses my photo album and clicks on one of the images.
    6.  The image opens up to its own screen.
    7.  The recipient selects the "download" and then save file option.
    Here is the part I do not understand.  For some reason, during this "download" process, the original name which I have given to the file is replaced by different name.  So I was hoping that someone knows how to prevent the file name from being changed during the "download and save" process.
    Much appreciated if you can help me find a solution to this problem.
    Mary  

  • How to extract Inventory data from SAP R/3  system

    Hi friends How to extract Inventory data from SAP R/3  system? What are report we may expect from the Inventory?

    Hi,
    Inventory management
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
    How to Handle Inventory Management Scenarios in BW (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Loading of Cube
    •• ref.to page 18 in "Upgrade and Migration Aspects for BI in SAP NetWeaver 2004s" paper
    http://www.sapfinug.fi/downloads/2007/bi02/BI_upgrade_migration.pdf
    Non-Cumulative Values / Stock Handling
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31
    Non-Cumulatives
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62ebe07211d2acb80000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/frameset.htm
    Here you will find all the Inventory Management BI Contents:
    http://help.sap.com/saphelp_nw70/helpdata/en/fb/64073c52619459e10000000a114084/frameset.htm
    2LIS_03_BX- Initial Stock/Material stock
    2LIS_03_BF - Material movements
    2LIS_03_UM - Revaluations/Find the price of the stock
    The first DataSource (2LIS_03_BX) is used to extract an opening stock balance on a
    detailed level (material, plant, storage location and so on). At this moment, the opening
    stock is the operative stock in the source system. "At this moment" is the point in time at
    which the statistical setup ran for DataSource 2LIS_03_BX. (This is because no
    documents are to be posted during this run and so the stock does not change during this
    run, as we will see below). It is not possible to choose a key date freely.
    The second DataSource (2LIS_03_BF) is used to extract the material movements into
    the BW system. This DataSource provides the data as material documents (MCMSEG
    structure).
    The third of the above DataSources (2LIS_03_UM) contains data from valuated
    revaluations in Financial Accounting (document BSEG). This data is required to update
    valuated stock changes for the calculated stock balance in the BW. This information is
    not required in many situations as it is often only the quantities that are of importance.
    This DataSource only describes financial accounting processes, not logistical ones. In
    other words, only the stock value is changed here, no changes are made to the
    quantities. Everything that is subsequently mentioned here about the upload sequence
    and compression regarding DataSource 2LIS_03_BF also applies to this DataSource.
    This means a detailed description is not required for the revaluation DataSource.
    http://help.sap.com/saphelp_bw32/helpdata/en/05/c69480c357354a8846cc61f7b6e085/content.htm
    http://help.sap.com/saphelp_bw33/helpdata/en/ed/16c29a27db6e4d81a015be8673eb80/content.htm
    These are the standard data sources used for Inventory extraction.
    Hope this helps.
    Thanks,
    JituK

  • How to download a file from Path specifed

    Hi Frndz..
    How to download a file from a specified path like  , i have a file on server in the path like "C://temp/Sap.pdf"
    I want to download this to user desktop..
    Thanks in Advance
    regards
    Rajesh

    Hi,
    For file down load u have to use a UI element as "File download".
    u just create context attribute as setdownload_res and file data.
    setdownload_res as of type "com.sap.ide.webdynpro.uielementdefinitions.Resource" then bound it to the ui element "resource".
    file data as of type "com.sap.tc.webdynpro.progmodel.api.IWDInputStream"
    and set calcuclated as true and read only as true.
    then in doinit method u just write this code
    IWDAttributePointer attr = wdContext.currentContextElement().getAttributePointer("fileData");
    IWDResource res = WDResourceFactory.createResource(attr,null,WDWebResourceType.UNKNOWN);
    wdContext.currentContextElement().setDownload_res(res);
    wdComponentAPI.getMessageManager().reportSuccess(""+c);
    after this in the getter method u write this code
    IWDInputStream stream = null;
    try
    stream = WDResourceFactory.createInputStream(new FileInputStream(new File("<pathof the file to be download>")));
    catch(Exception e)
    e.printStackTrace();
    return stream;
    also look at this thread  How to DownLoad any type of File from the server(PDF,XLS,Word)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
    PradeeP

  • How to download org model from R/3 to CRM.

    Dear Friends,
                     How to download Org model  from R/3 to CRM. Any one tell me step by step detaily.
    Regards,
    Raj kumar,
    08123667379

    You can download organization from R3 to CRM in the following way.
    go to SPRO -> Customer Relationship Management -> Master Data -> Organization Management -> Data Transfer -> Copy SAP ECC Sales Structure. This is the place from where you can replicate the sales structure from ECC. You can have a look at the IMG Implementation Guide for a more detailed information.
    As for the BP not coming as an Organization, you need to activate the switch to integrate the BP and Organization functionality. The link for the same is given below:
    SPRO -> Customer Relationship Management -> Master Data -> Business Partner -> Integration Business Partner-Organization Management --> Set up Intergration with Organization Management . Here you need to activate the following Switch - HRALX OBPON ON Integration O-BP Activated.

  • How to trigger IDOC'S from SAP

    Hi All,
    How to trigger IDOC's from SAP(ECC 6)..where can we check this in mii 11.5 weather it is fail/success
    Thanks,
    Abhi

    You can trigger LOIPRO, LOIPLO and a few others manually from POIT (SAP Txn).  Master Data related to orders can be triggered from POIM.  Depending on which IDocs you which to generate, there are other transactions to trigger different IDocs.
    You can also use Triggers from MII to generate IDocs in SAP using CLOI_DOWNLOAD_TRIGGER_MDAT (POIM equivalent) and CLOI_DOWNLOAD_TRIGGER_TRANS (POIT equivalent).
    There is also a rather nice post which detailed the process of using change pointers to automate the IDoc generation and download, but I am having trouble finding it.  Will continue to look and will post link when I find it.
    Regards,
    Mike
    I couldn't find the post I was looking for, but there is an informative note 390635 which may help.
    Edited by: Michael Appleby on May 5, 2009 1:29 PM

  • How to read some images from file system with webdynpro for abap?

    Hi,experts,
    I want to finish webdynpro for abap program to read some photos from file system. I may make MIMES in the webdynpro component and create photos in the MIMES, but my boss doesn't agree with me using this way. He wish me read these photos from file system.
    How to read some images from file system with webdynpro for abap?
    Thanks a lot!

    Hello Tao,
    The parameter
       icm/HTTP/file_access_<xx>
    may help you to access the pictures without any db-access.
    The following two links may help you to understand the other possibilities as well.
    The threads are covering BSP, but it should be useful for WebDynpro as well.
    /people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
    http://help.sap.com/saphelp_sm40/helpdata/de/c4/87153a1a5b4c2de10000000a114084/content.htm
    Best regards
    Christian

  • PSE10: how to download Raw files from Canon camera? [was:HELP]

    How do I download RAW images from a connon camera on photoshop Elements 10??

    is your issue resolved now?
    ~Surendra
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • How to download an asset from CQ with all its metadata

    Hi All,
    I am new to CQ and using CQ5.3 version. I am trying to download assets/pages from CQ using Content Zipper and upload file using Content Loader. Through Content Zipper, When I try to download only one image file from CQ, I am not able to download that particular image. Also If i download the whole node where image resides, then i am not able to finds its metadata.
    Am I missing something? Please Help.
    Thanks
    Rajarshi

    Hi Sham, Thanks for reply. My concern is slightly different.
    1) If i do any changes in images in DAM like cropping, CQ creates a new version of it and when I download any image from the link shown in your snapshot, i get the image from current version. But things get change when I do the same using content zipper. It download the image from its oldest version. How come the two modules for download things are different in the same product?
    2) Versions that gets created in DAM are not reflected when i check the same from content explorer. Same is for Content Zipper.
    Please help.
    Thanks

  • Downloading an Image from a URL

    In my application, I have a link to an image. I want to be able to download that image to a location that the user chooses using NSSavePanel. Could someone give me the code for how to do this? I do not want to just download the image from online and put it in the Resources, because the picture changes constantly.

    http://developer.apple.com/Documentation/Cocoa/Conceptual/URLLoadingSystem/URLLo adingSystem.html

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

Maybe you are looking for

  • How can I see all the recipients of an email when I reply?

    When I reply to an email that was sent to multiple people, I want to be able to see the original email header that shows the date, time, everyone who received it, etc. In other words, I'd like to see the original header that way it shows when I forwa

  • BPM Process won't start

    Hi, I'm trying to start a process via the process repository, but keep getting the message "Problem occured fulfilling the request. Log entries created with ID: 00199921BE7E0C7C00000000000040DC" - when I look at the log via NWA I can only see the "Nu

  • Files that "remember playback position" are not updating during sync

    I listen to long spoken word MP3 files that are not podcasts. I have the "remember playback position" option checked on these files. I will add it to my library, sync it to my 2nd gen iPod shuffle, then go play it. The shuffle will remember the playb

  • Printing out E Mails

    I am trying to print an E Mail from  BT.  I have the e mail on screen and when I press the print button all I get is a blank page with my email address top left and Page 1 of 1 top right.  Must be more to it than I realised. I am using Windows 7 home

  • Footer help using cfdocument format="pdf"

    I have a very simple PDF report that does the following: Query database and populate customer information at top of PDF Query database and populate a simple string pulled from a memo field in the database. Inserts a totals table at the bottom of the