Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

rollback

Former Member
0 Likes
1,266

Hello Experts,

I am using  HR_INFOTYPE_OPERATION to delimit the old record and create a new record in infotype-0008.

Now, after execution of the above mentioned FM, for some condition i want to rollback.

Please guide me how to perform the rollback.

Thank You.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,104

Thanks to everyone for replying.

My requirement was to give a option for test run.

I found the solution.

In that FM there is an importing parameter 'NOCOMMIT' type BAPI_STAND.

if we pass BAPI_STAND-NO_COMMIT = 'X' then it will not update the infotype.

6 REPLIES 6
Read only

former_member201275
Active Contributor
0 Likes
1,104

I would then recommend you run this in a simulation mode then i.e.:

In order to use the FM HR_INFOTYPE_OPERATION in simulation mode, use the parameter OPERATION = 'CHK' (CHECK_RECORD). This way it's possible to check the validity of a set of records before adding them to the database with an operation insert or modify. If the FM returns an error in any of the records no rollback has to be performed.

Read only

rajkumarnarasimman
Active Contributor
0 Likes
1,104

Hi Falak,

I think Rollback won't work here, we have the following operations in HR_INFOTYPE_OPERATION,

COPCopy
DELDelete
DISDisplay
EDQLock/unlock
INSCreate
LIS9Delimit
MODChange
INSSCreate for Actions is not converted to Change

I hope we can use the below option.

We can find the Infotype changes in the standard program S_AHR_61016380. Using the same I hope we can read the Old record based on that we can overwrite the current one.

Regards

Rajkumar Narasimman

Read only

0 Likes
1,104

You can also use CHK as I mentioned. This is best option.

Read only

SujeetMishra
Active Contributor
0 Likes
1,104

Hi,

You can change the valid till date to current and then create new record.

Regards,

Sujeet

Read only

former_member201275
Active Contributor
0 Likes
1,104

Hi,

is your question answered? if so please mark accordingly. Thank u.

Read only

Former Member
0 Likes
1,105

Thanks to everyone for replying.

My requirement was to give a option for test run.

I found the solution.

In that FM there is an importing parameter 'NOCOMMIT' type BAPI_STAND.

if we pass BAPI_STAND-NO_COMMIT = 'X' then it will not update the infotype.