cancel
Showing results for 
Search instead for 
Did you mean: 

Upload Employee Photo into SAP

Former Member
0 Kudos

Hi,

Due to employee photo is stored as ArchiveLink and I tried to upload it by LSMW, but it doesn't work. I was wordering that, the document that stored in ArchiveLink can be uploaded by LSMW or not.

Has anyone used to upload employee's photo into SAP? If so, how?

Thanks in advance.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi

Please Check Mass Upload  Employee Photo in wiki :

Mass upload of Employee photo for Infotype 0002 - Code Gallery - SCN Wiki

If you use content server to store employee photo see

In wiki : SAP Mass Upload Program for Photo to Content Server - ERP Human Capital Management - SCN Wiki

SAP Note :   685520

Former Member
0 Kudos

Hi,

You can also use this transaction OAAD.

ive business object PREL and document type HRIBMPFOTO.

Then click on create.

Reward if this helps you.

Cheers,

JS

Former Member
0 Kudos

Dear Sakchai,

Refer to the following link for step by step procedure:

http://wiki.ittoolbox.com/index.php/Upload_a_photo_in_SAP_HR

Sample program from http://sap.ittoolbox.com/groups/technical-functional/sap-hr/massive-upload-photo-1211577

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.

Regards,

Naveen.

Former Member
0 Kudos

hi,

Yes, ofcourse you can do by LSMW.

These are all the steps to upload the Photo.

1.Create a number range for SAP Archive Link :

IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain number ranges.

Tcode OANR. Create range 01 from 0000000001 to 9999999999 without the external number flag.

2.Document type HRICOLFOTO must exist with document class JPG.

IMG>Basis Components>Basis Services>SAP Archive Link>System Settings>Maintain document types.

Table TOAVE, Tcode OAC2.

3.Document type HRICOLFOTO must be linked to object type PREL and IT0002.

IMG>Personnel Management>Personnel Administration>Tools>Optical Archiving>Set up Optical Archiving in HR.

View V_T585O, no Tcode. In all three columns there ara minuses, don’t put a flag in the check box.

4.Check which content repository (Archive) is linked to document type HRICOLFOTO and object type PREL.

IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain Links.

Table TOAOM_C, Tcode OAC3

5.Create this content repository with storage type FILE archive.

IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain content repositories.

Tcode OAC0

Storage type FILE archive can be attained by clicking on the field Storage type and clicking somewhere else in the screen with the right mouse button. Choose Possible entries and only then you get a list of all values. FILE Archive is entry number 08. Choose Version no. 0031 and Archive path something (e.g. C:\).

6.Link photo to personnel number.

Menu>Tools>Business Documents>Miscellaneous>Stored Documents. Tcode OAAD.

Click on the Create button. Business object PREL and Docyment type HRICOLFOTO. Click on create (fill in the right personnel number in the pop up and click Continue). Choose the photo (as a JPG file) from the place where it is saved (e.g. hard disk). SAP will notify that the Stored Document was created succesfully. Photo is visible via PA10, PA20, PA30, PA40. Double-click to magnify photo.

If you want to upload the photo in Mass, view the zprog in this link.

http://wiki.ittoolbox.com/index.php/Code:Z_report_for_Massive_Photos_Upload

Good Luck

Om

Reward it, if u feel helpful.

Former Member
0 Kudos

Hi

First let us know you are getting any problem in updating a single photo directly by backend.

Manoj Shakya.

Former Member
0 Kudos

Hi,

Uploading a single photo directly by OAAD is fine. But I want to migrate for the whole employees photo (~4000 staff). Not upload one-by-one personnel no. manually. Anyway, thanks for all input.

Former Member
0 Kudos

Hi

It is mentioned in the problem that you have to do mass upload .

Before uploading those you must have to be sure that your config is working correctly that the reason i asked to try for one.

Know your config is correct then you can upload it very easily sometime it happens through LSMW some screens may not capture while recording then in that case <b>you have to add it manually.</b>

Ask your ABAPer to look into this it is just peice of cake.

Hope that answer your question.

Manoj Shakya.

Former Member
0 Kudos

Hi Manoj,

Thank you for your input. It seems can be done by ABAP only.

Thank a lot.

Former Member
0 Kudos

Hi

Yes you are correct.

Still you can even see it just need few codes .

Manoj Shakya

Former Member
0 Kudos

Hi

It can be done by LSMW also.

Manoj Shakya