on 11-29-2007 9:22 AM
Hi All,
When uploading employee photos with OAAD, I can not use SHDB to record the bdc actions because there is a popup function(to specify uploading JPG file) which can NOT be recorded by BDC.
So anybody got some suggestions?
Thanks in adv.
Br,Kee
Hi,
Use this code this will work.
This is a code workaround instead of BDC from SHDB.
START-OF-SELECTION.
LOOP AT t_record.
Since the employee photo is always stored in 0002 infotype, we need to
concatenate the employee id with preceeding zeros and pad "0002" in
right into the pernr field which will be passed to object_id
Any unwanted leading zeros deleted
SHIFT t_record-pernr LEFT DELETING LEADING '0'.
Any leading space is removed
CONDENSE t_record-pernr.
0002 is concatenated to the emp id
CONCATENATE t_record-pernr '0002' INTO t_record-pernr.
Push the contents of pernr into pernr_zero since its a NUMC type field
and hence zeros will be padded automatically by the system
w_pernr_zero = t_record-pernr.
Now pernr will be having zero padding
CLEAR w_pernr_pass.
w_pernr_pass = w_pernr_zero.
Call this function module for storing the photos.
CALL FUNCTION 'ARCHIV_CREATE_DIALOG_META'
EXPORTING
archiv_id = 'A1'
ar_object = 'HRICOLFOTO'
object_id = w_pernr_pass
sap_object = 'PREL'
file = t_record-path.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
Hope this helps you.
Regards,
Subbu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.