01-17-2008 6:07 AM
Hi
I'm trying to use the Bapi BAPI_HRMASTER_SAVE_REPL_MULT &
BAPI_ORGMASTER_SAVE_REPL_MULT
to create a new position id for already existing Organisation(O) and Position(S)
The scenario is like this
I'm having a organisation(o) and postion (s) for which i have to assign an employee (p) through Bapi but not by using any FM. So whenever i tried to put an command U to update the field it was not updating the field but when i tried with the command I then it was deleting the related employee id which i had declared over there to insert that position.
So let me know what are the other BAPI to create a new position ID or else plz provide me the necessary parameters to be passed for the same BAPI here i'm providing you the parameters which i had already passed
HR_OBJECT_HEADER
PLAN_VER 01
OBJ_TYPE S
OBJ_ID 50000519
PROOF X
OPERATOR U
HR_INFOTYPE_HEADER
PLAN_VER 01
OBJ_TYPE P
OBJ_ID 00000013
INFOTYPE 1001
SUBTYPE
FROM_DATE 16.01.2008
TO_DATE 31.12.9999
PD_OBJECT
CLIENT 100
PLAN_VER 01
OBJ_TYPE P
OBJ_ID 00000013
INFOTYPE 1001
SUBTYPE
PL_STATUS 1
PRIORITY
FROM_DATE 16.01.2008
TO_DATE 31.12.9999
LANGU EN
DUMMY_9
IT_REC_NO 000
CHANGED_ON
CHANGED_BY
REASON
HIST_FLAG
IT_TXT_MOD 00000000
OBJ_ABB JACKSON
OBJ_NAME JACKSON BRUCE
DELIM_DATE
LANGU_ISO EN
I had cross verified with different different scenarios so plz check it and provide me a suitable solution
Regards
Krishna
01-17-2008 6:28 AM
01-17-2008 6:38 AM
I want to create a new position or u can think as i want to insert new employee to the already existing Organisation & Position
Regards
Krishna
01-17-2008 6:48 AM
01-17-2008 6:59 AM
Hi
My Requirement is like this
Suppose a new employee has been joined in our organisation so he will be given an employee Id Right??
Now that particular employee should be assigned to a particular Organisation(O) & particular Position(S)
let us take an example
If i'm having an employee ID of 00000050
now i have to assign this particular employee to an position such as Team leader and consider this
Position (S) Number is 50000519
and this team leader is under
Organisation(O) is 50000494
Now my aim is to assign that new employee to this position that is i want i want to assign a new employee to this particular position. I want this employee id should be under that particular Position just like his recognition is Krishna ( Team Leader). I want to perform this through a BAPI
Regards
Krishna
01-17-2008 10:28 AM
Hi Krishna
There are two places in which you can do this assignment. One in PA which will update PA0001 and other one is in OM which will update HRP1001.
To update OM, you can use the FM "RH_INSERT_INFTY_1001_EXT" with the below mentioned parameters,
FCODE = 'INS'
VTASK = 'D'
And INNNN internal table populated as below,
PLVAR = '01'
OTYPE = 'P'
OBJID = '00000050'
INFTY = '1001
RSIGN = 'B'
RELAT = '008'
BEGDA = <Begin Date>
ENDDA = <End Date>
SCLAS = 'S'
SOBID = '50000519'
This will assign employee 00000050 to Position 50000519.
Hope this helps !
Regards
Ranganath
01-18-2008 4:07 AM
Hi Ramesh
Thanks for your inputs but i want to perform this update only through bapi but not through FM.
Regards
Krishna
01-18-2008 4:33 AM
Hi Krishna
You can use the same BAPI which you have mentioned BAPI_HRMASTER_SAVE_REPL_MULT, but the values for your parameters HR_OBJECT_HEADER
HR_INFOTYPE_HEADER and PD_OBJECT_RELATIONSHIPS as below
HR_OBJECT_HEADER :
PLAN_VER = '01'
OBJ_TYPE = 'S'
OBJ_ID = <Position ID>
OPERATOR = 'I'
HR_INFOTYPE_HEADER :
PLAN_VER = '01'
OBJ_TYPE = 'S'
OBJ_ID = <Position ID>
INFOTYPE = '1001'
SUBTYPE = 'A008'
FROM_DATE = <Begin Date>
TO_DATE = <End Date>
PD_OBJECT_RELATIONSHIPS :
PLAN_VER = '01'
OBJ_TYPE = 'S'
OBJ_ID = <Position ID>
INFOTYPE = '1001'
SUBTYPE = 'A008'
FROM_DATE = <Begin Date>
TO_DATE = <End Date>
REL_OBJ_TY = 'P'
REL_OBJ_ID = <Personnel Number>
And no need to pass PD_OBJECT, this will update IT1000 which is not required to maintain relationships.
Hope this helps !
Regards
Ranganath
Edited by: Ranganath Ramesh on Jan 18, 2008 5:33 AM
01-18-2008 4:39 AM
Hi Ramesh
But the problem is whenever i use the command I it was deleting the entries but not updating the id
REgards
Krishna
01-18-2008 4:50 AM
Please try with Operator value as 'U'. That may solve this problem..
Regards
Ranganath
01-18-2008 4:55 AM
Ya i tried with that also but it was not updating the positionid with new employee id
01-18-2008 4:59 AM
Ramesh
I tried with the same parameters u had given to me and i got the error messages as follows
TYPE E
ID 5-
NUMBER 106
MESSAGE Database update not possible, data record
LOG_NO
LOG_MSG_NO 000000
MESSAGE_V1 01S 500006721001A008 2007010199991231
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER HR_OBJECT_HEADER
ROW 1
FIELD
SYSTEM RFCOUT
2nd msg
TYPE I
ID 5-
NUMBER 106
MESSAGE Database update not possible, data record
LOG_NO
LOG_MSG_NO 000000
MESSAGE_V1 01S 500006721001A008 2007010199991231
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER HR_OBJECT_HEADER
ROW 1
FIELD
SYSTEM RFCOUT
3rd msg
TYPE S
ID 5A
NUMBER 043
MESSAGE For infotype 1001 in status , function INSE
LOG_NO
LOG_MSG_NO 000000
MESSAGE_V1 1001
MESSAGE_V2
MESSAGE_V3 INSE
MESSAGE_V4
PARAMETER HR_OBJECT_HEADER
ROW 1
FIELD
SYSTEM RFCOUT
01-18-2008 5:21 AM
01-18-2008 5:56 AM
Please also pass these values too,
CLIENT = SY-MANDT
CHANGED_ON = SY-DATUM
CHANGED_BY = SY-UNAME
into PD_OBJECT_RELATIONSHIPS parameter.
Regards
Ranganath
01-17-2008 7:12 AM
01-17-2008 9:00 AM
01-17-2008 12:56 PM
01-17-2008 1:22 PM
01-18-2008 4:03 AM
Hi
what are the necessary parameters to be passed for this particular bapi as i'm already passing for
HR_OBJECT_HEADER
HR_INFOTYPE_HEADER
PD_OBJECT
Regards
Krishna