Wednesday, October 28, 2015

Oracle Form Personalization - Launch a Function Parameters

Calling one form to another form using form personalization needs parameters to be passed.

Skip below steps if you have already created Menu and directly go for parameters.

Create new form personalization with Menu Type

Create another row to and use  Special4 menu for action to be performed


Launch a function with parameters
 


Parameters value should be defined as below. Make sure they are case sensitive and in single line.
Replace the parameters with the form parameters you are calling to.

'P_ORGANIZATION_ID='||${item.line.org_id.value}||' P_INVENTORY_ITEM_ID='||${item.line.inventory_item_id.value}||' P_SUBINV_CODE='||NVL(${item.line.subinv.value},'ABC')



Monday, October 26, 2015

Close Form A upon opening Form B, Oracle Forms When-Button-Pressed





When other form closing options failed use this suggestion

Follow the steps.

create a parameter

1) close_form



2) Initialize parameter before calling form B code in When-Button-Pressed trigger

PARAMETER.CLOSE_FORM = 'Y'

3) On When-New-Item-Instance trigger of the button that used to open other form, use below code.



        declare
          form_id FORMMODULE;
        BEGIN
            IF :PARAMETER.CLOSE_FORM = 'Y' THEN
            form_id := FIND_FORM(NAME_IN('SYSTEM.CURRENT_FORM'));
            IF NOT ID_NULL(form_id) THEN
              CLOSE_FORM(form_id);
            END IF;
            END IF;
            :PARAMETER.CLOSE_FORM := 'N';
        END;


Upon opening the form B in the foreground, form A still resides in the background.Form A closes when brought to foreground. When form B is closed form A also closes.

Thursday, October 22, 2015

Set system profile values from SQL Oracle Apps


Use fnd_profile.save to set system profile at site level from SQL.


Declare
value Boolean;
Begin
value := fnd_profile.save('put profile name code','new_profile_value','SITE');
commit;
End;