HR ABAP - update infotype 1001
Hi,
I am trying to update position of external person using function RH_UPDATE_INFTY_1001_EXT but it doesn't update neither it does give any error.
Below is my code:
hold_HSU_1001 like p1001.
loop at hold_HSU_1001.
case hold_HSU_1001-sclas.
when 'U'.
hold_HSU_1001-sobid = ZHAPEXTP-OT_LOCATN.
when 'S'.
hold_HSU_1001-sobid = ZHAPEXTP-OT_POSITN.
endcase.
modify hold_HSU_1001 transporting sobid.
endloop.
call function 'RH_UPDATE_INFTY'
exporting vtask = 'S'
tables innnn = hold_HSU_1001
exceptions ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4.
key parameters of hold_HSU_1001 is
hold_HSU_1001-otype = 'H' (external person)
hold_HSU_1001-OBJID = '50000123'
hold_HSU_1001-plvar = 'ab'
hold_HSU_1001-rsign = 'B'
hold_HSU_1001-relat = '008'
hold_HSU_1001-istat = '1' (active)
hold_HSU_1001-slcas = 'S' (positon)
hold_HSU_1001-sobid = '5000465' (which is to be updated).
Not sure why sobid doesn't get updated. if anyone can help it would be great.
thank you
Suganya
Hi,
I tried to pass that missing parameters also...Still it doesn't update.
i also tried RH_UPDATE_INFTY and RH_RELATION_MAINTAIN.
Thank you
Suganya
Similar Messages
-
hi all,
I have to update the SLAS of the object ID. I am using Fm " RH_UPDATE_INFty". but it is not updating the SCLAS
Code is given below
REPORT ZTEST_RH_UPDATE_INFTY.
DATA:
lt_relation TYPE TABLE OF p1001,
ls_relation TYPE p1001.
ls_relation-mandt = sy-mandt.
ls_relation-plvar = '01'.
ls_relation-otype = 'E'.
ls_relation-objid = '30000031'.
ls_relation-infty = '1001'.
ls_relation-istat = '1'.
ls_relation-rsign = 'A'.
ls_relation-relat = '025'.
ls_relation-begda = '20090709'.
ls_relation-endda = '20090711'.
ls_relation-sclas = 'P'.
ls_relation-sobid = '00123749'.
APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_UPDATE_INFTY'
EXPORTING
vtask = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR_NEW_LANGU = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
tables
innnn = lt_relation
ILFCODE =
EXCEPTIONS
ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
please help .
thanks
Sachinhi Dilek,
thanks for ur reply.
I have added both FM but its not updating yet.
below is my code.
REPORT ZTEST_RH_UPDATE_INFTY.
DATA:
lt_relation TYPE TABLE OF p1001,
ls_relation TYPE p1001.
ls_relation-mandt = sy-mandt.
ls_relation-plvar = '01'.
ls_relation-otype = 'E'.
ls_relation-objid = '30000031'.
ls_relation-infty = '1001'.
ls_relation-istat = '1'.
ls_relation-rsign = 'A'.
ls_relation-relat = '025'.
ls_relation-begda = '20090709'.
ls_relation-endda = '20090711'.
ls_relation-sclas = 'P'.
ls_relation-sobid = '00123749'.
APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_PM_ENQUEUE'
EXPORTING
act_plvar = '01'
act_otype = 'E'
act_objid = '30000031'
ERROR_TYPE = 'I'
EXCEPTIONS
ERROR_IN_ENQUEUE = 1
OTHERS = 2
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 'RH_UPDATE_INFTY'
EXPORTING
vtask = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR_NEW_LANGU = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
tables
innnn = lt_relation
ILFCODE =
EXCEPTIONS
ERROR_DURING_UPDATE = 1
NO_AUTHORIZATION = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
OTHERS = 5
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 'RH_PM_DEQUEUE'
EXPORTING
act_plvar = '01'
act_otype = 'E'
act_objid = '30000031'.
why this code is not updating SCLAS.
please help
thanks
Sachin -
Segment E1PITYP occurs for each subtype of Infotype 1001 in update mode
Hi,
I am using transaction PFAL and IDoc HRMD_A for transferring HR data.
In update mode the resulting IDoc contains segment E1PITYP for each subtyp (for example A002) of Infotype 1001 even if it contains no segments of type E1P1001.
Could somebody explain this and is it possible to avoid this behavior?
Thanks and regards
PatrickHi,
thanks for your answer.
Still I am little bit confused and want give an more detailed description of my problem.
If I export an organizational unit in initial mode I have for example 5 segments of type E1PITYP and each of them has a subsegment (for example E1P1001).
Export of the same organizational unit in update mode results in more than 200 segments of type E1PITYP and all of them without subsegment.
This seems to happen for all infotypes (not only 1001 like I thought before).
Now I want to understand why this happens and if it's possible to update an organizational unit without segments of type E1PITYP that don't have a subsegment.
Regards
Patrick -
Event for infotype 1001 updates doesn't trigger
Hi everyone,
I'm facing the following problem at HR Workflow
I've created the object ZEHSBUS900, subtype of PDOTYPE_SH. And so, created two events: NOTIFYCREATE and NOTIFYUPDATE.
At SWEHR3 transaction, I have this two entries:
S Position 1001 Relationships A003 Belongs to INS 0 ZEHSBUS900 NOTIFYCREATION
S Position 1001 Relationships A003 Belongs to UPD 0 ZEHSBUS900 NOTIFYUPDATE
But when I create or update an infotype 1001, only the NOTIFYCREATION is triggered. I mean, the UPD operation doesn't work.
What is stange is that I've made this kind of implementation at another system and it's working fine ( a creation at 1001 triggers NOTIFYCREATION and modifications trigger NOTIFYUPDATE ).
Do you know what could be missing?
Thanks in advance,
Raphael XavierHi Abdullah!
Thank you for the tip, but it still doesn't work this way. As what I've said before, what is strange is that problem occurs in one system and didn't occur in another one, and the same procedure was used in both.
What I did to "solve" this was using a function instead calling the event at SWEHR3. In this function there is a verification if it is an insert ou update operation and then a call to the function SWE_EVENT_CREATE.
It wasn't the best solution, but still was a solution.
If anyone has any idea what it can be, I'm still interested about it.
Raphael -
HR-ABAP Any BAPI or Function module to update infotypes 167 & 170
Hi,
Can anyone let me know is there any BAPI or Function module to update infotypes 167(Health Plans) & 170(Flexible Spending Accounts).
Thanks,
SandeepHi,
U can use HR_BEN_CREATE_PLANS internally it calls HR infotype operation as specified by suresh.
Suresh : If there are approximately 3000 records to be updated on regular basis do u think is it better to use BAPI's or BDC
regards
Vick -
Hr abap custom infotype updatation
hiii frnds,
i creatred custom inotype 9910 and i enterded some data for this infotype in pa30 when i click on the save it is noty saving in the pa9910 table...... can any one send sample code to save the data into tableDid you read [Developing an Infotype in Personnel Administration|http://help.sap.com/printdocu/core/print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf] (or more recent documentation) and a guide like [Steps to Customize infotypes|http://wiki.sdn.sap.com/wiki/display/ABAP/StepstoCustomize+infotypes]
Regards,
Raymond -
Updating InfoType 0001 in ABAP
Our parent company is passing different begin and end dates from Infotype 0001 to our HR system. In our system an employee would have a start date of 3/1/2005 but our parent company has the same employee in there system as a start date of 1/1/2008. I was looking at using user exit EXIT_SAPLRHA0_003 to capture these and add the parent companies dates into our Infotype 0001 so that there feed doesnt overwrite our original dates. I have attempted to use HR_INFOTYPE_OPERATION with no luck. Any one have a possible way to update InfoType 0001 without using a BDC?
What exactly is the issue? In any case HR_INFOTYPE_OPERATION in turn calls HR_MAINTAIN_MASTERDATA so you might end up with the same issue with either function call.
~Suresh -
Need a help to Update Infotype.....
Hi Experts,
*am developing HR-ABAP Report inthat, i have data in 2 internal tables, through these (itabs) i want to*
*insert the data into 2 Ztables(Respective tables) and then i want to Update one Custom Infotype.*
how can i procedure for this? is there any FM to update Infotype....
Thanks in Advance,
sudeer.The best way is to use HR_INFOTYPE_OPERATION function module in your program.
Sample code:
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = p0082-infty
number = p0082-pernr
subtype = p0082-subty
validityend = p0082-endda
validitybegin = p0082-begda
record = p0082
operation = 'INS'
tclas = 'A'
dialog_mode = '0'
importing
return = return
key = key.
capture error messages
if return-type = 'E'.
concatenate 'Sub Type:' p0082-infty into messtab-tcode.
move return-message to messtab-param.
append messtab. clear messtab.
endif.
You can use it for modifying the record also. -
Standard programs to 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
RohanHi,
I checked out the program you stating.......
In that program itself if you check the documentation its given how to add in fields.......
You can use report RPUSTD00 to transfer master data from your old HR system.
The dataset to be transferred must be stored in a sequential file. The file is stored under the name specified in the "logical file name" field (for more information on logical file names, read the IMG section entitled Additional client-dependent file name maintenance).
The report reads this dataset and creates a batch input session for transaction PA30.
The data description of your old record is defined according to the structure HRDATASET. If this structure does not meet your requirements, create the structure CI_HRDATAS in the ABAP Dictionary. In this structure, you can store the infotype fields to which data should be transferred. Make the necessary changes in RPUSTD00.
Example
If the include CI_HRADATAS contains the field F1 which is to be assigned to the infotype nnnn, add the following ABAP statements to FORM Dnnnn:
CLEAR BDCDATA.
BDCDATA-FNAM = 'Pnnnn-F1'.
BDCDATA-FVAL = SATZ-F1.
APPEND BDCDATA.
If the FORM Dnnnn does not exist for your infotype nnnn, copy FORM D0008 to FORM Dnnnn. Replace the 0008 by your infotype number:
FORM Dnnnn.
CLEAR BDCDATA.
BDCDATA-PROGRAM = 'MPnnnn00'.
BDCDATA-DYNPRO = '2000'.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
CLEAR BDCDATA.
BDCDATA-FNAM = 'Pnnnn-F1'
BDCDATA-FVAL = SATZ-F1
APPEND BDCDATA.
CLEAR BDCDATA.
BDCDATA-FNAM = 'BDC_OKCODE'.
BDCDATA-FVAL = '=UPD'.
APPEND BDCDATA.
ENDFORM.
The FORM Dnnnn is called directly after FORM D0008; see the ABAP statement indicated as "<------ INSERT in the following (starting at line 1730 in the standard system):
LOOP AT INFTAB.
CASE INFTAB.
Include all infotypes in your action *
WHEN '0002'. PERFORM D0002.
WHEN '0001'. PERFORM D0001.
WHEN '0006'. PERFORM D0006.
WHEN '0007'. PERFORM D0007.
WHEN '0008'. PERFORM D0008.
WHEN 'nnnn'. PERFORM Dnnnn. "<------ INSERT
WHEN OTHERS. WRITE: / 'Infotype not included:' (008), INFTAB.
STOP.
ENDCASE.
ENDLOOP.
Parameter DSLOGNAM
Logical file name
Parameter MAPNAME
Session name
Definition
Enter any name for the session to be created. -
Error message 'insertion of infotype 1001 (return code 3)'
Hello,
I have an IDoc containing many object like 'CP' and 'S' with their IT1001 relationships in UPDATE mode.
While posting the IDoc, it's going into 51 status with error message 'Error: insertion of infotype 1001 (return code 3)'.
Could you help me any possible solution?
Thanks.Hello,
The IDoc contains IT1001 relationships in update mode of Object type 'S' and 'CP'.
There is no structural issue with the IDoc contents.
Is there any other specific issue?
Thanks. -
EREC: An error occurred when you tried to insert infotype 1001 in IDOC
Hello Experts,
I have standalone e-Recruitment system and separate SAP HR system. I have ALE configuration done to talk both system.
In the Initial Transfer, I ran PFAL in HR system in 5 steps.
Step 1 Execute PFAL (RHALEINI)for Obj Type O, Infotype 1000 and Transfer mode as Update mode
Step 2 Execute PFAL (RHALEINI)for Obj Type S, Infotype 1000 and Transfer mode as Update mode
Step 3 Execute PFAL (RHALEINI)for Obj Type O and Transfer mode as Insert
Step 4: Execute PFAL (RHALEINI)for Obj Type S and Transfer mode as Insert
Step 5: Execute PFAL (RHALEINI)for Obj Type P and Transfer mode as Insert
All IDOC created in update mode (Step 1 & 2) are green in receiving e-recruitment system but IDOC getting create in Insert mode (Step 3 ,4 &5) are in status 51/52 I mean Red.
Error messages are as below:
1) An error occurred when you tried to insert infotype 1001 using RH_INSERT_INFTY (return code 3).
2) You tried to create a relationship from object 01S 76037685 to object 01AGC:R3HCM:OM_DISPLAY_US. However, object 01AGC:R3HCM:OM_DISPLAY_US does not exist or is not active in the period from 20110101 to 99991231
3) You tried to create a relationship from object 01O 10840305 to object 01O 10299323. However, object 01O 10299323 does not exist or is not active in the period from 20110101 to 99991231.
@ 3rd message : Object 10299323 exist but I still don't understand why I get this message.
Please provide valuable suggestion so that I can get rid of this error in IDOC
Appreciate your help.
Regards,
Krishna Bidwai
Losangeles USA.
818 527 0204.
Edited by: krishna bidwai on Aug 22, 2011 7:19 PMDear Krishna,
Hope you are doing good.
I know its very late in getting into this conversation. Since I am also experiencing the same issue, i need some inputs from you.
The error you posted on the top is same what i am getting when I am doing data transfers from SAP HR to E-Rec systems. Our iDoc is working file in Development server but not in Quality server. I am experiencing the same errors what you have mentioned above.
When i checked the error, this error has occurred in subroutine read_namtb for structure of infotype.
Proceedure is to Check the entry for infotype in table T777D (structure, IDoc segment,
expanded structure) and the corresponding structures.
As you have resolved this issue before, can you please suggest what needs to be maintained in the tables such as T777D, T777E, and T777Z.
Appreciate your valuable inputs on this.
Thank you. -
Infotype 1001 skipped due to lack of authorization
Hi,
I am using PP03 for maintaining Organisation Unit relationship with Cost Center,but i am getting this Information message.
Althouhg i have * in PLOG object in authorsation.
Please let me know where would be the problem.
THanks,
ViruHello,
Authorization check failed
bject Class HR Human Resources
Authorization Obj. PLOG Personnel Planning
Authorization Field INFOTYP Infotype
1001
Authorization Field ISTAT Planning Status
1
Authorization Field OTYPE Object Type
S
Authorization Field PLVAR Plan Version
01
Authorization Field PPFCODE Function Code
INSE
Authorization Field SUBTYP Subtype
<Dummy>
Check if this is the case if your metting the message.
Regards,
Regi ALex -
How to get the report to relaionship from infotype 1001.
Hi,
Could any one just let me know regarding how to get reports to relationship for the particular employee number from infotype 1001.
What exactly are the aprameters involved.
Thanks in Advance ,
Irfan HussainHi Irfan,
SELECT abkrs
pernr
ename
gsber
begda
persg
persk
werks
btrtl
plans
kostl
orgeh
INTO TABLE it_0001
FROM pa0001
loop at it_0001.
CLEAR: l_plans, l_sobid, l_sobidx, l_pernr.
SELECT SINGLE sobid INTO l_sobid
FROM hrp1001
WHERE otype = 'S'
AND objid = it_0001-plans
AND plvar = '01'
AND relat = '002'
AND endda = '99991231'.
IF sy-subrc EQ 0.
l_plans = l_sobid.
SELECT SINGLE sobid INTO l_sobidx
FROM hrp1001
WHERE otype = 'S'
AND objid = l_plans
AND plvar = '01'
AND relat = '008'
AND endda = '99991231'.
IF sy-subrc EQ 0.
l_pernr = l_sobidx.
SELECT SINGLE ename INTO <b>it_0001-repto</b>
FROM pa0001
WHERE pernr = l_pernr.
IF sy-subrc EQ 0.
MODIFY it_0001 INDEX l_index TRANSPORTING repto.
ENDIF.
ENDIF.
ENDIF.
endloop.
Regards,
Raj -
HRMD_A07 Idoc to update InfoType 0014 does not delimit existing PA0014 rec
In ECC 6.0, we are using HRMD_A07 Idoc to update infotype 0014 using update data received from a third party application. In XI, I am creating the Idoc with Update Code "U" with E1PLOGI, E1PITYP and E1P0014 segments. E1P0014 holds the data for the latest record.
If I directly pass the Idoc thru ALE layer, It creates records for the new date range on E1P0014 segment, but does not delimit the previous record by changing its end date. This results in two records in PA0014 with end date of 12/31/9999 - which is wrong.
I also tried using a wrapper FM to create additional segments in the Idoc representing the existing record in PA0014, with the end date being delimited to incoming record's beg. date minus 1.
This also results in just creating two additional records in PA0014 corresponding to the two segments in Idoc while existing record in PA0014 stays intact resulting in two records with end date 12/31/9999.
I also experimented with setting the lock indicator (PA0014-SPRPS) but that also does not result in delimiting the existing record.
Am I missing something? Is there a piece of config that controls this?
Regards,
The time constraint on 0014 is "2"Hi Jon and Ashish,
I too am facing the same issue that the new IDOC is not delimiting the previous record.
Can you explain how did u get over you issue.
I'm maintaining the same dates in E1PITYP and in E1P0014.
Thanks,
Jilly -
Problem in updating infotype 2001
Hi Experts,
While i am updating infotype 2001 , using HR_INFOTYPE_operation FM it giving a error , because it calling a wrong sceen 2000 , instead of 2001 . can anybody can help on this ?
thanks and regards
Renjith MPHi Dude,
Go through the below code for 2002 infotype :
TYPES BEGIN OF text_version.
TYPES nummer TYPE x.
TYPES END OF text_version.
DATA: PERSONALDATAKEY LIKE BAPIPAKEY.
DATA: RETURN LIKE BAPIRETURN1.
DATA: P2002 LIKE P2002.
DATA: PSKEY TYPE PSKEY.
DATA: IT_TEXT TYPE HRPAD_TEXT_TAB .
DATA: LINE TYPE HRPAD_TEXT.
DATA: version TYPE text_version.
DATA: pcl1 TYPE pcl1.Input Parameters:
PARAMETERS: PERNR LIKE PA2002-PERNR DEFAULT '1004511',
AWART LIKE PA2002-AWART DEFAULT 'LW',
BEGDA LIKE PA2002-BEGDA DEFAULT SY-DATUM,
ENDDA LIKE PA2002-ENDDA DEFAULT SY-DATUM,
BEGUZ LIKE PA2002-BEGUZ,
ENDUZ LIKE PA2002-ENDUZ.
START-OF-SELECTION.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = PERNR
IMPORTING
RETURN = RETURN.
IF RETURN-NUMBER IS NOT INITIAL.
EXIT.
ENDIF.
* ADD DATA
CLEAR: P2002.
P2002-PERNR = PERNR.
P2002-SUBTY = AWART.
P2002-ENDDA = BEGDA.
P2002-BEGDA = BEGDA.
P2002-BEGUZ = BEGUZ.
P2002-ENDUZ = ENDUZ.
P2002-AWART = AWART.
P2002-ITXEX = 'X'.
* WRITE DATA
CLEAR: RETURN, PERSONALDATAKEY.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '2002'
NUMBER = PERNR
SUBTYPE = AWART
VALIDITYEND = BEGDA
VALIDITYBEGIN = BEGDA
RECORD = P2002
OPERATION = 'INS'
NOCOMMIT = ''
TCLAS = 'A'
IMPORTING
RETURN = RETURN
KEY = PERSONALDATAKEY
EXCEPTIONS
OTHERS = 0.
IF RETURN-NUMBER IS INITIAL.
COMMIT WORK AND WAIT.
ELSE.
ROLLBACK WORK.
EXIT.
ENDIF.
Maybe you are looking for
-
Hi i used the Build JDEVADF_11.1.1.4.0 I want to make compare validation between two input text Are equal or not . same Thing when i create new email i must enter the password and re enter password if not equal he give me message
-
Hi i am using oracle 10.2 in windows 2003 server in test environment when i tried to migrate the database from os file system to ASM it give me the following error Error Examine and correct the following error(s), then retry the operation. Remote Ope
-
Look this is going to sound pathetic, but i keep trying to get onto tumblr.com but no matter what i do it keeps sending me to Facebook.com. I've tried to go through google, yahoo, and bing but its still keeps sending me to facebook. none of my friend
-
How do i use the character viewer
can anyone tell me the system in using the character viewer, i can drag and drop but surley there must be and easier way than that! Thanks.
-
Suppressing leading zeroes during mapping
Dear All, I am having one requirement in which i want to compress all the leading zeroes for the material no only eg 0000123450 shuld be converted into 123450. Is there any standard function available which compresses the leading zeroes??? Waiting fo