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;

Friday, September 11, 2015

OM: Your profile option does not allow automatic numbering e-Commerce Gateway

e-Commerce Gateway Inbound need the Profile Option ‘Sequential Numbering’ needs to be set
at the application and responsibility level to be able to generate order numbers in Order Management"

 

Thursday, September 3, 2015

Check FTP/SFTP status in Shell script

Status of FTP / SFTP can be check with below code in the shell script


2>&1 -- This is going to redirect stderr to stdout


result=`ftp -nv 111.111.111.111 << EOF 2>&1
user $USER $PASSWD
put file.txt
bye
EOF`

ctr=`echo "$result" | grep "226 Transfer complete" | wc -l`

#for error check, check the return string as it's different for FTP and SFTP

err_ctr=`echo "$result" | grep "Couldn't read packet" | wc -l`


if [ $ctr -gt 0 ]
then
echo "File Transfer successful"
elif [ $err_ctr -gt 0 ]
then
echo "connection failure"
fi

Tuesday, July 21, 2015

Passing More than 9 parameters for Oracle Apps Shell/Unix Concurrent program

Oracle Apps Shell Host Concurrent program can accept more than 9 parameters but when passed 10,11 and so on to unix variable as $10 or $11 it only gets the $1 parameter which is apps username and password.

To use $10, $11 parmaters it has to be assigned as ${10}, ${11},,,

Eg: Assign 10th or 11th parameter to unix variable in shell script


tenthparam=${10}
eleventhparam=${11}

Friday, July 17, 2015

Query to find Workflow Notification Mailer Outbound Server Name

Below is the query to find the Workflow notification Mailer Outbound server details.


SELECT   parameter_value
  FROM fnd_svc_comp_param_vals fscpv
  , fnd_svc_comp_params_b fscp
  WHERE fscpv.parameter_id = fscp.parameter_id
    AND fscp.parameter_name = 'OUTBOUND_SERVER';


You can find the other workflow mailer related attributes using the above tables.