Retrieving Invoice images from Content Server

Background
My problem is, that I need to retrieve images from the Content Server and save them on a local drive with a path provided by the user. Metadata that is available for the image includes Object ID and the URL to the image on the server.
However, the Object ID is not valid for DMS, so the Function Groups for this are invalid. The cl_gui_* function groups have several usable Function Modules, but the URL link provided for the image is something like this:
http://xxxxxx.xxxxxx.com:XXXX/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=Z2&docId=123AB1C123D12E12345.... etc.
What makes the cl_gui FM unable to work, is the :, ?, % and & characters in the string - which makes the FMs look at the URL as invalid.
I have also tried more or less the entire content of FM in the SCMS_* Function Group (containing FMs for the Content Server), but to no avail.
Question
So, now to my question: Is there any way to translate the URL provided so the cl_gui FMs can understand it? Or, should I go the other way around and fetch the Invoice Image using the provided Object ID?
All needed at my program to finish off, is a method to retrieve the given images and save them to a local path.
I hope the Guru's of the SDN will be able to help me here
regards
Anders Haugbølle
Edited by: Anders Haugbølle on Feb 4, 2009 12:53 PM

Moving this thread from ERP MM to [Enterprise Resource Planning (ERP) |Enterprise Resource Planning (SAP ERP);

Similar Messages

  • How to convert JPG image to BMP ? (Printing jpg images in smartforms from content server)

    Hi,
    We have employee photos(JPG Format) stored in Content server. And now we want to print the photos in smartforms. For this I had written the below code to read the photo from content server in binary format as below.
    REPORT ZTEST1.
    PARAMETERS P_PERNR TYPE PERNR_D.
    DATA: PS_CONNECT_INFO TYPE TOAV0,
          IT_BINARY TYPE TABLE OF SDOKCNTBIN.
    CALL FUNCTION 'HR_IMAGE_EXISTS'
      EXPORTING
        P_PERNR                     = P_PERNR
    *   P_TCLAS                     = 'A'
    *   P_BEGDA                     = '18000101'
    *   P_ENDDA                     = '99991231'
    IMPORTING
    *   P_EXISTS                    =
       P_CONNECT_INFO              = PS_CONNECT_INFO
    * EXCEPTIONS
    * ERROR_CONNECTIONTABLE       = 1
    *   OTHERS                      = 2
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.
    IF PS_CONNECT_INFO IS NOT INITIAL.
      CALL FUNCTION 'SCMS_DOC_READ'
        EXPORTING
       STOR_CAT                    = SPACE
       CREP_ID                     = PS_CONNECT_INFO-ARCHIV_ID
          DOC_ID                      = PS_CONNECT_INFO-ARC_DOC_ID
    *   PHIO_ID                     =
    *   SIGNATURE                   = 'X'
    *   SECURITY                    = ' '
    *   NO_CACHE                    = ' '
    *   RAW_MODE                    = ' '
    * IMPORTING
    *   FROM_CACHE                  =
    *   CREA_TIME                   =
    *   CREA_DATE                   =
    *   CHNG_TIME                   =
    *   CHNG_DATE                   =
    *   STATUS                      =
    *   DOC_PROT                    =
    TABLES
    *   ACCESS_INFO                 =
    *   CONTENT_TXT                 =
       CONTENT_BIN                 = IT_BINARY
    * EXCEPTIONS
    * BAD_STORAGE_TYPE            = 1
    *   BAD_REQUEST                 = 2
    *   UNAUTHORIZED                = 3
    * COMP_NOT_FOUND              = 4
    *   NOT_FOUND                   = 5
    *   FORBIDDEN                   = 6
    *   CONFLICT                    = 7
    * INTERNAL_SERVER_ERROR       = 8
    *   ERROR_HTTP                  = 9
    * ERROR_SIGNATURE             = 10
    *   ERROR_CONFIG                = 11
    *   ERROR_FORMAT                = 12
    * ERROR_PARAMETER             = 13
    *   ERROR                       = 14
    *   OTHERS                      = 15
      IF SY-SUBRC <> 0.
    * Implement suitable error handling here
      ENDIF.
    ENDIF
    Now the issue is I want to convert that binary data to bitmap image and upload the same in to SE78. So that I can use that BMP image from SE78 in my smartforms.
    I had used the class CL_IGS_IMAGE_CONVERTER to covert the image into bmp but it is giving error that error in IMAGE DATA CORRUPT & Error Code 3. The conversion code used is as below.
    ******* CONVERT THE JPG IMAGE INTO BMP PHOTO. **********
      DATA: L_IGS_IMGCONV TYPE REF TO CL_IGS_IMAGE_CONVERTER,
    L_IMG_BLOB    TYPE W3MIMETABTYPE,
    L_IMG_SIZE    TYPE W3PARAM-CONT_LEN,
    L_IMG_TYPE    TYPE W3PARAM-CONT_TYPE,
             L_IMG_SUBTYPE TYPE W3PARAM-CONT_TYPE,
    L_IMG_URL     TYPE W3URL,
    L_ERR_CODE    TYPE I,
    L_ERR_TEXT    TYPE STRING,
             P_DEST TYPE CHAR32 VALUE 'IGS_RFC_DEST'.
      DATA: G_IMG_BLOB     TYPE W3MIMETABTYPE,
          G_IMG_TYPE     TYPE W3PARAM-CONT_TYPE,
          G_IMG_SIZE     TYPE W3PARAM-CONT_LEN.
      IF NOT IT_BINARY[] IS INITIAL.
        G_IMG_BLOB[] = IT_BINARY.
        CREATE OBJECT L_IGS_IMGCONV
          EXPORTING
            DESTINATION = P_DEST.
        CALL METHOD L_IGS_IMGCONV->SET_IMAGE
          EXPORTING
            BLOB      = G_IMG_BLOB
            BLOB_SIZE = G_IMG_SIZE.
        CASE PS_CONNECT_INFO-RESERVE.
          WHEN 'TIF'.
            G_IMG_TYPE = 'image/tiff'.
          WHEN 'JPG'.
            G_IMG_TYPE = 'image/jpeg'.
          WHEN 'PNG'.
            G_IMG_TYPE = 'image/png'.
          WHEN 'GIF'.
            G_IMG_TYPE = 'image/gif'.
          WHEN 'BMP'.
            G_IMG_TYPE = 'image/x-ms-bmp'.
          WHEN OTHERS.
            EXIT.
        ENDCASE.
    L_IGS_IMGCONV->INPUT  = G_IMG_TYPE.
        L_IGS_IMGCONV->OUTPUT = 'image/x-ms-bmp'.
    *    PERFORM GET_SIZE USING PICTURE_CONTAINER
    * L_IGS_IMGCONV->WIDTH
    * L_IGS_IMGCONV->HEIGHT.
        CALL METHOD L_IGS_IMGCONV->EXECUTE
          EXCEPTIONS
            OTHERS = 1.
        IF SY-SUBRC IS INITIAL.
          CALL METHOD L_IGS_IMGCONV->GET_IMAGE
            IMPORTING
              BLOB      = L_IMG_BLOB
              BLOB_SIZE = L_IMG_SIZE
              BLOB_TYPE = L_IMG_TYPE.
          SPLIT L_IMG_TYPE AT '/' INTO L_IMG_TYPE L_IMG_SUBTYPE.
        ELSE.
          CALL METHOD L_IGS_IMGCONV->GET_ERROR
            IMPORTING
              NUMBER  = L_ERR_CODE
              MESSAGE = L_ERR_TEXT.
          BREAK-POINT.
        ENDIF.
      ENDIF.
    ENDIF.
    So could you please some one help me how to convert JPEG Photo to BMP programatically.
    Regards,
    Mayur.

    johnandersonpalmdesert wrote:
    My printer is requesting a vector file.
    Jpeg File format does not support vectors.  Photoshop has limited vector support and tools.  Photoshop can not save vector file formats like SVG.  What File type does your printer want?
    Adobe Illustrator is Adobe vector application.

  • How to retrieve/gather images from a non-ZEN server?

    Our main ZENworks server is 4.01 and it's running out of space for
    images. We have an OES server that I'd like to use to push & pull images.
    I looked at the Security tab / Upload restrictions in the Server Policy
    and thought I might be able to define exactly where images can be stored
    but haven't made any changes yet. Any ideas on how I can make this work?

    On Wed, 14 Dec 2005 15:39:41 GMT, [email protected] wrote:
    > Is that the only way?
    yes.. the imgserv.nlm does access the harddrive via connection 0... it is
    not able to authenticate..
    and honestly why would you want to pull an image from another server
    causing double amount of traffic..
    you only need to install the imgserv on the other server and reference him
    in your scripts... the old one can do the pxe stuff..
    If you have already compiled drivers or have linux.2 please put them on
    http://forge.novell.com/modules/xfmo...ect/?zfdimgdrv
    Marcus Breiden
    If you are asked to email me information please change -- to - in my e-mail
    address.
    The content of this mail is my private and personal opinion.
    http://www.edu-magic.net

  • Retrieving Image from IXOS server

    Hi,
    We want to retrieve an image from the IXOS server, convert it from IXOS format to JPEG,GIF format, and store it on the R/3 server for later use.
    Are there any function modules, class methods etc. to achieve this?
    Regards,
    Saurabh

    The link between R/3 and the IXOS server document should be contained in table toa01.  Once you locate the link to the document you can use function module ARCHIVOBJECT_GET_DT_VIA_TABLE to retrieve the archived document and do what ever you want.  There are a number of function modules that can be helpful in working with archived documents.  Just do a search in SE37 for ARCHIVE and you will find several. 
    Hope this helps.
    Regards
    Brent

  • Loader will load images from another server, but then we get error on Bitmap operation

    I'm developing an app that currently is using Loader to get images from another server.  This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place.  However, it does work -- sort of .
    Loader can load the images fine, without an error.  But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
    var myBitmap:Bitmap = Bitmap(loader.content);
    and when this runs we get a Flash player security error 2122, sandbox violation.
    So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
    (Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage?  I don't need to change its actual dimensions -- I just need to change its display width and height.)
    Thanks!

    The sandbox allows viewing, not editing from another server without a crossdomain.
    So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
    This should resolve itself once that crossdomain is in place.
    ||EDIT||
    I just realized I should clarify my statement a little more.
    When you load images from another server without a crossdomain, it allows the load for display only.  When you try to load data, it will fail.  This is because, XML data, or some other type of data is editable by default, and images are only viewable by default.  So, the image fails when you try to convert it into an editable form.

  • Any way to retrieve this image from my cache? When saved it only saves as a 1.7KB blank file.

    I'm trying to retrieve an image from Firefox's cache but so far have had no luck in doing so. The picture was hosted on imageshack and I had it open in a window but when I refreshed the page several hours later it was gone. I refreshed the page several more times, tried messing with the url to see if that did anything, but no luck. I haven't cleared anything on Firefox so I'm hoping there's some way I can recover it from the cache.
    I followed the instructions on this page: http://groups.google.com/group/mozilla.support.firefox/msg/73bab3fb55ac5b42
    However, when I right clicked the URL and chose "Save Link As..." it only saved a 1.7KB file that none of my photo editing programs can recognize or open. I've tried going to cache entries for other image links and saving them and when I choose Save Link As for those they save just fine, and in full size, so I'm not sure why this one won't work...I'm using Offline Mode so I'm not sure why the picture no longer being hosted online should make a difference one way or the other. I'm just hoping that my act of refreshing the page and nothing being there didn't overwrite the cache file and thus erase the cache'd image.
    So is there any hope of retrieving this picture or is it gone for good?

    Hi.
    Once the image in question is replace with another one, the old one is erased. That is to say, if you open an image, say www.domain.com/image.png, and it's a 200x200 image, then you close it, it's still on cache, and you can access it through the cache. But if the image is changed in the server, that same exact url, and you access it again, at you see a 250x200 image (just an example), then the 200x200 is gone forever.
    Your hope is that you never accessed the same URL again, so the old cache wasn't erased. If you know the url of the image, simply select offline mode (File > Work Offline, I think) and access its url. It will load the cached version and not check for the online one. Only if there is a cached version, of course.
    I hope this helps.

  • Using flash to display images from sql server or file system

    hello,
    what methods and parameters of the urlloader class we have to use to display images in a flash player if possible..
    also movie should update everytime a new image is added to a database or file
    the images can either be in a file system or in a sql database (if possible)
    does flash comes with an object of this type or we have to create it.
    regards,

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • Copy any kind of file from content server to network directory

    Helli All
    The question:
    I nee to copy any kind of file from content server to any network directory.
    Explanation
    1. transaction CV02N
    2. There is attached file for a document in tab "Document data/Original"
    3. This file stored in content server
    4. I wrote program code that creates path of the stored file that finally looks like
    http://cont:8888/ContentServer.dll?get&Version=.....*...&compid=app1.doc
    where app1.doc is file's name and I have to copy this file into network directory.
    The problem is that this URL open the file instead of just pointing to him
    so that no function or method can't see this file and as the result I got message that
    the file doesn\t exist.
    Please, advice.
    Regards,
    Daniel.

    many many thanks for ur help. i really did not check the URLClassLoader properly.
    but i would like to hear a little more from u. i have another question. here in this code (provided earlier), i searched for attribute values in the manifest file, then again i load the required class file from the very url. is it not good to retrieve the whole jar file first, and then check attribute values inside manifest file and load the required class files from that jar file that is already downloaded without going to that url again? how can i do this?

  • Fetch XML from Content server to Portlet and display as HTML

    Hi,
    I want to fetch the XML from the content server and display that XML in the Weblogic Portlet as HTML.
    The main reason is that data will be contributed by the users in UCM and then I had to get that data from content server and display in portlet
    Please Help........
    Thanks,
    Vinod

    Vinod:
    Probably what you're looking for is to bring the content over using the UCM SPI adapter for WLP's VCR:
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/ucm_adapter/intro.html]
    And then to display the content using a custom template using Content Presenter:
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/cm/displaytemplatesCM.html]
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portlets/development.html]
    When you say you want to fetch xml, is that because it's a contributor data file? You can either read the property values directly from the VCR, or use the info you get from the node (such as dDocName) to then use a UCM/WCM web service to retrieve formatted content and put it in an iframe. There are a lot of ways to go in formatting the data.
    You can even add edit capabilities to your Presenter template by calling the 'edit data file' web service of WCM.

  • Unable to send email from content server

    Hi,
    I have a requirement of sending the notification email to user from the stellent when he subscribe to it.To test it i logged in to content server as sysadmin.
    Administration->Actions->Send test email.
    I had filled some dummy data and when i click on send it gives me a error
    Content Server Request Failed
    Unable to send email. Could not send mail message from [email protected] with subject line: Test email from Content Server.
    intradoc.common.ServiceException: !csMailCouldNotSend,[email protected],Test email from Content Server
         at intradoc.server.InternetFunctions.sendMailToEx(Unknown Source)
         at intradoc.server.SystemAuditHandler.sendEmail(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at intradoc.common.IdcMethodHolder.invokeMethod(Unknown Source)
         at intradoc.common.ClassHelperUtils.executeMethodReportStatus(Unknown Source)
         at intradoc.server.ServiceHandler.executeAction(Unknown Source)
         at intradoc.server.Service.doCodeEx(Unknown Source)
         at intradoc.server.Service.doCode(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doAction(Unknown Source)
         at intradoc.server.Service.doAction(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doActions(Unknown Source)
         at intradoc.server.Service.doActions(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.executeActions(Unknown Source)
         at intradoc.server.Service.executeActions(Unknown Source)
         at intradoc.server.ServiceRequestImplementor.doRequest(Unknown Source)
         at intradoc.server.Service.doRequest(Unknown Source)
         at intradoc.server.ServiceManager.processCommand(Unknown Source)
         at intradoc.server.IdcServerThread.run(Unknown Source)
    Caused by: intradoc.common.ServiceException:
         at intradoc.common.SmtpClient.sendMail(Unknown Source)
         at intradoc.server.InternetFunctions.sendMail(Unknown Source)
         ... 21 more
    Caused by: java.lang.Exception: !csSMTPInvalidMessage,"System Administrator" <[email protected]>!csSMTPUnableToFindRecipients,1
         at intradoc.common.SmtpClient.writeMultiMsg(Unknown Source)
         ... 23 more
    Caused by: java.lang.Exception: !csSMTPResponseIndicatesFailure,550 5.7.1 Unable to relay for [email protected]
         at intradoc.common.SmtpClient.writeMsg(Unknown Source)
         ... 24 more
    I had set the internet configration in admin server to this values..
    HttpServerAddress=blrdxp-rchithul.corp.capgemini.com
    MailServer=BLREX002.corp.capgemini.com
    [email protected]
    SmtpPort=25
    HttpRelativeWebRoot=/idc/
    CgiFileName=idcplg
    UseSSL=No
    WebProxyAdminServer=true
    But i am still getting the error.kindly help me...
    Thanks in Advance
    Regards
    Rakesh

    Hi Rakesh,
    You have to request you Network team to add the ip address of the machine where you have installed content server to your Exchange Server.
    Let me know if it works.
    Deepak

  • Unable to Retrieve Contact Info from synch server - Gator wrote to try renaming file but I can't manage to find the pathway on my Win 7 computer for that file! got as far as my name under user but can't get to application data.  Can someone help?

    Hi, going crazy.  Can't get this fixed.  Unable to retrieve contact info from synch server.  I did re-do synch using one time only replace I-phone info from "contacts" on computer and tried synching after that - no use same error!
    I saw someone by name of Gator wrote pathways to follow in windows but got only as far as user (yes, selected my name as user as opposed to public) then clicked it open but lost after that - can't get to appdata for the next step....  any help or ideas would be soooooo appreciated. I'm so tired of this issue. thanks!
    Pinina in Phoenix, Az

    Hi, going crazy.  Can't get this fixed.  Unable to retrieve contact info from synch server.  I did re-do synch using one time only replace I-phone info from "contacts" on computer and tried synching after that - no use same error!
    I saw someone by name of Gator wrote pathways to follow in windows but got only as far as user (yes, selected my name as user as opposed to public) then clicked it open but lost after that - can't get to appdata for the next step....  any help or ideas would be soooooo appreciated. I'm so tired of this issue. thanks!
    Pinina in Phoenix, Az

  • Error Displaying Portlet Preview created from Content Server templates

    I created portlet from content server announcement portlet template.Whet put on the page this portlet shows the following error message:
    Error Displaying Portlet Preview.Error Getting Content from Portlet.
    Same error with portlet created from the news template.

    If the link exists in TOA01, why is the dosumnet not visible ? When i use the Function Module ARCHIVOBJECT_DISPLAY, i get the error -
    Error when opening document with HTML control:DP_ERROR_GENERAL
    Can someone please let me know what are we doing wrong ??

  • Problem using content from content server in portlet.

    Hi all,
    I create a JSR286 portlet project, add a content server connection then drag content from those connection to jspx by selected create > document - content presenter.
    Problem occur when i deploy the project to portlet managed server.
    I'm not sure any mds they required because while deploying the Deploymeny Configuration was poped up to prompt me select mds repository.
    I don't know what mds repository they required.
    Please help.
    Regards.

    Hi ngsankar,
    Thanks for your reply.
    I have no idea about any schema ;(
    on the integrated weblogic server i can't deploy too.
    Is it possible to use any content from content server in portlet like on portal?
    Regards.

  • Reading the Excel from Content Server...

    Hello Experts
    I have a requirement to read the contents of the excel from DMS content server to Internal Table.
    I tried using the function module "SCMS_DOC_READ", but it is reading only the part of the contents and remaining contents are missing in the Internal Table.
    Is there any other way to read the content of excel file stored in content server.
    Many Thanks in advance!!!
    Regards,
    Benu

    Hi Christoph,
    Many thanks for your reply...
    Now I am using the same report for downloading the document from content server but my requirement is to read the contents directly from content server without downloading it to presentation server..
    The function module mentioned in the above post is not reading the complete contents of the excel sheet.
    Regards,
    Benu

  • Db connection from content server context through JSP

    Hi All,
    Can anyone tell me how to get ucm db connection from Content Server context through JSP file? Thanks.
    Joe
    FMW Team,iTech,Shenzhen

    Start by getting a sample JSP here:
    http://www.corecontentonly.com/Blog/UsingJavaServerPagesWithContentServerAndAnExample
    Then, you can use the Workspace object in the jsp to create resultsets from SQL.
    String sql = "SELECT * FROM REVISIONS";
    // Execute the sql
    rs = objWorkspace.createResultSetSQL(sql);
    drs = new DataResultSet();
    drs.copy(rs);
    for (drs.first(); drs.isRowPresent(); drs.next())
    String dDocName = ResultSetUtils.getValue(drs, "dDocName");
    System.out.println(dDocName);
    }

Maybe you are looking for