Friday, July 29, 2016

Custom.pll compilation script

In R12:


cd $AU_TOP/Resource


frmcmp_batch module=CUSTOM.pll userid=apps/<pwd> output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special

WF_LOAD Script

WFLOAD apps/<pwd> 0 Y DOWNLOAD APINVAPR.wft APINVAPR 


WFLOAD apps/<pwd> 0 Y UPLOAD APINVAPR.wft

Fnd_Load Scripts


Oracle Forms Personalization:
FNDLOAD APPS/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_FORM_PERS.ldt FND_FORM_CUSTOM_RULES function_name=AP_APXINWKB_BATCHES

FNDLOAD apps/<pwd> 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_FORM_PERS.ldt
Request Group:
FNDLOAD apps/<pwd> O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct XX_GL_INQUIRY_REQ_GRP.ldt REQUEST_GROUP REQUEST_GROUP_NAME="Resp_grp_name" APPLICATION_SHORT_NAME="XX"

FNDLOAD apps/$apps_pwd O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct XX_GL_INQUIRY_REQ_GRP.ldt
Concurrent Program:
FNDLOAD apps/<pwd> O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CP.ldt PROGRAM APPLICATION_SHORT_NAME="XX" CONCURRENT_PROGRAM_NAME="XX"

FNDLOAD apps/$apps_pwd O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CP.ldt PROGRAM APPLICATION_SHORT_NAME="XX" CONCURRENT_PROGRAM_NAME="XX" CUSTOM_MODE=FORCE
RTF Template:
select * from xdo_lobs where lob_code = :l_lob_code and file_name like 'XX.rtf' and xdo_file_type = 'RTF'
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD <pwd> -JDBC_CONNECTION '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.xxx.xxx)(PORT=xxxx))(CONNECT_DATA=(SERVICE_NAME=xxxx)))' -LOB_TYPE TEMPLATE_SOURCE -LOB_CODE <lob Code> -APPS_SHORT_NAME XX -LANGUAGE en -TERRITORY 00 -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME

java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
    -DB_USERNAME APPS \
    -DB_PASSWORD $apps_pwd \
    -JDBC_CONNECTION $jdbc \
    -APPS_SHORT_NAME XX \
    -LOB_TYPE TEMPLATE_SOURCE \
    -LOB_CODE <lob code> \
    -LANGUAGE en \
    -TERRITORY US \
    -XDO_FILE_TYPE RTF \
    -FILE_NAME XX.rtf \
    -CUSTOM_MODE FORCE



Request Set:
Request Set:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct Test_FNDRS_RS.ldt REQ_SET REQUEST_SET_NAME="FNDRSSUB1054"

FNDLOAD apps/$apps_pwd O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct Test_FNDRS_RS.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

Request Set Link:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct Test_FNDRS_LINK.ldt REQ_SET_LINKS REQUEST_SET_NAME="FNDRSSUB1054"

FNDLOAD apps/$apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct Test_FNDRS_LINK.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Alert:
FNDLOAD apps/$apps_pwd 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct XX_ALERT.ldt ALR_ALERTS APPLICATION_SHORT_NAME=XX ALERT_NAME="XX - Alert Name"

FNDLOAD apps/$apps_pwd 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct XX_ALERT.ldt CUSTOM_MODE=FORCE 

For Web ADI:
Integrator:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bneintegrator.lct XX_LDT_FILE_INTG.ldt BNE_INTEGRATORS INTEGRATOR_ASN=XX INTEGRATOR_CODE=<integrator Code>

FNDLOAD apps/$apps_pwd  0 Y UPLOAD  $BNE_TOP/patch/115/import/bneint.lct XX_LDT_FILE_INTG.ldt
Download Layout: 
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnelay.lct XX_LDT_FILE_LAYOUT.ldt BNE_LAYOUTS LAYOUT_ASN=XX LAYOUT_CODE=<Layout Name>

FNDLOAD $apps_user/$apps_pwd  0 Y UPLOAD  $BNE_TOP/patch/115/import/bnelay.lct XX_LDT_FILE_LAYOUT.ldt
Download Contents:  
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnecont.lct XXOMG_CONTENT.ldt BNE_CONTENTS CONTENT_ASN=XX CONTENT_CODE=<Content code>

FNDLOAD $apps_user/$apps_pwd  0 Y UPLOAD  $BNE_TOP/patch/115/import/bnecont.lct XXOMG_CONTENT.ldt

Download mappings:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnemap.lct XX_LDT_FILE_MAP.ldt BNE_MAPPINGS MAPPING_ASN=XX MAPPING_CODE=MAP_KEY1

FNDLOAD $apps_user/$apps_pwd  0 Y UPLOAD  $BNE_TOP/patch/115/import/bnemap.lct XX_LDT_FILE_MAP.ldt
Lookup:
FNDLOAD apps/<pwd> O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_INDICATOR_LK.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=XX LOOKUP_TYPE=XX_INDICATOR_LK

FNDLOAD $apps_user/$apps_pwd O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_INDICATOR_LK.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
Function:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_LDT_FILE_ADI.ldt FUNCTION FUNCTION_NAME=XX_LDT_FILE_ADI 
FNDLOAD $apps_user/$apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_LDT_FILE_ADI.ldt

Menu:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_LDT_FILE_MENU.ldt MENU MENU_NAME=XX_OBI_SALES_UPLOAD

FNDLOAD $apps_user/$apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_LDT_FILE_MENU.ldt
Responsibility:
FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XX_LDT_FILE_RESP.ldt FND_RESPONSIBILITY RESP_KEY=XX_OBI_SALES_UPLOAD

FNDLOAD $apps_user/$apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct  XX_LDT_FILE_RESP.ldt

FND_USER Scripts

Create User:

DECLARE
  v_user_name  VARCHAR2(30):=UPPER('TGSWAMY');
  v_password   VARCHAR2(30):='welcome12';
  v_session_id INTEGER     := USERENV('sessionid');
BEGIN
  fnd_user_pkg.createuser (
    x_user_name => v_user_name,
    x_owner => NULL,
    x_unencrypted_password => v_password,
    x_session_number => v_session_id,
    x_start_date => SYSDATE,
    x_end_date => NULL
  );
  COMMIT;
  DBMS_OUTPUT.put_line ('User: '||v_user_name||'Created Successfully');
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.put_line ('Unable to create User due to'||SQLCODE||' '||SUBSTR(SQLERRM, 1, 100));
    ROLLBACK;
END;

Add Responsibility:

BEGIN
fnd_user_pkg.addresp ('TGSWAMY','SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD','Add Responsibility to USER using pl/sql',SYSDATE,SYSDATE + 100);
commit;
dbms_output.put_line('Responsibility Added Successfully');
exception WHEN others THEN
       dbms_output.put_line(' Responsibility is not added due to ' || SQLCODE || substr(SQLERRM, 1, 100));
       ROLLBACK;
END;

Reset Password for User:

DECLARE
      l_ret_val BOOLEAN;
      l_user_name   varchar2(50) := 'TGSWAMY';
      l_new_pwd     varchar2(20) := 'welcome123';
BEGIN
      l_ret_val := fnd_user_pkg.changepassword(username=> l_user_name,newpassword => l_new_pwd);
     IF l_ret_val
     THEN
        DBMS_OUTPUT.PUT_LINE('The password is successfully reset to '||  l_new_pwd);
        COMMIT;
     ELSE
        DBMS_OUTPUT.PUT_LINE('The password reset has failed');
     END IF;

END;

ValidateEntity() Method in in Entity Object (EOImpl) file in oaf

-- Method Already available in EOImpl file if you enable check button in EO wizard.

-- Method in EOImpl File
Protected void validateEntity()
{
super.validateEntity();
Double value = Double.parseDouble(getAmount().toString());
if(value > 0)
{
throw new OAException(“Amount Greater than Zero..”,OAException.WARNING);
}
}

Thursday, July 28, 2016

Set custom CSS (Colors) for specific fields in OAF

In Controller ProcessRequst Method():

OAMessageTextInputBean textBean = (OAMessageTextInputBean)oawebbean.findIndexedChildRecursive("Amount");
textBean.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, "xx_CSS_property_name");

Set two decimal to Number fields in OAF

In Controller ProcessRequest() method:

OAMessageTextInputBean Baseline_END_DATE7 = (OAMessageTextInputBean)oawebbean.findIndexedChildRecursive("xxAmount");
Baseline_END_DATE7.setAttributeValue(OAWebBeanConstants.CURRENCY_CODE,"USD" );