Photo upload in infotype 2, or infotype header
Can anyone tell me in detail how to upload photo of employee in infotype header and what all needs to be done in terms of basis also , archieve link or something. I know oAAD but how does that linkage happen.
Solution in https://wiki.sdn.sap.com/wiki/display/ERPHCM/Add%20Employee%20Photo%20on%20Infotype%200002?showChildren=false is very good.
Mass upload program ZHR_BDC_UPLOADPIC requires input every file path for photos in dialog window.
I have improved this process:
1. Made a copy of program OANEWCON (program in transaction OAOH) ZOANEWCON (hung on new transaction ZOAOH)
inserted two lines allow to pass a path as a parameter to this program:
PROGRAM ZOANEWCO MESSAGE-ID OA.
TABLES: TOAV0, TOAOM, TWFDB, TOAPA.
DATA: KEY LIKE OJINT-KEY.
DATA: OBJECT LIKE OJINT-NAME.
DATA: OBJECT_ID LIKE TOAV0-OBJECT_ID.
DATA: ARCHIV_ID LIKE TOAV0-ARCHIV_ID.
DATA: ARC_DOC_ID LIKE TOAV0-ARC_DOC_ID.
DATA: ABLAGEDATUM LIKE SAPB-SAPABLDATE.
DATA: AR_DATE LIKE TOAV0-AR_DATE.
DATA: DEL_DATE LIKE TOAV0-DEL_DATE.
DATA: SAP_OBJECT LIKE TOAOM-SAP_OBJECT.
DATA: AR_OBJECT LIKE TOAOM-AR_OBJECT.
DATA: EXPIRY_TIM LIKE TOAOM-EXPIRY_TIM.
DATA: METHOD LIKE OJINT-METHOD.
DATA: RETURN LIKE OJINT-RETURN.
DATA: PARAMETER LIKE OJINT-PARAMETER.
DATA: BEGIN OF I_TOAV0 OCCURS 1.
INCLUDE STRUCTURE TOAV0.
DATA: END OF I_TOAV0.
DATA: BEGIN OF I_TOAOM OCCURS 1.
INCLUDE STRUCTURE TOAOM.
DATA: END OF I_TOAOM.
DATA: BEGIN OF FIELDS OCCURS 1.
INCLUDE STRUCTURE OJFIELDS.
DATA: END OF FIELDS.
DATA: OK_CODE(4) TYPE C,
OK_CODE_SAVE(4) TYPE C.
DATA: CREATE(2) VALUE '01'.
DATA: infile(70).
MODULE INIT0100 OUTPUT *
MODULE INIT0100 OUTPUT.
SET TITLEBAR '000'.
CLEAR: OBJECT, AR_OBJECT.
SET PF-STATUS 'POPU100'.
ENDMODULE.
MODULE EXIT_BEARBEITEN INPUT *
MODULE EXIT_BEARBEITEN INPUT.
OK_CODE_SAVE = OK_CODE.
CLEAR OK_CODE.
CASE OK_CODE_SAVE.
WHEN 'ESC'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'CANC'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE.
MODULE READ0100 INPUT *
MODULE READ0100 INPUT.
OK_CODE_SAVE = OK_CODE.
CLEAR OK_CODE.
CLEAR KEY.
CASE OK_CODE_SAVE.
WHEN 'NEW'.
OBJECT = TOAOM-SAP_OBJECT.
AR_OBJECT = TOAOM-AR_OBJECT.
SELECT * FROM TOAOM WHERE AR_OBJECT = AR_OBJECT
AND SAP_OBJECT = OBJECT.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE W251 WITH AR_OBJECT OBJECT.
"MESSAGE: NO NCI-DOCTYPE with this Objecttyp
ELSE.
Corr. 3.0. Begin
Authority check with Archive id
ARCHIV_ID = TOAOM-ARCHIV_ID.
PERFORM AUTHORITY_CHECK_CREATE(OAALL)
USING ARCHIV_ID OBJECT SPACE AR_OBJECT SPACE
CHANGING SY-SUBRC.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
Corr. 3.0 End.
Change 5.0 for BOR Objecttypes with GUID vok
METHOD = 'EDIT'.
Eingabe der Object_Id
CALL FUNCTION 'OJ_KEY_FIELDS'
EXPORTING
KEY = KEY
METHOD = METHOD
OBJECT = OBJECT
TITLE_DIALOG = TEXT-001
IMPORTING
KEY = KEY
TABLES
FIELDS = FIELDS
EXCEPTIONS
EXC_OBJECT_NOT_FOUND = 01.
CALL FUNCTION 'ARCHIV_POPUP_OBJECT_KEY'
EXPORTING
DISPLAY = ' '
OBJTYPE = OBJECT
TITLE = TEXT-001
OBJKEY = ' '
LASTTYPE = ' '
LASTKEY = ' '
CHECKEXISTENCE = 'X'
GENERIC = ' '
EDIT = ' '
IMPORTING
CHANGED =
RETURN =
OBJKEY = KEY
USE_LAST =
EXCEPTIONS
ERROR_PARAMETER = 1
USER_CANCEL = 2
OTHERS = 3
End of change 5.0 for BOR Objecttypes with GUID vok
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'W' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
CLEAR TOAV0.
ELSE.
TOAV0-OBJECT_ID = KEY.
IF KEY EQ SPACE.
MESSAGE W252.
CLEAR TOAV0.
'Kein SAP-Beleg vorhanden.'.
ELSE." create archiveobject versus dialog
PERFORM CREATE_ARCHIVE_OBJECT.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDCASE.
ENDMODULE.
FORM CREATE_ARCHIVE_OBJECT *
FORM CREATE_ARCHIVE_OBJECT. "Create an archiveobject
CALL FUNCTION 'ARCHIV_CREATE_DIALOG_META'
EXPORTING
AR_OBJECT = TOAOM-AR_OBJECT
OBJECT_ID = TOAV0-OBJECT_ID
SAP_OBJECT = TOAOM-SAP_OBJECT
FILE = infile
IMPORTING
ARCHIV = TOAV0-ARCHIV_ID
ARCHIV_DOC_ID = TOAV0-ARC_DOC_ID
DOCUMENTCLASS = TOAOM-DOC_TYPE
EXCEPTIONS
ERROR_ARCHIV = 01
ERROR_COMMUNICATIONTABLE = 02
ERROR_CONNECTIONTABLE = 03
ERROR_KERNEL = 04
ERROR_PARAMETER = 05
ERROR_SCANQUEUE = 06
others = 7.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'W' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
CLEAR TOAV0.
ELSE.
MOVE TOAOM-DOC_TYPE TO TOAV0-RESERVE.
TOAV0-SAP_OBJECT = TOAOM-SAP_OBJECT.
TOAV0-AR_OBJECT = TOAOM-AR_OBJECT.
COMMIT WORK.
MESSAGE I044.
ENDIF.
ENDFORM.
2. in program ZHR_BDC_UPLOADPIC calling transaction ZOAOH
added parameters for data file, for a photo ID in archive, and add date of a photo into the data file
e.g.: 0000000527.09.2004C:\Photos\5.jpg
{REPORT ZHR_BDC_UPLOADPIC NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF IT_DATA OCCURS 0,
PERNR(8), " LIKE RP50G-PERNR,
DATUM(10), "date of the photo
FILENAME(128),
END OF IT_DATA.
DATA: T1(80),
file_path(132).
SELECTION-SCREEN: BEGIN OF BLOCK sp WITH FRAME TITLE text-f01
NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(4) A1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK sp.
INCLUDE BDCRECX1.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN: BEGIN OF BLOCK vst WITH FRAME TITLE text-f02.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(25) TEXT-S11 FOR FIELD IDOBJ.
selection-screen position 45.
PARAMETERS POPFILE(128) VISIBLE LENGTH 50
DEFAULT 'C:\PICTURE.TXT'. "input data file
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(25) TEXT-S12 FOR FIELD IDOBJ.
selection-screen position 45.
PARAMETERS IDOBJ(2) DEFAULT '01'. "id object
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK vst.
at selection-screen on value-request for POPFILE.
call function 'F4_FILENAME'
exporting
field_name = file_path
importing
file_name = POPFILE.
exception
others = 1.
START-OF-SELECTION.
PERFORM OPEN_GROUP.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = POPFILE
FILETYPE = 'ASC'
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 : / 'No to able read input file'.
STOP.
ELSE.
WRITE : / 'Data processing ...'.
T1 = 'Data processing ...'.
MESSAGE T1 Type 'S'.
ENDIF.
LOOP AT IT_DATA.
PERFORM BDC_DYNPRO USING 'ZOANEWCON' '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_FIELD USING 'INFILE' IT_DATA-FILENAME."JPG
PERFORM BDC_DYNPRO USING 'SAPLOA12' '0200'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'OBJID-VALUE(03)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=OK'.
PERFORM BDC_FIELD USING 'OBJID-VALUE(01)' IT_DATA-PERNR.
PERFORM BDC_FIELD USING 'OBJID-VALUE(02)' '0002'.
PERFORM BDC_FIELD USING 'OBJID-VALUE(04)' IDOBJ.
PERFORM BDC_FIELD USING 'OBJID-VALUE(05)' IT_DATA-DATUM.
PERFORM BDC_TRANSACTION USING 'ZOAOH'.
clear IT_DATA-FILENAME.
ENDLOOP.
PERFORM CLOSE_GROUP.}
Similar Messages
-
Hi friends,
Im just beginner in HR-ABAP and Im uploading employee pics(mass) thru BDC object with Tcode:OAOH but Im getting error at end as Error:401 Unauthorised.
Just kindly advise me, before I go this, is there any confg has to do by the HR consultant? so y Im getting this error or what is the steps will be done.Pls post me in detail.
Note:The image is not coming out for my HR consultant, has he done all this conf methods correctly and he also got successful message at end but its not displaying the image we loaded.
Pls advise.
Thanks & regards
sankar.hi
check this code for photo uploading
REPORT ZHR_BDC_UPLOADPIC
NO STANDARD PAGE HEADING LINE-SIZE 255.
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.
thanks
sitaram -
Function Module Error In Uploading Data for Basic Pay Infotype
Hi All,
I'm trying to upload data into Basic Pay Infotype 0008 Using LSMW Subtype 0(Basic Contract). While we are trying to input values into ANSAL(Annual Salary) field directly using default wage type as 1000.
We are gettting a error in function module RP_ANSAL_FROM_WAGETYPES.
and eventhough we are inputting values into ANSAL field it is taking it as 0.00 by default .
Kidly suggest me solution.
Thanks,
VasanthHi ..
check this
765785
673372
730976
note 1032950
http://help.sap.com/saphelp_nw2004s/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
Message was edited by:
hari kv -
Info required on Employee Photo upload
Hi Friends,
Can any of you explain my questions listed below:
1. Is there any storage limit for storing the photos in Content repository ?
2. If not , If I have a requirement to store lot of photos, does it impact the performance of the system in anyway?
3. How to upload photos for a group of employees?
Kindly share the link or document where I can get all the information about the above said questions.
Thanks in Advance.
Regards,
Nithya.1) CUstomizing steps
IMG - Personnel management - personnel administration - customizing user interfaces - change screen header.
Regarding the archiving part - Basis admin to set that up for document type HRICOLFOTO.
2) Photo in the PA IT0002 In version 4.0B
1. Define physical archives using transaction OAC0 Arx. ZZ
2. Assign objects types & document types to archive & documents tables for Obj PREL , doc.type HRIEMPFOTO, Arx. ZZ using transaction OAC3
3. Define number range using transaction OANR
4. Using transaction OAC2 define doc.typ & tech doc types for exmpl. HRIEMPFOTO - TIF
5. Create protocol for Archive link using transactions OAA3 for exmpl. Comm.prot.,version. Generate it will define application type from list and so on.
6. In the table 585O define relevant infotype for object and document type for exmpl. for it0002
7. Using transaction OAAD create link for PERNR with relevant infotype & files on the server, which described on the first step.
3)
In addition to any infotype fields you can also include passport photos of your employees in the infotype header in Infotype Header Definition view (T588J).
In the System Table view (T77S0), determine the document type with which you want to enter the passport photos in the optical archive.
Still does not work? try as suggested below:
When I execute the OAAD transaction the result is ok, but when I look at PA30 I can´t see the photo.
In PA30 if I look by "Extras-> display all facsimiles" the photo appears correctly, so the photo is assigned to the employee number.
Then my problem is in the initial screen in PA20, PA30,...
From an OSS message from SAP:
For using an employee picture in the PA20/PA30 please check that you have a correct customization for the infotype header.
For further information please have a look at the corresponding point in the customizing for 'Personnel Administration' - 'Define Dynpro header'.
You have to check the table T588J and T77S0 (define document type for pictures). Additionally, remember that the photo should be in JPG format."
You may find helpful note 353949.
T588J could look like:
00 1 60 0001 PERNR PIC -
Report on employee photo upload [HRICOLFOTO]
Hi Experts,
Have gone thru many posts regarding photo upload, but is there any report or table which gives PERNR wise details for all the uploaded photos?
Basically I want to know for how many employees photos have not been uploaded or the other way will also do.
Have checked content repository table SDOKCONT1 but not of much help.
Please help on the issue.Hi,
Run report OAADMILI via SE38 for the relevant content repository.
There restrict the output to PREL object.
There you'll see all the personnel numbers who have a photo in the SAP Object ID column (along with the infotype number e.g. XXXXXXXXYYYY where XXXXXXXX is the personnel number and YYYY is the infotype)
Regards,
Dilek -
Hi Guys,
I found CF 'ARCHIV_CREATE_DIALOG_META' is useful for massive photo upload.I tried tat,but getting an error(file_open_error) eventhough valid file exists.
And also,
-What should be the name of photo? i kept as (emp no).jpg ,
- Do we need to give ARCHIV_ID? while debugging i found Z2 as archiv_id,but i didnt mention tat in a call function.
Please help in this regard.Points will ve rewarded.
Have a look @ my code:
*& Data Declaration *&
DATA : BEGIN OF T_RECORD OCCURS 0,
PERNR(12) TYPE C, "Employee Number
PATH LIKE SAPB-SAPPFAD, "Photo Path
END OF T_RECORD.
DATA : w_pernr_zero LIKE t_record-pernr,
w_pernr_pass TYPE SAPB-SAPOBJID.
*& Selection screen *&
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME.
SELECT-OPTIONS : PERNR FOR T_RECORD-PERNR,
PATH FOR T_RECORD-PATH NO INTERVALS.
SELECTION-SCREEN END OF BLOCK A1.
*& Start of selection *&
START-OF-SELECTION.
LOOP AT PERNR.
T_RECORD-PERNR = PERNR+3(4).
T_RECORD-PATH = PATH+3(140).
APPEND T_RECORD.
ENDLOOP.
LOOP AT t_record.
"Since the employee photo is always stored in 0002 infotype,
" - Concatenation of emp id with preceding zeros and pad "0002" in
" - right into the pernr field which will be passed to object_id.
SHIFT t_record-pernr LEFT DELETING LEADING '0'.
CONDENSE t_record-pernr.
CONCATENATE t_record-pernr '0002' INTO t_record-pernr.
w_pernr_zero = t_record-pernr.
CLEAR w_pernr_pass.
w_pernr_pass = w_pernr_zero.
CALL FUNCTION 'ARCHIV_CREATE_DIALOG_META'
EXPORTING
ar_object = 'HRICOLFOTO'
object_id = w_pernr_pass
sap_object = 'PREL'
file = t_record-path.
IF SY-SUBRC EQ 0.
WRITE:/ 'SUCCESSFULLY ASSIGNED'.
ELSE.
WRITE :/ 'NO RECORDS HAVE BEEN ASSIGNED'.
ENDIF.
ENDLOOP.Hi,
for uploading the photograph you need to do some customization.
1. Initial customization
Execute transaction code OAQ1 and put X in all the boxes.
Execute t code OAB4 and schedule the job
Execute t code SPAD and configure an output device
Execute T code OANR and configure the number range
Execute T code OAGI and deactivate Print list management system
EXecute T code SA38 and execute program RAPARAM and check for rspo/archive_format and make sure it should have 2 assigned on it.
2. Execute t code OAC0 and configure content repository
Execute t code OAC2 and make your document type
Assign JPG doc class to your doc type made in OAC2 in t code OAC3.
3. Now go to transaction code OAD5 and configure your settings
Come to t code OAWD and upload all your scanned photo to SAP
I know the procedure is tedious and lenghthy but there is no way out.
If it helps you then reward it.
Enjoy
For further help contact at [email protected] -
Hi all,
Can you please guide me how to upload photo of employee from infotype 0002.
I can upload it through ooad or oaoh, how can we upload photo through 0002
please help
Regards,
AmanHi Aman,
You cannot upload the photos from infotype 2.
You have to use a BDC program for mass upload or upload individually through OAAD.
Use the FM ARCHIV_CREATE_DIALOG_META for upload of Photo, Since the recording of OAAD will pop-up a dialog window.
chk this source code.
*Table for filling screen
DATA: BEGIN OF t_record OCCURS 0,
pernr(12) TYPE c, "Employee Number
path(255) TYPE c, "photo path
END OF t_record.
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.
from "ARCHIV_CREATE_DIALOG_META"
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.
Message was edited by:
Subramanian Padmanaaban -
Employee Photo Upload through binary data
Hi all,
I know the Provision for Photo upload through OAAD Tcode, I know FM to upload the photos by giving path as input data. my requirement is I have picture in the form of binary data . i want to upload that into PA30. I have return the following code. No Error but image is not displayed in PA30.Can u Please correct me?
tables: toav0, toaom, twfdb, toapa.
data: key like ojint-key,
object like ojint-name,
object_id like toav0-object_id,
archiv_id like toav0-archiv_id,
arc_doc_id like toav0-arc_doc_id,
ablagedatum like sapb-sapabldate,
ar_date like toav0-ar_date,
del_date like toav0-del_date,
sap_object like toaom-sap_object,
ar_object like toaom-ar_object,
expiry_tim like toaom-expiry_tim,
method like ojint-method,
return like ojint-return,
parameter like ojint-parameter.
data:begin of i_toav0 occurs 1.
include structure toav0.
data: end of i_toav0.
data: begin of i_toaom occurs 1.
include structure toaom.
data: end of i_toaom.
data: begin of fields occurs 1.
include structure ojfields.
data: end of fields.
DATA: filename1 TYPE string.
Data: i_name TYPE STXBITMAPS-TDNAME value 'TEST',
* archiv_id like toav0-archiv_id,
i_id TYPE STXBITMAPS-TDID VALUE 'BMAP',
i_btype TYPE STXBITMAPS-TDBTYPE VALUE 'BCOL',
l_bds_bytecnt TYPE i,
FLENGTH TYPE SAPB-LENGTH,
l_bds_content TYPE TABLE OF bapiconten,
OUTDOC LIKE TOADT ,
wa_l_bds_content TYPE bapiconten.
*DATA : BINARY TYPE STANDARD TABLE OF TBL1024,
data : BINARY TYPE STANDARD TABLE OF TBL1024 WITH HEADER LINE,
ARCHIVOBJECT type standard table of docs,
archiv_doc_id like toav0-arc_doc_id,
wa_binary type TBL1024.
data: lw_ar_object like toaom-ar_object,
lw_object_id like sapb-sapobjid,
lw_sap_object like toaom-sap_object,
lw_doc_type like toadd-doc_type,
lw_path like sapb-sappfad,"toav0-arc_doc_id
* archiv_doc_id like toav0-arc_doc_id,
doc_type like toadt-doc_class.
constants: c_sap_object type toaom-sap_object value 'PREL',
c_ar_object type toaom-ar_object value 'HRICOLFOTO',
c_doc_type type toaom-doc_type value 'JPG'.
PARAMETERS: filename(150) TYPE c OBLIGATORY. "Name of the File where source as txt format
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM getfile.
start-of-selection.
filename1 = filename.
key = '010001380002'.
lw_ar_object = c_ar_object.
* lw_object_id = w_pernr_pass.
lw_sap_object = c_sap_object.
lw_doc_type = c_doc_type.
* lw_path = it_data-file_nam.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename1
filetype = 'BIN'
TABLES
data_tab = archivobject.
* Object to be archived
select single * from toaom where ar_object = c_ar_object and sap_object = c_sap_object.
if sy-subrc <> 0.
raise UPLOAD_ERROR.
else.
* Authority check with Archive id
archiv_id = toaom-archiv_id.
perform authority_check_create(oaall)
using archiv_id object space ar_object space
changing sy-subrc.
if sy-subrc ne 0.
raise UPLOAD_ERROR.
else.
if sy-subrc <> 0.
raise UPLOAD_ERROR.
clear toav0.
else." Transfer key for archiving
toav0-object_id = key.
if key eq space.
Raise FUNCTION_ERROR.
clear toav0.
else.
perform create_archive_object_new .
endif.
endif.
endif.
endif.
form create_archive_object_new .
CALL FUNCTION 'ARCHIV_CREATE_TABLE'
EXPORTING
AR_OBJECT = lw_ar_object
* DEL_DATE =
OBJECT_ID = '010001380002'
SAP_OBJECT = lw_sap_object
* FLENGTH = '2328'
DOC_TYPE = lw_doc_type
* DOCUMENT =
* MANDT = SY-MANDT
* IMPORTING
* OUTDOC =
TABLES
ARCHIVOBJECT = ARCHIVOBJECT
* BINARCHIVOBJECT = binary
* EXCEPTIONS
* ERROR_ARCHIV = 1
* ERROR_COMMUNICATIONTABLE = 2
* ERROR_CONNECTIONTABLE = 3
* ERROR_KERNEL = 4
* ERROR_PARAMETER = 5
* ERROR_USER_EXIT = 6
* ERROR_MANDANT = 7
* OTHERS = 8
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
call function 'ARCHIVOBJECT_CREATE_TABLE'
EXPORTING
archiv_id = archiv_id
document_type = lw_doc_type
* length = '2328'
IMPORTING
archiv_doc_id = i_toav0-arc_doc_id
TABLES
archivobject = archivobject
* binarchivobject = BINARY
EXCEPTIONS
error_kernel = 1
error_communicationtable = 2
error_archiv = 3.
move i_toav0 to toav0.
toav0-sap_object = lw_sap_object.
toav0-object_id = key.
move archiv_id to toav0-archiv_id.
move i_toav0-arc_doc_id to toav0-arc_doc_id.
toav0-ar_object = lw_ar_object.
move lw_doc_type to toav0-reserve.
move lw_doc_type to doc_type.
commit work.
call function 'ARCHIV_CONNECTION_INSERT'
exporting
archiv_id = toav0-archiv_id
arc_doc_id = toav0-arc_doc_id
ar_date = ar_date
ar_object = toav0-ar_object
* DEL_DATE = ' '
* MANDANT = ' '
object_id = '010001380002'
sap_object = toav0-sap_object
doc_type = doc_type
* barcode = barcode
exceptions
error_connectiontable = 1
others = 2
endform.
FORM getfile .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ' '
def_path = '*.*'
mask = ''
mode = 'O'
title = ' SELECTING FILE FOR SOURCE PROGRAM'
IMPORTING
filename = filename
EXCEPTIONS
selection_cancel = 3
selection_error = 4.Hi all,
I know the Provision for Photo upload through OAAD Tcode, I know FM to upload the photos by giving path as input data. my requirement is I have picture in the form of binary data . i want to upload that into PA30. I have return the following code. No Error but image is not displayed in PA30.Can u Please correct me?
tables: toav0, toaom, twfdb, toapa.
data: key like ojint-key,
object like ojint-name,
object_id like toav0-object_id,
archiv_id like toav0-archiv_id,
arc_doc_id like toav0-arc_doc_id,
ablagedatum like sapb-sapabldate,
ar_date like toav0-ar_date,
del_date like toav0-del_date,
sap_object like toaom-sap_object,
ar_object like toaom-ar_object,
expiry_tim like toaom-expiry_tim,
method like ojint-method,
return like ojint-return,
parameter like ojint-parameter.
data:begin of i_toav0 occurs 1.
include structure toav0.
data: end of i_toav0.
data: begin of i_toaom occurs 1.
include structure toaom.
data: end of i_toaom.
data: begin of fields occurs 1.
include structure ojfields.
data: end of fields.
DATA: filename1 TYPE string.
Data: i_name TYPE STXBITMAPS-TDNAME value 'TEST',
* archiv_id like toav0-archiv_id,
i_id TYPE STXBITMAPS-TDID VALUE 'BMAP',
i_btype TYPE STXBITMAPS-TDBTYPE VALUE 'BCOL',
l_bds_bytecnt TYPE i,
FLENGTH TYPE SAPB-LENGTH,
l_bds_content TYPE TABLE OF bapiconten,
OUTDOC LIKE TOADT ,
wa_l_bds_content TYPE bapiconten.
*DATA : BINARY TYPE STANDARD TABLE OF TBL1024,
data : BINARY TYPE STANDARD TABLE OF TBL1024 WITH HEADER LINE,
ARCHIVOBJECT type standard table of docs,
archiv_doc_id like toav0-arc_doc_id,
wa_binary type TBL1024.
data: lw_ar_object like toaom-ar_object,
lw_object_id like sapb-sapobjid,
lw_sap_object like toaom-sap_object,
lw_doc_type like toadd-doc_type,
lw_path like sapb-sappfad,"toav0-arc_doc_id
* archiv_doc_id like toav0-arc_doc_id,
doc_type like toadt-doc_class.
constants: c_sap_object type toaom-sap_object value 'PREL',
c_ar_object type toaom-ar_object value 'HRICOLFOTO',
c_doc_type type toaom-doc_type value 'JPG'.
PARAMETERS: filename(150) TYPE c OBLIGATORY. "Name of the File where source as txt format
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM getfile.
start-of-selection.
filename1 = filename.
key = '010001380002'.
lw_ar_object = c_ar_object.
* lw_object_id = w_pernr_pass.
lw_sap_object = c_sap_object.
lw_doc_type = c_doc_type.
* lw_path = it_data-file_nam.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename1
filetype = 'BIN'
TABLES
data_tab = archivobject.
* Object to be archived
select single * from toaom where ar_object = c_ar_object and sap_object = c_sap_object.
if sy-subrc <> 0.
raise UPLOAD_ERROR.
else.
* Authority check with Archive id
archiv_id = toaom-archiv_id.
perform authority_check_create(oaall)
using archiv_id object space ar_object space
changing sy-subrc.
if sy-subrc ne 0.
raise UPLOAD_ERROR.
else.
if sy-subrc <> 0.
raise UPLOAD_ERROR.
clear toav0.
else." Transfer key for archiving
toav0-object_id = key.
if key eq space.
Raise FUNCTION_ERROR.
clear toav0.
else.
perform create_archive_object_new .
endif.
endif.
endif.
endif.
form create_archive_object_new .
CALL FUNCTION 'ARCHIV_CREATE_TABLE'
EXPORTING
AR_OBJECT = lw_ar_object
* DEL_DATE =
OBJECT_ID = '010001380002'
SAP_OBJECT = lw_sap_object
* FLENGTH = '2328'
DOC_TYPE = lw_doc_type
* DOCUMENT =
* MANDT = SY-MANDT
* IMPORTING
* OUTDOC =
TABLES
ARCHIVOBJECT = ARCHIVOBJECT
* BINARCHIVOBJECT = binary
* EXCEPTIONS
* ERROR_ARCHIV = 1
* ERROR_COMMUNICATIONTABLE = 2
* ERROR_CONNECTIONTABLE = 3
* ERROR_KERNEL = 4
* ERROR_PARAMETER = 5
* ERROR_USER_EXIT = 6
* ERROR_MANDANT = 7
* OTHERS = 8
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
call function 'ARCHIVOBJECT_CREATE_TABLE'
EXPORTING
archiv_id = archiv_id
document_type = lw_doc_type
* length = '2328'
IMPORTING
archiv_doc_id = i_toav0-arc_doc_id
TABLES
archivobject = archivobject
* binarchivobject = BINARY
EXCEPTIONS
error_kernel = 1
error_communicationtable = 2
error_archiv = 3.
move i_toav0 to toav0.
toav0-sap_object = lw_sap_object.
toav0-object_id = key.
move archiv_id to toav0-archiv_id.
move i_toav0-arc_doc_id to toav0-arc_doc_id.
toav0-ar_object = lw_ar_object.
move lw_doc_type to toav0-reserve.
move lw_doc_type to doc_type.
commit work.
call function 'ARCHIV_CONNECTION_INSERT'
exporting
archiv_id = toav0-archiv_id
arc_doc_id = toav0-arc_doc_id
ar_date = ar_date
ar_object = toav0-ar_object
* DEL_DATE = ' '
* MANDANT = ' '
object_id = '010001380002'
sap_object = toav0-sap_object
doc_type = doc_type
* barcode = barcode
exceptions
error_connectiontable = 1
others = 2
endform.
FORM getfile .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ' '
def_path = '*.*'
mask = ''
mode = 'O'
title = ' SELECTING FILE FOR SOURCE PROGRAM'
IMPORTING
filename = filename
EXCEPTIONS
selection_cancel = 3
selection_error = 4. -
Hi Experts,
I need to upload the photographs of employee to SAP.
All the config required for photo upload is done
These photograph path details and Emp Id will be available in a flat file.
As BDC approach using OAAD is not able to workout (picking of text file is via a Operating system screen so we cant record it in BDC) so we used below approach.
Using GUI_UPLOAD and ARCHIV_CREATE_DIALOG_META .
The above approach works FINE for foreground and presentation server upload.
Now the requirement is:
I have 2 questions.
1. It is not working for background processing.
2. The photo has to be called from app server (images available on App. Server (UNIX)). is it possible to get JPEG file from app server without using GUI_UPLOAD?
If it is possible do guide me.
Regards,
RahulI thought I'd share this with everyone. We figured out how to load pictures in batch processing using pictures stored on a unix server. The code below is what we are using. For now, I'm using a driver file from the local drive to determine which picture goes with which associate, but we plan to automate this by storing the pictures with the associate number in the name. We'll then read the directory each night and load any new pictures. I thought I'd share what we discovered for now so you can build what you need for your side.
REPORT ZHR_EMPLOYEE_PICTURES_UPLOAD
NO STANDARD PAGE HEADING LINE-SIZE 255.
Program Title: Program to mass load employee pictures into HR module
INCLUDE
PARAMETERS:
P_INFILE LIKE RLGRAP-FILENAME
DEFAULT 'c:\PICTURE.TXT',
P_UNXDIR LIKE RLGRAP-FILENAME
DEFAULT '/usr/sap/data/WINDOWS_DFS/'.
I N T E R N A L T A B L E S
DATA : BEGIN OF INFILE_DATA OCCURS 0,
IN_LINE(80) type c,
END OF INFILE_DATA.
DATA : begin of inrec,
raw(1024) type x,
end of inrec.
DATA : begin of itab occurs 0,
raw(1024) type x,
end of itab.
Data: WS_FILENAME TYPE STRING,
WS_OBJID LIKE SAPB-SAPOBJID,
WS_FILELENGTH TYPE I,
WS_FLENGTH LIKE SAPB-LENGTH.
S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
Read input file that controls which picture goes with which associate.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_INFILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = INFILE_DATA.
IF SY-SUBRC NE 0.
WRITE : / 'Unable to upload data'.
STOP.
ENDIF.
LOOP AT INFILE_DATA.
Determine file name and personnel ID from input file.
concatenate P_UNXDIR INFILE_DATA-IN_lINE+9(71) into WS_FILENAME.
WS_OBJID = INFILE_DATA-IN_LINE+0(8).
Clear table holding picture data.
clear ITAB.
refresh ITAB.
Reset overall file length variable.
ws_flength = 0.
Open dataset to read in binary mode.
open dataset WS_FILENAME for input in binary mode.
do.
Read file one record at a time in binary mode.
clear inrec.
read dataset WS_FILENAME into inrec
maximum length 1024
actual length ws_filelength.
Determine accumulated file length as each record read in.
ws_flength = ws_flength + ws_filelength.
Last record of file will cause sy-subrc to not be 0 and will be
less in length than record size.
if ws_flength > 0.
move inrec to itab.
append itab.
endif.
end loop at end of file.
if sy-subrc ne 0.
exit. "end of file must have been reached
endif.
enddo.
close dataset WS_FILENAME.
Add picture file to content server for specific associate.
CALL FUNCTION 'ARCHIV_CREATE_TABLE'
EXPORTING
ar_object = 'HRICOLFOTO'
object_id = WS_OBJID
sap_object = 'PREL'
flength = WS_FLENGTH
TABLES
binarchivobject = ITAB.
IF SY-SUBRC = 0.
WRITE : / WS_OBJID+0(8), ' -- picture loaded: ', WS_FILENAME,
' -- length: ', WS_FLENGTH.
else.
WRITE : / WS_OBJID+0(8), ' -- Unable to load pic: ', WS_FILENAME,
' -- length: ', WS_FLENGTH.
ENDIF.
clear INFILE_DATA-IN_LINE.
ENDLOOP. -
URGENT :Photo Upload automation : help required
Hi Experts,
I need your help in my program which require executing DOS command from SAP ECC 6.0.
The requirement is "to make an automated SAP program workable with ECC 6.0 which will able to execute DOS command Dir *.jpg -> photo.txt to create a File Photo.txt, Then I need to upload this file automatically into SAP Internal table for further processing" that will lead to photo upload (this part is already done by me).
I am not sure if someone has done some similar things in past if yes kindly guide how to do this.
best Regards,
Rahul
nullHi Rahul
Firstly you need to create an archive to store the pictures. Then
Goto SM30 or SM31.
Enter the Table/view name as TOAAR_C.
Click on New Entries.
Give StSym as 'A2'.
Give a description ..
In Arch. Path enter as /.
Select the radio button 'File store'.
Save the entry.
You can view the photo through PA20/PA30/PA40 for each employee.
For this you have to add an entry in Table T588J for your header
modification.
The field type of this entry should be 'PIC'.
Then you have to run the report RPHDYNPG for generating the screen
header.
After the initial configuration as described above,
for uploading the Photo
Go to Tcode OAAD -> Create
Business Object : PREL
Document Type : HRICOLFOTO
Click on Create.
System will ask for personnel no and path of Photo
If you need detailed step by step procedure, do let us know. If you need a useful code to carry out this, do let me know with your email ID -
How to fix photo uploader, ovi store, and social
after i update my phone to nokia care, the link to ovistore is missing, social can't work, photo uploader just the icon and didn't work. I have try to fix this solution by follow all suggestion in this forum and others but nothing can fix my problem. Can any 1 give me best solution?
Or this is just the biggest mistake from nokia?Hi hatstead ,
If you can't find any mail, Please clear your Online services data located at-
C:\Users\suresing.ADOBENET\AppData\Roaming\Adobe\Online Services\Photoshop Elements 11.0.0 and
C:\Users\suresing.ADOBENET\AppData\Roaming\Adobe\Elements Organizer\11.0\Organizer\OLS
After deleting this data, refresh the OLS services from Edit ->preferences -> Adobe partner services ->Refresh.
Check & please let me know if this helps.
Sarika -
I just got tOhe iPhone 4Gs today and had contacts and photos uploaded from another phone synced new phone with iTunes for music and accidentally restored it so all my old iPhone stuff is on the new one is there any way to fix this ?! Please help !!!!
Could you be more specific about what exactly do you want to fix now?
-
Hi,
I am new to flex.
I am developing a web application in flex.
I want to do the photo uploading functionality in flex and action script3.
I have to do that like "Applet photo uploader" Like what we have in facebook photo uploader.
Means on left I have client directory structure and images with thumbnail on right side.
Also I want a multithreading for this.
Can it possible in flex?
Any help appreciated.
Thanks,
Tushar Gandhi.The problem seems to be fixed. Swanky.
-
Photo Uploaded in AD but not showing/visible in Lync 2010 client
Photo Uploaded in AD but not showing/visible in Lync 2010 client
balaHi,
Please also double check the size of the photograph in AD, make sure the size not overtake 48 pixels by 48 pixels, as it has a serious limitation on the size and resolution of the photos: the thumbnailPhoto attribute can only hold a photograph with
a maximum size of 48 pixels by 48 pixels.
Best Regards,
Eason Huang
Eason Huang
TechNet Community Support -
When I try to upload a new album to Facebook or pictures to printerpix the photo upload window where I choose which photos to add does not come up, until I click on another screen. But then when it does come up everything is frozen and I have to force quit safari. Pop-ups are not blocked on my computer and all soft wear updates are complete, any other ideas? Thank you!
Hey, I don't have any answer for you right now but I saw your post and wanted to let you know I'm looking into your issue with Kaleb.
John M. -
Facebook Photo uploader not working
Hi
a few weeks ago (nov 2012) i upgraded to the latest vresion of facebook, but if i now go into the app and click to upload a photo, nothing happens, not even an error message appears. everythign else is working fine though. Photo uploading works if i go to the gallery and select send to facebook.
ive tried uninstalling, resetting my phone and upgrading my software but nothing has worked. any help would be good and i have a blackberry curve9300 3Gdo you confirm you are using Facebook 3.3.0.11 ?
The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Maybe you are looking for
-
How do I access an iTunes library from different computers?
Hi I have my iTunes Media on a NAS but the library files on my local disk (WIndows 7). Is there any way I can allow my wife to access the same Media folder on the NAS from her laptop (also Windows 7 and on the same network)? Using iTunes server will
-
HT204380 Can I use same email address for face time on iphone as well as macbook?
Can I use the same email for facetime on both iphone and macbook? I tried and got email already in use.
-
I'm having some problems getting the process id to display for the current process. I'm using netbeans 4.0 with JDK 5.0 as my interface. I'm working on a simple program for a class and this is the only portion that I can't seem to figure out how to c
-
Hi trying to download videos from my camera roll to my pc.pictures have all downloaded but not the videos
-
Update users information on AD
Hi, Monthly I have to update user's information such as office, Description, Department. I have read something about combining dsquery and dsmod but I didn't had success. C:\>dsquery user domainroot -samid "184491" | dsmod user "CN=Franco\, Oscar,OU=