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

User exit problem

waqas_rashid
Contributor
0 Likes
598

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
531

Hi,

Try this.

CASE INNNN-INFTY.

 WHEN '2001'.
   "Your code comes here.
ENDCASE.

Regards,

Jovito

3 REPLIES 3
Read only

Former Member
0 Likes
531

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.

Read only

0 Likes
531

Thanks for reply, but I don't know how to get infotype number in a variable.

Waqas Rashid

Read only

Former Member
0 Likes
532

Hi,

Try this.

CASE INNNN-INFTY.

 WHEN '2001'.
   "Your code comes here.
ENDCASE.

Regards,

Jovito