How to initialize array variable generated by Rosetta

Hello,
I have
pl/sql types :
TYPE xxg2c_pe is record (quota_name clob,revenue_class_name varchar2(30), performance_type varchar2(150),
rate_table_name varchar2(80), formula_name varchar2(30),package_name varchar2(30) );
TYPE xxg2c_pe_tab is table of xxg2c_pe;
pl/sql procedure:
PROCEDURE check_redundancy_pe(
p_org_id IN cn_quotas_all.org_id%TYPE
               ,p_comp_plan_id IN cn_quota_assigns_all.comp_plan_id%TYPE
,p_pe_tab OUT xxg2c_pe_tab
,x_return_status OUT varchar2
,x_msg_count OUT number
,x_msg_data OUT varchar2
the signature generated by Rosetta:
public static void checkRedundancyPe(
OracleConnection _connection,
BigDecimal p_org_id,
BigDecimal p_comp_plan_id,
Xxg2cPe [][] p_pe_tab,
String [] x_return_status,
BigDecimal [] x_msg_count,
String [] x_msg_data
) throws SQLException :
I call this method in java:
xxg2cCompPlanUtilsPkg.checkRedundancyPe(
conn,
new BigDecimal(getOADBTransaction().getOrgId()),
new BigDecimal(compPlanId),
quotaTAB,
returnStatus,
msgCount,
msgData);
But before I call this method, I need to initialize quotaTAB as:
Xxg2cCompPlanUtilsPkg.Xxg2cPe quotaTAB [][] = new Xxg2cCompPlanUtilsPkg.Xxg2cPe[size][6];
Since quotaTAB is an output parameter, before I call the method, I don't know its size, so what size do I need to put for initialization?
thanks for your help.
Lei

Hello,
I have
pl/sql types :
TYPE xxg2c_pe is record (quota_name clob,revenue_class_name varchar2(30), performance_type varchar2(150),
rate_table_name varchar2(80), formula_name varchar2(30),package_name varchar2(30) );
TYPE xxg2c_pe_tab is table of xxg2c_pe;
pl/sql procedure:
PROCEDURE check_redundancy_pe(
p_org_id IN cn_quotas_all.org_id%TYPE
,p_comp_plan_id IN cn_quota_assigns_all.comp_plan_id%TYPE
,p_pe_tab OUT xxg2c_pe_tab
,x_return_status OUT varchar2
,x_msg_count OUT number
,x_msg_data OUT varchar2
the signature generated by Rosetta:
public static void checkRedundancyPe(
OracleConnection _connection,
BigDecimal p_org_id,
BigDecimal p_comp_plan_id,
Xxg2cPe ][ p_pe_tab,
String [] x_return_status,
BigDecimal [] x_msg_count,
String [] x_msg_data
) throws SQLException :
I call this method in java:
xxg2cCompPlanUtilsPkg.checkRedundancyPe(
conn,
new BigDecimal(getOADBTransaction().getOrgId()),
new BigDecimal(compPlanId),
quotaTAB,
returnStatus,
msgCount,
msgData);
But before I call this method, I need to initialize quotaTAB as:
Xxg2cCompPlanUtilsPkg.Xxg2cPe quotaTAB [] [] = new Xxg2cCompPlanUtilsPkg.Xxg2cPe [size][6];
Since quotaTAB is an output parameter, before I call the method, I don't know its size, so what size do I need to put for initialization?
thanks for your help.
Lei
Edited by: user571830 on Feb 13, 2009 1:48 AM

Similar Messages

  • HOW-TO initialize class variable

    How can an annotation initialize a class variable? For example, JEE5 has an annotation called @EJB that initializes a class variable with a remote or local interface:
    @Stateless class Foo
    @EJB bar;
    bar.scoobyDoobyDoo(); // I can use bar seemingly before it was initialized!
    In general terms, how can annotation be used to initialize class variables?

    It can't.
    What it can do is tell something else that this needs to be done, and that something else can do it.
    That something else might be an annotation processor running at build / compile time, which might generate some code to do it, or might generate some configuration file that causes it to be done later.
    That something else might alternatively be a runtime artifact, that can look at the annotation and carry out the requested operation. For example a container could do it.
    So an annotation cannot do anything, including initailizing a class variable, but it can declare that the class variable needs to be initialized in some way.
    Bruce

  • How to initialize a variable

    Hi,
    I'm trying to initialize a variable due to an error but I don't know how to do it.
    I have the following code:
    public class Multimedia
    String titulo;
    String autor;
    int duracion;
    Multimedia(String titulo, String autor, int duracion)
    this.titulo=titulo;
    this.autor=autor;
    this.duracion=duracion;
    }

    In class you have declared :
    Multimedia[] listamultimedia=new Multimedia[20];And in for loop you are using:
    listamultimedia=new Multimedia[20];First statement means : listamultimedia is an array of Multimedia with 20 elements.
    Second statement means :*Each element of listamultimedia* is an array of 20 elements. That would mean listamultimedia is array of array i.e 2-dimensional array.
    So you got the problem i guess. Its trivial to solve now.
    Edited by: J2EE_Life on Apr 8, 2012 5:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use array variable in Oracle

    Hi,
    I want to use a array variable to store many string values i.e. values like ( "my name is hhhyy and i have a tack", "My data is valid" , "hhggg gaya hujjjs")
    currently all these values are in seperate variables , I want to consolidate them in one array and use it in further , after replacing some values from them.
    I want to take data too. I am thinking of using "Varchar array" with values are in one cursor i want to take them in single array.
    varchar array is throwing some exception once it has taken all the value. I had extended it upto 100 values.
    What could be the possible solution.
    create or replace function testet
    ( value varchar2) return varchar2
    as
    x_value Varchar2(2000);
    x_value2 varchar2_array := varchar2_array();
    x_value3 number;
    cursor c1 is
    SELECT val
    FROM table A
    WHERE A.coulmn= 'val';
    begin
    x_value2.EXTEND(100);
    x_value3 := 1;
    for indx IN c1
    loop
    x_value2(x_value3):= indx.val;
    dbms_output.put_line(x_value2(x_value3));
    x_value3 := x_value3 + 1;
    end loop ;
    end;

    user12403816 wrote:
    actual error :
    ORA-06533: Subscript beyound count
    ORA - 06512 " at Function name , line 23
    ora - 06512: at line 3
    06533, 00000, "Subscript beyond count"
    // *Cause:  An in-limit subscript was greater than the count of a varray
    //          or too large for a nested table.
    // *Action: Check the program logic and explicitly extend if necessary.code contains bug.
    after code is fixed, then no error gets thrown

  • How to use array variable in Business Rule

    Hi,
    I have read a lot about Array variable. But everywhere declaration of array variable in described. I can declare that. It works fine. But i can't implement that array variable.
    Can any one please provide me an example of implementation of array variable?
    Regards,
    Rubi
    Edited by: Rubi Banerjee on Mar 30, 2012 3:35 AM

    forget about all varible in essbase CSC
    it's bad practics.^^^Is it?
    Essbase cube are self big array )^^^That's what makes ARRAY so cool -- you can set up an array that encompasses a dimension.
    Example straight from a HBR:
    ARRAY SomeArray["Entity"] ;
    Regards,
    Cameron Lackpour

  • How to initialize the variables in the subvi when the main vi running?

    Hi, friends!
    Now I am working on a project with labview. I make a main vi  including many subvis.
    When the main vi running, I want to reinnitialize the variables in the subvi to zero.
    I know that I can realize that  using the local variable when I enter the subvi,
    but I want to keep the the values when I left the subvi and saw them when I
    click in this subvi again. So, I do not reinitialize the subvi when it runs. But, I
    don not know how to reinitialize the indicators in the subvi when I run the main
    VI in the first instance. I try to use the global variables, but it seems do not work
    well. Would you like to give me some advice? Thanks a lot!

    Hi dec,
          If I understand your question, try using the "First Call?" node in your Sub-VI - to initialize values the first time the VI executes every time the top-level VI is Run.
    If this doesn't work for you, just post again!
    Cheers.
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • How to initialize variable? (ArrayList String [])

    How to initialize this variable correctly, without getting a type safety warning?
    ArrayList<String>[] var = ?
    Thanks & Best regards,
    Kristian
    Message was edited by:
    Kriskra

    I need to use an array in this case... Thanks for
    your advice anyway...And the answer still is arrays and generics don't mix so your request is impossible without ignoring the warning.
    Try@SuppressWarnings("unchecked")
    ArrayList<String>[] var = new ArrayList[10];

  • How do I use an array variable in the assignment target?

    Hi,
    I am creating a BPEL process in which I have to use an array variable. The array variable needs to be initialized based on some condition.
    The issue is I cannot find a way to set the value of the array variable. There are ways to GET the value of an array variable indexing into it.
    But how do I set the value by using the Array variable in the <to> tag?
    Any help is appreciated. I am using BPEL 10.1.2.0.2.
    Thanks.

    You can declare a variable of type integer which will server as your index. Figure out based on some condition in your process which index of array to update. Assign to your integer variable you created.
    And have Assign copy operation like this -
    <copy>
    <from variable="Var_Output_FetchDueDate"
    part="OutputParameters"
    query="/ns18:OutputParameters/ns18:DUEDATE"/>
    <to variable="outputVariable" part="payload"
    query="/client:GetCustomerAccountInformationProcessResponse/client:customer/client:accounts/client:account[$Var_Counter]/client:dueDate"/>
    </copy>
    I have been using this in my processes.

  • How to create an array variable

    Hi folks,
    I'm developing a flowN activity , for each branch created, I need to pass different values (values I get from DB).
    For this my plan would be,
    -create an array variable , load all the values(from DB) into the array
    -pass the array to each branch in flowN activity based on the index
    As I'm newbie to BPEL, I do not know how to create an array variable.
    Could you people guide me please.
    Regards
    Viki

    Hi,
    I created my string array like
    <element name="string_array">
    <complexType>
    <sequence>
    <element name="input" type="string" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </element>
    <variable name="arr" element="client:string_array"/>
    I am able to add values to my array variable named as "arr"
    When I use the following code snippet, it gives my the value of the entire list.
    <%ora:getNodeValue(bpws:getVariableData('arr'))%>
    But when I try retireve values one by one like <%ora:getElement('arr','/client:string_array/client:input',[0])%>, its giving me error.
    Guide to get throu' this.
    Viki

  • How to initialize the array of hashmap???

    how to initialize the array of hashmap??

    What do you mean by "the array of hashmap"?

  • How do we initialize DAL variables without making changes to INI files?

    We have an application which currently use only two DALs. We would like to add a DAL to popluate certain data on the form. We have encountered an issue with initialization of dal vairables.
    One of the solutionis that set FlushDalSymbo = Yes in the FSISYS file.
    However, this involves INI file change which we would like to avoid.
    So, is there a way to initialize dal variables, without making changes to INI files? If so, how?
    Thanks,
    Bala

    Hi Bala,
    Initializing a variable is simple, you just need to set the value to blank or zero:
    Variable = ""
    #Variable =0
    $Variable = 0.00
    You can place the declaration at the beginning of your script, of course replacing "Variable" with the actual name of you variable.
    Gaétan

  • How to initialize Button Array at "declaration"?

    How to initialize Button Array at "declaration"?
    Button[] b = new Button[2];
    b[0] = "label" ?
    b[1] = "label" ?
    Again,please at declaration not using setText within main program.

    main...
    Button[] btts = {new Button(...),new Button(...), ...)
    that shold be it
                                                                                                                                                                                   

  • How to use event to detect the change of a array variable?

    I have a main application that includes a lot of sub
    components. the main app mxml file import a public class that
    includes an array variable. Each of the values in the array can be
    updated in the sub components.
    I would like to have the main mxml be able to detect the
    change of the values of the array. Is it possible to use event? And
    how? Is there a good example to follow?

    See this FB3 help topic, particularly watchers:
    Defining data bindings in ActionScript

  • How do I load values from a database column to an array variable in TS?

    I'm trying to get the values from the column in a database into an array variable in TS using the property loader.
    The Open Database, Open SQL Statement, and Property loader steps all complete and say "done".  But my array is empty when it's all over.
    Using TestStand 2010
    Microsoft SQL Management Express 2008
    Database configured by my company, I can not change it only read from it.
    Thank you,
    Newb-D

    The database has to be in a form that will work with the PropertyLoader and it sounds like it isn't.
    Try using the Import/Export Properties tool found in the Tool menu, to export some data to a database and then you can see if your database is compatible.
    My guess is you will have to write your own loader.
    Regards
    Ray Farmer

  • How to Declare Arrays in bpel and use them as acollection

    Hi,
    I Am new to Bpel, I had created an empty Bpel Process and configured file adapter to a directory, In my text file i have 3 records with four columns, each column seperated by ',' and each record seperated by "EOL(end of line)", Below is the xsd file generated by the native format xsd builder, taken a recieve activity to recieve the contents of file from file adapter.
    So all the data which is in the file will be there in recieve activity.
    FileContents
    55555,rgfdgsd,gfdgfdg,23
    66666,retretret,trtertg,21
    77777,rtrttreter,trtter,23
    My Question is
    I want to compare whether value of C1 = '55555' and if the value is equal to 55555 then that record with c1=55555 has to be inserted into database by using Arrays
    How to compare the value of c1 through bpel functions.
    with java i have to use the logic similar to this by using Xpath
    getElement by tagname(c1);- it will give all the elements with tagname c1, three records are there with tagname c1 (c1=55555,c1=66666,c1=77777), we have to iterate through the elemnts and check whether the value iof c1='55555' and get the whole parent block which contains values of c1,c2,c3,c4 and insert that to database
    What variables we have to use to get the Similar logic in bpel
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/FileAdapter"
    xmlns:tns="http://TargetNamespace.com/FileAdapter"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="Associates">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Associate" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C1" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C4" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    I want to do it by using Arrays,
    Please post the step by step procedure like
    How to declare an Array?
    How to iterate the results in recieve acticity of file adapter and put them to array?
    How to compare the values in array with our desired value?
    Please Look into this and suggest me the solution.
    Regards

    I think it is a good option to use transformations. Do you have any critical reason why you want to do this using array?
    Little explanation below for your questions.
    As per my understanding from variable is the recieve activity variable and to variable is the Array variable is it right?
    Yes. Here I was try to build my array from the different source system data. This will append data to the array variable.
    How can we declare an array variable in bpel(to variable) with name as Variable_Array, part as payload and query as ArrayList?
    *Any element that can hold another element can be a array.
    For example if element A is declared as sequence of element B type, then A acts as a array for B*
    Could you please explain this also, what is from variable? and what is to variable?
    +<assign name="Assign_XPath_For_Array">+
    +<copy><from expression="concat('/ns1:ArrayList/ns2:ArrayElem') "/><to variable="Variable_Xpath"/></copy>+
    +</assign>+
    what is the type of to variable "Variable_Xpath"(String or int etc)?
    This creates a dynamic Xpath and store in some variable here. Here the variable is called Variable_Xpath which is a string
    similarly what is the type of to variable?
    +<assign name="Assign_Read_Array">+
    +<copy>+
    +<from expression="bpws:getVariableData('Variable_Array','payload',bpws:getVariableData('Variable_Xpath'))"/>+
    +<to variable="Variable_Read_Array_Element" query="/ns1: ABC"/>+
    +</copy>+
    +</assign>+
    To variable type is the variable that I read from the Array.
    *For example if A is the array holding B, then the to variable is B and from is doing A[counter]*
    Every Little Helps
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

Maybe you are looking for