Sunday, May 29, 2016

READ ONLY RESPONSIBILITIES in ORACLE


  1. Go to $Au_TOP/resource. 
  1. Copy   CUSTOM.pll and open the file in Form builder
 If you will open the package body of CUSTOM.pll in the forms builder then you will find the like below :
  1. ==========
    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.

    Just you need to add the below query in the package body of
CUSTOM.pll. Compile it 

4.
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;


  1. How to create FND_PROFILE.VALUE?

a. Steps:

Go to Application developer->profile and create the profile as below
  
Go to System Administrator->profile->system


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

  1. 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.


No comments:

Post a Comment

Best Blogger TipsGet Flower Effect