Employee Photo Display

Hi SDN Gurus,
I want to display employee photo in my custom webdynpro abap application. Im using Document Area as blank, Storage type as SAP System Database and Rep. Sub-Type as Normal and Content Table is SDOKCONT1 in tcode OAC0.
I have written a FM to output the photo from table SDOKCONT1 which is of data type LRAW.
though im not able to get the image in Webdynpro component.
Are there any alternate ways or work arounds for this? Please help as i just want to display employee photo in my webdynpro application anyhow.
Appreciate your help.
Regards,
Vinayak
Edited by: vinayak landge on Mar 28, 2011 3:27 PM

DATA:gx_mimetype TYPE string VALUE 'JPG'.
data lv_url type string.
****Create the cached response object that we will insert our content into
  DATA: cached_response TYPE REF TO if_http_response.
  CREATE OBJECT cached_response
    TYPE
      cl_http_response
    EXPORTING
      add_c_msg        = 1.
  TRY. " ignore, if compression can not be switched on
      CALL METHOD cached_response->set_compression
        EXPORTING
          OPTIONS = cached_response->co_compress_based_on_mime_type
        EXCEPTIONS
          OTHERS  = 1.
    CATCH cx_root.
  ENDTRY.
****set the data and the headers
  DATA: l_app_type TYPE string.
  DATA: l_xstring TYPE xstring,
        i_cache_timeout  TYPE i VALUE '300'.
  cached_response->set_data( lv_raw ).
  l_app_type = gx_mimetype.
  cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                     value = l_app_type ).
****Set the Response Status
  cached_response->set_status( code = 200 reason = 'OK' ).
****Set the Cache Timeout - 60 seconds - we only need this in the cache
****long enough to build the page and allow the Image on the Client to request it.
  cached_response->server_cache_expire_rel( expires_rel = i_cache_timeout ).
  DATA LR_PHOTO TYPE REF TO if_wd_context_node.
  DATA ls_PHOTO TYPE        IG_COMPONENTCONTROLLER=>ELEMENT_PHOTO.
  DATA: i_path TYPE string VALUE '/sap/public',
        i_format TYPE string VALUE 'JPG'.
****Create a unique URL for the object
  DATA: guid TYPE guid_32.
  CALL FUNCTION 'GUID_CREATE'
    IMPORTING
      ev_guid_32 = guid.
  CONCATENATE i_path '/' guid '.' i_format INTO Lv_URL.
****Cache the URL
  cl_http_server=>server_cache_upload( url      = Lv_URL
                                       response = cached_response ).
lv_raw is the raw string of the image.
lv_url is the URL bind this to Image UI element source property.

Similar Messages

  • Displaying Employee Photo using WDA  in ESS

    Hello Experts,
    We have a requirement to dispaly employee photo in ESS.We are implementing ESS with Webdynpro ABAP.
    we have created one archive link in R3(Content repository)
    Please help me..
    1) how to call this archive link from WDA...is there any standard WDA application in ESS
    2) what is the correct process to display employee photo in ESS.
    3)can we use Colloboration Demo role?
    4) can we user Who's Who role? how we need to enable this role?
    Please help..many of you have worked on this type of requirements..please share your thoughts and solutions..
    thanks in advance for your help..
    Regards
    EP user1

    Dear Vinodh
    Normally there might be many reasons for pics not getting displayed, as u have said that the photo is already visible in R/3 then u need to check the following things
    1) check S_WFAR_OBJ authorization object has been maintained or not.
    2) Access T-code PZUSWHO & check whether the following settings are maintained or not.
    Check these links as it entails how to upload the Photos
    How to upload photos in SAP
    Employee Photographs Mass Uploading to Backend System (ECC)
    Kindly come up with screen shots,
    Hope this solves ur problem.
    Cheers
    Pradyp

  • Get employee photo and display the photo in external system.

    Hi,
    We start to work with the portal....We want an application that display the employee photo..
    The photo is the same one that appear in pa20/30...
    We create the photos in OAAD and have a table repository.
    How from here i can use this to build a RFC that return "data"..that from the external system we can show the photo,
    Thanks.

    write a RFC which uses
    'HR_IMAGE_EXISTS' to get the image document id and then use 'ALINK_RFC_TABLE_GET' to  image in JPG format convert the returned RAW table to xstring format using SCMS_BINARY_TO_XSTRING pass the resulting xstring as the export parameter of this RFC .
    portal application can now use this xsring to render the image.
    Regards
    Raja

  • Employee photo is not displayed in ESS Who's who service

    Hi colleagues,
    Please help our colleague in this issue:
    1) They have implemented correctly the procedure to display photos in PA20/PA30 and the current ITS based ESS who's who is displaying the photo.
    2) They are trying to implement EP 7 with XSS BP 1.0 SP10 bold however in the Who's Who service the employee photo is not being displayed.
    Best regards

    Hi,
    Yo would have check the forum..
    Display Photo in Employee Who is who search
    Kind Regards
    Hari Sankar M

  • Employee Photo not displayed in ESS- Who's Who Services

    Hi All..
    My employee photo upload was successful in Quality System . I can also view the photo both in R/3 employee related facsmiles , header of PA20, PA30. and also the same photo's are displayed in ESS - Who's Who services.
    steps I used-
    OANR, OAC2, V_T585O, OAC3, OAC0 and for manual upload OAAD & OAOH.
    For Mass Upload - program- OA_UPLOAD_AND_LINK
    In production in the same way , all the photo's can be seen in the facsmiles but if I checked in Who's Who..Its coming like a outline with a red cross on top corner but without any photo.
    Kindly give your valuable suggesions..
    Thanks in advance...

    Hi Alok,
    I am also facing the same issue in Prod Environment. If u r having the solution, please share with me.
    I checked in NWA Trace is not registering.
    currently i am facing issue with Employee Photo Under ESS--> Emp Search --> Change Own Data.
    All my Employee Photos are uploaded in ECC, i am able to see from PA30 Header.
    we are having same setup in QA- Environment , all the employee Photos we are able to see from Portal.
    But in Production Environment, We are Having One Central Instance and Three application Instances and configured Load Balancing among Central Instance and Application Instances.
    All the Servers Content Server in SICF t-Code is activated.
    If i login into Prod Portal [either Centeal Instance or Application Instance] some time Employee Photo is Displaying Some time not,i.e No Photo at the top of corner X symbol. If i right click check on that URL, its poiting to the ECC server content server.
    But If Not is Displaying --> Size is Showing Not Avaliable but Demension is Displaying.
    But if Photo is Displaying ---> Both Size and Dimensions are Displaying Properly...
    PHOTO URL Path  When Photo is  Displaying
    http://xxx025.xxx.com:8011/sap/bc/contentserver/490?get&pVersion=0046&contRep=A2&docId=4CA926D07B816545E1000000AC16020B&accessMode=r&authId=CN%3DMRP&expiration=20101016091012&secKey=MIH4BgkqhkiG9w0BBwKggeowgecCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGBxzCBxAIBATAZMA4xDDAKBgNVBAMTA01SUAIHIBADFBNVRjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTAxMDE1MDkwNjMxWjAjBgkqhkiG9w0BCQQxFgQUS%2BicVNGV7i6eSE8TXK5R3umNS%2FgwCQYHKoZIzjgEAwQvMC0CFQCPAZf3C48Lvl6i935mlsVqMw95owIUUJFedqFO2AoLGe6QCHHqBMSObIU%3D
    Type : JPEG Image
    Size : Not Avaliable
    Dimension: 170*200 Pixels.
    PHOTO URL Path  When Photo is Not Displaying
    http://yyy024.yyy.com:8010/sap/bc/contentserver/490?get&pVersion=0046&contRep=A2&docId=4CA927D07B816545E1000000AC16020B&accessMode=r&authId=CN%3DMRP&expiration=20101016091451&secKey=MIH3BgkqhkiG9w0BBwKggekwgeYCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGBxjCBwwIBATAZMA4xDDAKBgNVBAMTA01SUAIHIBADFBNVRjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTAxMDE1MDg1NzQ3WjAjBgkqhkiG9w0BCQQxFgQUAP9cyWhLiOtkp4vwo9KK%2FPQtxWgwCQYHKoZIzjgEAwQuMCwCFDs729ib7fVKbiGKz5CPPd1YHch3AhR7NVgtXJI7ej07GiKMpG06lZPWoQ%3D%3D
    Type : JPEG Image
    Size : 3527 Bytes
    Dimension : 170*200 Pixels.
    We are always opening the Portal with Fully Qualifies Domain Name (FQDN)
    Please suggets the Solution, how to get rid of this Porduction Issue.
    Thanks & Regards
    Ganesh

  • Displaying Employee Photos in Visual Composer

    Hi,
    I am having a requirement of displaying the employee photo's in a visual composer,
    Is there any standard RFC function module to display Employee photo??
    If any body know's please let me know...........
    Thanks & Regards,
    Bala

    Hi Elizabeth
    I've installed the the NWVC60_0-20000504.ZIP as well as the NWVC60P_2-20000504.zip content (https://websmp106.sap-ag.de/download - "search all categories" - type "visual composer*").
    But it still doesn't seem to work.
    Any ideas?
    Best regards
    Ole

  • ESS- Employee Photo is not displaying.

    Dear All,
    Employee photo is not displaying in Who's who application of Employee search.
    By right click help gone through the Properties.
    It is giving message that..
    "800?get&pVersion=0046&contRep=Z2&docId=E135E81A75C422F1B0B95CF3FC94086E&accessMode=r&authId=CN%3DPR1,OU%
    3DI0020259918,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&expiration=20120104085649&secKey=MIIBUgYJKo
    ZIhvcNAQcCoIIBQzCCAT8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAR4wggEaAgEBMG8wZDELMAkGA1UE
    BhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0k
    wMDIwMjU5OTE4MQwwCgYDVQQDEwNQUjECByARBQkJWFkwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG
    9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTEyMDEwMzA4NTY0OVowIwYJKoZIhvcNAQkEMRYEFOB%2Fx7LoOChOjGW3iIGG
    FxjjpJkMMAkGByqGSM44BAMELzAtAhRpHueDstxejUkJ0F2j7PNmxPu5xQIVAILHJcNOP7pvx%2BbPVgmDX%2F5Osaby"
    here 800 is client number and Z2 is the content repository name.
    also
    http://<Host>.xxxxxxxxx.com:<port>/sap/bc/contentserver/800?get&pVersion=0046&contRep=Z2&docId=E135E81A75C422F1B0B95CF3FC94086E&accessMode=r&authId=CN%3DPR1,OU%
    3DI0020259918,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&expiration=20120104085649&secKey=MIIBUgYJKo
    ZIhvcNAQcCoIIBQzCCAT8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAR4wggEaAgEBMG8wZDELMAkGA1UE
    BhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0
    kwMDIwMjU5OTE4MQwwCgYDVQQDEwNQUjECByARBQkJWFkwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhki
    G9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTEyMDEwMzA4NTY0OVowIwYJKoZIhvcNAQkEMRYEFOB%2Fx7LoOChOjGW3iIG
    GFxjjpJkMMAkGByqGSM44BAMELzAtAhRpHueDstxejUkJ0F2j7PNmxPu5xQIVAILHJcNOP7pvx%2BbPVgmDX%2F5Osaby
    Please help to solve this.
    Regards,
    Potru.
    Edited by: N Potru on Jan 3, 2012 10:21 AM

    Hi Siddharth,
    http://yyyy.xxxxxxxxx.com:8000/sap/bc/contentserver/180?get&pVersion=0046&contRep=Z2&docId=E141FAA8EA53BEF1B0AF00145E190D9D
    When I right click on that Place system is giving this error.
    I have maintained number ranges for photo upload. I have uploaded 3 photos and checked the number range but it is showing current number as 0. means no number is generating from the number ranges.
    Thanks,
    Potru.

  • Asking ECC System Credentials while Displaying Employee Photo in CODService

    Hello All,
    Currently we are having requirement like , need to display the employee Photo from Portal.
    Already all the Employee Photos are Uplaoded in the backend, i can able to see employee photos on Hearder in PA30.
    While Displaying the Employee Photo from the Portal using COD Service, it asking the ECC System Credentails.
    What Configuration steps need to follow to display the Employee Photo in CHange Own Data Service from the Portal with out asking the backend system Credentails..
    Plz Share some inputs to fix the issue..
    Thanks in Advance
    Adapag

    Hi Pramod,
    Thanks for the reply, we stored all our employee photos on  ECC System Only...
    If i enter the Personal No: in PA30, i am able to see the EMployee Photos on the Header..
    But While accessing the COD Service from the Portal, asking ECC system credentials to display the photo.. If i am providing the Credenials Employee Photo is displaying .. other wise Blank Image Displaying...
    Siddarth suggested its due to SSO problem, if its sso issue, how come i login into portal without any errors currently we are using ABAP UME both Portal and ECC Login details r same...
    Please Suggest me how to fix the issue...
    Thanks in Advance
    Adapag

  • Displaying employee photo during runtime

    I form for employee master and i want to store all employee photo in file and have them displayed during runtime from the file
    directory. That is when i query for an emp_no
    the records along with the picture in the file directory should also come up?
    null

    You'll have an image-item in your form and use read_image_file built-in. The image file has to be on the local client or on a network drive the client is connected to, and that will be quite a problem.
    Another way to do, which is, by far, better is to have the image stored in a longraw column of a table in your database, as I did and it isn't too difficult.
    Or, eventually, use BLOBS - which I haven't done so far.

  • Displaying Employee Photo thru Web Service

    Hi,
    I am having a requirement of displaying the employee photo's thru weservice, in asp.net application.
    Is it  possible?
    If anybody knows..
    Guide me to close this issue...
    Thanks & Regards,
    Balajee Jeyaraj .

    Hi Pramod,
    Thanks for the reply, we stored all our employee photos on  ECC System Only...
    If i enter the Personal No: in PA30, i am able to see the EMployee Photos on the Header..
    But While accessing the COD Service from the Portal, asking ECC system credentials to display the photo.. If i am providing the Credenials Employee Photo is displaying .. other wise Blank Image Displaying...
    Siddarth suggested its due to SSO problem, if its sso issue, how come i login into portal without any errors currently we are using ABAP UME both Portal and ECC Login details r same...
    Please Suggest me how to fix the issue...
    Thanks in Advance
    Adapag

  • Displaying Employee Photo in smartform in SAP-HR

    hi all,
    how can i display employee photo in smartform which is not uploaded in the sytem with tcode se78 but throgh diff tcode (OAAD) by HR functional. There are mainly two parts: 1. Procedure to retrieve that photo from the system
                              2. Display it in the smartform.
    This photo is stored as graphics and so in  smartform i am unable to put the name in graphic option which we normally follow.Please suggest what can i do.
    Regards
    Raj

    THe below links should help you
    Smart forms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
    http://www.sap-img.com/smartforms/smart-001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sap-img.com/smartforms/smart-002.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Try to upload the pictures via SE73 as it's described in the Online help.. As far as I remember it works all the mentioned formats
    Please check this FM perhaps they may help.
    HR_IMAGE_*
    HRWPC_RFC_EP_READ_PHOTO_URI
    HR_ESS_EMPLOYEE_PHOTO_CHECK
    HR_ESS_EMPLOYEE_PHOTO_INIT
    HR_ESS_EMPLOYEE_PHOTO_RESET
    HR_ESS_EMPLOYEE_PHOTO_SAVE
    HR_ESS_EMPLOYEE_PHOTO_SHOW
    HR_ESS_EMPLOYEE_PHOTO_TAKE
    Reward points if found helpful….
    Cheers,
    Chandra Sekhar.

  • How to display employee photo in pdf through WebDynpro OR ABAP print Progr?

    hi,
    I have uploaded employee photos using TCODE OAOH. Now all the employee photos are stored in Archive link.
    Now my requirement is i have get the employee photo and display it in PDF using PDF forms and  webdynpro OR using ABAP print program.
    I am able to get the employee photo from SAP archive link using ABAP code. After this i have to upload this to MIME reository. From MIME repository i have to display it in PDF forms from WEbDynpro.
    I tried with ABAP print program, directly calling the PDF form in program and display the employee data with Employee Photo. With my program i am able to see only employee data. But it's not displaying employee Photo.
    Plz any helps to display employee photo in PDF forms using either webdynpro OR ABAP printprogram.
    If ur reply is related to WebDynpro, pla tel me how to upload photo to MIME repository From Archive Link.
    Since all the employee photos are uploaded into Archive link using Tcode OAOH. From this i have to get the employee photo and upload it to MIME repository and i have to display it in PDF forms.
    Any help are appreciated.......
    Regards,
    Shankar.

    Hi Sankar,
    1)You can use the program BSP_UPDATE_MIMEREPOS to upload the photos in the mime repository.
    2)Use the following code to get the content from your mime and set the content to your interactive UI element as Xstring format.
        data:
        mime_repository type ref to if_mr_api,
        content type xstring,
        url type string value '/SAP/BC/BSP/SAP/myBSPapplication/rajkumar.jpg'  .
      mime_repository = cl_mime_repository_api=>get_api( ).
      call method mime_repository->get
        exporting
          i_url     = url
        importing
          e_content = content.
      wd_context->set_attribute( name = 'DATAS' value = content ).
    Thanks,
    Rajkumar.S

  • I  want to retrieve a photo image of an Employee to display in smartforms

    Hi,
    i want to retrieve a photo image of an Employee to display in smartforms , how do i do that? can anyone help me with this?
    Regards
    Anbu B

    Hi Anbu,
    Check this link:
    smartforms: logo
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/1d008bdd4811d3969500a0c930660b/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/69a154cd8b11d3b563006094192fe3/content.htm
    Regards,
    Chandra Sekhar

  • ESS photo display problem in portal

    Hi,
    I am not able see the photo in communication data or while viewing the employee's profile  in my system. The photo is properly getting stored in sap hr. In Internet explore security settings are low and even photo display is ticked but still i am not able see the photo in the iview of portal.
    Please help.
    thanks,
    Regards,
    Aditya

    Hi Aditya,
    1. R you able to see the photo while accessing PA30 ?
    2. There is a function module to retieve the employee photo in URI.
        & you can use that URI in your Iview.
    call function 'HRWPC_RFC_EP_READ_PHOTO_URI'
      exporting
        pernr                  = '00001185'
    *   DATUM                  = SY-DATUM
    *   TCLAS                  = 'A'
      importing
        uri                    = uri
    and URI should be of the type TOAURI-URI.
    Rgds,
    Jothi.P

  • How to maintain Employee photo in ESS who's who without sap_all and sap_new

    Hi ALL,
    Displaying Employee photo in ESS Who's who. it is working but with SAP_ALL and SAP_NEW user profiles.
    My requirment is without SAP_ALL and SAP_NEW user profiles. how it is working where can i maintain authorizations for this issue.
    The parameter i used are as follows:
    Business obj: PREL
    Doc type: HRICOLFOTO
    Personal num: 00000094
    Infotype: 0002
    Photo type: .JPG
    please help me.
    Regaards
    Satya.

    Dear satya .
    Please check the following
    1. Trace with the t.code ST01 and check that object require.
    2. The portal require the following obect:
    S_SERVICE
    S_RFC
    P_PERNR
    PLOG
    P_ORGIN/ P_ORGINCON
    P_HAP_DOC, if you work with Appraisal Document.
    3. Check the table T77S0
    P_PERNR, P_ORGIN, y P_ORGINGCON
    4. Check that you have the roles need for ESS.
    SAP_ESSUSER
    SAP_ESSUSER_ERP05
    SAP_EMPLOYEE_ERP05
    SAP_EMPLOYEE_ERP_13
    SAP_EMPLOYEE_ERP05_xx
    SAP_EMPLOYEE_ERP_13_xx
    5. Check the following notes:
    SAP Note 857431 - ESS: Authorizations and roles for WD services in ERP 2005
    SAP Note 844639 - MSS: Authorizations and roles for WD services in ERP 2005
    SAP Note 1373177 - Back end authorization roles missing in EHP4
    SAP Note 824757.
    [ESS Quick Start|http://www.cogentibs.com/pdf/cogsap08/ESS.pdf]
    Hope is help you.
    Regards
    consultor_ess_mss

Maybe you are looking for

  • Using BAPI_ROUTING_CREATE to copy routing from legacy system

    Hi, I would like to know whether its possible to use BAPI_ROUTING_CREATE in my Routing conversion program to upload all routing data from the legacy system into SAP? It's kind of urgent. Thanks in advance

  • Access restriction for business objects in same solution

    Hi All, Requirement: I have one single solution with 4 modules. 1 module is common and other 3 are industry specific. When i roll it out to a customer, i what restrictions on Business Objects. So that i can roll out single or combination of modules a

  • F110 using customers

    Hi Friends, Can anyone explain in easy words what is the logic behind having Customers accounts in F110 run ? I imagined it was only a transaction for payments of Vendors. Why some scenarios F110 has only customers ? Please provide some input so it i

  • All invisible items visible now - What to do?

    Greetings everyone, All of a sudden all the invisible items at the root level of my HD have become visible, stuff like "bin", "sbin", "Volumes", "etc", "dev" and so on... are now visible, my guess is they are system files, and not to be tampered with

  • Statement "E_KUNNR=" is not defined. Check your spelling.

    Hi, I was trying to work out a User exit EXIT_SAPMV45A_002 to predetermine a customer in the sales order.Something went wrong and I deactivated and delected the project I created in CMOD. The System is showing a msg  like below. Syntax Error in progr