Académique Documents
Professionnel Documents
Culture Documents
Content Repository
Create a content repository with storage type FILE archive.
Transaction code: OAC0
or follow IMG path:
Basis Components
Basis Services
Basic Settings
Swap from display to amend. Select a current entry and copy or just hit create. Then select .
Then fill in the details as below:
Choose a two character name can use Zx (where x is a number) only 2 Character should be maintained if you wish
to use the customer namespace
Choose the relevant description
Set DocArea to be Archive Link
Storage type set to R/3 Database
Protocol leave blank
Choose Version no. 0046 (or the latest one that is available)
Contents table set this to SDOKCONT1
Basic Path c:\ (this should be set to where the photos are all held)
Archive Path c:\ (this is the area from where the photos are retrieved)
Output Device can leave blank
Enter the path name where the photos are to be loaded from. Note this is for loading only. When the photos are
linked into the sap system (see later), actually, SAP takes a copy and stores it elsewhere. The path may only need
to be entered to Arch.path, but entering to all three doesnt seem to hurt.
Check which content repository (Archive) is linked to document type HRICOLFOTO in object
type PREL
Transaction code: OAC3
Table: TOAOM_C
Set the Content Repository field to the one you set up in the step above.
Note the Ret.per. field is the retention period for the photo in MONTHS. (so the default is 833 years and 3 months!)
Displaying Photos
You can display your linked photos straight away if you want, from any Infotype, by selecting the employee in Display
or Maintain Data and selecting Menu item Extras, display all facsimiles:
However, this will open a new application (e.g. Paint) and load the picture into it. This is a bit cumbersome. Its much
more likely that you really want the picture to appear nicely in the header of the appropriate infotype.
Personnel Administration
If youre following the IMG path, you must now choose activity Infotype Header Definition
Note, Header structure per infotype and Header modifier activities describe which header is to be shown at the top of
each infotype. The enticing Passport photo option determines whether HRICOLFOTO or HRIEMPFOTO is used.
Choosing either option is fine as long as all your other settings relate to that entry as well.
In the example below, the picture has been placed in header modifier 91, which corresponds to screen header 91,
which is linked to Infotype 0002.
All you need to do is add an entry for PERNR with Field Type PIC. Column 75 puts the picture on the right hand
side. The IT column is used to decide where to take the Field Name value from. For PERNR, all infotypes have this
field.
Dont forget to GENERATE the screen header again.
When you see the resultant Infotype display you can double click on the picture will bring up a large version of it.
You can add more than one photo to the same employee !
If you do this, both photos are stored (with stored dates). The latest one will be displayed on the infotype header.
Selecting menu bar Extra --> Display all facsimiles will give you a list of all the photos for the employee. To look at
one, select it and choose something like Display from content server. (some of the normal display buttons dont
actually display the photo, just details about it!).
You can find details of, and delete photos.
This can be done from transaction OAAD by choosing Find rather than Create.
Make sure you choose the right Find. Photos are Documents.
Select Business Object as PREL and document type as HRICOLFOTO or HRIEMPFOTO depending on which
one you have used.
You may be further asked for a Personnel number. If you blank this out, youll get all the entries in your
Archive.
To delete a photo, select the entry and hit the dustbin (or Delete). After a number of are you sure messages, and a
display of the doomed photo (probably in a separate window which will need closing again), the photo will be deleted.
Note, the deleted entry will NOT vanish from the currently displayed list. You will need to back arrow out of the list
and re-execute the archive display to see the changes.
Displaying a photo can slow down the server during the transaction, since the photo has to be loaded from the
archive (this is especially the case if you choose to display the photo on the master data / applicant data entry
screen.)
INCLUDE
INCLUDE BDCRECX1.
INTERNALTABLES
DATA : BEGIN OF IT_DATA OCCURS 0, RP50G-PERNR(8), " LIKE RP50G-PERNR,
RLGRAP-FILENAME(128),
END OF IT_DATA.
START-OF-SELECTION
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.