To Use  Cursor or  TYPE table Index by PLS_integer

Hi All,
Let's see if I have table with no. of records 19,26,20,000.
If I want to loop through all the records which will be a optimized way To Use Cursor or TYPE table Index by PLS_integer.
Please guide.
Thanks.

What is it you want to do to/with the rows you're looping through?
Ideally you want to avoid looping, as that's row by row (aka slow by slow) processing and it's expensive time-wise.
If you're doing DML (insert/update/delete) then you're best off doing it in one sql statement, rather than looping.

Similar Messages

  • How to use PL/SQL type table in SQL FROM clause

    Hi All,
    I have to use a PL/SQL type table in our SQL statement as a table?
    I am using the syntax (below) but it gives PL/SQL: ORA-00902: invalid datatype
    SELECT ... FROM TABLE(CAST( var_pl/sql_table AS pl/sql_table)) tab WHERE tab.a=1;
    Plz reply with an example.
    Thanks.. Ratan

    You don't need a cast!!!
         select *
         from table ( <nested_table> )
         where <condition>Anyway, are you sure that tab.a is a number?
    Here follows an example with an useful function
    CREATE OR REPLACE
    type string_table  as table of varchar2(4000)
    CREATE OR REPLACE
    FUNCTION split_string (
         string IN varchar2,
         delimiter IN varchar2
    ) RETURN  string_table IS
         tab string_table;
         pre integer;
         post integer;
         step integer;
         i integer;
    BEGIN
         pre := 1;
         step := length(delimiter);
         i := 0;
         tab := string_table();
         loop
              tab.extend;
              i := i + 1;
              post := instr(string,delimiter,pre);
              if ( post = 0 ) then
                   tab(i) := substr(string,pre);
                   return tab;
              end if;
              tab(i) := substr(string,pre,post-pre);
              pre := post + step;
         end loop;
    END;
    select * from table (split_string('abc,dfg,hij',','))
    Query finished, retrieving results...
                                      COLUMN_VALUE                                  
    abc                                                                             
    dfg                                                                             
    hij                                                      

  • Java, PLSQL table index

    Hello,
    when I call from a java program a plsql procedure with 1
    parameter type table index, it works fine. But, when I use 2
    parameters type table index, it throws the exception with this
    message:
    ORA-01036: illegal variable name/number
    Thanks,
    Andres.

    Hi Simi,
    now, it is working well in the JDeveloper 9i, but when I deploy
    the files in the iAS server (1.0.2.2.1), it shows an exception:
    ORA-00932: inconsistent datatypes
    Just because of the table index parameter.
    I have changed the classes12 file in the home/lib directory in
    the OC4J without success with:
    classes12.jar original from lib directory.
    classes12.zip original from iAS's client BD.
    classes12.zip original from Oracle client BD 8.1.7. (C:\orant8
    \jdbc\lib)
    classes12.zip original from Oracle client BD 9i. (C:\orant9
    \jdbc\lib)
    classes12.jar original from Oracle client BD 9i. (C:\orant9
    \jdbc\lib)
    classes12.zip original from JDeveloper 9i. (C:jdev9i\lib)
    My java program is:
    connection.prepareCall("{call user.package.proc
    ocs.setString(1, cod);
    ocs.registerOutParameter(2, OracleTypes.VARCHAR);
    ocs.registerOutParameter(3, OracleTypes.VARCHAR);
    ocs.registerOutParameter(4, OracleTypes.VARCHAR);
    ocs.registerOutParameter(5, OracleTypes.VARCHAR);
    ocs.registerOutParameter(6, OracleTypes.VARCHAR);
    ocs.registerIndexTableOutParameter(7, 50,
    OracleTypes.VARCHAR, 100);
    ocs.registerOutParameter(8, OracleTypes.VARCHAR);
    ocs.registerOutParameter(9, OracleTypes.VARCHAR);
    ocs.registerOutParameter(10, OracleTypes.INTEGER);
    ocs.registerOutParameter(11, OracleTypes.VARCHAR);
    ocs.execute();
    My plsql header is:
    TYPE StringTabTyp IS TABLE OF table.column%TYPE
    INDEX BY BINARY_INTEGER;
    PROCEDURE proc
    ( ps1 IN VARCHAR2,
    ps2 OUT VARCHAR2,
    ps3 OUT VARCHAR2,
    ps4 OUT VARCHAR2,
    ps5 OUT VARCHAR2,
    ps6 OUT VARCHAR2,
    ps7 OUT StringTabTyp,
    ps8 OUT VARCHAR2,
    ps9 OUT VARCHAR2,
    pnRet OUT NUMBER,
    psRet OUT VARCHAR2
    If the parameter ps7 is of type VARCHAR2, it works. But if it is
    of type StringTabTyp (Table Index), this message is generated:
    ORA-00932: inconsistent datatypes
    Any idea will be useful.
    Thank you very much.
    Andres.

  • How to find the space used by a single table, a index on that table etc

    Can someone tell where to locate for the Extents used by a single table , index and other objects

    A large question implies a large answer, read the reference guide
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
    and search dba_extents...
    Nicolas.

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • Using cursor on table of records

    I'm trying to use cursors on a passed in table of records and I
    get a compilation error on the cursor definition that states
    that the table must be defined (but I'm passing the table in).
    Here are the types:
    create type input_record_t as object (
    field1 varchar2(10),
    field2 varchar2(20));
    create type input_table_t is table of input_record_t;
    procedure process_data (
    input_data in input_table_t) is
    cursor data_cursor is select * from input_data; /* error */
    begin
    /* processin here */
    end;
    I've also tried:
    cursor data_cursor (data_table in input_table_t) is select
    * from data_table; /* also error */
    How do I define a cursor on a passed in table of records? Any
    help would be appreciated.

    Same thing I am doing
    Its working finr in applications(If i call from VB or ASP I am
    getting result set)
    I want to see the result set in SQL plus window,How can i call it
    SQL > execute packperson.oneperson(1,?);
    SQL > execute packperson.oneperson(1);
    SQL > execute packperson.oneperson(1,NULL);
    Nothing is working
    Need help please
    Thanks
    are you trying to assign records to a plsql table type?
    CREATE OR REPLACE PACKAGE packperson
    AS
    TYPE tfname is TABLE of VARCHAR2(15)
    INDEX BY BINARY_INTEGER;
         PROCEDURE oneperson
         (onessn IN      integer,
         fname      OUT           tfname);
    END packperson;
    CREATE OR REPLACE PACKAGE BODY packperson
    AS
    PROCEDURE oneperson
              ( onessn IN      integer,
         fname      OUT           tfname)
    IS
    CURSOR person_cur
    IS
    SELECT ssn, fname, lname
    FROM person
    where ssn = onessn;
    percount NUMBER DEFAULT 1;
    BEGIN
    FOR singleperson IN person_cur
    LOOP
    fname(percount) := singleperson.fname;
    percount := percount + 1;
    END LOOP;
    END;
    END;

  • DB proc - do you need to create a table to pass a ref cursor record type?

    I want to pass a limited selection of columns from a large table through a DB procedure using a REF CURSOR, returning a table rowtype:
    CREATE OR REPLACE package XXVDF_XPOS_DS021_ITEMS AS
         TYPE XXVDF_XPOS_DS021_ITEM_ARRAY
         IS REF CURSOR
         return XXVDF_XPOS_DS021_ITEM_TABLE%ROWTYPE;
    Do I need to create this dummy table?
    I can't get a TYPE to work, where the type is an OBJECT with the desired columns in it.
    So a dummy empty table will sit in the database...
    Is there another way?
    thanks!

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

  • Using variable in physical table of type "select"

    Hello!
    I have to use query as physical table (in Administration tool - http://file.qip.ru/file/120930377/8713693/1_online.html):
    SELECT ID, CODE
    FROM TABLE (pkg.output('1','2')) This code works well. I need to insert instead of parameters '1' and '2' session variables, which will be set from Dashboard.
    How to put variable in this query? Variants like @{test} don't work.

    Hi
    I have a working example:
    select * from table(get_emps('VALUEOF(NQ_SESSION.USER)'))
    where
    CREATE OR REPLACE FUNCTION GET_EMPS(P_USER VARCHAR2:='SUPPLIER2')
    RETURN EMP_TYPE_LIST
    IS
    EMPS EMP_TYPE_LIST:=EMP_TYPE_LIST();
    R EMP_TYPE:=EMP_TYPE(NULL,NULL,NULL,NULL,NULL);
    i pls_integer:=0;
    CURSOR C_EMP(C_USER EMPLOYEES.USER_ID%TYPE) IS
    SELECT EMPLOYEE_ID,FIRST_NAME,LAST_NAME,SALARY ,USER_ID
    FROM EMPLOYEES WHERE upper(USER_ID)=upper(C_USER);
    BEGIN
    OPEN C_EMP(P_USER);
    LOOP
    FETCH C_EMP INTO R.EMPLOYEE_ID,R.FIRST_NAME,R.LAST_NAME,R.SALARY,R.USER_ID;
    EXIT WHEN C_EMP%NOTFOUND;
    i:=i+1; emps.extend; EMPS(i):=R;
    END LOOP;
    RETURN EMPS;
    END;
    and
    CREATE OR REPLACE TYPE EMP_TYPE AS OBJECT
    EMPLOYEE_ID NUMBER(6),
    FIRST_NAME VARCHAR2(20),
    LAST_NAME VARCHAR2(25),
    SALARY NUMBER(8,2),
    USER_ID VARCHAR2(30));
    and
    CREATE OR REPLACE TYPE EMP_TYPE_LIST AS TABLE OF EMP_TYPE;
    My employees table contains an extra column, called user_id, which has different values: 'Administrator','SUPPLIER2' and so on
    Best regards
    Laszlo

  • OCI doc says Cursor and Nested table have the same bind type SQLT_RSET but they don't

    5 Binding and Defining in OCI
    PL/SQL REF CURSORs and Nested Tables in OCI
    says SQLT_RSET is passed for the dty parameter.
    If I use SQLT_RSET for the return value of a function that returns a table and pass a statement handle's address for the OCI parameter data pointer, I expected that the statement handle will be instantiated as a result of executing the function on which I can further perform fetch, similar to a cursor. But it throws exception PLS-00382: expression is of wrong type ORA-06550: line 2, column 3. Is the above documentation wrong?
    From the OCI header file I see that for varray and nested table it mentions to use SQLT_NCO. I could find no example in the OCI documentation on how to pass or receive as return value a nested value when using SQLT_NCO.
    Please help before I shoot myself.

    So the Nested table I quoted in the doc is not actually used to mean a table type below?
    create type t_resultsetdata as object (
    i int, d decimal, c varchar(10)
    create type t_nested_resultsetdata as table of t_resultsetdata;
    create function Blah return t_nested_resultsetdata  is . . .
    For this you are saying to use SQL_NTY and not SQL_NCO. Can you tell where this usage is documented, because ocidfn.h says
    #define SQLT_NTY  108                              
    /* named object type */
    #define SQLT_NCO  122 
    /* named collection type (varray or nested table) */
    Another question - Because of the original document I said I followed, I thought I could treat cursor and nested table similarly in the calling application, i.e. I could repeatedly do a fetch on the OCIStmt* which will be bound for nested table. Now from what you say I understand I can't really bind a OCIStmt* for nested table but have an object type. That means it will get all the data of that collection in one go, right? LIke I said, lack of examples is making this tough. I don't want to look into OCI source code, as that will be too much.

  • Explain the all type Table uses

    Hai,
    I got this information from one site, can any one give full details of each one and adventages over one anothers or related websites.
    There are seven types of tables in Oracle.
    Heap organized tables
    Index organized tables
    Clustered tables
    Hash clustered tablels
    Nested tables
    Temporary tables
    Object tables
    Required Information:
    Purpose of 7 types.
    how can we use these tables efficiently.
    Pros and cons for all tables.
    Regards,
    V.Karthik

    Well,
    You can search at http://asktom.oracle.com or read oracle docs.
    Jaffar

  • How to update multiple columns from different tables using cursor.

    Hi,
    i have two tables test1 and test2. i want to udpate the column(DEPT_DSCR) of both the tables TEST1 and TEST2 using select for update and current of...using cursor.
    I have a code written as follows :
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
         LOOP
              FETCH C1 INTO v_mydept1,v_mydept2;
              EXIT WHEN C1%NOTFOUND;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
         END LOOP;
         COMMIT;
    END;
    The above code when run says that it runs successfully. But it does not updates the desired columns[DEPT_DSCR].
    It only works when we want to update single or multiple columns of same table...i.e. by providing these columns after "FOR UPDATE OF"
    I am not sure what is the exact problem when we want to update multiple columns of different tables.
    Can anyone help me on this ?

    oops my mistake.....typo mistake...it should have been as follows --
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    Now here is the upated PL/SQL code where we are trying to update columns of different tables --
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO v_mydept1,v_mydept2;
    EXIT WHEN C1%NOTFOUND;
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    END LOOP;
    COMMIT;
    END;
    Please let us know why it is not updating by using using CURRENT OF

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • Loading data from one table to another using cursor

    Hi,
    I have given the below command to load the data from 1 table to another using cursor.
    declare
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';
    Begin
    for mycursor_1 IN mycursor loop
    insert into tmp_tab columns(col1,col2,col3,col5) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA);
    End loop;
    commit;
    end;
    It is working fine.
    But I want to hard code some of the columns ( like flags ) which are not there in 1st table and load them into 2nd table.
    In db2 we will give commands like
    varSqlStatus=`db2 "declare mycurs cursor for select extract_name,from_date,to_date,BETA,'N','Y' from temp_table"`
    varSqlStatus=`db2 "load from mycurs of cursor modified by identityignore insert into tmp_tab(col1,col2,col3,col5,col6,col7) nonrecoverable"`
    But I want it in oracle 10g, Can any one help me in this.

    Have you tried either of the two options :
    1. Modify the CURSOR itself :
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA,'N','Y' from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';2. Modify the INSERT statement itself :
    insert into tmp_tab columns(col1,col2,col3,col5,col6,col7) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA,'N','Y');

  • Problem with table-indexes when using select-options in select

    Hello experts,
    is it right that table-indexes will not be used if you take select-options to select data from the database?
    in detail:
    i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
    e.g.:    SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
    Now i startet the test with select-options
    e.g.:   SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA  AND keyb IN seltabB AND keyc IN seltabC.
    First of all i just filled the seltabs with only 1 value:    eg:  seltabA=      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'     etc.
    Everything worked fine. Every key of the index was used.
    But now, I putted more than one entries in the seltabs e.g.
    seltabA:      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '2'   
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '3'
    From now on, the indexed was not used completely (with all keys).
    Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
    Thanks a lot,
    Marcel

    Hi Hermann,
    i hope this helps:
    this is the first one, which uses the complete index:
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND    
      "STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
      "STATUS" = ? )  WITH UR                 
    RESULT: 5 IXSCAN /dbcon/01_con05 #key columns:  4
    And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns:  4):
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND        
      "KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR 
      "STATUS" = ? OR "STATUS" = ? )  WITH UR                                  
    and here the access-plan
       0 SELECT STATEMENT ( Estimated Costs =  5,139E+01 [timerons] )                                                                               
    5     1 RETURN                                                                               
    5     2 NLJOIN                                                                               
    5     3 [O] TBSCAN                                                                               
    5     4 SORT                                                                               
    5 TBSCAN GENROW                                                                               
    5     6 <i> FETCH /dbcon/01_con                                                                               
    7 IXSCAN /dbcon/01_con05 #key columns:  2   
    As you can see, only 2 keys were taken for indexed selection!
    Any idea?
    Kind regards,
    MArcel
    Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM

  • V-41 tcode error :Table 304 is not defined for use with condition type PR00

    Hi All,
    I am trying to create a BDC using the transaction V-41. 
    The first screen has fields:
    ConditionType and Table, where I have to fill values ZPM1 and 800 respectively.
    But as soon as I enter the tcode v-41 and say enter, the above mentioned fields are already having the  values 'PR00' and ' 304'. Normally if you take an example fo t-code VA02, all fields are blank.
    Then an error message  is displayed:
    Table 304 is not defined for use with condition type PR00
    This behaviour is not allowing me to use the BDC feature.
    Please advise me on why this is happening. What are the possible solutions I can use to clear these values programmatically?
    Can anything be done via customizing?
    Regards,
    Namita.

    Dear ILHAN ,
    Well the problem you are facing is having the following solution:
    Table 304 is not defined for use with condition type PR00
    Message no. VK024
    Diagnosis
    The selected condition type does not fit in the condition table, that is the basis for the condition record. Alternatively the selected condition type is not included in the condition types that were selected on the selection screen or that are defined in the variant of the standard selection report.
    Procedure
    Úse F4 help to choose a valid condition type.
    If this does not give you the required condition type, check in Customizing for condition types and the related access sequences.
    In the condition maintenance also check Customizing for the selection report (pricing report), that you have selected in the navigation tree, using the standard condition table as a reference.
    I hope this helps.
    It has worked for me.
    I gave it a try and what I am getting using the transaction V-41 is create Price condition (PR00) : Fast Entry.
    Please award points if you find it useful.
    Regards,
    Rakesh

Maybe you are looking for