‎2008 Jan 15 12:55 PM
Hi everyone,
I'm facing a little problem: I must update a group of abscences at infotype 2001 for an employee. So, what I want to do is a "none or everything" operation, I mean, if a update in one of the abscences was wrong, roolback the modifications for that employee.
I've tried to use the HR_INFOTYPE_OPERATION within a LOOP, with the NOCOMMIT parameter set = 'X', and use a COMMIT WORK or a ROOLBACK outside, in my program. But I found out that it is not working like I've imagined.
Someone have an idea? I don't want to use UPDATE command directly, because for infotypes it's not recommended.
Thanks in advance!
Raphael
‎2008 Jan 15 1:27 PM
Hi,
Have you tried to excecute the function module
CALL FUNCTION 'HR_INITIALIZE_BUFFER'. just afert you have upadte your group of absences ?
Regards
‎2008 Jan 15 1:04 PM
Hi Raphael
Just check if you have an option of VTASK with that FM, in that case pass VTASK as 'B', in case of all your records are successful then use Commit work else Rollback the update.
Cheers
~ Ranganath
‎2008 Jan 15 1:27 PM
Hi,
Have you tried to excecute the function module
CALL FUNCTION 'HR_INITIALIZE_BUFFER'. just afert you have upadte your group of absences ?
Regards
‎2008 Jan 15 2:01 PM
Thanks Jürgen!
I was about to change the FM, but with your help I could see that the problem was I've used the FM 'HR_INITIALIZE_BUFFER' just after each call of FM 'HR_INFOTYPE OPERATION', so when the COMMIT WORK was called there was nothing to commit...hehe.
So now it's working fine!
Raphael