How to assign values from multiple output(cursor) to fields(line item-one below other) in forms??

Hi all,
I have a Form which has text_field columns as below , created from table RECEIVED_FORM_15G. This table is blank.
1)     CUST_CODE with 1 line item. (Number of Items displayed=1)
2)     ACCT_FD_NO with 10 line items. (Number of Items displayed=10)
There are more than 1 ACCT_FD_NO for 1 CUST_CODE.
When i enter the CUST_CODE and press tab, all the values of ACCT_FD_NO must get displayed. I am taking ACCT_FD_NO values from another table called KEC_FDACCT_MSTR
and want to display ACCT_FD_NO, one below other (line item). So i put in the following code:
  BEGIN
       FIRST_RECORD;
       FOR CUR_R IN (SELECT  ACCT_FD_NO FROM KEC_FDACCT_MSTR WHERE   STAUS='E' AND ACCT_CUST_CODE=:CUST_CODE)
       LOOP
           NEXT_RECORD;
          :ACCT_FD_NO :=CUR_R.ACCT_FD_NO;
       END LOOP;
    END;
But the problem is i'm not able to display the captured value in next consecutive line items.
It is getting displayed in first & second line item only.
The first value gets displayed in first line item, then the cursor moves from first line item to second line item,
the second value gets displayed in the second line item, (this is because of NEXT_RECORD in my code)
later all the values are getting displayed in the second line item only. (I checked it using message call.)
I want it to display one below the other.
The problem is the cursor is not moving to third line item after the second line item.
So the remaining values gets displayed in the second line item only.
So what is wrong in my code??
Where should i place the next_record to make the cursor move from one line item to next line item i.e from second line item to third line item
& third line item to fourth line item & so on....  Please let me know.
Thank You.
Oracle Forms Builder 6i
Oracle 9i.

The above code is right..
The only mistake was In the property palette of CUST_CODE, "required" was not set to "Yes" .
So after setting required to 'YES' , it worked perfectly fine.

Similar Messages

  • How input fields should come one below other

    Hi,
          I want to create an application in webdynpro.My requirement is to develop a personal detail form like name date of berth qualification, date of joining etc. So for that I need to create several input field,LABEL and at last one button (GO).so, please explain the property and related values by which the input fields should come one below other. Like in first line name second line date of berth input field should come.
    Thanks
    Kundan.

    Hi Kundan,
    In Webdynpro we have four layouts beased on our requirement we used that layouts.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50568365-ba9e-2b10-1188-a612a20edf31
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30291df2-b980-2a10-0884-839c4f7f147e
    Thanks,
    Tulasi Palnati

  • How to get values from a ref cursor in a procedure

    I have a procedure that returns a cursor type of values, but I cannot get the values.
    I got error when on how to define the output cursor. Could someone please look at the code and tell me how to correct it?
    Thanks in advance.
    ******************************8
    --This is the package
    CREATE OR REPLACE PACKAGE Test_SECURITY2 as
    type T_RoleTest is ref cursor;
    Procedure P_GetUserRole(userID in number, p_cur out T_RoleTest);
    end;
    CREATE OR REPLACE PACKAGE BODY Test_SECURITY2 as
    Procedure P_GetUserRole(userID in number, p_cur out T_RoleTest) as
    begin
         open p_cur for
         select PREO_Role.ROLE_ID,PREO_Role.ROLE_NAME
         from preorder.PREO_Role, preorder.PREO_User_Role
         where PREO_Role.Role_id = PREO_User_Role.Role_id
         and PREO_User_Role.user_id = userid;
    end;
    end;
    --This is the testing code. I got error here
    SQL> set serveroutput on;
    SQL> execute dbms_output.enable;
    PL/SQL procedure successfully completed.
    SQL> declare
    2 type T_RoleTest is ref cursor;
    3 V_UserRole is ref cursor; --how to define the output cursor
    4 v_userId number := 42;
    5 V_Role_Id number;
    6 v_Role_name varchar2(20);
    7 begin
    8 Test_SECURITY2.P_GetUserRole(v_userId, V_UserRole);
    9
    10 open V_UserRole;
    11 loop
    12 fetch V_UserRole into V_Role_Id, v_Role_name;
    13
    14 EXIT WHEN V_UserRole%NOTFOUND;
    15 dbms_output.put_line('RoleID'||v_Role_ID);
    16 dbms_output.put_line('Rolename'||v_Role_name);
    17
    18 end loop;
    19
    20 end;
    21 /
    V_UserRole is ref cursor;
    ERROR at line 3:
    ORA-06550: line 3, column 13:
    PLS-00103: Encountered the symbol "IS" when expecting one of the following:
    constant exception <an identifier>

    declare
      type T_RoleTest is ref cursor;
      v_UserRole T_RoleTest;or just:
    declare
      v_UserRole  Test_Security2.T_RoleTest;And, if you are on 9i or later, you can just use the built-in sys_refcursor type.

  • How to read data from multiple files and append in columns in one file

    Hi Guys,
    I have a problem in appending data from files in different columns. I have attachement has file A and B which I am reading and not able to get data as in file Result.txt. Please comment on how can I do this
    Solved!
    Go to Solution.
    Attachments:
    Write to file.vi ‏13 KB
    A.txt.txt ‏1 KB
    B.txt.txt ‏1 KB

    You cannot append columns to an existing file. Since the data is arrange line-by-line as one long linear string in the file, you can only append rows. A new row needs to be interlaced into the original file, shifting everything else. If you want to append rows, you need to build the entire output structure in memory and then write all at once.
    (I also don't think you need to set the file positions, it will be remembered from the last write operation.)
    Unless the files are gigantic, here's what I would do:
    (Also note that some of your rows have an extra tab at the end. If this is normal, you need a little bit more code to strop out empty columns. I include cleaned up files in the attachment. I also would not call them A.txt.txt etc. A plain A.txt is probably sufficient.)
    EDIT: It seems Dennis's solution is similar )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Write to fileMOD.zip ‏6 KB
    MergeColumns.png ‏6 KB

  • How to sum values from multiple lines in a DataTable?

    I have a Lookout program which uses a DataTable to allow users to write basic programs (relay on/off times, which relays change state, and pause times).  The DataTable cursor position changes to advance from one program stage to another.  
    What I would like to do is sum up the times from all the various stages.  Can anyone suggest how I might iterate through the DataTable using Lookout alone?  
    Thanks,
    Dave 

    I have tried to make 'loops' similar to that one but Lookout shows a message that iterations or loops for a variable are not allowed.
    You can use a sequencer but there are 2 inconvenients:
    1.- For a fast computer every step of the sequencer cannot be faster than 0.1 - 0.2 seconds. If you have many iteraciones, it will take some time.
    2.- The sequencer object has a maximimum of 100 steps.
    Ryan S. Here are questions for you:
    1.- Is there a way to add in the lks file statements and or functions using existing variables? What can be done and what not?
    2.- Is there a way to insert comments in the lks file?
    Thanks in advance.
    Rudy Lopez

  • How to assign value from one element to another ?

    Hi,
    I am stuck up in silly problem.
    I have an XML as string i have used parseEscapedXML() to convert it in to XML object Type. see following code.
    <assign name="Assign_3">
    <copy>
    <from expression="ora:parseEscapedXML(ora:getContentAsString(bpws:getVariableData('inputXML')))"/>
    <to variable="inputVariable" part="payload" query="/ns1:email"/>
    </copy>
    </assign>
    above is working fine. In Debug window i can see values in "/ns1:email/ns1:ovdTriggeredDate" but now i need to assign "/ns1:email/ns1:ovdTriggeredDate" to another variable. see following code for refrence.
    <assign name="Assign_2">
    <copy>
    <from expression="ora:getNodeValue(bpws:getVariableData('inputVariable','payload','/ns1:email/ns1:ovdTriggeredDate'))"/>
    <to variable="Variable_2"/>
    </copy>
    </assign>
    in above code "ovdTriggeredDate" is a string and "Variable_2" is also String.
    i dont know why above code is not working
    Can anybody help me in this?
    Thanks in Advance.
    Nimisha

    Hi,
    ovdTriggeredDate is type of an element which is of type string. and Variable_2 is also of type string variable.
    see following use case.i have xml as a string
    inputXML = <email><ovdTriggeredDate>16thFeb</ovdTriggeredDate></email>
    i need to convert string to XML object. now i am assigning this value to Schema.following is my schema.
    <xsd:element name="email">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ovdTriggeredDate" type="xsd:string" minOccurs="1"/>
    </xsd:complexType>
    </xsd:sequence>
    </xsd:element>
    i am able to convert XML string to xml object. now i need only one variable of xml. so i am assigning "ovdTriggeredDate" to string variable "variable_2"
    but its giving me exception. any idea ?
    thanks,
    Nimisha

  • How to assign value from insert statement to variable from a trigger

    Hi,
    I got this really annoying problem and I don't know if I am doing it correctly.
    I have a BEFORE INSERT trigger on a table. When someone executes an insert statement I want to grab the value of a column from that statement and assign it to a variable and then do stuff with it. I'm stuck on the assignment.. look below..
    CREATE OR REPLACE TRIGGER CARS.geotest2_trigger
    BEFORE INSERT ON CARS.GEO_TEST2
    FOR EACH ROW
    DECLARE
    v_chainkey nchar(32);
    v_chainkey2 nchar(32);
    not_exists EXCEPTION;
    BEGIN
    :NEW.CHAINKEY := v_chainkey;
    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE GEO_TEST.CHAINKEY = v_chainkey;
    IF v_chainkey2 = '' or v_chainkey2 is null THEN
    RAISE not_exists;
    ELSE
    INSERT INTO GEO_TEST2 VALUES(:NEW.CHAINKEY, :NEW.BLA, :NEW.FOO);
    END IF;
    EXCEPTION
    WHEN not_exists THEN
    RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    END;
    I keep getting this error
    Error: ORA-04098: trigger 'CARS.GEOTEST2_TRIGGER' is invalid and failed re-validation
    SQLState: 42000
    ErrorCode: 4098

    It isn't assigning because v_chainkey is not at the left hand side of the assignment statement.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> declare
      2    x  number := 5;
      3    y  number;
      4  begin
      5    x := y; -- does not assign anything to y; assigns NULL to x,
      6            -- because y is NULL at this point
      7            -- so, essentially the value 5 of x is *LOST* now
      8    dbms_output.put_line('x = '||x);
      9  end;
    10  /
    x =
    PL/SQL procedure successfully completed.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>In any case, here's what you are probably looking for:
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> drop table geo_test;
    drop table geo_test
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G> drop table geo_test2;
    drop table geo_test2
    ERROR at line 1:
    ORA-00942: table or view does not exist
    test@ORA10G>
    test@ORA10G> create table geo_test (chainkey nchar(32));
    Table created.
    test@ORA10G> insert into  geo_test (chainkey) values ('a');
    1 row created.
    test@ORA10G> insert into  geo_test (chainkey) values ('');
    1 row created.
    test@ORA10G>
    test@ORA10G> create table geo_test2 (chainkey nchar(32), bla number(1), foo number(1));
    Table created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G> CREATE OR REPLACE TRIGGER geotest2_trigger
      2  BEFORE INSERT ON GEO_TEST2
      3  FOR EACH ROW
      4  DECLARE
      5    v_chainkey2  nchar(32);
      6    not_exists   EXCEPTION;
      7  BEGIN
      8    SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE nvl(GEO_TEST.CHAINKEY,'~') = nvl(:new.chainkey,'~');
      9    IF v_chainkey2 is null THEN
    10      RAISE not_exists;
    11    END IF;
    12  EXCEPTION
    13    WHEN not_exists THEN
    14      RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
    15  END;
    16  /
    Trigger created.
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('b',1,1);
    insert into geo_test2 (chainkey,bla,foo) values ('b',1,1)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 5
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values (null,1,1);
    insert into geo_test2 (chainkey,bla,foo) values (null,1,1)
    ERROR at line 1:
    ORA-20010: Chainkey does not exist in parent table GEO_TEST
    ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 11
    ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('a',1,1);
    1 row created.
    test@ORA10G>
    test@ORA10G>
    test@ORA10G>pratz
    I think the sole purpose of that "not_exists" exception is this -
    If you try to insert a NULL value for GEO_TEST2.CHAINKEY, then this trigger will throw an error even if at least one NULL value exists in GEO_TEST.CHAINKEY column.
    Not sure if that's something that you wanted.
    Message was edited by:
    pratz

  • How can I pull from multiple output trays?

    I have a Xerox DP180. I have several paper types, example: white, blue, green. I want to be able to select different paper types from a multi-page PDF.
    Example:
    Pages 1 and 2 from tray 1 (white paper)
    Pages 3 - 10 from tray 2 (blue paper)
    Pages 11 and 12 from tray 3 (green paper)
    Pages 13 - 20 from tray 1 (white paper)
    If not from Acrobat are there any other applications that will allow me to do this?
    Thank you,

    There is no general way in PDF to control trays. Now, it's possible that people can write special ways to do this for particular printers. So your best bet is to pursue this with Xerox.

  • How to change value of GL account on sales order line item

    I am trying to change COGS account based on discount percentage. How do I write formatted search?
    discount filed is $[$38.15.1] and I need to change COGS account if discprcnt = 100 on sales order
    Thanks

    Thanks again Jim and Manikadan
    I had to modify the query a little bit to following but I was able to change the COGS account on FMS.
    Declare @prcntdisc as nvarchar(20)
    Declare @acctcogs as nvarchar(20)
    Declare @defaultcogs as nvarchar(20)
    SET @prcntdisc = (SELECT $[dln1.discprcnt])
    SET @acctcogs = '67000015-01-001-03'
    SET @defaultcogs = (SELECT C.FormatCode
                  from
                   dbo.oitb A
                   inner join dbo.oitm B on B.ItmsGrpCod = A.ItmsGrpCod
                   inner join dbo.oact C on A.SaleCostAc = C.AcctCode
                  where
                   B.ItemCode =(SELECT $[dln1.ItemCode])
    if @prcntdisc like '100.%' 
    begin
    Select  @acctcogs
    end
    else
    begin
    Select @defaultcogs
    end

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How to get one value from multiple duplication for a key figure field

    Hi expert,
          I have a infoprovider, with following format:
            employee     hourly_rate   action_type  count of action
         there are multiple rows for each employee, I want to create query as follows:
            employee     hourly_rate   action_type  count of action
         in which hourly_rate is constant , only retriving one value from multiple rows for one employee, count of action should be summarized. 
    how to get this hourly_rate.
    Many Thanks,

    Hi,
    put the employee in rows panel -> reaming object put it in free char panel.
    suppress the all result rows for the all object except employee .
    select the object -> go to query properties -> select display tab -> select result rows -> select suppress.
    select the employee -> go to query properties -> select display tab -> select result rows -> select always display. - now it will give employee wise hourly rate summarize data.
    Thanks,
    Phani.

  • How to assign Action to multiple Users dynamically in GP

    Hello Experts,
    I have the following scenario in GP
    I have created a Web Dynro GP Callable Object and from my Web Dynpro i need to a pass a list of Users to which a particular Action needs to be assigned.
    I am able to return a single value from web dynpro to gp.
    Can some one help me how to return a list of users to gp.
    I have done the following: In the getDescription method I have added an attribute of multiplicity 1_N:
    IGPStructureInfo outputStruct = technicalDescription.getOutputStructureInfo();
    IGPAttributeInfo list1 = outputStruct.addAttribute("List1", IGPAttributeInfo.BASE_STRING);
    list1.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_N);
    then in the complete method I am trying to set an Arraylist to this variable:
    IGPStructure output = execContext.getOutputStructure();
    output.setAttributeValue("List1", userList);
    Here userList is an Arraylist which contains the list of User Id's..
    However I get the following exception:
    com.sap.caf.eu.gp.exception.api.GPInvocationException: Multiplicity of attribute with name List1 and namespace null does not allow single values to be set/received
    at com.sap.caf.eu.gp.structure.impl.GPStructure.setAttributeValue(GPStructure.java:114)
    Can someone help me in knowing how I can return a list as an output parameter to GP from Web Dynpro...
    Regards
    Sundeep

    Hi Srinivasan,
    Of course the Role is Runtime defined...
    I would brief you again the mapping that I have performed in the Design time at the processlevel.
    From Web Dynpro I return a List of type String and Multiplicity 1..N.
    I map this List with the leaf item User Identifier contained in the User List Input parameter of the Assign User to Process Role callable object.
    However since the User Identifier parameter is of cardinality 0..1 only the first value in the returned list is getting assigned to it. Thus the task is getting assigned to only one user.
    Now it is not possible in Design time to Group or consolidate parameters of different types. Thus the List which is of type String cannot be mapped to User List or the User_Item contained within it which are both of type Structure and multiple cardinality.
    I even created a Structure in Web Dynpro of cardinality 1..N and withing it i included a List of type String and cardinality 1..N. Now I returned this Structure from Web Dynpro and tried to map it to the User Item Structure of the Assign User to Process Role Callable object, but doint this the task did not get assigned to any user..
    One question:
    Don't you think that in order for the task assignment to happen using the Assign User to Process Role Callable Object the leaf item User Identifier parameter contained in the User_List input parameter of this callable object needs to be populated with the required User Id's.
    But if the cardinality of this parameter is always 0..1 , is it possible to achive the assignment of an Action to multiple Users at runtime using this Callable Object?
    Can you please explain the parameter mapping you followed in order to achive this...
    Regards
    Sundeep
    I want to ensure that you remain in the top 3 contributors in this forum 
    I will continue to reward points for your answers
    Edited by: Sundeep Sethi on Sep 4, 2008 1:47 PM

  • How to assign values to Dynamic VO.

    Hi All,
    I have created a Dynamic VO and i have created 2 attributes(name and age) for it.
    Can i create this dynamic VO in Process form request of one of the CO class?
    Please let me know how to assign values to it......and display it and the page.?
    Thanks,
    Sowmya.

    Mukul
    I am trying to achieve something like below:
    Creating a Dynamic VO in my extended controller's ProcessRequest() method and attaching it to a MessageChoiceBean. In ProcessFormRequest() method based on some condition i have to change my Dynaic VO's whereClauseParam and re-execute it so that it will show some different set of values. Below is the code which i used. But after re-executing it my LOV is still showing old set of values. I have posted a query regd. the same but dint get much help. Kindly let me know, if you have any comments. Also Please find the link to my earlier post.
    Link: Re: Re-executed dynamic VO not showing new values
    * CODE *
    ProcessRequest()
    ViewObject vo = (ViewObject)am.createViewObjectFromQueryStmt("dummyVO","SELECT MEANING AS VALUE FROM HR_LOOKUPS WHERE LOOKUP_TYPE = :1");
    vo.setMaxFetchSize(-1);
    vo.setWhereClauseParam(0,"input1");
    vo.executeQuery();
    OAMessageChoiceBean mesBean=(OAMessageChoiceBean)webBean.findIndexedChild(webBean,"DemoChoiceItem");
    mesBean.setPickListCacheEnabled(false);
    mesBean.setPickListViewObjectDefinitionName("dummyVO ");
    mesBean.setPickListViewUsageName("dummyVO ");
    mesBean.setListDisplayAttribute("VALUE");
    mesBean.setListValueAttribute("VALUE");
    ProcessFormRequest()
    If the event is fired
    S.O.P(....);
    ViewObject vo1 = (ViewObject)am.findViewObject("dummyVO");
    vo1.clearCache();
    vo1.reset();
    vo1.setWhereClause(null);
    vo1.setWhereClauseParams(null);
    vo1.setWhereClauseParam(0,"input2");
    vo1.executeQuery();
    S.O.P(....);
    Thanks

  • How to assign Values to nested table and pass as parameter to procedure?

    How to assign Values to nested table and pass as parameter to procedure?
    Below is the Object and its type
    create or replace type test_object1 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type1 is table of test_object1;
    create or replace type test_object2 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type2 is table of test_object2;
    GRANT ALL ON test_object1 TO PUBLIC;
    GRANT ALL ON test_type1 TO PUBLIC;
    GRANT ALL ON test_object2 TO PUBLIC;
    GRANT ALL ON test_type2 TO PUBLIC;
    here is the table made of object type:
    create table test_object_tpe
    sl_num NUMBER,
    description VARCHAR2(100),
    main_val1 test_type1,
    main_val2 test_type2
    NESTED TABLE main_val1 STORE AS tot1
    NESTED TABLE main_val2 STORE AS tot2;
    here is the procedure which inserts values into nested table:
    PROCEDURE INSERT_TEST_DATA(sl_num IN NUMBER,
    description IN VARCHAR2,
    p_main_val1 IN test_type1,
    p_main_val2 IN test_type2
    IS
    BEGIN
    FOR rec in p_main_val1.first..p_main_val1.last
    LOOP
    INSERT INTO xxdl.test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    sl_num
    ,description
    ,test_type1 (test_object1(
    p_main_val1(rec).val1,
                                       p_main_val1(rec).val2,
    p_main_val1(rec).val3
    ,test_type2 (test_object2( p_main_val2(rec).val1,
                        p_main_val2(rec).val2,
                        p_main_val2(rec).val3
    END LOOP;
    commit;
    END INSERT_TEST_DATA;
    here is the anonymoys block which assigns values to the object type and pass values into the procedure:
    set serveroutput on;
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1(1).val1 := 'testx1';
    inval1(1).val2 := 'testx2';
    inval1(1).val3 := 'testx3';
    inval2(1).val1 := 'testy1';
    inval2(1).val2 := 'testy2';
    inval2(1).val3 := 'testy3';
    CSI_PKG.INSERT_TEST_DATA(sl_num => p_sl_num,
    description => p_description,
    p_main_val1 => inval1,
    p_main_val2 => inval2
    end;
    Can anybody correct me.
    Thanks,
    Lavan

    Thanks for posting the DDL and sample code but whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    How to assign Values to nested table and pass as parameter to procedure?
    >
    Well you are doing almost everything wrong that could be done wrong.
    Here is code that works to insert data into your table (the procedure isn't even needed).
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1.extend();
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');
    inval2.extend();
    inval2(1) := test_object2('testy1', 'testy2', 'testy3');
    INSERT INTO test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    (p_sl_num, p_description, inval1, inval2);
    commit;
    end;
    /See Example 5-15 Referencing a Nested Table Element in Chap 5 Using PL/SQL Collections and Records in the PL/SQL doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#CJABEBEA
    1. You don't even need the procedure since all it does is a simple INSERT into the table which you can do directly (see my code above)
    inval1(1).val1 := 'testx1';There is no element one (1) of 'inval1' since you haven't created any elements yet. You need to EXTEND the collection to add an element
    inval1.extend();And then there is an empty element but 'inval1' is a container for objects of type 'test_object1' not for scalars like 'val1', 'val2', and 'val3'.
    So you can't do
    inval1(1).val1 := 'testx1';You have to create an instance of 'test_object1'
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');And so on for the other collection
    You don't need the procedure (as my sample code shows) but once you populate the variables properly it will work.

  • Infosource Fields with values from multiple Data Sources

    Hi Experts,
    My question is:
    i have to load values of only few fields of 0LIS_11_VAHDR and few fields of 0LIS_11_VAITM into one infocube.
    If i just create one infosource with those fields only in communication structure, but then i can assign only one data source at time, how to load values from another datasources at same time?
    Can i do it using single infosurce? and if yes any guideline....
    Thanks......

    My dear, the problem is that even for the first solution (only one infosource) you have to manage two separate dataloads, since linking several datasources to one infosource means only that you can manage a unique communication structure, but different transfer rules/structures and, avove all, two different infopackages !
    So, you have anyway to face the automation issue of your dataloading.
    My suggestion has been more functional and conceptual than technical (for which I gave the same answer, that is, "you can do it"): you are not loading a master data source (the same object 0MATERIAL) with attributes, texts and hierarchies (and in this case it's obvious that you have to use one infosource); here you want to use the infosource dedicated to the header flow to load item info too (and you will have to use the same and unique update rules).
    Again, no problem from a technical point of view, but I guess that someone who will look into your architecture, probably, will have something to say with this kind of choice !!!
    Bye,
    Roberto

Maybe you are looking for