Wednesday, August 6, 2014

EBS 11i-- Function not available to this responsibility & adding custom top

You may encounter "Function not available to this responsibility" errors using EBS 11i Forms.


These kind of errors are mostly caused by a wrong Custom module setup and can be fixed by taking following actions:  
As this case is for 11i, 
check your $APPL_TOP/admin/topfile.txt file and add your custom module into that file, if it s not present already.

Also check your environment file, especially custom environment file.. It should reflect your custom_top as well..  
Finally, run autoconfig .
--- That's it. Your problem should be fixed..

Oracle also suggests following action plan to fix the error:

Make sure the your custom application is defined in:
1)$APPL_TOP/admin/applcust.txt and $APPL_TOP/admin/topfile.txt
2)Add the custom_top to $APPL_TOP/custom_$CONTEXT_NAME.env
3)If necessary edit your xml file (from APPL_TOP/admin) and make sure that the variable <oa_env_file type="custom" oa_var="s_custom_file" points to the custom environment file
4)Run autoconfig.

Also, following script may help adding custom tops in to an EBS 11i instance...

ORACLE EBS 11i ADD CUSTOM TOP SCRIPT --for linux



Usage Example:
 sh add_custom_top.sh xxefa TEST oracle1 XXEFA XXEFA XXEFA_TBS TEMPPROD /u2/oradata/u2/xxefa_01.dbf 1000M

###ADD CUSTOM TOP SCRIPT BY ERMAN ARSLAN ### Created 6/18/2013
### This script should be executed by the application owner
### Before, executing this script, apps environment should be sourced. APPS{SID}_{hostname}.env
### 1. parameter ->  name of the custom top  (lowercase) example: xxefa
### 2. parameter- >  Ebs database SID 
### 3. parameter ->  System user password
### 4. parameter ->  Db user name that is going to be created for the new application 
### 5. parameter ->  Password of the db user  that is going to be created for the new application 
### 6. parameter ->  Tablespace name that will be created for the new  user.
### 7. parameter ->  Existing Temp tablespace that will be used by the new user
### 8. parameter ->  Datafile full path with datafile name . This datafile will be created while creating the new tablespace
### 9. parameter -> datafile size 1000M

### Checking Command line argument count ###

if test $# -lt 9;
then
echo Lacking argument.. Please provide 9 arguments
echo " Usage :
#######################################################################################################
Script calistirilmadan once application environment source edilmis olmalidir. APPS{SID}_{hostname}.env
ADD CUSTOM TOP SCRIPT BY ERMAN ARSLAN ### Created 6/18/2013
This script should be executed by the application owner
Before, executing this script, apps environment should be sourced. APPS{SID}_{hostname}.env
1. parameter ->  name of the custom top  (lowercase) example: xxefa
2. parameter- >  Ebs database SID 
3. parameter ->  System user password
4. parameter ->  Db user name that is going to be created for the new application 
5. parameter ->  Password of the db user  that is going to be created for the new application 
6. parameter ->  Tablespace name that will be created for the new  user.
7. parameter ->  Existing Temp tablespace that will be used by the new user
8. parameter ->  Datafile full path with datafile name . This datafile will be created while creating the new tablespace
9. parameter -> datafile size 1000M
########################################################################################################
"
exit
fi


echo Script is executed by user =  `whoami`
echo "Continue?  (Y or N)  Y for continue , N for abort"
read Cevap1
if [ $Cevap1 == "N" ]
then
echo Program closed.
exit
fi
echo " Is apps environment set? ( Y or N)   Y for continue , N for abort"
read Cevap2
if [ $Cevap2 == "N" ]
then
echo Program closed
exit
fi


### Creating Directory structure. ####

mkdir $APPL_TOP/$1
mkdir $APPL_TOP/$1/11.5.0
mkdir $APPL_TOP/$1/11.5.0/admin
mkdir $APPL_TOP/$1/11.5.0/admin/sql
mkdir $APPL_TOP/$1/11.5.0/admin/odf
mkdir $APPL_TOP/$1/11.5.0/sql
mkdir $APPL_TOP/$1/11.5.0/bin
mkdir $APPL_TOP/$1/11.5.0/reports
mkdir $APPL_TOP/$1/11.5.0/reports/US
mkdir $APPL_TOP/$1/11.5.0/forms
mkdir $APPL_TOP/$1/11.5.0/forms/US 
mkdir $APPL_TOP/$1/11.5.0/$APPLLIB
mkdir -p $APPL_TOP/$1/11.5.0/$APPLOUT
mkdir -p $APPL_TOP/$1/11.5.0/$APPLLOG

### Adding custom product top to topfile.txt..

cd $APPL_TOP
cd admin
echo $1  $APPL_TOP >> topfile.txt

### Adding new Custom top to the default custom environment file
function toUpper { echo $1 | tr [a-z] [A-Z]; } ## uppercase e cevirme fonksiyonunu tanimladik
echo export `toUpper $1`_TOP=$APPL_TOP/$1/11.5.0 >> $APPL_TOP/custom`echo $2`_`hostname -a`.env

###  Connecting to db and creating tablespace and user 
sqlplus system/$3 << EOF
create tablespace $6 datafile '$8' size $9 default storage(initial 10k next 10k);
create user $4 identified by "$5" default tablespace $6 temporary tablespace $7 quota unlimited on $6 ;
grant connect, resource to $4;
exit;
EOF

### Environment is sourced again

. $APPL_TOP/APPS`echo $2`_`hostname -a`.env

echo"
### Script completed . Check above for the error.. If there are errors produced, run the script after correcting them. Error handling is not done in this script, because this script will not be used by the end users.
"
################
###################################


IMPORTANT: For other systems (not Linux) , this script may fail.. The script will run successfully but you may encounter problems like the following;

adcmctl.sh: XXEFA_TOP=/u01/appappl/xxefa/11.5.0: is not an identifier..

This a shell problem, as /bin/sh in Solaris behaves different than it behaves in Linux.
That is ,it is caused by environment variable declaration in custom environment file.. I mean the syntax..
In solaris an environment variable should be defined as follows;

XXEFA_TOP=/u01/appappl/xxefa/11.5.0
export XXEFA_TOP

not -> export XXEFA_TOP=/u01/appappl/xxefa/11.5.0 .. This is wrong in Solaris /bin/sh....

No comments :

Post a Comment

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.