Tuesday, January 20, 2009

How to Register a shell script in oracle Applications???

I am putting this basics for people like me who are poor in unix…and not confident in doing shell scripting..:)
we dont need to develop huge scripts in apps..most of the times it will be moving files between servers or deleting files after completion…
Recently I developed a few scripts for moving files after program completion like output to some other folder…

$1 connect String
$2 Userid
$4 Concurrent request id

Create a shell script .If the shell script is supposed to get values from the concurrent program parameters defined ,they can be accessed using $5,$6 onwards

Step2:Create a executable in application
With execution method as host

Step3:Create the concurrent program for this executable

Step 4:Attach the Program to a request group
Step5:Now move the shell script to the bin folder for the corresponding application top of the executable..make sure that file type is .prog not .sh
For example : General ledger application executable.. then GL_TOP/bin

Step6:Change the permission on the file..
Chmod 775 file if it doesn’t work chmod 777 XX_TEST.prog

Step7: Create a soft link between the shell the shell script and the concurrent manager

ln -s $FND_TOP/bin/fndcpesr XX_TEST

Step7:Run the concurrent program

One more thing if you want the message to seen for debugging it can be done using
Echo command….
echo $MONTH


Anonymous said...


I need a info, if we need to write messages to FND OUT file, how to do. Since echo command always writes the information into the FND LOG file alone

Chandra R Matta said...

Here are the steps, how you write something into fnd out file.

In shell script what ever we echo something that will be written in log file. This is expected behaviour.

To write some content into ".out" file, one need to do it explicitly.

Here are the steps.
1.find out out file. which is --> o"request_id".out
2. find out out directory. Mostly $APPLCSF/out or something like this.
3. Write the intended content/text to ".out" file.
4.If you are able to write text in .out file correctly, then that can be seen from "View Output" button once conc. program completed.

Here is the sample code:
# do sed on f2 and add 'o' and '.out' as suffix and prefix.
OUTFILE_NAME=o`echo $1 | cut -d" " -f2 | sed 's/FCP_REQID=//g' | sed 's/"//g' `.out
# any other code here ..
# finally write text in to outfile. In my case, I am writing contents of temp.txt to out file.
cat temp.txt >> $APPLCSF/out/$OUTFILE_NAME

Hope this helps..


durga said...

Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.

How to Register a Business

Sridevi Koduru said...
This comment has been removed by the author.
Sridevi Koduru said...
This comment has been removed by the author.
Sridevi Koduru said...

Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.