on 05-17-2016 6:24 AM
Hi Experts,
I have a Faced one Problem.
My Requirement: In case End user Wrong Hiring Process of Employees, Then how to Change of Data in IT0001 ?
Example:
Wrong Data in IT0001: Company Code:1000
PA :ABCD
PSA :100
Then I want this type
Correct Data in IT0001: Company Code:2000
PA :WXYZ
PSA :200
How to Change this Problem ?
Please give me any suggestions..
Thanks
Ramesh.
Hi Ramesh,
Make use of FM 'HR_INFOTYPE_OPERATION' to modify record. First lock the employee and then make changes, after that unlock that pernr.
Read the infotype 1 record which needs to be modified and pass it into work area 'wa_P0001'. Make changes to desired fields.
wa_p0001-werks = 'xyz'.
wa_p0001-btrtl = 'abc'.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = wa_P0001-PERNR.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0001'
NUMBER = wa_P0001-PERNR
VALIDITYEND = wa_P0001-ENDDA
VALIDITYBEGIN = wa_P0001-BEGDA
RECORD = wa_P0001
OPERATION = 'MOD'
TCLAS = 'A'
IMPORTING
RETURN = wa_return.
COMMIT WORK.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = wa_P0001-PERNR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Other ways can be to run Organizational Reassignment action or transfer action in PA40.
If the payroll is not executed for the employee then go to PA30 --> Utilities --> Change entry/ Leaveing date. It will allow you to change the PA, PSA, EG, ESG & the date for the action if the payroll is not executed for that particular month.
If you don't want to do these then you have to manipulate data at table level as mentioned in above post.
Hi Colleen,
As per understanding, we trying to understand the problem & accordingly provide the solutions.
Some time user face problem & they can't describe or understand or we are unable to understand the user problem.
Therefore always suggest, first test the solution on sand box or test server or other ways, if user satisfied then apply in production.
In conveyance is regrated.
Hi Rakesh
Finding solutions can be a challenge and sometimes the area we specialise in blinkers us. As a developer or technical person it can be easy to seek our development and technical solutions when a simpler option already exists.
This is not about moving an item via the 3 tier landscape. But proposing an option like this has a cost (development/change request); a time delay (user having access to PA40/PA30 vs the build effort) and a risk (code not fully tested and direct table update)
I applaud exploring options but they should always be assessed for appropriateness. In this particular situation, the recommendation would have been better as a PA40 hire action to fix as opposed to directly updating tables (you don't know what other validations for other infotypes or even triggers to other process areas will be impacted)
A good developer can recognise when the solution does not sit with them. Not every problem sent your ways needs to result in a code change
Regards
Colleen
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
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.