Problem while passing parameter to shell script which sends email-Ora Apps

Hi,
I have a pl/sql package which will call a shell script program.The shell script program is written in order to send the invoice hold details of AP as a mail.The parameters to this program are passed in the pl/sql package.
The shell script program has
5 parameters namely
to - email
from - email
hold id - which is a number
hold name - varchar2( free text)
hold reason - varchar2( free text)
the shell script looks as below.
FROM_EMAIL=`echo $1|cut -f9 -d " "|sed 's/\"//g'`
echo "From email id is $FROM_EMAIL" -- From email
TO_EMAIL=`echo $1|cut -f10 -d " "|sed 's/\"//g'`
echo "To Email id is $TO_EMAIL" -- to email
PARAM0=`echo $1 | awk '{print $11}'|sed -e "s/\"//g"`
echo "Param0: $PARAM0" -- hold id
PARAM1=`echo "$1" | cut -d" " -f12-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
echo "Param1: $PARAM1" -- hold name
PARAM2=`echo "$1" | cut -d" " -f13-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
echo "Param2: $PARAM2" -- hold reason
the values that am passinf to this program are if suppose
from email ---- [email protected]
to email [email protected]
12345 ------ hold id
test hold name ------ hold name
test hold reason ------- hold reason
The output for the above parameters is as follows
from email ---- [email protected]
to email [email protected]
12345 ------ hold id
test hold name ------ hold name
hold name --------hold reason (a part of hold name parameter is displayed as hold reason.The reason being in param2 we used cut which is cutting from 13.
the problem here is since param1 being free text we cannot predict at what position the parameter ends.i mean there might be a single word or more than 2 words in that parameter seperated by space. the question here is ... is there anyway that we can specify dynamically from which location the param2 should fetch the value.
can we use some delimiter to identify the end of param1 and start of param2.If so... how can it be written in this scenario.
Thanks in Advance.

As I see, all parameters are merged into 1 at shell script.
Please do as follow:
1- Modify your shell script as followed:
echo "From email id is $1" -- From email
echo "To Email id is $2" -- to email
echo "Param0: $3" -- hold id
echo "Param1: $4" -- hold name
echo "Param2: $5" -- hold reason
2- rename your shell script file with .prog extension : CUSTOM_NAME.prog
3- perform the following command at custom file location:
ln -s $FND_TOP/bin/fndcpesr CUSTOM_NAME
This approach will seperate your parameters and then it will be more easier to manipulate them.
Regards

Similar Messages

  • Problem while passing parameter from report to report.

    Hi
    I'm using forms and reports 10g, hava a problem while passing the parameter from reports to report.
    i'm using srw.set_hyperlink to call report from report.
    i have created a key value in the cgicmd.dat file called
    faccre802005-2006: report=faccre80 destype=cache desformat=pdf userid=<userid/passwd@cs> server=<servername>
    Now in the format trigger i'm using this key value
    function BTN_DEBITFormatTrigger return boolean is
    temp varchar2(5000);
    IP_ADDRESS VARCHAR2(50);
    SERVER_NAME VARCHAR2(10);
    L_ACCT_CODE VARCHAR2(14);
    begin
    SELECT MAST_INT_DESC,MAST_USER_PGM_ID INTO IP_ADDRESS,SERVER_NAME FROM MAST_INT_INFO WHERE MAST_INT_ID='VISHWA';
    temp := IP_ADDRESS||'?faccre80'||:P_FIN_YEAR||'+server='||server_name;
    temp :=temp ||'+'||'P_PREVIOUS_CODE='''||:ACCT_CODE||''''||'+'||'P_COMPANY_CODE='''||:P_COMPANY_CODE||'''';
    temp :=temp ||'+'|| 'P_FROM_DATE='''||TO_CHAR(:P_FROM_DATE,'DD-MON-RRRR')||''''||'+'|| 'P_TO_DATE='''||TO_CHAR(:P_TO_DATE,'DD-MON-RRRR')||''''||'+'||'P_TRUST_CODE='''|| :P_TRUST_CODE||'''';
    temp :=temp ||'+'|| 'P_UNIT_CODE='''||:P_UNIT_CODE||''''||'+'||' P_FIN_YEAR='''||:P_FIN_YEAR||'''';
    temp :=temp ||'+'|| 'P_LEVEL='''||:P_LEVEL||''''||'+'||'P_HEADER='''||replace(:P_HEADER,' ','%20')||''''||'+'||'P_FORMAT='''||:P_FORMAT||'''';
    SRW.Set_Hyperlink(temp);
    END;
    return (TRUE);
    end;
    Report is coming but not the expected result because parmaeters are not coming from first report to second report.
    If i dont use cgicmd file userid and password are displyed in the URL.
    Pl tell me how to pass parameter from one report to another.
    thanks and regards

    Hi
    I got the solution.
    I forgot to add %* at end of the KEY value.

  • Problem while calling concsub from shell script

    Hi All,
    I am facing problem when I am trying to run CONCSUB utility from shell script.The same works well when I try it from command line.The only prob I am facing from shell script is assigning values to temporary variables.
    This is how my script looks
    #!/bin/bash
    export PARM5="$5"
    export PARM6="$6"
    export PARM7="$7"
    echo "INTPARM5=\"$PARM5\""
    echo "INTPARM6=\"$PARM6\""
    echo "INTPARM7=\"$PARM7\""
    echo $FND_TOP/bin/CONCSUB $1 ONT 'Order Management Super User, Vision Operations (USA)' $3 WAIT=Y CONCURRENT ONT $PROGRAM "$INTPARM5" "$INTPARM6" "$INTPARM7"When I try to run the above shell based concurrent program it doesn't pass the parameters as expected and it errors out saying "Wrong number of arguments to call the procedure"
    I tried my luck from some of the previous posts ({thread:id=2360776} ),but to vain
    If anyone has any ideas,please suggest!!
    Thanks in advance!!
    Edited by: sandy on May 4, 2013 12:54 PM

    Here are your proofs
    Proocedure
       PROCEDURE abc(--p_errbuf            OUT   VARCHAR2,
                                                --p_errcode           OUT   VARCHAR2,
                                 p_order_no          IN    NUMBER DEFAULT NULL,
                                                p_customer_id       IN    NUMBER DEFAULT NULL,
                                 p_name              IN    VARCHAR2 DEFAULT NULL
          IS
                    v_cname    VARCHAR2(200);
               v_ordered_date DATE;
               v_order_number  NUMBER;
              v_order_type    VARCHAR2(200);
    BEGIN
                fnd_file.put_line(fnd_file.output, 'Begin Execution');
       SELECT DISTINCT ac.customer_name,
                    d.ordered_date ordered_date,
                    d.order_number order_number,
                    x.NAME order_type
            INTO   v_cname
               ,v_ordered_date
               ,v_order_number
               ,v_order_type
               FROM oe_order_headers_all d,
                    oe_transaction_types_tl x,
                    wsh_delivery_details b,
                    wsh_delivery_assignments c
                    ,ar_customers ac
              WHERE 1 = 1
                AND ac.customer_id = b.customer_id
                AND d.order_type_id = x.transaction_type_id
                AND x.LANGUAGE = 'US'
                AND b.released_status = 'B'
                AND b.source_header_id = d.header_id
                AND c.delivery_detail_id = b.delivery_detail_id
                AND d.order_number=NVL(p_order_no,d.order_number)
                AND ac.customer_id = NVL(p_customer_id,ac.customer_id)
             AND x.name=NVL(p_name,x.name)
                AND NOT EXISTS (SELECT 1
                                FROM wsh_delivery_details b
                               WHERE 1 = 1
                                      AND b.released_status != 'B'
                                      AND b.source_header_id = d.header_id)
                                       --BETWEEN ('1213794') and ('1213797'))
                AND rownum<2;
            INSERT INTO xxc_temp(customer_name,ordered_date,order_number,order_type) VALUES(v_cname,v_ordered_date,v_order_number,v_order_type);
            COMMIT;
             fnd_file.put_line(fnd_file.output, 'Order Number is' || v_order_number);
             fnd_file.put_line(fnd_file.output, 'Order Type is'   || v_order_type);
       END;Script
    #!/bin/bash
    set -x
    export PARM5="$5" 
    export PARM6="$6"
    export PARM7="$7"
    sqlplus -s $1 <<EOF
    set head off feed off serverout on size 1000000
    exec abc('$PARM5','$PARM6','$PARM7');
    exit
    EOFNow when I run the 'XX Order Detail CSV Report' I get the below log and no Output
    +---------------------------------------------------------------------------+
    Application Object Library: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXKES_PDF_TRANSFER module: XX Order Detail CSV Report
    +---------------------------------------------------------------------------+
    Current system time is 06-MAY-2013 05:05:56
    +---------------------------------------------------------------------------+
    + export PARM5=66432
    + PARM5=66432
    + export PARM6=
    + PARM6=
    + export PARM7=Mixed
    + PARM7=Mixed
    + sqlplus -s APPS/APPS
    +---------------------------------------------------------------------------+
    Executing request completion options...
    Output file size:
    0
    +------------- 1) PRINT   -------------+
    Disabling requested Output Post Processing.  Nothing to process.  The output of the request is zero byte.
    +--------------------------------------+
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed successfully
    Current system time is 06-MAY-2013 05:05:56
    +---------------------------------------------------------------------------+After the concurrent program executed I queried the table xxc_temp and here you see the data
    SQL> select * from xxc_temp;
    CUSTOMER_NAME
    ORDERED_D ORDER_NUMBER ORDER_TYPE
    A. C. Networks
    18-FEB-13        66432 MixedMy procedure fetches the data fro given set of i/p parameters but it doesn't give o/p coz it's a host based conc program.Please advise if there's a way to get the o/p in a host based conc program
    Thanks!!

  • Problem while executing procedure thru Shell script (EXECUTE IMMEDIATE)

    Hi All,
    I have created a procedure where i am passing column name, tablename and business date. The procedure gets last 5 business date excluding Saturday and sunday based on business date.
    i am using EXECUTE IMMEDIATE statement in the procedure, where i am replacing the column name, table name, and business date & then executing this statement.
    stmt := 'select count(1) FROM '||tblname||' where trunc('||date_column||')= :1';
    EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
    It will give me the count of all 5 days for a particular dates. When i run the procedure in SQL*Plus/TOAD, it gives me desired result. When i run this in UNIX shell script, it runs fine but at end gives following error:
    SP-xxx: Bind varaible not declared.
    Can someone tell me where might be the problem?

    Hello, if you could put a {noformat}{noformat} before and after your snippets of code please, it makes it much easier to decipher.
    You have:EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
    Where it should be:EXECUTE IMMEDIATE l_stmt into tbl_count using TRUNC(in_date) ;
    Additionally, you do not need the SQL script, you could simply have:sqlplus -S $ORA_UID/$ORA_PWD@$DSQuery <<EOF >>${TMP_DIR}/report.log 2>&1
    whenever sqlerror exit failure
    whenever oserror exit failure
    set serveroutput on;
    set pages 0;
    set feed off;
    exec return_date ('20090515','STIFAPACDTR','ASOFD','n');
    print;
    quit
    EOF
    if [[ $? -ne 0 ]]
    then
    echo "sqlplus did not run successfully,verify"
    echo "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
    else
    echo "$0 script executed successfully"
    fi
    exit $?
    You don't need any of this:if /usr/xpg4/bin/grep -e 'ORA-' -e '^ERROR at' -e 'unknown command' ${TMP_DIR}/report.log
    then
    print "sqlplus did not run successfully,verify"
    print "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
    exit 1
    fi
    if [http:// -s ${TMP_DIR}/report.log ]
    then
    print "`echo $0 script executed successfully"
    grep -v '^$'${TMP_DIR}/report.log > ${TMP_DIR}/report.csv
    else
    print "${TMP_DIR}/report.log file not generated, verify, \n exiting"
    exit 1
    fi
    outFLAG="n"
    done
    I'm not sure that that will fix your problem here, but can you try again with those changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Shell Script to send email with .txt file as attachment

    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!

    978334 wrote:
    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!http://bit.ly/XHfSCz
    https://forums.oracle.com/forums/search.jspa?threadID=&q=sendmail&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Problem while passing parameter between forms

    Hi,
    I am tring to call a form from another form using the code
    fnd_function.EXECUTE (function_name => 'TABFORMFUN',
    open_flag => 'Y',
    session_flag => 'Y',
    other_params => 'EMPNO="' ||'paramvalue'||'"');
    in WHEN-MOUSE-CLICK trigger.
    when I deployed it in applications and click the button on the first form
    getting an error message:
    FRM-47023 No such parameter Named G_QUERY_FIND exist in form TABFORM.
    Thanks
    Kittu.

    Hi there
    I have the following questions:
    1. Does the code work in any of you environments?
    2. Does the G_QUERY_FIND exist in the TABFORM form? If it is not there, what happens if you add it?
    3. Can we have a sample of what code is in the fnd_function.EXECUTE procedure? This will help expain the actual method that you are calling the TABFORM form with. i.e are you using call_form/open_form/new_form built-ins or are you constructing a URL. I assume this is a forms/library based package.
    Sorry to be picky Eric, but EXECUTE is not an Oracle reserved word, it is perfectly fine to use it. Oracle use is themselves in various manners e.g. as a function in the dbms_sql package as well as for the EXECUTE IMMIDIATE statement for imbedded dianamic sql. Ref to the following Oracle URL for a list of all reserved words: http://download-east.oracle.com/docs/cd/B14117_01/server.101/b10759/ap_keywd.htm
    Cheers
    Q

  • Problem while passing parameter from standard page to custome page

    Hi,
    We are calling a custom page from standard page.
    Standard page Extended CO
    PR
    String wcHeader = pageContext.getParameter("WcHeaderId");
    pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
    PFR
    String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
    Till here we are able to put the Parmeter in Tranasction
    After calling the custom page from standard page while we are using the Transaction value it is returning null.
    Custom page CO
    PR
    String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    we are getting nulll here.
    Please provide the solution for this
    Thanks,
    Narayana

    Hi Meher Irk,
    i got WcHeaderid value in Custom CO. but i want to set value Custome page to Standard page in custom page i have a total value this value i want to set to Standard page.
    Custom CO code
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package xxbb.oracle.apps.pos.xxwc.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import xxbb.oracle.apps.pos.xxwc.server.WithholdAMImpl;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.cabo.ui.validate.Formatter;
    import oracle.apps.fnd.framework.webui.OADecimalValidater;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.table.OATableFooterBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.jbo.domain.Number;
    import java.util.Enumeration;
    import oracle.apps.pos.wc.webui.WcRespondCO;
    //import oracle.apps.pos.wc.webui.*;
    * Controller for ...
    public class WithholdCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String wcHeader=new String();
    Formatter formatter=new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
    OAColumnBean columnBean=(OAColumnBean)webBean.findIndexedChildRecursive("Amountcol");
    columnBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR,formatter);
    //String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
    pageContext.writeDiagnostics(this,"zzzzzz"+wcHeader,1);
    if(pageContext.getSessionValue("WcHeaderId") != null&& !pageContext.getSessionValue("WcHeaderId").equals(""))
    wcHeader=pageContext.getSessionValue("WcHeaderId").toString();
    pageContext.writeDiagnostics(this,"If get session condition "+wcHeader,1);
    /* OAMessageTextInputBean item=(OAMessageTextInputBean)webBean.findIndexedChildRecursive("item3");
    item.setValue(pageContext,"10");*/
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if("AdvancedRN".equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    am.invokeMethod("xxInsertRow");
    // am.xxInsertRow();
    if(pageContext.getParameter("Save")!=null)
    am.invokeMethod("xxSaveTransaction");
    am.invokeMethod("xxUnitotal");
    OAViewObject vo = (OAViewObject)am.findViewObject("TotalVO1");
    vo.reset();
    vo.next();
    OARow totRow = (OARow)vo.getCurrentRow();
    Number total = (Number)totRow.getAttribute("Total");
    throw new OAException("Records Saved Successfully",OAException.CONFIRMATION);
    if(pageContext.getParameter("Delete")!=null)
    am.invokeMethod("xxDeleteRow");
    am.invokeMethod("xxSaveTransaction");
    //am.xxDeleteRow();
    // am.xxSaveTransaction();
    throw new OAException("Records Deleted Successfully",OAException.CONFIRMATION);
    if(pageContext.getParameter("Close")!=null)
    pageContext.setForwardURL("OA.jsp?page=/oracle/apps/pos/wc/webui/WcRespondPG&param=FrmWithHoldPG"
    ,null
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null
    ,null
    ,true
    ,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    Thanks,
    Narayana

  • How to pass variables to shell script?

    I have a shell script which uses the touch command to change the date of a file.  To run the command on the command line the syntax is:
    set-file-date.sh <file> <date>
    I'm trying to run it from an automator workflow, so I'm prompted for the date, then the workflow iterates over the finder items, i.e., files, and changes the date of each files.
    The problem is in the "Run Shell Script" action.  The $@ is substituted with the file names selected in finder, so this will echo the file names:
    for i in "$@"; do
         echo "$i"
    done
    What I want to do is something like this:
    for i in "$@"; do
         set-file-date.sh <DATE VARIABLE> "$i"
    done
    But I can't prompt for the date value, and pass it to the script.  I've tried using the "Get Value of Variable" and the "Ask For Text" actions.  I can either get the file names from finder OR the text input in the "Ask for Text" action, but not both.
    Is what I'm trying to do possible with a shell script?
    -Thanks

    This is standard AppleScript text concatenation...
    set howManyWords to do shell script "wc -w /path/to/file | awk '{print $1}'"
    do shell script "/usr/local/bin/growlnotify -t 'Corpus' -m '" & howManyWords & " words were added to the corpus.'"
    in other words, just use the & to concatenate the parts of your text together.

  • Parameter  to shell script using Runtime.exec(string)

    Hi all, ( Speciall hi to dheeraj tak )
    Briefly : How do i pass an arguement to a non - java executible being called using Runtime.exec.
    In detail : i am using Runtime.exec to call a shell script : The code is as follows:
    String callAndArgs[] = {"/home/tom/jakarta-tomcat-4.1.24/webapps/dash/script.sh"};
    try {
    Runtime rt = Runtime.getRuntime();
    Process child = rt.exec(callAndArgs);
    This works properly & calls the shell script which in turn invokes some other executible (c file).
    $HOME/midi/test/build/bin/<C-EXECUTIBLE>
    Here i am specifying the name (say hello.exe ) . So far so good.
    I want to make this happen dynamiclaly. so i need to pass the name of the executible as a parameter to the script.
    To pass a parameter i hav to change the string to :-
    String callAndArgs[] = {"/home/tom/jakarta-tomcat-4.1.24/webapps/dash/script.sh <C-EXECUTIBLE HERE>"};
    and the script to
    $HOME/midi/test/build/bin/$1 --- where $1 refers to argument 1. (C-EXECUTIBLE AGAIN).
    This is giving an IO - Execption. Plz help
    Code will be very helpful.
    Thanx in advance

    some 1 plz tell me the difference :-
    This is the documentation of Runtime.exec that i found :-
    1> exec
    public Process exec(String command) throws IOException
    Executes the specified string command in a separate process.
    The command argument is parsed into tokens and then executed as a command in a separate process. This method has exactly the same effect as exec(command, null).
    Parameters:
    command - a specified system command
    Complete refernce says : Process (String progName) ----- Executes a program specified by programname as a seperate process.
    2> exec
    public Process exec(String cmdarray[]) throws IOException
    Executes the specified command and arguments in a separate process.
    The command specified by the tokens in cmdarray is executed as a command in a separate process. This has exactly the same effect as exec(cmdarray, null).
    Parameters:
    cmdarray - array containing the command to call and its arguments.
    Complete reference says : Process exec(String comLineArray[]) ---- Executes the command line specified bythe string in comLineArray as a seperate process.
    This means that there is provision 4 command line arguments...
    how do u use it then????????????????????????????

  • Error while passing parameter in Oracle Jdeveloper

    Hi All,
    I was passed Crystal report viewer object  From Servlet it is Running fine but one problem in that while passing parameter from that page  to data base it is not supporting (The ok Button on page).
    can any one tell me how to find Action Button (.Jsp page)
    Because i am using .jsp  page That was made in CR4E
    in that i found only jsp code I have not get how to work Action of that button
    Also another problem while making Viewer.jsp pge ..rpt-Crystal reports--->>Create Viewer Jsp->>Insert CrysatlReport viewer API code------->>>1.Connectparameterinthat report 2.connect the crystalreportPageViewer  while makin this page  i was running on Apache tomcat Server it is not displaying Anything only Displaying Blank Browser
    Can Any one help me...
    Sincerly
    Amol

    For your first question can you please be a little more clear as to what you are referring to?  I am not familiar with an action button for the parameter pages.... what I can tell you is that we don't have any jsp code for the viewer controls, all of that is generated dynamically at runtime.  We do have a viewer SDK that you can use to set properties on the viewer; information about this can be found in the [Developer Library|https://boc.sdn.sap.com/developer/library] in the Viewer SDK documentation book.
    For your second question, I assume you are referring to generating a viewer page from a report in Crystal Reports for Eclipse.  You will need to uncomment the viewer code (for some reason when the page is generated, the viewer code has block comments surrounding it).  You will probably want to make sure the parameter code is uncommented as well. 
    In addition to this, there is a helper file called JRCHelperSample.java that contains all of the helper methods for the automatically generated viewer page.  This can be modified in whatever way you wish to suit your needs.

  • Procedure to call shell script which invoke java program

    Hi
    I have requirement for a pl/sql procedure to invokes a shell script which calls java programs.
    I was using DBMS_SCHEDULTER to invoke the shell , the shell is getting invoked but it is not executing the java programs.
    appreciate your suggestions and advices .
    param1=$1
    param2=$2
    #echo "First parameter is:"$1
    #echo "Param1 is:"$param1
    if [ $# -eq 1 ]; then
    java -jar -Xmx512m abc.jar ${CONFIG_DIR} $param1
    elif [ $# -eq 2 ]; then
    java -jar -Xmx512m abc.jar ${CONFIG_DIR} $param1 $param2
    fi
    Regards

    user458361 wrote:
    Hi
    I have requirement for a pl/sql procedure to invokes a shell script which calls java programs.
    I was using DBMS_SCHEDULTER to invoke the shell , the shell is getting invoked but it is not executing the java programs.
    appreciate your suggestions and advices .
    param1=$1
    param2=$2
    #echo "First parameter is:"$1
    #echo "Param1 is:"$param1
    if [ $# -eq 1 ]; then
    java -jar -Xmx512m abc.jar ${CONFIG_DIR} $param1
    elif [ $# -eq 2 ]; then
    java -jar -Xmx512m abc.jar ${CONFIG_DIR} $param1 $param2
    fi
    RegardsYou are doing the equivalent of making THREE Left turns instead of a single Right turn
    Most likely the shell environment is woefully lacking in needed details
    add new line as below
    param1=$1
    param2=$2
    /usr/bin/env | /usr/bin/sort -o /tmp/capture.log
    # make sure above Fully Qualified Pathnames are correct for your system!
    After you invoke script from PL/SQL post content of /tmp/capture.log back here

  • Passing password from shell script to Java

    Hi there,
    I have a shell script which has user id and password stored in variables. I call a java program from this shell script. I tried accessing this environment variable from java using system.getproperty and java is not getting the values. I have used export USERID PASSWORD
    and java classname to call it.
    I do not want to pass it as arguments because of security reasons. can anybody help me please.
    Thanks a bunch.

    Hi there,
    I have a shell script which has user id and
    password stored in variables. I call a javaprogram
    from this shell script. I tried accessing this
    environment variable from java using
    system.getproperty and java is not getting the
    values. I have used export USERID PASSWORD
    nd java classname to call it.
    Presumably you are using one of the newer java
    versions.
    Questions
    1. What statements are you using to set, export and
    run java?
    2. What shell are you using?
    3. How are you accessing the vars in java?
    I do not want to pass it as arguments because of
    security reasons. can anybody help me please.
    That is nonsensical. Putting it in env vars exposes
    it more than passing it as args.Thanks for replying jschell.
    1. I am using newer version java 1.5
    2. shell scripts gets it's variables from oracle reports through webservices.
    3. to run java i use java javaclassname3. I used EXPORT variablename and in java called system.getproperty(variablename)But system.getproperty is getting a null.
    And the decision about not passing it as args was made by our client. They think it's not safe to pass password.
    are they wrong??
    Please help me.

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

  • How to execute a shell script which is present in remote machine using ODI

    I have requirement of executing a batch (shell script) which is present in the remote machine.
    i have an ODI agent in remote machine as well. I have created agent locally by using the remote machine IP and port.
    I am able to test the agent successfully. But when i am executing the package using that agent it is failing with the following error
    errorODI-1226: Step Execution of the Scenario REMOTE_DEMO version 001 fails after 1 attempt(s).
    ODI-1241: Oracle Data Integrator tool execution fails.
    Caused By: oracle.odi.runtime.agent.invocation.InvocationException: HTTP/1.1 500 ODI-1423: Warning connecting to Agent localagent: work repository WORKREP1 is not bound to the master
    My Work Repository Name is : WORKREP1
    Remote Work Repository Name is:WORKREP_LOCAL.
    Could anyone please help me regarding this.
    I can't download shell script and run it locally this needs to be run on that remote machine only.
    Thanks
    senthilkumar

    This is the code.
    1. we can declare types dynamically
    2. Internal table dynamically
    3. Select querry dynamically
    just copy paste this code
    Here is the code for your question
    DATA:v_fieldname
    TYPE fieldname,
    l_PROG TYPE string,
    v_mess TYPE string,
    l_sid TYPE string,
    wa_ddfields TYPE dntab.
    DATA i_tab TYPE STANDARD TABLE OF string.
    DATA:l_str TYPE string,
    l_str1 TYPE string.
    PARAMETERS matnr type marc-matnr.
    end-of-SELECTION.
    *build the subroutine pool
    APPEND 'PROGRAM subpool.' TO i_tab.
    APPEND `LOAD-OF-PROGRAM.` TO i_tab.
    APPEND `DATA i_tab1 TYPE TABLE OF vbak.`      TO i_tab.
    APPEND `DATA l_rows TYPE i.`      TO i_tab.
    APPEND `select * into table i_tab1 from vbak.` To i_tab.
    append 'DESCRIBE TABLE i_tab1 LINES l_rows.' to i_tab.
    append 'Write :  l_rows .' to i_tab.
    GENERATE SUBROUTINE POOL i_tab NAME l_PROG
    MESSAGE v_mess
    SHORTDUMP-ID l_sid.
    IF sy-subrc = 0.
    PERFORM ('LOOP_AT_TAB') IN PROGRAM (l_PROG) IF FOUND.
    ELSEIF sy-subrc = 4.
    MESSAGE v_mess TYPE 'I'.
    ELSEIF sy-subrc = 8.
    MESSAGE l_sid TYPE 'I'.
    ENDIF.
    Edited by: vijay wankhade on Jan 1, 2009 5:34 PM
    Edited by: vijay wankhade on Jan 1, 2009 5:34 PM

  • Passing parameters from shell script to OWB process flow

    Hi all,
    I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
    sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
    How do i catch those values in process flow and pass those to mappings in Process flow?
    Do i need to create PF variables with same names or any name will do?
    Thanks in advance

    This document is explaining how to pass data between activities in process flow.
    I am passing parameters from a shell script.
    Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
    Thanks

Maybe you are looking for

  • Error in Process Chain while loading Master data text?

    Hello All Having a Process chain and having 5 infopackages(Master data Attri & text)with FULL LOAD with an processing options as PSA and Infobject.In this one of the infopackage failed and the status is in red colour,and when I right clicked there is

  • Dot source/calling a function with switch from the cmd line

    Hi This is driving me crazy and I know its something really obvious. If I have an example script like so, called myexample.ps1 [CmdletBinding()] param [Parameter(Mandatory=$false, HelpMessage="My Switch")] [switch] $Myswitch, [Parameter(Mandatory=$fa

  • Code is taking more time on DB.

    Hi, The following code is taking more time on DB. Any changes can be done to this code to improve the performance.. FORM list_name.   DATA: adr_form TYPE anrex.   LOOP AT it_p0002 INTO  wa_p0002                    WHERE begda LE pn-endda             

  • Problem in Composite deployment using SAR file

    Hello All We are facing issues during deployment of composites to a clustered environment. We created a simple HelloWorld Composite and deployed it as a SAR file. The deployment and test was successful for this composite. The WSDL and XSD of HelloWor

  • CP7 - quiz slides continue to play after timeline

    I'm using quiz slides with audio in Captivate 7. The audio plays, I choose an answer and click Submit, then click Y to continue, and whether I'm right or wrong, the playbar is only 1/2 - 2/3 way through the slide.  So I have to wait while the slide p