Table as Input parameter for BAPI in Webdynpro Application

I am creating webdynpro JAVA application to create RFQ, for which ABAP guy written a Custom BAPI called Z_BAPI_INQUIRY_CREATE. I tested this BAPI  in SAPGUI it is working fine. From my webdynpro application when I passes header and item parameter, my header getting inserted but my item data is not. It is giving me error like "Table input parameter not found". I am passing table to this bapi. When I tried my code to standard BAPI's (NOT CUSTOM), I am able to insert both HEADER and ITEM data.
In above scenario I have few questions,
1. Is there anything extra we have to do with custom BAPI's? (my BAPIs are in BOR).
2. What is the datatype in webdynpro parallal to table parameter?
3. is there any tutorial available for table parameter? (except FLIGHT examle).
Thanks and regards,
Nitin

Hi Vijayakhanna Raman,
Thanks much for your reply.
Yes I did the same as you mentioned, but still I am getting an error "Table parameter not avaliable is empty".
I am not getting were is the bug. And this is happening only with ZBapi's not with Standard Bapi's.
I am really stucted becouse of this, answer will really get all 10 points.
Here is my code,
     1. First create an instance for bapi and bind the instance to the bapi node.
     Z_Bapi_Inquiry_Change_Input input = new Z_Bapi_Inquiry_Change_Input();
     Zbapirfqitem item =new Zbapirfqitem();          
     wdContext.nodeBapi_RFQ_OnHold_Update_Input().bind(input);
     2. Then if u have the import parameter u have to set them by using
     input.setRfq_Number("6");
     input.setCreated_By("NLNS0000");
     //wdContext.currentBapi_RFQ_OnHold_Update_InputElement().modelObject().setRfq_Number("6");
     //wdContext.currentBapi_RFQ_OnHold_Update_InputElement().modelObject().setCreated_By("NLNS0000");
     3. If the bapi has a table parameters then the structure for the table parameters will also be imported In the model class.
DONE!
     4. Set the table parameters by creating the instance for that structure and using this instance set it.
                         item.setUpdateflag("I");
                         item.setItm_Number("000030");
                         item.setMaterial("MAT-NITIN");
                         item.setMatl_Desc("Inserted by Nitin");
                         item.setQuantity(new BigDecimal(4));
                         item.setBase_Uom("PCE");
                         item.setReq_Qty(new BigDecimal(4));
                         item.setBase_Uom1("PCE");
                         item.setList_Price(new BigDecimal(3));
                         item.setList_Curr("");
                         item.setReq_Price(new BigDecimal(4));
                         item.setCurrency("EUR");
                         item.setIndirect_Price(new BigDecimal(4));
                         item.setCurrency_2("EUR");
                         item.setFinal_Price(new BigDecimal(4));
                         item.setCurrency_3("EUR");
                         item.setText_Line("");
                         item.setReq_Date_H(new Date(12-05-06));
                         item.setDirect_Dis(new BigDecimal(4));
                         item.setIndirect_Dis(new BigDecimal(4));
                         item.setFinal_Dis(new BigDecimal(4));
                         item.setProfit_Margin1(new BigDecimal(4));
                         item.setProfit_Margin2(new BigDecimal(4));
                         item.setBrand1("");
                         item.setModel1("");
                         item.setVal_Loccurr1(new BigDecimal(4));
                         item.setCurrency1("");
                         item.setBrand2("");
                         item.setModel2("");
                         item.setVal_Loccurr2(new BigDecimal(4));
                         item.setCurrency2("");
          5. Then add the structure instance to the bapi instance.
     input.addItem(item);
     6. Then Execute the bapi after setting the import parameters.
          //wdThis.wdGetContext().currentBapi_RFQ_OnHold_Update_InputElement().modelObject().execute();
          input.execute();
Message was edited by: Nitin Kamble

Similar Messages

  • Date Format on OWB 11.1.0.7 to use for input parameter for a mapping

    All,
    What is the Date Format on OWB 11.1.0.7 to use for passing in an input parameter for a mapping to execute?
    I have tried '01-01-2010','01-JAN-2010','01.01.2010', 01/01/2010 and I get the following error:
    Error RPE-01003: An infrastructure condition prevented the request from completing.
    Error RPE-01038: Failed to evaluate expression declare l_expression DATE := 01/01/2010;begin :result := wb_rt_conversions.from_date(l_expression);end;. Please modify the expression, redeploy and retry again.
    RA-06550: line 1, column 32:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 24:
    PL/SQL: Item ignored
    ORA-06550: line 1, column 90:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 51:
    PL/SQL: Statement ignored
    I am using a Mapping Input parameter object and have a START_DATE_IN as a DATE and an END_DATE_IN as a DATE
    Any information you could provide would be greatly appreciated.
    Thanks,
    Shaun

    Hello Shaun,
    The function wb_rt_conversions.from_date is (at least in OWB10.2) overloaded and can with input-types as
    date, timestamp_unconstrained, timestamp_tz_unconstrained, timestamp_ltz_unconstrained or varchar2.
    If it doesn't work with varchar2 I would try Date:
    For example: to_date('2010-01-01','YYYY-MM-DD')
    I also found this thread:
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=608257
    Hoping this helps...
    Guenther

  • Declaring input parameter for flag in procedure!!!!!

    hi,
    can anyone tell how to declare the flag i,e true or false as an input parameter in the procedure.
    here is the code wat i have
    create or replace procedure test
         cur_out out sys_refcursor
    as
    begin
         open cur_out for
              select field1
              from Test
              where REPORTING_FLG = 'y' --(here i want the user to select 'Y' or 'N' )
    ORDER BY field1;
    end TEST;
    In the where condition i want the user to select the 'y' or 'N'. So i have to give input parameter i guess. So could anyone let me know how to give input parameter for flag.
    Urgent PLZ!!!
    Thank u in Advance.

    May be this way:
    Create or Replace procedure test (cur_out out sys_refcursor,flg in varchar2)
    as
    begin
    open cur_out for select field1 from Test
    where REPORTING_FLG = flg
    ORDER BY field1;
    end TEST;
    We can only pass Input parameters!

  • How to set  JCO.Table as input parameter

    RunTest.java
    Reservation reservation=new InvReservation();
              reservation.setRSNUM("0001");
              reservation.setMATNR("cellphone");
              reservation.setMENGE(1.0);
              reservation.setLGORT("MAINWH");
              reservation.setWERKS("HQ");
              reservation.setSERNR("AP");
              reservation.setVBELN("SD");
              try{
              Collection col=reservation.confirmReservation();
              for(Iterator it=col.iterator();it.hasNext();){
                   InvReservation invRes=(InvReservation)it.next();
                   System.out.println(invRes.getRSNUM()+"  "+invRes.getMBLNR()+"  "+invRes.getMATNR() +" "
                              +invRes.getMENGE()+" " +invRes.getSERNR()+"  " +invRes.getDMBTR() +"  "
                              +invRes.getZSUBRC()+"  "+invRes.getZEMSG());
              }catch(Exception ex){
                   System.out.println("main: " +ex );
    Reservation.java
    public Collection confirmReservation() throws CustomException{
              Reservation outgoingRes = new InvReservation();
              Collection col=new ArrayList();
                   JCO.Function function = null;
                   JCO.Client client = null;
                   String functionName = "ZMM_OSB_CONFIRM_RESERVATION";
                   try{
                        function = con.createFunction(functionName);
                        client = JCO.getClient(con.getConnectionPool());
                                            if (function != null) {
                             Table codes=function.getTableParameterList().getTable("ZOSB");
              int j=codes.getNumRows();  //it did not enter the for loop
                             for(int i=0;i<codes.getNumRows();i++){
                                  Reservation incomingRes1=new InvReservation();
                                  codes.setRow(i);
                                  incomingRes1.setRSNUM(codes.getString("RSNUM"));
                                  incomingRes1.setMATNR(codes.getString("MATNR"));
                                  incomingRes1.setMENGE(codes.getDouble("MENGE"));
                                  incomingRes1.setLGORT(codes.getString("LGORT"));
                                  incomingRes1.setWERKS(codes.getString("WERKS"));
                                  incomingRes1.setSERNR(codes.getString("SERNR"));
                                  incomingRes1.setVBELN(codes.getString("VBELN"));
                                  col.add(incomingRes1);
                                   System.out.println("RSNUM:" +codes.getString("RSNUM") + 't' +
                                        "MATNR:"+ codes.getString("MATNR") + 't' +
                                        "MENGE:" +codes.getDouble("MENGE") + 't' +
                                        "LGORT:" +codes.getString("LGORT") + 't' +
                                        "WERKS:" +codes.getString("WERKS") + 't' +
                                        "SERNR:" +codes.getString("SERNR") + 't' +
                                        "VBELN:" +codes.getString("VBELN"));
                              System.out.println("after set successful");
                              client.execute(function);     
                              int  count= function.getExportParameterList().getFieldCount();
                             JCO.Field ZSUBRCField=function.getExportParameterList().getField("ZSUBRC");
                             JCO.Field ZEMSGField=function.getExportParameterList().getField("ZEMSG");
                              for(int i=0; i<count; i++) {
                                if(ZSUBRCField.getName().equals("ZSUBRC")){
                                       outgoingRes.setZSUBRC(ZSUBRCField.getString()); 
                                  }else if(ZEMSGField.getName().equals("ZEMSG")){
                                       outgoingRes.setZEMSG(ZEMSGField.getString()); 
                             System.out.println(ZSUBRCField.getName() + ":t" + ZSUBRCField.getString());
                             System.out.println(ZEMSGField.getName() + ":t" + ZEMSGField.getString());
                              Table excodes = function.getTableParameterList().getTable("ZOSBMSEG");
                              for(int i=0;i<excodes.getNumRows();i++){
                                   Reservation outgoingRes1 = new InvReservation();
                                   excodes.setRow(i);
                                   outgoingRes1.setRSNUM(excodes.getString("RSNUM"));
                                   outgoingRes1.setMBLNR(excodes.getString("MBLNR"));
                                   outgoingRes1.setMATNR(excodes.getString("MATNR"));                              
                                   outgoingRes1.setMENGE(excodes.getDouble("MENGE"));
                                   outgoingRes1.setSERNR(excodes.getString("SERNR"));
                                   outgoingRes1.setDMBTR(excodes.getDouble("DMBTR"));
                                   outgoingRes1.setZSUBRC(ZSUBRCField.getString());
                                   outgoingRes1.setZEMSG(ZEMSGField.getString());
                                   col.add(outgoingRes1);
                                   System.out.println("RSNUM:" +excodes.getString("RSNUM") + 't' +
                                              "MBLNR:" +excodes.getString("MBLNR") + 't' +
                                        "MATNR:" +excodes.getString("MATNR") + 't' +
                                        "MENGE:" +excodes.getDouble("MENGE")+ 't' +
                                        "SERNR:" +excodes.getString("SERNR") + 't' +
                                        "MENGE:" +excodes.getDouble("DMBTR") + 't' +
                                        "ZSUBRC:" +ZSUBRCField.getString() + 't' +
                                        "ZEMSG:" +ZEMSGField.getString());
                             System.out.println("all ok");
                   }catch(Exception ex){
                        System.out.println("Caught an exception: n" + ex);
                        throw new CustomException(ex);
                   }finally{
                        if (client != null) {
                             System.out.println("Connection Closed");
                             JCO.releaseClient(client);
                   return col;
    everytime , when i debug, i found that it didnot enter the for loop and the j value always equals =0
    int j=codes.getNumRows();
    and always come up with this
    JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet
    Result:
    AFTER CREATEFUNCTION:Name:   ZMM_OSB_CONFIRM_RESERVATION
    Input: 
    null
    Output:
    | PARAMETERS 'OUTPUT'
    ZEMSG
    ZSUBRC
    01234567890123456789012345678901234567890123456789
    0   1
    as stated the input is null...i dunno why i cant set the input table parameter
    Message was edited by:
            yzme yzme
    Message was edited by:
            yzme yzme
    Message was edited by:
            yzme yzme

    new code
    public Collection confirmReservation() throws CustomException{
              // TODO Auto-generated method stub
              Reservation outgoingRes = new InvReservation();
              Collection col=new ArrayList();
                   JCO.Function function = null;
                   JCO.Client client = null;
                   String functionName = "ZMM__CONFIRM_RESERVATION";
                   try{
                        function = con.createFunction(functionName);
                        client = JCO.getClient(con.getConnectionPool());
                        System.out.println("AFTER CREATEFUNCTION:" + function );
                        if (function != null) {
                             JCO.ParameterList tabInput = function.getTableParameterList();
                             JCO.Table inputTable = tabInput.getTable("ZOSBIMSEG");
                             inputTable.appendRow();
                             System.out.println("checking table input:" +this.getRSNUM()+"  " +this.getMATNR()+ ""
                                                 +this.getMENGE()+" " +this.getLGORT()+" " +this.getWERKS() +" "
                                                 +this.getSERNR()+" " +this.getVBELN());
                                                      inputTable.setValue(this.getRSNUM(),"RSNUM");
                             inputTable.setValue(this.getMATNR(),"MATNR");
                             inputTable.setValue(this.getMENGE(),"MENGE");
                             inputTable.setValue(this.getLGORT(),"LGORT");
                             inputTable.setValue(this.getWERKS(),"WERKS");
                             inputTable.setValue(this.getSERNR(),"SERNR");
                             inputTable.setValue(this.getVBELN(),"VBELN");
                                                       System.out.println("after set successful");
                              client.execute(function);     
                              int  count= function.getExportParameterList().getFieldCount();
                             JCO.Field ZSUBRCField=function.getExportParameterList().getField("ZSUBRC");
                             JCO.Field ZEMSGField=function.getExportParameterList().getField("ZEMSG");
                              for(int i=0; i<count; i++) {
                                if(ZSUBRCField.getName().equals("ZSUBRC")){
                                       outgoingRes.setZSUBRC(ZSUBRCField.getString()); 
                                  }else if(ZEMSGField.getName().equals("ZEMSG")){
                                       outgoingRes.setZEMSG(ZEMSGField.getString()); 
                             System.out.println(ZSUBRCField.getName() + ":t" + ZSUBRCField.getString());
                             System.out.println(ZEMSGField.getName() + ":t" + ZEMSGField.getString());
                              Table excodes = function.getTableParameterList().getTable("ZOSBMSEG");
                              for(int i=0;i<excodes.getNumRows();i++){
                                   Reservation outgoingRes1 = new InvReservation();
                                   excodes.setRow(i);
                                   //add here
                                   outgoingRes1.setRSNUM(excodes.getString("RSNUM"));
                                   outgoingRes1.setMBLNR(excodes.getString("MBLNR"));
                                   outgoingRes1.setMATNR(excodes.getString("MATNR"));                              
                                   outgoingRes1.setMENGE(excodes.getDouble("MENGE"));
                                   outgoingRes1.setSERNR(excodes.getString("SERNR"));
                                   outgoingRes1.setDMBTR(excodes.getDouble("DMBTR"));
                                   outgoingRes1.setZSUBRC(ZSUBRCField.getString());
                                   outgoingRes1.setZEMSG(ZEMSGField.getString());
                                   //outgoingRes.setMENGE(java.lang.Double.parseDouble(codes.getString()));
                                   col.add(outgoingRes1);
                                   System.out.println("RSNUM:" +excodes.getString("RSNUM") + 't' +
                                              "MBLNR:" +excodes.getString("MBLNR") + 't' +
                                        "MATNR:" +excodes.getString("MATNR") + 't' +
                                        "MENGE:" +excodes.getDouble("MENGE")+ 't' +
                                        "SERNR:" +excodes.getString("SERNR") + 't' +
                                        "MENGE:" +excodes.getDouble("DMBTR") + 't' +
                                        "ZSUBRC:" +ZSUBRCField.getString() + 't' +
                                        "ZEMSG:" +ZEMSGField.getString());
                             System.out.println("all ok");
                   }catch(Exception ex){
                        System.out.println("Caught an exception: n" + ex);
                        throw new CustomException(ex);
                   }finally{
                        if (client != null) {
                             System.out.println("Connection Closed");
                             JCO.releaseClient(client);
                   return col;
    Just to let's you know something here...
    the input parameter is a table structure...so when i execute this.
    Caught an exception:
    java.lang.NullPointerException
    JCO.ParameterList list = function.getImportParameterList();
                              list.setValue(this.getRSNUM(),"RSNUM");
                              list.setValue(this.getMATNR(),"MATNR");
                              list.setValue(this.getMENGE(),"MENGE");
                              list.setValue(this.getLGORT(),"LGORT");
                              list.setValue(this.getWERKS(),"WERKS");
                              list.setValue(this.getSERNR(),"SERNR");
                              list.setValue(this.getVBELN(),"VBELN");
    so i changed to ....
    it get what i want....
    but again the result of the input is still null
         JCO.ParameterList tabInput = function.getTableParameterList();
                             JCO.Table inputTable = tabInput.getTable("ZOSBIMSEG");
                             inputTable.appendRow();
                             System.out.println("checking table input:" +this.getRSNUM()+"  " +this.getMATNR()+ ""
                                                 +this.getMENGE()+" " +this.getLGORT()+" " +this.getWERKS() +" "
                                                 +this.getSERNR()+" " +this.getVBELN());
                                                      inputTable.setValue(this.getRSNUM(),"RSNUM");
                             inputTable.setValue(this.getMATNR(),"MATNR");
                             inputTable.setValue(this.getMENGE(),"MENGE");
                             inputTable.setValue(this.getLGORT(),"LGORT");
                             inputTable.setValue(this.getWERKS(),"WERKS");
                             inputTable.setValue(this.getSERNR(),"SERNR");
                             inputTable.setValue(this.getVBELN(),"VBELN");
    AFTER CREATEFUNCTION:Name:   ZMM_OSB_CONFIRM_RESERVATION
    Input: 
    null
    Output:
    | PARAMETERS 'OUTPUT'
    | ZEMSG                                            | ZSUBRC |
    |01234567890123456789012345678901234567890123456789|   0   1|
    |                                                  |00000000|

  • How to give input parameter to Bapi when executing a method.

    Hi All,
    I have 1 input field and 1 button.I've defined a model node and inside that model attribute in my view.If I enter something in the Input field the value should go to the particular model attribute I defined.How to pass that input parameter.I have a action like this....
    public void onActionGetDateDetails(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGetDateDetails(ServerEvent)
        wdThis.wdGetGetDateDetailsCustController().execute_Bapi_Get_Date_Details("");
    // while executing the above method I have to pass the input parameter typed in the input field.
    Structure of my context :
    Bapi_Date_Details
    >Network List(Model Node)
                                          |
                                          -->Network (Model Attribute)
         //@@end
    Help me to solve this.
    Thankx in advance.
    Regards,
    Karthick.K.E

    Hi Karthick,
    You can associate an input field's value to a BAPI in two ways:
    1) binding the input UI element's 'value' directly to the BAPI's input attribute that you want to set. This is the methos Noufal suggested. In this method, make sure you initialize the attribute through the following lines of code in the doInit() method, else, the input field will be disabled.
    <b><Bapi_name>Input input = new <Bapi_name>Input();
    input.set<Attribute_name>(new <dataType>);</b>
    2) The second method is settting the input's 'value' to some other attribute(say 'abc') and giving this value to the input parameter just before calling the RFC.
    input.set<Attribute_name>(wdContext.currentContextElement.getAbc());
    Hope this helps,
    Best Regards,
    Nibu

  • Fill parameter for BAPI BAPI_ACC_STAT_KEY_FIG_POST with T.code 9KE5

    Dear experts!
    Now, I'm getting some issues about fill parameters for BAPI: BAPI_ACC_STAT_KEY_FIG_POST with t.code 9KE5.
    Really, I want to perform the bapi with t.code 9KE5.
    Help me, please!
    Best regards, Huy!

    Hi Huy
    If you go to SE37 you have to set the following parameters to make it work:
    1-For Parameter section, Doc Header you have to set:
    CO_AREA                        1000
    DOCDATE                        08.11.2011
    POSTGDATE                      08.11.2011
    VERSION                        0
    DOC_NO
    VARIANT
    DOC_HDR_TX
    USERNAME                       X1FREDRA
    OBJ_KEY
    OBJ_TYPE
    OBJ_SYS
    VAL_PERIOD                     000
    VAL_FISYEAR
    For table DOC_ITEMS you have to set:
    STATKEYFIG                     BRSAPU
    STAT_QTY                                    10,000
    PERSON_NO                      00000000
    SEG_TEXT
    REC_CCTR                       MS1010
    ACTTYPE
    REC_ORDER
    REC_WBS_EL
    RECSALEORD
    RECITEM                        000000
    Then you run and it will post. But there is no profit center line, maybe you have to use the parameter RECCOSTOBJ.
    Regards
    Fred

  • Error while setting input parameter for dynamic process - GP

    Hi All,
    I am using CAF 7.1 GP.
    Here I have to start a process dynamically and it is working fine.
    But, when I tried to set value for input parameter of this process by
    IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
    params.setAttributeValue("Val","MyValue");
    ( <b>Val</b> is the name of grouped input parameter ), it is giving
    com.sap.caf.eu.gp.exception.api.GPInvocationException: Structure with name input and namespace http://wwww.sap.com/nw/eup/gp does not have an attribute with name Val and namespace null.
    But no where I have mentioned http://wwww.sap.com/nw/eup/gp.
    I dont have any structures in my input and output.
    Here is my full code
           try
                IGPProcess process = null;
                IUser tl_user =UMFactory.getUserFactory().getUserByLogonID("fahad");
                     IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(tl_user);//, user.getLocale());
                     process =GPProcessFactory.getDesigntimeManager().getActiveTemplate("F5D76840A56F11DC983B001966243CAD",userContext);
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
                     IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
                     int rolenum = process.getRoleInfoCount();
                     wdComponentAPI.getMessageManager().reportSuccess("Number is "+rolenum);
                     IGPProcessRoleInstance roleInstance=null;
                     IUser ho_User=null;
                     for (int i = 0; i < rolenum; i++)
                             wdComponentAPI.getMessageManager().reportWarning("Role Text is "process.getRoleInfo(i).getText()"  Role Name is "+process.getRoleInfo(i).getRoleName());
                             if(i==1)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("poornendu");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addRuntimeDefinedUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                             if(i==2)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("fahad");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                     wdComponentAPI.getMessageManager().reportSuccess(""+process.getStructure().getItemCount());
                     IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     <b>params.setAttributeValue("Val","MyValue");</b>                     
                     String pName=wdContext.currentContextElement().getProcessName();
                     IGPProcessInstance prInstance = rtm.startProcess(process,pName,"This process has been started using the GP public API",tl_user,roles,params,tl_user);
           catch(Exception e)
                wdComponentAPI.getMessageManager().reportException(""+e);
    Can anyone help me on this.
    Thanks,
    Fahad Hamsa

    Hi Experts,
    I solved it myself.
    The problem was, I have to make the input parameter as exposed. Thats all
    Anyway, thanks for the support.
    Regards,
    Fahad Hamsa

  • Input parameter for ZGGBS000

    Hi Expert,
    May I ask what are the input parameters for ZGGBS000, which is directly copied from RGGBS000?
    Can I read the the G/L account number by BSEG-SAKNR?
    BR,
    King

    Please check table GB01( or view VWTYGB01 in SM30) and see if exclude field for BSEG-SAKNR is marked. If yes, then the field cannot be substituted otherwise, you need to check with your FI consultant and uncheck the checkbox.
    Regards

  • Is it possible to pass table type values as input parameter for con prg?

    Hi All,
    Could you please confirm that is it possible to pass table type value as input to concurrent program?
    If possible how to achive this?
    If not possible whether we have any ora doc which is confirming this.
    Any hel will be great.
    Thanks,

    Hi student;
    Please check (http://apps2fusion.com/at/45-as/241-enablingdisabling-concurrent-program-parameters)
    Hope it helps
    Regard
    Helios

  • Can I use Bulk Collect results as input parameter for another cursor

    MUSIC            ==> remote MUSIC_DB database, MUSIC table has 60 million rows
    PRICE_DATA ==> remote PRICING_DB database, PRICE_DATE table has 1 billion rows
    These two table once existed in same database, but size of database exceeded available hardware size and hardware budget, so the PRICE_DATA table was moved to another Oracle database.  I need to create a single report that combines data from both of these tables, and a distributed join with DRIVING_SITE hint will not work because the size of both table is too large to push to one DRIVING_SITE location, so I wrote this PLSQL block to process in small blocks.
    QUESTION: how can use bulk collect from one cursor and pass that bulk collected information as input to second cursor without specifically listing each cell of the PLSQL bulk collection?  See sample pseudo-code below, I am trying to determine more efficient way to code than hard-coding 100 parameter names into 2nd cursor.
    NOTE: below is truly pseudo-code, I had to change the names of everything to adhere to NDA, but below works and is fast enough for my purposes, but if I want to change from 100 input parameters to 200, I have to add more hard-coded values.  There has got to be a better way.
    DECLARE
         -- define cursor that retrieves distinct SONG_IDs from MUSIC table in remote music database
         CURSOR C_CURRENT_MUSIC
         IS
        select distinct SONG_ID
        from MUSIC@MUSIC_DB
        where PRODUCTION_RELEASE=1
         /*  define a parameterized cursor that accepts 100 SONG_IDs and retrieves
              required pricing information
         CURSOR C_get_music_price_data
                   P_SONG_ID_001 NUMBER, P_SONG_ID_002 NUMBER, P_SONG_ID_003 NUMBER, P_SONG_ID_004 NUMBER, P_SONG_ID_005 NUMBER, P_SONG_ID_006 NUMBER, P_SONG_ID_007 NUMBER, P_SONG_ID_008 NUMBER, P_SONG_ID_009 NUMBER, P_SONG_ID_010 NUMBER,
                   P_SONG_ID_011 NUMBER, P_SONG_ID_012 NUMBER, P_SONG_ID_013 NUMBER, P_SONG_ID_014 NUMBER, P_SONG_ID_015 NUMBER, P_SONG_ID_016 NUMBER, P_SONG_ID_017 NUMBER, P_SONG_ID_018 NUMBER, P_SONG_ID_019 NUMBER, P_SONG_ID_020 NUMBER,
                   P_SONG_ID_021 NUMBER, P_SONG_ID_022 NUMBER, P_SONG_ID_023 NUMBER, P_SONG_ID_024 NUMBER, P_SONG_ID_025 NUMBER, P_SONG_ID_026 NUMBER, P_SONG_ID_027 NUMBER, P_SONG_ID_028 NUMBER, P_SONG_ID_029 NUMBER, P_SONG_ID_030 NUMBER,
                   P_SONG_ID_031 NUMBER, P_SONG_ID_032 NUMBER, P_SONG_ID_033 NUMBER, P_SONG_ID_034 NUMBER, P_SONG_ID_035 NUMBER, P_SONG_ID_036 NUMBER, P_SONG_ID_037 NUMBER, P_SONG_ID_038 NUMBER, P_SONG_ID_039 NUMBER, P_SONG_ID_040 NUMBER,
                   P_SONG_ID_041 NUMBER, P_SONG_ID_042 NUMBER, P_SONG_ID_043 NUMBER, P_SONG_ID_044 NUMBER, P_SONG_ID_045 NUMBER, P_SONG_ID_046 NUMBER, P_SONG_ID_047 NUMBER, P_SONG_ID_048 NUMBER, P_SONG_ID_049 NUMBER, P_SONG_ID_050 NUMBER,
                   P_SONG_ID_051 NUMBER, P_SONG_ID_052 NUMBER, P_SONG_ID_053 NUMBER, P_SONG_ID_054 NUMBER, P_SONG_ID_055 NUMBER, P_SONG_ID_056 NUMBER, P_SONG_ID_057 NUMBER, P_SONG_ID_058 NUMBER, P_SONG_ID_059 NUMBER, P_SONG_ID_060 NUMBER,
                   P_SONG_ID_061 NUMBER, P_SONG_ID_062 NUMBER, P_SONG_ID_063 NUMBER, P_SONG_ID_064 NUMBER, P_SONG_ID_065 NUMBER, P_SONG_ID_066 NUMBER, P_SONG_ID_067 NUMBER, P_SONG_ID_068 NUMBER, P_SONG_ID_069 NUMBER, P_SONG_ID_070 NUMBER,
                   P_SONG_ID_071 NUMBER, P_SONG_ID_072 NUMBER, P_SONG_ID_073 NUMBER, P_SONG_ID_074 NUMBER, P_SONG_ID_075 NUMBER, P_SONG_ID_076 NUMBER, P_SONG_ID_077 NUMBER, P_SONG_ID_078 NUMBER, P_SONG_ID_079 NUMBER, P_SONG_ID_080 NUMBER,
                   P_SONG_ID_081 NUMBER, P_SONG_ID_082 NUMBER, P_SONG_ID_083 NUMBER, P_SONG_ID_084 NUMBER, P_SONG_ID_085 NUMBER, P_SONG_ID_086 NUMBER, P_SONG_ID_087 NUMBER, P_SONG_ID_088 NUMBER, P_SONG_ID_089 NUMBER, P_SONG_ID_090 NUMBER,
                   P_SONG_ID_091 NUMBER, P_SONG_ID_092 NUMBER, P_SONG_ID_093 NUMBER, P_SONG_ID_094 NUMBER, P_SONG_ID_095 NUMBER, P_SONG_ID_096 NUMBER, P_SONG_ID_097 NUMBER, P_SONG_ID_098 NUMBER, P_SONG_ID_099 NUMBER, P_SONG_ID_100 NUMBER
         IS
         select
         from PRICE_DATA@PRICING_DB
         where COUNTRY = 'USA'
         and START_DATE <= sysdate
         and END_DATE > sysdate
         and vpc.SONG_ID IN
                   P_SONG_ID_001 ,P_SONG_ID_002 ,P_SONG_ID_003 ,P_SONG_ID_004 ,P_SONG_ID_005 ,P_SONG_ID_006 ,P_SONG_ID_007 ,P_SONG_ID_008 ,P_SONG_ID_009 ,P_SONG_ID_010,
                   P_SONG_ID_011 ,P_SONG_ID_012 ,P_SONG_ID_013 ,P_SONG_ID_014 ,P_SONG_ID_015 ,P_SONG_ID_016 ,P_SONG_ID_017 ,P_SONG_ID_018 ,P_SONG_ID_019 ,P_SONG_ID_020,
                   P_SONG_ID_021 ,P_SONG_ID_022 ,P_SONG_ID_023 ,P_SONG_ID_024 ,P_SONG_ID_025 ,P_SONG_ID_026 ,P_SONG_ID_027 ,P_SONG_ID_028 ,P_SONG_ID_029 ,P_SONG_ID_030,
                   P_SONG_ID_031 ,P_SONG_ID_032 ,P_SONG_ID_033 ,P_SONG_ID_034 ,P_SONG_ID_035 ,P_SONG_ID_036 ,P_SONG_ID_037 ,P_SONG_ID_038 ,P_SONG_ID_039 ,P_SONG_ID_040,
                   P_SONG_ID_041 ,P_SONG_ID_042 ,P_SONG_ID_043 ,P_SONG_ID_044 ,P_SONG_ID_045 ,P_SONG_ID_046 ,P_SONG_ID_047 ,P_SONG_ID_048 ,P_SONG_ID_049 ,P_SONG_ID_050,
                   P_SONG_ID_051 ,P_SONG_ID_052 ,P_SONG_ID_053 ,P_SONG_ID_054 ,P_SONG_ID_055 ,P_SONG_ID_056 ,P_SONG_ID_057 ,P_SONG_ID_058 ,P_SONG_ID_059 ,P_SONG_ID_060,
                   P_SONG_ID_061 ,P_SONG_ID_062 ,P_SONG_ID_063 ,P_SONG_ID_064 ,P_SONG_ID_065 ,P_SONG_ID_066 ,P_SONG_ID_067 ,P_SONG_ID_068 ,P_SONG_ID_069 ,P_SONG_ID_070,
                   P_SONG_ID_071 ,P_SONG_ID_072 ,P_SONG_ID_073 ,P_SONG_ID_074 ,P_SONG_ID_075 ,P_SONG_ID_076 ,P_SONG_ID_077 ,P_SONG_ID_078 ,P_SONG_ID_079 ,P_SONG_ID_080,
                   P_SONG_ID_081 ,P_SONG_ID_082 ,P_SONG_ID_083 ,P_SONG_ID_084 ,P_SONG_ID_085 ,P_SONG_ID_086 ,P_SONG_ID_087 ,P_SONG_ID_088 ,P_SONG_ID_089 ,P_SONG_ID_090,
                   P_SONG_ID_091 ,P_SONG_ID_092 ,P_SONG_ID_093 ,P_SONG_ID_094 ,P_SONG_ID_095 ,P_SONG_ID_096 ,P_SONG_ID_097 ,P_SONG_ID_098 ,P_SONG_ID_099 ,P_SONG_ID_100
         group by
               vpc.SONG_ID
              ,vpc.STOREFRONT_ID
         TYPE SONG_ID_TYPE IS TABLE OF MUSIC@MUSIC_DB%TYPE INDEX BY BINARY_INTEGER;
         V_SONG_ID_ARRAY                         SONG_ID_TYPE                     ;
         v_commit_counter           NUMBER := 0;
    BEGIN
         /* open cursor you intent to bulk collect from */
         OPEN C_CURRENT_MUSIC;
         LOOP
              /* in batches of 100, bulk collect ADAM_ID mapped TMS_IDENTIFIER into PLSQL table or records */
              FETCH C_CURRENT_MUSIC BULK COLLECT INTO V_SONG_ID_ARRAY LIMIT 100;
                   EXIT WHEN V_SONG_ID_ARRAY.COUNT = 0;
                   /* to avoid NO DATA FOUND error when pass 100 parameters to OPEN cursor, if the arrary
                      is not fully populated to 100, pad the array with nulls to fill up to 100 cells. */
                   IF (V_SONG_ID_ARRAY.COUNT >=1 and V_SONG_ID_ARRAY.COUNT <> 100) THEN
                        FOR j IN V_SONG_ID_ARRAY.COUNT+1..100 LOOP
                             V_SONG_ID_ARRAY(j) := null;
                        END LOOP;
                   END IF;
              /* pass a batch of 100 to cursor that get price information per SONG_ID and STOREFRONT_ID */
              FOR j IN C_get_music_price_data
                        V_SONG_ID_ARRAY(1) ,V_SONG_ID_ARRAY(2) ,V_SONG_ID_ARRAY(3) ,V_SONG_ID_ARRAY(4) ,V_SONG_ID_ARRAY(5) ,V_SONG_ID_ARRAY(6) ,V_SONG_ID_ARRAY(7) ,V_SONG_ID_ARRAY(8) ,V_SONG_ID_ARRAY(9) ,V_SONG_ID_ARRAY(10) ,
                        V_SONG_ID_ARRAY(11) ,V_SONG_ID_ARRAY(12) ,V_SONG_ID_ARRAY(13) ,V_SONG_ID_ARRAY(14) ,V_SONG_ID_ARRAY(15) ,V_SONG_ID_ARRAY(16) ,V_SONG_ID_ARRAY(17) ,V_SONG_ID_ARRAY(18) ,V_SONG_ID_ARRAY(19) ,V_SONG_ID_ARRAY(20) ,
                        V_SONG_ID_ARRAY(21) ,V_SONG_ID_ARRAY(22) ,V_SONG_ID_ARRAY(23) ,V_SONG_ID_ARRAY(24) ,V_SONG_ID_ARRAY(25) ,V_SONG_ID_ARRAY(26) ,V_SONG_ID_ARRAY(27) ,V_SONG_ID_ARRAY(28) ,V_SONG_ID_ARRAY(29) ,V_SONG_ID_ARRAY(30) ,
                        V_SONG_ID_ARRAY(31) ,V_SONG_ID_ARRAY(32) ,V_SONG_ID_ARRAY(33) ,V_SONG_ID_ARRAY(34) ,V_SONG_ID_ARRAY(35) ,V_SONG_ID_ARRAY(36) ,V_SONG_ID_ARRAY(37) ,V_SONG_ID_ARRAY(38) ,V_SONG_ID_ARRAY(39) ,V_SONG_ID_ARRAY(40) ,
                        V_SONG_ID_ARRAY(41) ,V_SONG_ID_ARRAY(42) ,V_SONG_ID_ARRAY(43) ,V_SONG_ID_ARRAY(44) ,V_SONG_ID_ARRAY(45) ,V_SONG_ID_ARRAY(46) ,V_SONG_ID_ARRAY(47) ,V_SONG_ID_ARRAY(48) ,V_SONG_ID_ARRAY(49) ,V_SONG_ID_ARRAY(50) ,
                        V_SONG_ID_ARRAY(51) ,V_SONG_ID_ARRAY(52) ,V_SONG_ID_ARRAY(53) ,V_SONG_ID_ARRAY(54) ,V_SONG_ID_ARRAY(55) ,V_SONG_ID_ARRAY(56) ,V_SONG_ID_ARRAY(57) ,V_SONG_ID_ARRAY(58) ,V_SONG_ID_ARRAY(59) ,V_SONG_ID_ARRAY(60) ,
                        V_SONG_ID_ARRAY(61) ,V_SONG_ID_ARRAY(62) ,V_SONG_ID_ARRAY(63) ,V_SONG_ID_ARRAY(64) ,V_SONG_ID_ARRAY(65) ,V_SONG_ID_ARRAY(66) ,V_SONG_ID_ARRAY(67) ,V_SONG_ID_ARRAY(68) ,V_SONG_ID_ARRAY(69) ,V_SONG_ID_ARRAY(70) ,
                        V_SONG_ID_ARRAY(71) ,V_SONG_ID_ARRAY(72) ,V_SONG_ID_ARRAY(73) ,V_SONG_ID_ARRAY(74) ,V_SONG_ID_ARRAY(75) ,V_SONG_ID_ARRAY(76) ,V_SONG_ID_ARRAY(77) ,V_SONG_ID_ARRAY(78) ,V_SONG_ID_ARRAY(79) ,V_SONG_ID_ARRAY(80) ,
                        V_SONG_ID_ARRAY(81) ,V_SONG_ID_ARRAY(82) ,V_SONG_ID_ARRAY(83) ,V_SONG_ID_ARRAY(84) ,V_SONG_ID_ARRAY(85) ,V_SONG_ID_ARRAY(86) ,V_SONG_ID_ARRAY(87) ,V_SONG_ID_ARRAY(88) ,V_SONG_ID_ARRAY(89) ,V_SONG_ID_ARRAY(90) ,
                        V_SONG_ID_ARRAY(91) ,V_SONG_ID_ARRAY(92) ,V_SONG_ID_ARRAY(93) ,V_SONG_ID_ARRAY(94) ,V_SONG_ID_ARRAY(95) ,V_SONG_ID_ARRAY(96) ,V_SONG_ID_ARRAY(97) ,V_SONG_ID_ARRAY(98) ,V_SONG_ID_ARRAY(99) ,V_SONG_ID_ARRAY(100)        
              LOOP
                   /* do stuff with data from Song and Pricing Database coming from the two
                        separate cursors, then continue processing more rows...
              END LOOP;
              /* commit after each batch of 100 SONG_IDs is processed */        
              COMMIT;
              EXIT WHEN C_CURRENT_MUSIC%NOTFOUND;  -- exit when there are no more rows to fetch from cursor
         END LOOP; -- bulk fetching loop
         CLOSE C_CURRENT_MUSIC; -- close cursor that was used in bulk collection
         /* commit rows */
         COMMIT; -- commit any remaining uncommitted data.
    END;

    I've got a problem when using passing VARRAY of numbers as parameter to remote cursor: it takes a super long time to run, sometimes doesn't finish even after an hour as passed.
    Continuing with my example in original entry, I replaced the bulk collect into PLSQL table collection with a VARRAY and i bulk collect into the VARRAY, this is fast and I know it works because I can DBMS_OUTPUT.PUT_LINE cells of VARRAY so I know it is getting populated correctly.  However, when I pass the VARRAY containing 100 cells populated with SONG_IDs as parameter to cursor, execution time is over an hour and when I am expecting a few seconds.
    Below code example strips the problem down to it's raw details, I skip the bulk collect and just manually populate a VARRAY with 100 SONG_ID values, then try to pass to as parameter to a cursor, but the execution time of cursor is unexpectedly long, over 30 minutes, sometime longer, when I am expecting seconds.
    IMPORTANT: If I take the same 100 SONG_IDs and place them directly in the cursor query's where IN clause, the SQL runs in under 5 seconds and returns result.  Also, if I pass the 100 SONG_IDs as individual cells of a PLSQL table collection, then it also runs fast.
    I thought that since the VARRAY is used via select subquery that is it queried locally, but the cursor is remote, and that I had a distribute problem on my hands, so I put in the DRIVING_SITE hint to attempt to force the result of query against VARRAY to go to remote server and rest of query will run there before returning result, but that didn't work either, still got slow response.
    Is something wrong with my code, or I am running into a Oracle problem that may require support to resolve?
    DECLARE
         /*  define a parameterized cursor that accepts XXX number of in SONG_IDs and
          retrieves required pricing information
         CURSOR C_get_music_price_data
      p_array_song_ids SYS.ODCInumberList              
         IS
         select  /*+DRIVING_SITE(pd) */
      count(distinct s.EVE_ID)
         from PRICE_DATA@PRICING_DB pd
         where pd.COUNTRY = 'USA'
         and pd.START_DATE <= sysdate
         and pd.END_DATE > sysdate
         and pd.SONG_ID IN
              select column_value from table(p_array_song_ids)
         group by
               pd.SONG_ID
              ,pd.STOREFRONT_ID
      V_ARRAY_SONG_IDS SYS.ODCInumberList := SYS.ODCInumberList();    
    BEGIN
    V_ARRAY_SONG_IDS.EXTEND(100);
    V_ARRAY_SONG_IDS(  1 ) := 31135  ;
    V_ARRAY_SONG_IDS(  2 ) := 31140   ;
    V_ARRAY_SONG_IDS(  3 ) := 31142   ;
    V_ARRAY_SONG_IDS(  4 ) := 31144   ;
    V_ARRAY_SONG_IDS(  5 ) := 31146   ;
    V_ARRAY_SONG_IDS(  6 ) := 31148   ;
    V_ARRAY_SONG_IDS(  7 ) := 31150   ;
    V_ARRAY_SONG_IDS(  8 ) := 31152   ;
    V_ARRAY_SONG_IDS(  9 ) := 31154   ;
    V_ARRAY_SONG_IDS( 10 ) := 31156   ;
    V_ARRAY_SONG_IDS( 11 ) := 31158   ;
    V_ARRAY_SONG_IDS( 12 ) := 31160   ;
    V_ARRAY_SONG_IDS( 13 ) := 33598   ;
    V_ARRAY_SONG_IDS( 14 ) := 33603   ;
    V_ARRAY_SONG_IDS( 15 ) := 33605   ;
    V_ARRAY_SONG_IDS( 16 ) := 33607   ;
    V_ARRAY_SONG_IDS( 17 ) := 33609   ;
    V_ARRAY_SONG_IDS( 18 ) := 33611   ;
    V_ARRAY_SONG_IDS( 19 ) := 33613   ;
    V_ARRAY_SONG_IDS( 20 ) := 33615   ;
    V_ARRAY_SONG_IDS( 21 ) := 33617   ;
    V_ARRAY_SONG_IDS( 22 ) := 33630   ;
    V_ARRAY_SONG_IDS( 23 ) := 33632   ;
    V_ARRAY_SONG_IDS( 24 ) := 33636   ;
    V_ARRAY_SONG_IDS( 25 ) := 33638   ;
    V_ARRAY_SONG_IDS( 26 ) := 33640   ;
    V_ARRAY_SONG_IDS( 27 ) := 33642   ;
    V_ARRAY_SONG_IDS( 28 ) := 33644   ;
    V_ARRAY_SONG_IDS( 29 ) := 33646   ;
    V_ARRAY_SONG_IDS( 30 ) := 33648   ;
    V_ARRAY_SONG_IDS( 31 ) := 33662   ;
    V_ARRAY_SONG_IDS( 32 ) := 33667   ;
    V_ARRAY_SONG_IDS( 33 ) := 33669   ;
    V_ARRAY_SONG_IDS( 34 ) := 33671   ;
    V_ARRAY_SONG_IDS( 35 ) := 33673   ;
    V_ARRAY_SONG_IDS( 36 ) := 33675   ;
    V_ARRAY_SONG_IDS( 37 ) := 33677   ;
    V_ARRAY_SONG_IDS( 38 ) := 33679   ;
    V_ARRAY_SONG_IDS( 39 ) := 33681   ;
    V_ARRAY_SONG_IDS( 40 ) := 33683   ;
    V_ARRAY_SONG_IDS( 41 ) := 33685   ;
    V_ARRAY_SONG_IDS( 42 ) := 33700   ;
    V_ARRAY_SONG_IDS( 43 ) := 33702   ;
    V_ARRAY_SONG_IDS( 44 ) := 33704   ;
    V_ARRAY_SONG_IDS( 45 ) := 33706   ;
    V_ARRAY_SONG_IDS( 46 ) := 33708   ;
    V_ARRAY_SONG_IDS( 47 ) := 33710   ;
    V_ARRAY_SONG_IDS( 48 ) := 33712   ;
    V_ARRAY_SONG_IDS( 49 ) := 33723   ;
    V_ARRAY_SONG_IDS( 50 ) := 33725   ;
    V_ARRAY_SONG_IDS( 51 ) := 33727   ;
    V_ARRAY_SONG_IDS( 52 ) := 33729   ;
    V_ARRAY_SONG_IDS( 53 ) := 33731   ;
    V_ARRAY_SONG_IDS( 54 ) := 33733   ;
    V_ARRAY_SONG_IDS( 55 ) := 33735   ;
    V_ARRAY_SONG_IDS( 56 ) := 33737   ;
    V_ARRAY_SONG_IDS( 57 ) := 33749   ;
    V_ARRAY_SONG_IDS( 58 ) := 33751   ;
    V_ARRAY_SONG_IDS( 59 ) := 33753   ;
    V_ARRAY_SONG_IDS( 60 ) := 33755   ;
    V_ARRAY_SONG_IDS( 61 ) := 33757   ;
    V_ARRAY_SONG_IDS( 62 ) := 33759   ;
    V_ARRAY_SONG_IDS( 63 ) := 33761   ;
    V_ARRAY_SONG_IDS( 64 ) := 33763   ;
    V_ARRAY_SONG_IDS( 65 ) := 33775   ;
    V_ARRAY_SONG_IDS( 66 ) := 33777   ;
    V_ARRAY_SONG_IDS( 67 ) := 33779   ;
    V_ARRAY_SONG_IDS( 68 ) := 33781   ;
    V_ARRAY_SONG_IDS( 69 ) := 33783   ;
    V_ARRAY_SONG_IDS( 70 ) := 33785   ;
    V_ARRAY_SONG_IDS( 71 ) := 33787   ;
    V_ARRAY_SONG_IDS( 72 ) := 33789   ;
    V_ARRAY_SONG_IDS( 73 ) := 33791   ;
    V_ARRAY_SONG_IDS( 74 ) := 33793   ;
    V_ARRAY_SONG_IDS( 75 ) := 33807   ;
    V_ARRAY_SONG_IDS( 76 ) := 33809   ;
    V_ARRAY_SONG_IDS( 77 ) := 33811   ;
    V_ARRAY_SONG_IDS( 78 ) := 33813   ;
    V_ARRAY_SONG_IDS( 79 ) := 33815   ;
    V_ARRAY_SONG_IDS( 80 ) := 33817   ;
    V_ARRAY_SONG_IDS( 81 ) := 33819   ;
    V_ARRAY_SONG_IDS( 82 ) := 33821   ;
    V_ARRAY_SONG_IDS( 83 ) := 33823   ;
    V_ARRAY_SONG_IDS( 84 ) := 33825   ;
    V_ARRAY_SONG_IDS( 85 ) := 33839   ;
    V_ARRAY_SONG_IDS( 86 ) := 33844   ;
    V_ARRAY_SONG_IDS( 87 ) := 33846   ;
    V_ARRAY_SONG_IDS( 88 ) := 33848   ;
    V_ARRAY_SONG_IDS( 89 ) := 33850   ;
    V_ARRAY_SONG_IDS( 90 ) := 33852   ;
    V_ARRAY_SONG_IDS( 91 ) := 33854   ;
    V_ARRAY_SONG_IDS( 92 ) := 33856   ;
    V_ARRAY_SONG_IDS( 93 ) := 33858   ;
    V_ARRAY_SONG_IDS( 94 ) := 33860   ;
    V_ARRAY_SONG_IDS( 95 ) := 33874   ;
    V_ARRAY_SONG_IDS( 96 ) := 33879   ;
    V_ARRAY_SONG_IDS( 97 ) := 33881   ;
    V_ARRAY_SONG_IDS( 98 ) := 33883   ;
    V_ARRAY_SONG_IDS( 99 ) := 33885   ;
    V_ARRAY_SONG_IDS(100 ) := 33889  ;
        /* do stuff with data from Song and Pricing Database coming from the two
      separate cursors, then continue processing more rows...
      FOR i IN C_get_music_price_data( v_array_song_ids ) LOOP
      . (this is the loop where I pass in v_array_song_ids
      .  populated with only 100 cells and it runs forever)
      END LOOP; 
    END;

  • Need to pass field value as input parameter for a task

    I have the following scenario:
    User opens a task from UWL and sees a UI in which a Quote no. is generated, which is saved in the backend. Next time the user comes to this UI(from the same task in his UWL) he should see the Quote no. generated. Also, the data is fetched from backend by calling BAPI which takes the Quote no. as input, which was generated the first time user visited this UI.
    My concern is how can I store this Quote no. in GP, which was generated the first time, so that user sees the data specific to quote no., as relevant for that task.
    Please help.
    Thanks and Regards
    Aanchal

    Hi Srinivasan,
    Thanks for ur quick response.
    I am explaining my issue further.
    User comes to this UI (first time), Quote no. is generated. User fills some other fields( but does not complete whatever he has to) and saves the data to backend. Now user closes the window (task remains in his UWL), but now when he opens the task, he should see the Quote no. which was generated earlier and also data which he saved(by calling BAPI). How can I get this quote no.?
    Can you please explain what you mean by "expose the quote no. at process level"?
    Thanks and Regards
    Aanchal

  • Parsing an input parameter for the where clause or record select value

    In my limited CR experience, I've always used a command database connection so that I can write my own SQL.  However, now I have to parse a  pipe delimited parameter to get my value for the where clause, so I'm selecting several tables and joining them through the Database Expert Links tab.  All works fine, but after doing that and then parsing the parameter with the below formula in the Select Expert, I notice that there is no where clause in the SQL query, and although the report eventually displays the proper values, it runs through thousands of records first.  Here is my Select Expert - Record formula:
    StringVar array Parm1;
    Parm1 := Split({?DATA_AREA}, "|");
    {SO_ORDERS.CASE_ID} = Parm1[2]
    If I change "Parm1[2]" on the last line to a valid Case ID, then there is a where clause in the SQL and the report generates immediately. 
    It seems like the record select formula is applied AFTER all of the records (without a where clause) are searched when I use the parsed parameter value, but when I hard code a valid value, it places that into the where clause BEFORE the sql is executed.  Is there a way to get the parameter parsed first and then use that parsed value in the SQL where clause?
    Thanks.
    Bill

    Yes crystal will run the query first to get 100% data and then applies record selection condition. To increase the performance you need to pass the where condition at the command level instead of report level. So you need to create a report using add command like this
    select * from tablename where field={?Parameter}
    {?Parameter} is a command level parameter.
    Now insert this report as a subreport in another report which has no connection but has a parameter
    {?DATA_AREA} and create a formula like this in the main report
    Split({?DATA_AREA}, "|")[2]
    Now right click on the subreport and go to change subreport links and add this formula from main report and link this to sub report parameter {?Parameter} without linking any database field from the subreport.
    Now your subreport runs with the where clause to get the data.
    Regards,
    Raghavendra

  • Passing null as input parameter for relational physical DS

    I'm creating a adapter(physical and logical) to talk to a Sybase Stored procedure. A few input integer arguments to the stored procedure are always null
    From Stored procedures - default NULL , I use xs:int(()) to pass in nulls. But for the 2nd argument($id),which has args with valid input following it, the stored procedure does not return any results. Executing the same stored proc with same inputs via Java JDBC or Sybase central gives the right results.
    But if i give a value for the 2nd argument ($id), the stored proc returns valid multi-row results indicating that the plumbing(my rowset schema..) works.
    In the below code, I have included the 2nd argument(id_inp) as an input to Logical just to be able to test using "setNull" check box. I also tried just passing "xs:int(())" without getting it as input into the logical.
    Physical:
    declare function f1:test_get($cid as xs:string, *$id as xs:int?*, $dt as xs:string, $tm as xs:string, $in1 as xs:int?, $in2 as xs:int?, $in3 as xs:int?, $in4 as xs:int?) as schema-element(t1:test_get) external;
    Logical:
    declare function tns:test_get($cid_inp as xs:string, $dt_inp as xs:string, $tm_inp as xs:string, *$id as xs:int?*) as element(ns1:OutputSchema)*{
    for $test_ret_get in f1:test_get($cid_inp, *$id*, $dt_inp, $tm_inp, xs:int(()), xs:int(()), xs:int(()), xs:int(()))
    return
    The sybase stored proc is declared as below: [ id, in1.in2,in3,in4 do not need to be passed in]
    create proc test_get
    @cid          varchar(32)=null,
    @id          int=null,
    @dt               varchar(8)=null,
    @tm               varchar(8)=null,
    @in1               int=null,
    @in2          int=null,
    @in3          int=null,
    @in4           int=0
    as
    Can i pass in null to an input argument followed by valid inputs to arguments following it?
    Is there any other way to send null?
    Thank you.

    mikereiche wrote:
    First - it is impossible to optimize stored procedures, as sorting, joining and filtering cannot be "pushed" inside the stored procedure. For this reason, I encourage you to avoid using stored procedures in your solution.Unfortunately, this is an external Sybase DB stored proc that we need to call to get data.
    >
    The issue is that SQL syntax for querying for a null value ( ... where COL_A is null ) is not consistent with querying for a non-null value (... where COL_A = ? ), and for ODSI to support querying for null values, it would need to delay generating the sql until the value of the arguments was known, and also there would be the possibility of having 2^number_of_args different sql statements. So it does not execute queries where any of the arguments are null. (look at the audit for your query, there won't be any executions of the sql).
    The stored procedure seems to correctly handle the null input parameters since I get the correct results with Java JDBC.
    See the thread, Re: Search Functionality , the post by Jeff Hoffman at "Mar 8, 2010 12:24 PM"
    Jeff shows how to solve this problem when it occurs in a sql query (SELECT) - and this is useful for doing query-by-form - which, by the looks of it, is what you are after. To implement it for a stored query, you would need an extra "IsNull" arg for each arg that could be null,
    myProcedure( @lastName varchar(8), @lastNameIsNull int, @firstName varchar(8) @firstNameIsNull int)
    select from CUSTOMER where (LASTNAME = @lastName or @lastNameIsNull=1) and (FIRSTNAME = @firstName or @firstNameisNull=1)
    And you would call that from ODSI as below (using Jeff's ensureNotNull function).
    myProcedure( tns:ensureNotNull($lastName), fn:empty($lastName) , tns:ensureNotNull($firsttName), fn:empty($firstName) )
    You may note that when lastName is null, a bogus value of "" (empty-string) will be passed for the value of @lastName. This does not matter since LASTNAME = @lastName will have no effect in the query since @lastNameIsNull=1 is true.I'm probably missing something but it is different in my case that i want to pass in null and the stored proc already has the necessary check for null. It looks up a different table when this arg is null and gets the values needed for execution.
    I turned on the Audit for query parameters and it goes out as null for the 2nd argument. Its probably what i'm not getting from your explanation but I don't understand why it would behave differently compared to Java JDBC when it looks like the input parameters are the same. This also uses the JDBC DataSource created in Weblogic console.
    Audit log:
    rows: 0
    parameters:
    10000
    null
    12/06/11
    15:48:00
    null
    null
    null
    0

  • Problems when creating a new instance of an Input parameter for a REM

    I am working in a small demo which calls a Remote Enable Function Module in order to read data from the back end system. Since the function module I need to call ("BP_BUPA_SEARCH_BY_USER") is not Remote Enable I created a copy of it and made it Remote Enable ("Z_BUPA_SEARCH_BY_USER"). I have created the model within webdynpro without any problems but when my application reaches the line where I create a new instance of the object Z_Bupa_Search_By_User_Input (see below the source code), just before to call the remote function, the application stops there. I have exactly the same code in another bapi calls and it works fine. I am wondering if my problem has anything to do with the fact the function module i am calling is the function module I created. Any advice is very welcome.
    Regards,
    Diego.
    Source Code:
    msg.reportSuccess("------>>>");  "THIS LINE IS PRINTED
    Z_Bupa_Search_By_User_Input searchByUser =
    new Z_Bupa_Search_By_User_Input();  "PROGRAM STOPS HERE          
    msg.reportSuccess("<<<------");  "THIS LINE DOES NOT                
    wdContext.nodeZ_Bupa_Search_By_User_Input().bind(searchByUser);
    msg.reportSuccess("<----
    msg.reportSuccess("if (Internet_User != null)");
    if (Internet_User != null) {
    Usselmodbe ir_user = new Usselmodbe();
    ir_user.setSign("I");
    ir_user.setOption("EQ");
    ir_user.setLow(Internet_User);
    searchByUser.addIr_User(ir_user);

    Hi,
    Try to get some more error info, e.g. like this:
    try {
    Z_Bupa_Search_By_User_Input searchByUser =
    new Z_Bupa_Search_By_User_Input(); "PROGRAM STOPS HERE
    } catch (Exception e) {
        msg.raiseException(e.getMessage(), true);
    msg.reportSuccess("<<<------"); "THIS LINE DOES NOT
    good luck,
    Roelof

  • Input parameter for service ECC_SALESORDERCRTRC.

    Hello,
    Has anybody worked on ent service "ECC_SALESORDERCRTRC" to create Sales order.
    Can anybody share the information regarding the input parameters to execute this service to create Sales order?
    with regards
    Mangesh A. Kulkarni

    hi,
       Yes today i explored it the parameters are as follows
    ->ReferenceID
       ->schemeAgencyID < This contains the logical system >
    ->SalesOrder
       -> Date < This conatins the order creation date >
       -> ProcessingTypeCode < This contains order type for example, OR for standard order >
    ->BuyerID
       -> (String) < This contains the PO number>
    ->BuyerParty
       ->InternalID
          -> (String) < This contains the customer number>
    ->SalesOrganisationParty
       ->InternalID
          ->(String) (String) < This contains the sales organization of customer>
    ->SalesTerms
       ->DistributionChannelCode
          ->(String) (String) < This contains the distribution channel of customer>
    ->DivisionCode
       ->(String) < This contains the division of customer>
    ->DateTerms
       -> RequestDate < This conatins the requested date >
    ->Item
       -> element1
           -> Product
               -> SellerID < This conatins the product number >
           ->TotalValues
              -> RequestedQuantity
                  -> unitCode < Unit of measure >
                  -> (java.math.BigDecimal) < quantity of product >
    I think this will be of great use to you.....
    Mark the post Answered once u get the solution
    regards
    Ajantha.

Maybe you are looking for

  • Airport express (I think) in a G4 and DLINK

    hey all I am trying to get my G4 to log onto a Dlink wireless access point and havin no luck what so ever can anyone help please...;l.

  • Problems with Sratch Disks

    I have a strange problem with my scratch disks. In my FCP preferences under scratch disks, I have 3 hard drives set up. 2 internal and one external that has been formatted correctly. My log and capture window tells me my scratch disks on both interna

  • Using Global Temporary Table in OBIEE 11

    Hi, THe requirement is to run a database function before the report runs. This Function accepts 5 parameters (Presentation Variable) and populates a GTT Global Temporary Table. This GTT is configured in presentation Layer. Issue: 1. Created a dummy r

  • Inbound proxy with attachments.

    We've created an inbound proxy.  The inbound message has an attachment.  How do I get access to it, within the inbound proxy method? I've got this from the various helps and blogs:   DATA: lt_attach    TYPE prx_attach,         l_name       TYPE strin

  • PowerShell Search-Mailbox cmdlet filtering language differences: AQS, KQL, FQL

    In Exchange 2010, Search-Mailbox uses AQS as the filtering language.  We're preparing to move to Exchange 2013 and want to make sure that the processes we used to search for particular types of emails gets updated before-hand.  Initially when we were