cancel
Showing results for 
Search instead for 
Did you mean: 

How to Modify in Data IT0001?

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

pranay570708
Active Contributor
0 Kudos

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.

pranay570708
Active Contributor
0 Kudos

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.

former_member201807
Contributor
0 Kudos

Dear Ramesh,

T-code: PA30—(0000) Action—Copy—give the start date & end date (31.12.9999)

Now its work like as action (put the entries as per your requirement)

Please do this activity in development for test purpose.

Regards,

Rakesh

Colleen
Advisor
Advisor
0 Kudos

Why would you recommend manipulating data and having a development solution when an end user made a mistake using a sap standard transaction which happens to have sap standard solution that also provides an audit trail?

former_member201807
Contributor
0 Kudos

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.

Colleen
Advisor
Advisor
0 Kudos

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