How to create user for Read only responsibilites in frontend apps

Steps mentioned below are to create User with Read Only Responsibility and require fair amount of development knowledge

1. Go to $Au_TOP/resource.
2. Copy CUSTOM.pll and open the file in Form builder.
3. If you will open the package body of CUSTOM.pll in the forms builder then you will find the like below :

procedure event(event name varchar2) is

— This procedure allows you to execute your code at specific events
— including:

— ZOOM
— WHEN-NEW-FORM-INSTANCE
— WHEN-NEW-BLOCK-INSTANCE
— WHEN-NEW-RECORD-INSTANCE
— WHEN-NEW-ITEM-INSTANCE
— WHEN-VALIDATE-RECORD
===============

Already the ‘WHEN-NEW-FORM-INSTANCE’ is described.

You need to add the below query (point 4) in the package body of
CUSTOM.pll. and then Compile it

4. Query to add in custom.pll

      BEGIN

IF event_name = ‘WHEN-NEW-FORM-INSTANCE’ THEN
IF FND_PROFILE.VALUE(‘USER_NAME’)=’ xxxxxx’ THEN

BEGIN
COPY(‘Entering app_form.query_only_mode.’,’global.frd_debug’);
COPY(‘YES’, ‘PARAMETER.QUERY_ONLY’);
APP_MENU2.SET_PROP(‘FILE.SAVE’, ENABLED,PROPERTY_OFF);
APP_MENU2.SET_PROP(‘FILE.ACCEPT’, ENABLED,PROPERTY_OFF);
formname := NAME_IN(‘system.current_form’);
blockname := GET_FORM_PROPERY(formname, FIRST_BLOCK);

WHILE (blockname is not null) LOOP
IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN
SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE);
END IF;

blockname := GET_BLOCK_PROPERTY(blockname, NEXTBLOCK);
END LOOP;
END query_only_mode;
END IF;
END IF;
END;

5. Next step is to create Profile Option name FND_PROFILE.VALUE using application developer as shown in screenshot and then set this profile option at user level

5.1 Go to Application developer->profile and create the profile as below

5.2 Go to System Administrator->profile->system
as shown in screen

6.    Copy the CUSTOM.pll from Form Builder to the server i.e. to $AU_TOP/resource.

7.    Compile the CUSTOM.pll file by using the command

f60gen module=CUSTOM.pll userid=apps/xxxxx  module_type=library

8. Now log into the Applications with the user we created and  test.

Please find steps by step doc here  (word doc).
Mohan reddy

About the Author Masroof Ahmad

Leave a Comment:

7 comments
Add Your Reply