‎2011 Jan 26 9:24 AM
Hi,
My requirement is to stop deletion of infotype 2001 record for some specific users. I am not able to achieve this through authorization, as through authorization if a user is given create access automatically he gets modify and delete access.
So, I have tried EXIT_SAPFP50M_002 user exit from PBAS0001 enhancement.
The problem with this user exit is that it is triggered for all infotypes. Since I want this to execute for only infotype 2001 and not for all infotypes in PA30. Anyone have an idea how to achieve this.
Following is my code in exit:
Case sy-ucomm.
When 'UPDL'.
Message 'Record cannot be deleted.' Type 'E'.
EndCase.
Thanks,
Waqas Rashid
Moderator message: please use more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Jan 26, 2011 3:48 PM
‎2011 Jan 26 2:27 PM
Hi,
Try this.
CASE INNNN-INFTY.
WHEN '2001'.
"Your code comes here.
ENDCASE.Regards,
Jovito
‎2011 Jan 26 10:23 AM
If you are able to identify the infotype (in a variable) inside the userexit by using the existing parameters of the userexit then you can achieve this.
‎2011 Jan 26 11:09 AM
Thanks for reply, but I don't know how to get infotype number in a variable.
Waqas Rashid
‎2011 Jan 26 2:27 PM
Hi,
Try this.
CASE INNNN-INFTY.
WHEN '2001'.
"Your code comes here.
ENDCASE.Regards,
Jovito