Uploading HRP infotypes
HI Experts,
I have to upload data in HRP infotypes which must reflect through transaction PO13.
The Inofytpes are HRP1005, HRP1008, HRP1013
I am using the FM
HR_INFOTYPE_OPERATION
Is their any other better way.
Thanks in Advance.
Regards,
IFF
Hi,
There are two options...
1.BDC
2. FM 'RH_PNNNN_MAINTAIN'... the below example to update the single record...but you can use these FM to update the Multiple entries also...in the Tables options of this FM you can pass the multiple entries for the single infotype which you are updating,,
FORM rh_pnnnn_maintain TABLES p_return TYPE table
USING p_fcode
p_plvar
p_otype
p_objid
p_infty
p_subty
p_pnnnn
p_test
p_subrc.
DATA: l_commit_flg TYPE hrrhap-commit_flg.
DATA: l_hrrhad_msg TYPE hrrhad_msg.
DATA: l_msg LIKE sy-msgv1.
DATA: l_type TYPE bapireturn-type.
DATA: l_cl TYPE sy-msgid.
DATA l_no TYPE sy-msgno.
DATA l_m1 TYPE sy-msgv1.
DATA l_m2 TYPE sy-msgv2.
DATA l_m3 TYPE sy-msgv3.
DATA l_m4 TYPE sy-msgv4.
DATA: l_return LIKE bapiret1.
IF p_test NE space.
l_commit_flg = ''.
ELSE.
l_commit_flg = 'X'.
ENDIF.
CALL FUNCTION 'RH_STORE_BUFFER_PLOG_TAB'.
CALL FUNCTION 'RH_CLEAR_BUFFER'.
CALL FUNCTION 'RH_CLEAR_PLOG_TAB'.
CALL FUNCTION 'RH_PNNNN_MAINTAIN'
EXPORTING
act_fcode = 'INSE'
act_plvar = p_plvar
act_otype = p_otype
act_objid = p_objid
act_infty = p_infty
act_subty = p_subty
act_pnnnn = p_pnnnn
suppress_dialog = '2'
act_commit_flg = l_commit_flg
IMPORTING
act_mess_info = l_hrrhad_msg
EXCEPTIONS
infty_not_valid = 1
no_plvar = 2
object_not_defined = 3
otype_not_valid = 4
no_authority = 5
action_rejected = 6
no_gdate = 7
fcode_not_supported = 8
OTHERS = 9.
IF sy-subrc NE 0.
CASE sy-subrc.
WHEN '1'.
CONCATENATE p_objid p_infty p_subty 'Infotype Not valid'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
WHEN '2'.
CONCATENATE p_objid p_infty p_subty 'No Plan version'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
WHEN '3'.
CONCATENATE p_objid p_infty p_subty 'Object Not defined'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
WHEN '4'.
CONCATENATE p_objid p_infty p_subty 'Object type not valid'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
WHEN '5'.
CONCATENATE p_objid p_infty p_subty 'No Authority'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
WHEN OTHERS.
CONCATENATE p_objid p_infty p_subty 'Update Error'
INTO l_msg SEPARATED BY space.
PERFORM bapi_return_get TABLES p_return
USING 'W' 'PN' '016' l_msg.
ENDCASE.
ELSE.
p_subrc = 0.
ENDIF.
IF l_hrrhad_msg-msgty = 'E' OR
l_hrrhad_msg-msgty = 'A'.
l_hrrhad_msg-msgty = 'W'.
ENDIF.
l_type = l_hrrhad_msg-msgty.
l_cl = l_hrrhad_msg-msgid.
l_no = l_hrrhad_msg-msgno.
l_m1 = l_hrrhad_msg-msgv1.
l_m2 = l_hrrhad_msg-msgv2.
l_m3 = l_hrrhad_msg-msgv3.
l_m4 = l_hrrhad_msg-msgv4.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
type = l_type
cl = l_cl
number = l_no
par1 = l_m1
par2 = l_m2
par3 = l_m3
par4 = l_m4
IMPORTING
bapireturn = l_return.
APPEND l_return TO p_return.
IF sy-subrc = 0 AND p_test = ''.
COMMIT WORK.
ENDIF.
IF p_test = 'X'.
ROLLBACK WORK.
ENDIF.
CALL FUNCTION 'RH_RESTORE_BUFFER_PLOG_TAB'.
ENDFORM. " RH_PNNNN_MAINTAIN
Edited by: avinash kodarapu on Dec 14, 2008 2:39 PM
Similar Messages
-
Custom HRP Infotype for e-Recruiting
I am trying to create a custom HRP infotype to be used in our e-Recruiting system. I want to be able to update the infotype using the SAP standard RH_INSERT_INFTY and like function calls. However my entry in table t777d won't let me change the Update type to anything other than blank (No update via personnel planning update task). I also am having issues which I am not sure if this stems from that problem or not but when I try to use the RH_INSERT_INFTY I get a short dump when it tries to do an insert with a vtask of D because the data doesn't appear to be mapped to the correct fields. My input table type is of type p9xxx and it seems to be mapped correctly until the last stage when it actually tries to insert the line into the table. Any suggestions for what might be wrong? I have checked to make sure that the p9xxx and hrp9xxx have the same structure and they appear to match correctly
You could search/post this question in the HR forum...
-
I am trying to create a custom HRP infotype to be used in our e-Recruiting system. I want to be able to update the infotype using the SAP standard RH_INSERT_INFTY and like function calls. However my entry in table t777d won't let me change the Update type to anything other than blank (No update via personnel planning update task). I also am having issues which I am not sure if this stems from that problem or not but when I try to use the RH_INSERT_INFTY I get a short dump when it tries to do an insert with a vtask of D because the data doesn't appear to be mapped to the correct fields. My input table type is of type p9xxx and it seems to be mapped correctly until the last stage when it actually tries to insert the line into the table. Any suggestions for what might be wrong? I have checked to make sure that the p9xxx and hrp9xxx have the same structure and they appear to match correctly.
Thanks,
StephanieYou could search/post this question in the HR forum...
-
i m new one of sap i need to do the mass upload to infotype 2011 please help me..
Hi Vijayan,
Generally the time events (2011) are uploaded thru some Z program which is created by the ABAPers... but the SAP has provided a report to upload the time events in bulk and they are
RPTEUP00
RPTEUP10
run these report in the T.code se38., get the help of ur ABAPer to change the report for your requirement..
hope this will help u.. if its helpful provide me the points
Regards
Gopinath.BKrish -
Hi,
Just like PCL4 for PA Infotypes, do we have a mechanism to check the changes done to HRP Infotypes?
Thanks,
SuryakiranPl check this <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/db/7a2a40ce93185de10000000a1550b0/frameset.htm">SAP Help</a> on maintaining log for PD infotypes..
~Suresh -
How to delete buffer for HRP infotypes
Hi all,
I am using DFPS workbench and currently it stored buffer of hrp infotype when more than 1 record is being save . i am able to get the buffer using FM : RHOM_GET_BUFFER_FOR_INFTY. However when i try with 'RH_CLEAR_BUFFER' the buffer is still there when i try.
Any solution to this?
Thanks and Regards,
LHHi
Try using this FM:HR_PSBUFFER_INITIALIZE.
For more info about this function module, click on this [link|http://shafiq.us/sap/index.php?option=com_content&view=article&id=59:hrmaintainmasterdata-and-hrinfotypeoperation-update-performance&catid=45:hr-abap-tips-and-differences&Itemid=64 ].
Hope this helps.
Harsh -
How To upload a infotype via BDC recording
Hi ,
I am looking to do a BDC recording to upload a infotype which is 105 for communications My office head quarters are moving so they are changing the first 6 digits of the tlefone numbers but the extensions will remain the same so how is this possible .
regardsA better approach to BDC would be to use a BAPI function module, for example BAPI_EMPLCOMM_CHANGE to change the current data. Make sure you specify the correct Subtype for the telephone number communication. Pass the new telephone number in the COMMUNICATIONID importing interface parameter.
Make sure you lock (BAPI_EMPLOYEE_ENQUEUE) the employee before calling the BAPI and unlock afterwards (BAPI_EMPLOYEE_DEQUEUE).
Hope this helps.
JB -
Bulk Uploading to Infotype 0015
Hi All,
I need to upload bulk data from file to infotype 0015 while uploading standard infotype validations also need to be performed as i know FM HR_INFOTYPE_OPERATION can be used to upload but it needs to be called for each records so it may result in performance issue .
So can any one know suggest the best way to upload mass data to the infotype with standard validations as i cannot go with LSMW.
Regards,
PrakashHi,
You will have to update records one by one using this Function module.
1. Use FM HR_PSBUFFER_INITIALIZE to initialize the buffer.
2. Sort your internal table by Pernr (Assuming there can be multiple records for a given employee)
3. Loop at the internal table.
4. AT NEW PERNR, lock the pernr using FM BAPI_EMPLOYEE_ENQUEUE. Upto this point, if you have not checked whether employee exist in the system or not, then call FM BAPI_EMPLOYEE_CHECKEXISTENCE before calling FM BAPI_EMPLOYEE_ENQUEUE. ENDAT.
5. Call function HR_INFOTYPE _RECORD with a single update record. Do not set the flag for COMMIT.
6. On change of Pernr, use BAPI_EMPLOYEE_DEQUEUE to unlock the employee. Endon.
7. Endloop.
8. Commit Work after endloop.
Regards,
Jayesh
Edited by: Jayesh Gupta on Apr 23, 2010 10:49 AM -
Reg BAPI: "'BAPI_BASICPAY_CREATE" uploading to infotype P0008
The following BAPI to upload the salary data to info type PA0008( BASIC PAY).
This bapi is expects the table type amount with 4 decimals.
Please let us know any other bapi to upload the data to infotype 0008 or how to work with existing bapi. Sothat amount would be with 2 decimals raterthan 4 decimals.
CALL FUNCTION 'BAPI_BASICPAY_CREATE'
EXPORTING
EMPLOYEENUMBER = IT_PA0008-PERNR
SUBTYPE = IT_PA0008-SUBTY
VALIDITYBEGIN = IT_PA0008-BEGDA
VALIDITYEND = IT_PA0008-ENDDA
PAYSCALETYPE = IT_PA0008-TRFAR
PAYSCALEAREA = IT_PA0008-TRFGB
PAYSCALEGROUP = IT_PA0008-TRFGR
PAYSCALELEVEL = IT_PA0008-TRFST
NEXTINCREASE =
LOCALALLOWLEVEL =
PARTNERSHIP =
CURRENCY =
COMPARISONPAYSCLTYPE =
COMPARISONPAYSCLAREA =
COMPARISONPAYSCLGRP =
COMPARISONPAYSCLLVL =
COMPNEXTINCREASE =
CAPACITYUTILLEVEL = IT_PA0008-BSGRD
HOURSWORKEDPERPERIOD = IT_PA0008-DIVGV
ANNUALSALARY =
CASEGROUPCATALOG =
CASEGROUP =
CURRENCYANNUALSALARY = IT_PA0008-ANCUR
REASON =
NOCOMMIT =
IMPORTING
RETURN = IT_BAPIRETURN1
EMPLOYEENUMBER = V_PERNR
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYBEGIN =
VALIDITYEND =
RECORDNUMBER =
TABLES
<b> WAGETYPES = IT_WAGE</b>
tHANKS
Badari
Help would be highly appreciable!PL note that HR_INFOTYPE_OPERATION is not RFC enabled.. you will have to wrap it around with a custom RFC in order to use it in palce of the above BAPI..
~Suresh -
Standard programs to upload / update infotypes
Please provide updates for this question:
What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
before going ahead with BDC .
Thanks
RohanPlease provide updates for this question:
What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
before going ahead with BDC .
Thanks
Rohan
Hi Rohan ,
you can update you infotype using 'HR_INFOTYPE_OPERATION' function module .
1) transfer all your excel data into internal table .
2) loop at internal table
3) fill all the required field of that infotype .
4) lock table
5) call that functuion module .
6) unlock table
for this fallow the below code...
DATA: it_p0169 TYPE STANDARD TABLE OF pa0169 WITH HEADER LINE. (make internal table according to your requirment)
DATA: wa_p0169 TYPE p0169.
LOOP AT it_file
v_eeamt = it_file-pct_gross.
*Pre-Tax Contribution Percentage
v_eepct = v_eeamt / 10.
v_begda = it_file-datchngd .
*Appending into header (these all are the required filed in my case )
it_p0169-eeamt = v_eeamt.
it_p0169-begda = v_begda.
it_p0169-eepct = v_eepct.
it_p0169-bplan = v_bplan .
CLEAR wa_p0169.
MOVE-CORRESPONDING it_p0169 TO wa_p0169.
wa_p0169-INFTY = '0169'. (not forget to pass infotype no in the header )
CONSTANTS: c_action_ins TYPE pspar-actio VALUE 'MOD', (it can be also COP for Copy , DEL for Delete , DIS for Display , MOD to Change , LIS9 to Delimit , INS to Create )
c_infty_0169 TYPE prelp-infty VALUE '0169'.
DATA: it_return TYPE bapireturn1. (as it is )
DATA: it_return TYPE bapireturn1.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = p_pernr
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
RAISE enqueue_FAILED.
ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = c_infty_0169
number = p_wa_0169-pernr
SUBTYPE = '401K'
OBJECTID =
LOCKINDICATOR =
validityend = p_wa_0169-endda
validitybegin = v_begda1
RECORDNUMBER =
record = p_wa_0169
operation = c_action_ins
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
return = it_return.
if it_return-MESSAGE is not initial .
delete it_file .
endif.
commit work .
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = p_pernr
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
RAISE DEQUEUE_FAILED.
ENDIF.
Enjoy
Priyank -
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.} -
Hi All,
After uploading photos into infotype 2, the photos are dipalying in infotype 3, 14, 15 infotype but not in IT0001, IT0002.
Can anybody help me out?
Thanx in advance.Hi Shiv,
These are the steps to add photos.
1) You'll find the customizing settings in :-
IMG - Personnel management - personnel administration - customizing user interfaces - change screen header.
Regarding the archiving part you better ask your basis admin to set that up for document type HRICOLFOTO.
2) Photo in the PA IT0002
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.
Please check this link for reference
How to upload Employee Photo in HR Personnel Adminstration
upload photo to infotypes!!
http://sapr3.tripod.com/saphr.htm
<b>***Reward Points if Useful</b>
Warm Regards
Gokul -
How to upload Infotypes 0000, 0001, 0002, 0009, 0016. using session method.
please provide step by step procedure.
Thanks in advance
vamsi.But ravi if the data is large amount, how can we use this. we have to go with BDC itself right. please spot light on this issue.
Thanks in advance
vamsi. -
Hr data upload for Infotypes 14, 17 and 442
Hi all,
I need to upload hr data to sap for infotypes 14, 17 and 442. Is there any BAPIs / FMs / Idocs fot this.
Help will be highly appreciated & rewarded
Regards,
YounusHI,
Are you looking for a BAPI or IDOC? what are you going to do with IDOC to upload 14 and 17 Infotypes using PA30?
Can't you do the same Upload by writing a BDC Program?
Regards,
Anji -
Data upload in infotype 2006 using LSMW
Dear gurus,
I am trying to upload data from a flat file into infotype 2006 using LSMW can you tell me what the standard t code thorugh which infotype 2006 is populated or can please you please guide me procceding forward .
Thanks in advanceHi,
Please Have a look at the following Link there is Much more information about using FM: HR INFOTYPE OPERATION. This link is the Result of Search From SCN you can also search like this.
Because you are new to SDN so always Search Before Posting your Query there are lots of Thread having info about most of the Questions
[HR INFOTYPE OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=%22hr_infotype_operation%22&cat=sdn_all]
Hope will help you to solve out your problem,
Kind Regards,
Faisal
Maybe you are looking for
-
As of last week, our Windows 7 Pro workstations can not map or browse the Windows 2008 Server shares. They can ping the Windows 2008 server. The Windows 7 Pro machines can still access the Windows 2003 Server Shares. The older workstations running Wi
-
Error while installing Oracle 9i Application server
Hi All, I am trying to install oracle 9i Application Server 9.0.2.0.0 Enterprise Edition on Windows 2000. The installation gets stuck up after 40 percent , while trying to copy a file named 'PGPUS.MSB' . There is no update in the Install Actions Log
-
HT201386 iPhone 5 64G did not ask me to migrate iPhotos?
The article about how to migrate iPhoto to Photos on iOS8 mentions two things: It will ask you to migrate every time you open iPhoto until you migrate"Tap Migrate to start the migration process. If you choose Cancel, the dialog is dismissed, but will
-
Convert JPanel to buffered Image
Hi, i have a JPanel,I override the paintComponent() method to do a lot of painting. the size of this panel is about 2500 X 2500 i want to convert it to a buffered image, but i dont get image of total panel, but only the image of what is displayed on
-
BLOB Link (after fire I see source of blob)
Hi I have problem with link to uploaded file. I created own table with BLOB column ("PLIK"), MIMETYPE, FILENAME, LAST_UPDATE_DATE. I created PLSQL procedure which move blob from apex_application_files to my table (insert as select). I created apex no