Skip to Content
author's profile photo Former Member
Former Member

employee photo - send to external system

Hi,

There is requirement that need to send employee photo from sap to the external system. How can I do this? Any function or sample code for this?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 08:00 AM

    HI,

    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.

    Thanks

    Virkatnh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 08:01 AM

    Hi,

    Please check this link

    upload-employee-photo-into-sap

    Thanks

    Vikranth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 08:02 AM

    REPORT ZHR_BDC_UPLOADPIC NO STANDARD PAGE HEADING LINE-SIZE 255.

    INCLUDE

    INCLUDE BDCRECX1.

    I N T E R N A L T A B L E S

    DATA : BEGIN OF IT_DATA OCCURS 0, RP50G-PERNR(8), " LIKE RP50G-PERNR,

    RLGRAP-FILENAME(128),

    END OF IT_DATA.

    S T A R T - O F - S E L E C T I O N

    START-OF-SELECTION.PERFORM OPEN_GROUP.

    CALL FUNCTION 'UPLOAD'

    EXPORTING

    FILENAME = 'C:\PICTURE.TXT'

    FILETYPE = 'DAT'

    TABLES

    DATA_TAB = IT_DATA

    EXCEPTIONS

    CONVERSION_ERROR = 1

    INVALID_TABLE_WIDTH = 2

    INVALID_TYPE = 3

    NO_BATCH = 4

    UNKNOWN_ERROR = 5

    GUI_REFUSE_FILETRANSFER = 6

    OTHERS = 7.

    IF SY-SUBRC NE 0.

    WRITE : / 'Unable to upload data'.

    STOP.

    ENDIF.

    LOOP AT IT_DATA.

    PERFORM BDC_DYNPRO USING 'OANEWCON' '0100'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'TOAOM-AR_OBJECT'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=NEW'.

    PERFORM BDC_FIELD USING 'TOAOM-SAP_OBJECT'

    'PREL'.

    PERFORM BDC_FIELD USING 'TOAOM-AR_OBJECT'

    'HRICOLFOTO'.

    PERFORM BDC_DYNPRO USING 'SAPLSJ01' '0200'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'FIELD_VALUES-INPUT(02)'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=OK'.

    PERFORM BDC_FIELD USING 'FIELD_VALUES-INPUT(01)'

    IT_DATA-RP50G-PERNR. "'10002'.

    PERFORM BDC_FIELD USING 'FIELD_VALUES-INPUT(02)'

    '0002'.

    PERFORM BDC_DYNPRO USING 'SAPLOPTM' '0105'.

    PERFORM BDC_FIELD USING 'BDC_CURSOR'

    'SAPB-SAPPOOLINF'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE'

    '=OKAY'.

    PERFORM BDC_FIELD USING 'SAPB-SAPPOOLINF'

    IT_DATA-RLGRAP-FILENAME. "JPG'.

    PERFORM BDC_TRANSACTION USING 'OAOH'.

    clear IT_DATA-RLGRAP-FILENAME.

    ENDLOOP.

    PERFORM CLOSE_GROUP.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.