System Administrator

How To Make All The Responsibilities Read Only For A User

Here is a sample code could be used to make all the responsibilities read only for a specific user. I am sure we can use it in different variations.

1. Open the Custom.pll in the Form Builder.
2.Add the following sample code in the Procedure Event for the event WHEN-NEW-FORM-INSTANCE
3.Compile the Custom.pll and place under the directory $AU_TOP/resource

BEGIN
IF event_name = ‘WHEN-NEW-FORM-INSTANCE’ THEN
IF FND_PROFILE.VALUE(‘USER_NAME’)='<USER_NAME>’ 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;

The above code will make all the Responsibilities read only for a specific user.

It will fundamentally make all the form functions to behave as passing the parameter QUERY_ONLY.

Oracle Reports (Report 6i) – Technical – Interview – Question Answers

Receive the latest blog updates

Facebook Twitter Instagram Youtube Linkedin