How to call a concurrent program with some parameters in a stored procedure

Hi All,
I have made two procedures, xx_nidhi_proc1 and xx_nidhi_proc2.
xx_nidhi_proc1 takes four parameters from front end and is registered as concurrent program in oracle apps and running fine alone.
xx_nidhi_proc2 calls the concurrent program of xx_nidhi_proc1 which is XX_NIDS_PROC1_PROG1.
But the problem in my code is , It runs the second concurrent program for xx_nidhi_proc2 but shows the Inactive- No Manager status for my first concurrent program XX_NIDS_PROC1_PROG1,
Please find out the error in my code...
CREATE OR REPLACE PACKAGE BODY NIDHI IS
procedure xx_nidhi_proc1 (errbuf OUT VARCHAR2,
retcode OUT VARCHAR2,
name_t varchar2,
empno varchar2,
doj date,
desig varchar2) is
begin
fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
fnd_file.PUT_LINE(Fnd_File.output, 'Name:'||name_t);
fnd_file.PUT_LINE(Fnd_File.output, 'Number:'||empno);
fnd_file.PUT_LINE(Fnd_File.output, 'DOJ:'|| to_char(doj, 'DD-MON-RRRR'));
fnd_file.PUT_LINE(Fnd_File.output, 'Designation:'||desig);
fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
errbuf:='SUCCESS';
retcode:='SUCCESS';
end xx_nidhi_proc1;
--calls the xx_nidhi_proc1 as concurrent program.
procedure xx_nidhi_proc21 (errbuf OUT VARCHAR2,
retcode OUT VARCHAR2)
is
v_request_id number;
begin
fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
fnd_file.PUT_LINE(Fnd_File.output, 'Deptartment Number:'||'Computer');
fnd_file.PUT_LINE(Fnd_File.output, 'Location:'||'TCS Towers');
fnd_file.PUT_LINE(fnd_file.output,'Starting XX_NIDS_PROC1_PROG1');
fnd_global.apps_initialize(user_id => 1318 ,resp_id => 50578, resp_appl_id => 201);
v_request_id := FND_REQUEST.SUBMIT_REQUEST('PO',
'XX_NIDS_PROC1_PROG1',
null,
null,
TRUE,
'Nidhi gupta',
138609,
'12-Dec-2003',
'ASE');
commit;
fnd_file.PUT_LINE(fnd_file.OUTPUT,'Request ID is '||to_char(v_request_id));
fnd_file.PUT_LINE(fnd_file.OUTPUT,'End XX_NIDS_PROC1_PROG1');
fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
errbuf:='SUCCESS';
retcode:='SUCCESS';
end xx_nidhi_proc21;
Thanks
Nidhi
END NIDHI;

Nidhi this might help u
v_num_request_load_id :=
fnd_request.submit_request (c_chr_application_short_name,
c_chr_apl_short_name,
NULL,
NULL,
FALSE,
p_chr_allocation_view,
p_chr_flow_type,     
p_chr_operating_unit,
p_dte_planned_from,          
p_dte_planned_to,
p_num_application_id,
p_num_loc_seg1_id,
p_num_loc_seg2_id,
p_num_organization_id,
p_num_responsibility_id,
p_num_session_id,
p_num_user_id,
p_chr_arrival_status,
p_chr_statuses,
p_chr_locations,
p_chr_transport_unit
COMMIT;
IF v_num_request_load_id = 0
THEN
          o_num_stat := 2;
     o_chr_err_msg := 'Report could not be submitted';
END IF;
          o_chr_err_msg := 'Request Id :' || v_num_request_load_id;
          v_boo_wait :=
     fnd_concurrent.wait_for_request (v_num_request_load_id,
c_num_interval,
c_num_max_wait,
v_chr_phase,
v_chr_status,
v_chr_dev_phase,
v_chr_dev_status,
v_chr_err_buf
IF v_chr_dev_phase = 'COMPLETE' /* 1.1 */
THEN
IF v_chr_dev_status = 'NORMAL' /* 1.2 */
THEN
BEGIN
-- some your own logic
EXCEPTION
WHEN OTHERS THEN
     o_chr_err_msg := o_chr_err_msg||' Unable to determine Report File Path.';
               o_num_stat := 2;
END;
ELSIF v_chr_dev_status = 'WARNING'                                             /* 1.2 */
THEN
o_chr_err_msg := o_chr_err_msg||' Report program completed with Warning.';
ELSE                                                                                               /* 1.2 */
o_chr_err_msg := o_chr_err_msg||' Report program completed with Error.';
END IF; /* 1.2 */
ELSE /* 1.1 */
o_chr_err_msg := 'Report program Timed Out.';
END IF; /* 1.1 */

Similar Messages

  • How to call a dialog program with return value in another dialog program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    You can you SET/GET parameters to do this.
    This is some information about this.
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f.
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    Thanks,
    SriRatna

  • How to call a concurrent program from a Custom JSP page.

    Hi,
    I have a custom JSP page which i have deployed by creating a form function with the path of the JSP Page
    and added the JSP Page to the OA_HTML top.
    Now, i need to call a concurrent program from the JSP Page, i have all the parameters in my page and i am using the standard class as below:
    ConcurrentRequest cr= new ConcurrentRequest(con);
    int requestId= cr.submitRequest("XXINV",programName,null,null,false,vec);
    I have verified my connection object and it is OK but i am getting the exception that user is not set to run the program.
    I tried the below code in my JSP page and getting -1 for all test variables :-
    int userId = wctx.getUserId();
    int respApplId = wctx.getRespApplId();
    int respId = wctx.getRespId();
    I think i need to set the context in JSP page to run the program..
    Pls help ....
    Regards
    Saurabh Jaiswal

    Hi,
    Thanks for the reply,,,
    This is a possible solution but this will allow to run the program anyhow.
    But the procedure which i call thru callable statement will start with
    fnd_global.apps_initialize (3825, 50603, 704);
    fnd_request.submit_request API call.
    Now, the values of user and Responsibilty is required in the program and it changes.
    With this approach we have to hardcode the user and resp.
    The same JSP page is attached to other responsibilities and there the concurrent program would get fired as if fired from the resp Id hardcoded as above.
    Need to capture user Id and RespId.
    How can i set the apps Context in JSP page???
    Regards
    Saurabh Jaiswal

  • How to call an eCATT programmatically with import parameters

    Hi there,
    I am using function module ECATT_EXECUTE to call test scripts from within ABAP test code, like below. Unfortunately, I am not able to pass my actual import parameter values. It seems that the interface does not provide a way to pass import parameters to the eCATT.
    Although posted in November, this is still an issue for me. Does anybody know an answer?
      call function 'ECATT_EXECUTE'
        exporting
          to_execute              = lt_script
          display_log             = space
          i_supress_output        = 'X'
        importing
          executed                = lt_executed
          logid                   = ls_logid
          trace_prot              = lt_trace
        exceptions
          nothing_to_do           = 1
          too_many_scripts_called = 2
          others                  = 3.
    Does anybody reading this have a solution?
    Thanks and regards,
    Rüdiger
    Edited by: Rüdiger Plantiko on Jan 17, 2008 3:05 PM
    Edited by: Rüdiger Plantiko on Jan 17, 2008 3:05 PM

    Hello Rüdiger,
    direct passover would be fine - well, I've come to get used to finding workarounds in SAP though. Maybe, the function module will support the missing parameters in some forthcoming release.
    Btw I switched over to tables ECTC_VAR / ECTC_DATA and pass obj_type = 'ECTC' to ECATT_EXECUTE, since test configurations can directly be executed.
    You don't happen to know what has to be done, if the call of ECATT_EXECUTE results in a dump? After correctly executing the test configuration. Looks like eCatt tries to put the resulting log to nowhere. Perhaps I have to initialize some kind of a log receiver first or set some option in the start profile? I passed DISPLAY_LOG = SPACE, and SUPPRESS_OUTPUT = 'X'.
    Dump was:
    Laufzeitfehler         OBJECTS_OBJREF_NOT_ASSIGNED
    Datum und Zeit         05.03.2008 17:37:00
    Zeile Quelltext
         1 METHOD http_send_and_receive .
         2
         3   DATA: l_errortext       TYPE string.
         4   DATA: l_http_subrc      TYPE sy-subrc.
         5 *----------------------------------------------------------------
         6
    >>>>>   im_http_client->request->set_data( data = im_request ).
         8
    Aktive Aufrufe/Ereignisse
    Nr.   Art          Programm                            Include                             Zeile
          Name
        6 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00Q     7
          CL_HTTP_TESTZONE_RESULT=>HTTP_SEND_AND_RECEIVE
        5 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00O    16
          CL_HTTP_TESTZONE_RESULT=>HTTP_REQUEST_NEWRESULTID
        4 METHOD       CL_HTTP_TESTZONE_RESULT=======CP    CL_HTTP_TESTZONE_RESULT=======CM00T    34
          CL_HTTP_TESTZONE_RESULT=>SEND_TO_RESULT_REPOSITORY
        3 METHOD       CL_APL_ECATT_LOG_TO_RESREP====CP    CL_APL_ECATT_LOG_TO_RESREP====CM001   400
          CL_APL_ECATT_LOG_TO_RESREP=>GET_LOG_DATA
        2 FUNCTION     SAPLECATT_EXECUTE                   LECATT_EXECUTEU01                     888
          ECATT_EXECUTE
        1 EVENT        ZDSD_SL_VIA_CATT                    ZDSD_SL_VIA_CATT                       26
          START-OF-SELECTION
    Regards + have a nice weekend,
    Matthias

  • How to Spawn a concurrent program from another Concurrent Program

    Hi,
    I need to write a concurrent program with PL/sql procedure. Inside this procedure, for a cursor data, for each record I need to spawn another concurrent program. How can I do this. Should I call a concurrent program using fnd_request.submit_request?
    Any suggestions?
    Thanks,
    HC

    Correct - you will need to use FND_REQUEST. Pl use the search feature of these forums to find old threads that discuss this topic
    https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_REQUEST+AND+SUBMIT_REQUEST&objID=c3&dateRange=all&userID=&numResults=15
    How To Submit A Concurrent Request Set Using Fnd_Request.Submit_Request          [Document 382791.1]
    Most Commonly Used FND APIs in APPS Customizations          [Document 221549.1]
    HTH
    Srini

  • How to call a Dialog Program from another Dialog Program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    1. Insted of creating 2 different Dialog program. It's good to create as many screens as you want in same module pool program. Any way you can use the different TCODE for each screen.
    2. Another and The best way is to create a function group and then inside function group use the function 2 module... In the function group define a global variable which will be present for both the function group if they are getting executed in sequence. and inside the Function Module call the screens using command " call screen <screenno>".
    3. You can use set / get parameter to pass values of a field between two dynpro program.

  • How to run a Concurrent Program from the back end?

    Hi,
    How to run a Concurrent Program from the back end?
    Is it Possible to see that Concuurent Request id which we run from the back end, in the front end?
    If yes, then Please Give reply how to write the code
    Thanks in Advance,
    Bharathi.S

    This is documented in Chapter 20 of the Application Developers Guide http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121devg.pdf. These MOS Docs also have some information available
    221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
    235359.1 - How to Launch Planning Data Pull MSCPDP using FND_REQUEST.SUBMIT_REQUEST
    HTH
    Srini

  • How to Submit a Concurrent program from OAF page Button?

    Hi,
    I have tried this but its not submitting the request
    String shipId = pageContext.getParameter("shipId");
    OADBTransaction tr = am.getOADBTransaction();
    Connection conn = tr.getJdbcConnection();
    OracleCallableStatement ocs = null;
    String stmt = new String("");
    if(pageContext.getParameter("SubmitRequest") != null) {
    try {
    stmt = "begin fnd_request.submit_request( application => 'XX',
    program => 'SHIPG_MATRL_PKP',
    description => NULL,
    start_time => sysdate,
    argument1 => :1 ); end;";
    ocs = (OracleCallableStatement)conn.prepareCall(stmt);
    ocs.setString(1,shipId);
    ocs.execute();
    catch(SQLException se)
    throw OAException.wrapperException(se);
    What is the mistake in the syntax.
    Can anyone provide the syntax for this?
    Krishna

    Hi Anil,
    I got the same requirment. The requirement was we need to create a Print PO button on the OAF page and when we click the button, we need to display the PO in pdf format by calling a concurrent program(XML) based on the PO type.
    My approach was below.
    1. Create the button using Personilization.
    2. Extend the controller class and add the code to call the concurent request.
    Can you please guide me how to create the button using personilization. When I created the button, this was shown on the OAF page. But I don't get the hand symbol on that button to click that button.
    Also please give me the approach of extending the controller and AM.
    Thanks for your help

  • Can we schedule a concurrent program with in a request set

    HI,
    I have a requirement that to schedule a concurrent program in a request set after completing the another request with in the set
    ie i have request set with two concurrent programs and each concurrent program having two parameters for each
    if i submit the request set once
    the first programs completes successfully after completing the first program i need to schedule the second concurrent program with the same parameter values of the first parameter
    is it possible if yes how it can be done
    Regards
    DRK

    Ripendra durgam wrote:
    HI,
    I have a requirement that to schedule a concurrent program in a request set after completing the another request with in the set
    ie i have request set with two concurrent programs and each concurrent program having two parameters for each
    if i submit the request set once
    the first programs completes successfully after completing the first program i need to schedule the second concurrent program with the same parameter values of the first parameter
    is it possible if yes how it can be done
    Regards
    DRKI believe it is not possible.
    Thanks,
    Hussein

  • How to call a abap program ?

    Can anyone tell me how to call one abap program in another abap program ??

    Hi,
    You can use <b>submit</b> statement to achieve the same.
    Sample Code
    REPORT ZREP2 NO STANDARD PAGE HEADING.
    tables: qals.
    RANGES seltab for qals-prueflos.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
    / 'Selection 2'.
    AT LINE-SELECTION.
    CASE SY-LILLI.
    WHEN 4.
    SUBMIT zrep1 VIA SELECTION-SCREEN
    WITH PARAMET EQ 'Selection 1'
    WITH SELECTO IN SELTAB
    WITH SELECTO NE 3
    AND RETURN.
    WHEN 5.
    SUBMIT zrep1 VIA SELECTION-SCREEN
    WITH PARAMET EQ 'Selection 1'
    AND RETURN.
    ENDCASE.
    Message was edited by: Jayanthi Jayaraman

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • How to Call abap functn/program from java layer

    Hi all,
        I have to develop a program which has to call abap function/program from java side or how to call a abap program through java ..
    pls send me related links or explanations.. dont send unrelated answers..
    Regards,
    Arivarasu S

    Hi,
    You mean accessing ABAP functions from J2EE perspective, then I think we can do this by using SAP Java Resource Adapter and also through webservices.
    SAP Java Resource Adapter (SAP JRA) can be used as an add-on for the SAP JCo SAP JRA enables the implementation of standard interfaces from diverse J2EE servers to the SAP JCo in the SAP Web AS. The SAP JRA thus simplifies
    communication with ABAP within heterogeneous J2EE landscapes.
    Go through the following links which has Good documentation on how to achieve this
    Accessing BAPIs Using the SAP Java Resource Adapter
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
    Connectivity and Interoperability
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/326d82e5-0601-0010-fca4-9caf27b89c26]
    Finally with WebServices. Accessing SAP Business Functions (ABAP) via Web Services
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4]
    Regards
    Raghu

  • How do I create a JTable with some empty cells in it?

    I have a three column JTable. The first column is a String showing description. The second column contains numbers (double) and the third column also contains numbers. In some cases not all cells in a row should contain data. So for instance, I could have row one showing only description (a String in the first column), and then row two showing description (a String in the first column) and a number (a double in the second column) in columns one and two respectively. My problem is that, the data gets copied from the cells with data to the cells which are supposed to be empty. So, how do I create a JTable with some empty cells in it.

    I have tried empty strings for those values, but it did not work. My table puts objects in an arraylist called reconciliation. The arraylist takes different objects with the same super class. The code below explains. Are you suggesting I pass null to my constructor?
    JTable table = new JTable(new ReconTableModel());The method below is from the table model
    protected  List<Reconciliation> reconciliation = new ArrayList<Reconciliation>();
    protected void fillModel(){
          reconciliation.add(new CashBook("Cash Book Report"," "," "));
          reconciliation.add(new CheckingBankAccount("Checking Bank Account"," "," "));
          reconciliation.add(new BankBalance("Bank Balance As Per Bank Statement",500," "));
          reconciliation.add(new PaymentVouchers("Payment Voucher Receipt",300," "));
          reconciliation.add(new DepositVoucher("Deposit Voucher Receipt",1000," "));
          reconciliation.add(new ReconciledBalance("Reconcilied Bank Balance",1200," "));
          reconciliation.add(new BalanceAt("Bank Balance At",800," "));
          reconciliation.add(new Difference("Difference",400," "));
          Collections.sort( reconciliation, new Comparator<Reconciliation>(){
          public int compare( Reconciliation a, Reconciliation b) {
            return a.getTransactionName().compareTo( b.getTransactionName());
      }

  • Create Host Concurrent Program with parameters

    Hi All,
    I have created a host concurrent program in Oracle APPS with one parameter. My shell script in unix is this :
    cd $1
    mv _oracle.txt Especificacion.txt
    it is in $AC_TOP/bin directory.
    When I execute the host concurrent program with oracle APPS with one parameters that is the path that I want to send it to shell script this error occurs.
    /hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb: cd: bad argument count
    mv: cannot rename _oracle.txt to Especificacion.txt:
    No such file or directory
    /hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb
    Program exited with status 1
    I have read many papers in metalink and I understand that at first parameter it includes many details programs such as, user id, concurrent program name, etc etc, and not only the value that I want to send.
    So I know the problem, but my question is, how can I resolve it ?. I'm not a unix expert.
    Please,
    Thanks in advance
    Mariano.-

    It doesn't work. But I finally find the solution. The point is this...
    p1=`echo $1|cut -f9 -d " "|cut -f2 -d '"'`
    In f1, f2, f3, etc you receive the information of the concurrent, and in f9 receive the first value of your parameter that you create in de concurrent program.
    Regards,
    Mariano.-

  • How to EXPORT a concurrent program from one instance to another

    Hi,
    I am new to EBS.
    How to EXPORT a concurrent program from one instance to another. I dont want to use FNDLOAD.
    Is there any other way from where we can export the concurrent program to anothere instance from CLIENT connection server.
    Thanks
    Asis

    Hi;
    What is EBS version? Why you dont use FNDLOAD?
    Pelase see below thread
    Move concurrent program to prod
    Move concurrent program to prod
    Regard
    Helios

Maybe you are looking for

  • External hard drives - what brand do you use

    I'm looking to buy an external hard drive, maybe I'm a bit paranoid, but I'm thinking about getting a RAID1 setup. I have a lot of valuable pictures in I-Photo, a lot of music in I-Tunes, and would not be a happy camper if my internal HD fails. Would

  • How to create a Regional Structure and how to use it

    Hi can anyone help me in creating the postal and political regional  structures with T-CODES if u have any documents or screen shots THANK YOU IN ADVANCE

  • Standard Date Fn

    Hi All, Are there any standard Date functions to calculate like 90 days, 60 days & 30 days of present day? And also to find the previous month of the present month & Month in Character format. If it is there please let me know. Thanks & Regards Rajen

  • Language specific urls in EP6

    Hi all, i was trying to implement language specific URL iview using the following link: http://help.sap.com/saphelp_nw70/helpdata/en/44/aabd5c7e8e0a47e10000000a1553f7/frameset.htm however this link is for EP7. Can anybody tell how can I implement the

  • How can we change background colour for number of photos which are in a folder?

    how can we change background colour for number of photos which are in a folder?