Authorization to the user based on installement plan type in FPR1
we have a scenario wherein if the customer comes for the payment to be converted to an installment plan through TCODE FPR1.
the user creates an installement plan for him which could be of 3 months or 6 month of 12 months duration depending on the selection of installement plan type field.
Now the requirement is that if the user is of level 1 he should only be allowed to create installement plan for 3 months duration and should be restricted for choosing any other plan type.
similarily if the user of level 2 tries to create for 12 months he should be restricted for that but he should be allowed to create an installement plan upto 6 months catogory.
so on and so forth.
there are in total 3 levels of users and upto 24 months category of installement plan namely IN03 fr 3 months, IN06 for 6 months, In12 for 12 months and IN24 for 24 months.
Edited by: Ankit Bajaj on Jun 1, 2011 2:34 PM
Nirmalya Chatterjee replied
You can create three different custom roles for three levels of users. Then assign these roles to the users depending on their levels. Now using the FM CKEXUTIL_USER_TO_ROLE for a specific user you will get all the list of the roles assigned to the users.
Now create a custom function module for event 3040 and check the role of the user by passing his user name. Also you will get the instalment plan category in T_HEAD-RPCAT field in the same event.
You can restrict the user depending on his / her role and the instalment plan category he has chosen during instalment plan createion. You will have a mapping which role the user is assigned to and which instalment plan category he has chosen and based on that you can restrict and show a warning / information / error message to the user during creation
Hope it helps.