April 14, 2015

Scripts for fndload upload /downlod step by step

Place this script file in temporary location with the reports and *.ldt file under same temp directory.

Step1:-Code for Login in Database and java base for DD & RTF File
*******************************************
# +===================================================================+
TMPDIR=`'pwd'`
# +===================================================================+
#  Function to Check the validity of loginids and password.
# +===================================================================+

CHKLOGIN(){
       if sqlplus -s /nolog <<! >/dev/null 2>&1
          WHENEVER SQLERROR EXIT 1;
          CONNECT $1 ;
          COLUMN tbl NEW_VALUE tbl_name NOPRINT;
          SELECT  table_name tbl
          FROM  all_tables
          WHERE table_name  = '$2'
          AND   ROWNUM      = 1;
          EXIT;
!
    then
        echo OK
    else
        echo NOK
    fi
}
APPSID="$XX_APPS_LOGIN_PASS"
# +===================================================================+
#  Check if APPS Login Id is entered else prompt to get it
# +===================================================================+
while [ "$APPSID" = "" -o `CHKLOGIN "$APPSID" "DUAL"` = "NOK" ]
do
    if [ "$APPSID" = "" ];then
            echo -e "Enter APPS Login Userid/Passwd : \c"
            read APPSID
    else
        echo "APPS Login Userid and Password entered is not CORRECT"
        APPSID=""
    fi
done
APPS_LOGIN=`echo $APPSID | cut -d"/" -f1`
APPS_PWD=`echo $APPSID | cut -d"/" -f2`
echo "Enter JDBC Connection String e.g 10.22.16.38:1543:IMDU: "
read APPSJDBC
#:: eg jaorddu1.dpa.co.ae:1533:DWCD
*********************************************************************
Step 2:Copy all the files You need to deploy in temp folder:

->shell script file name: cp $TMPDIR/SCRIPT.install                    $XXHR_TOP/bin/SCRIPT.install
->Any Packages/SQL/Views: cp $TMPDIR/XXHR_PACKAGE.sql                        $XXHR_TOP/admin/sql/XXHR_PACKAGE.sql
->Concureent program *.ldt file cp $TMPDIR/XXHRXMLRPT.ldt                    $XXHR_TOP/admin/import/XXHRXMLRPT.ldt
->template file related to the report : cp $TMPDIR/XXHRXMLRPT.rtf                    $XXHR_TOP/admin/import/XXHRXMLRPT.rtf
->rdf file related to the report cp $TMPDIR/XXHRXMLRPT.rdf                            $XXHR_TOP/reports/US/XXHRXMLRPT.rdf
**********************************************************************
Step3:Upload Valusets,Concurrent Program And Data Definition:

->$FND_TOP/bin/FNDLOAD $APPSID O Y UPLOAD $FND_TOP/patch/115/import/afffload.lct  valueset.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
->Concurrent Program
if $FND_TOP/bin/FNDLOAD $APPSID O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXHRXMLRPT.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE
then
    echo "Successfully uploaded Concurrent Program - XXHR:Employee  Report"
else
    echo "Error uploading in Concurrent Program -  XXHR:Employee   Report"
fi

#TEMPLATE of the Report
if java oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME $APPS_LOGIN -DB_PASSWORD $APPS_PWD -JDBC_CONNECTION $APPSJDBC -LOB_TYPE TEMPLATE -APPS_SHORT_NAME XXHR -CUSTOM_MODE FORCE -XDO_FILE_TYPE RTF -LANGUAGE en -LOB_CODE XXHRXMLRPT -FILE_NAME XXHRXMLRPT.rtf
then
   echo "Successfully uploaded xsl template - XXHR:Employee  Report"
else
   echo "Error uploading in xsl template -  XXHR:Employee  Report"
fi
#
##Data Definition Of the Report+
if $FND_TOP/bin/FNDLOAD $APPSID O Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XXHR_EMP_PROB_PRD_REP_DD.ldt
then
    echo "Successfully uploaded DD -  XXHR_EMP_PROB_PRD_REP_DD"
else
    echo "Error uploading in DD -  XXHR_EMP_PROB_PRD_REP_DD"
fi
#
****************************************************EOF*************************

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...