How to write - Perform using variable changing tables

hi Gurus,
I am facing an issue while writing a perform statement in my code.
PERFORM get_pricing(zvbeln) USING nast-objky
                              CHANGING gt_komv
                                       gt_vbap
                                       gt_komp
                                       gt_komk.
in program zvbeln :-
FORM get_pricing  USING    p_nast_objky TYPE nast-objky
                  tables   p_gt_komv type table komv
                           p_gt_vbap type table vbapvb
                           p_gt_komp type table komp
                           p_gt_komk type table komk.
  BREAK-POINT.
  DATA: lv_vbeln TYPE vbak-vbeln.
  MOVE : p_nast_objky  TO lv_vbeln.
  CALL FUNCTION '/SAPHT/DRM_ORDER_PRC_READ'
    EXPORTING
      iv_vbeln = lv_vbeln
    TABLES
      et_komv  = p_gt_komv
      et_vbap  = p_gt_vbap
      et_komp  = p_gt_komp
      et_komk  = p_gt_komk.
ENDFORM.                    " GET_PRICING
But its giving an error . please let me know how i can solve this .

Hi,
Please incorporate these changes and try.
perform get_pricing(zvbeln) TABLES gt_komv gt_vbap gt_komp gt_komk
                                        USING nast-obky.
in program zvblen.
Form get_pricing TABLES p_gt_komv type table komv
                                       p_gt_vbap type table vbapvb
                                       p_gt_komp type table komp
                                       p_gt_komk type table komk
                          USING p_nast_objky TYPE nast-objky.
REST OF THE CODE SAME.
End form.
Note : Please check lv_vbeln after the move statement.
Hope this will help you.
Regards,
Smart Varghese

Similar Messages

  • In which case we require to write perform using/changing

    hi,
    in which case we require to write perform using/changing .
    and what is excatly we r doing  with perform using.changing.
    please somebody help me.
    thanks
    subhasis

    This is an awfully basic question.
    Simply press F1 on PERFORM.
    And responders take note:
    bapi
    Rob

  • How to write a pgm to change the existing encrypted password

    Hi all,
    can anybody tell me how to write a pgm to change the existing encrypted password.
    thanks in advance.

    Well, it's going to depend on how it's implemented in the current system.
    But basically it's going to look a lot like the current login actions. Presumably you have something that takes the user ID and password, encrypts the password, looks up the encrypted password in the database matching that user ID, and compares them. This functionality would also take a new password (preferably twice so they can be checked for consistency), and if the existing encrypted passwords match, it will encrypt the new password and put it in the database where the old one was.
    And if the application has a mechanism for new users to sign up, it'll look a lot like this as well.
    But I'm just guessing. This is all going to depend on how the existing functionality is written. Probably the best thing you can do is talk to a programmer at your organization who has worked on the application, and ask them for help.
    Hope this helps anyway.

  • How can I Improve the Performance using Global Temo Tables ??

    Hi,
    Can anyone tell me , How can i make use of Global Temporary Tables to improve the Performance.
    I have few sample scripts ,
    Say i have the View based on some Complex query like ,
    CREATE OR REPLACE VIEW Profile_values_view AS
    SELECT d.Profile_option_name, d.Profile_option_id, Profile_option_value,
    u.User_name, Level_id, Level_code
    FROM Profile_definitions d, Profile_values v, Profile_users u
    WHERE d.Profile_option_id = v.Profile_option_id
    AND ((Level_code = 'USER' AND Level_id = U.User_id) OR
    (Level_code = 'DEPARTMENT' AND Level_id = U.Department_id) OR
    (Level_code = 'SITE'))
    AND NOT EXISTS (SELECT 1 FROM PROFILE_VALUES P
    WHERE P.PROFILE_OPTION_ID = V.PROFILE_OPTION_ID
    AND ((Level_code = 'USER' AND
    level_id = u.User_id) OR
    (Level_code = 'DEPARTMENT' AND
    level_id = u.Department_id) OR
    (Level_code = 'SITE'))
    AND INSTR('USERDEPARTMENTSITE', v.Level_code) >
    INSTR('USERDEPARTMENTSITE', p.Level_code));
    Now i have created the Global temp Table as ,
    CREATE GLOBAL TEMPORARY TABLE Profile_values_temp
    Profile_option_name VARCHAR(60) NOT NULL,
    Profile_option_id NUMBER(4) NOT NULL,
    Profile_option_value VARCHAR2(20) NOT NULL,
    Level_code VARCHAR2(10) ,
    Level_id NUMBER(4) ,
    CONSTRAINT Profile_values_temp_pk
    PRIMARY KEY (Profile_option_id)
    ) ON COMMIT PRESERVE ROWS ORGANIZATION INDEX;
    Now I am Inserting the Records into Temp table as
    INSERT INTO Profile_values_temp
    (Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id)
    SELECT Profile_option_name, Profile_option_id, Profile_option_value,
    Level_code, Level_id
    FROM Profile_values_view;
    COMMIT;
    Now what my doubt is, when do i need to execute the Insert Statement.
    Say , if the View returns few millions of records , then loading such a data into Global Temporary table takes lot of time.
    Then what is the use of Global Temporary tables and how can i improve the Performance using the same.
    Raj

    Thanks for the responce ,
    There are 2 to 3 complex views in our database, and there always be more than 5000+ users will be workinf on the application and is OLTP application. Those complex views are killing the application performance.
    I what i felt was, if i create the Global Temporary tables for thow views and will be able to load the one third million of records returned by the views in to cache and can improve the application performance.
    I have created the Global Temporary tables for 2 views with the option On Commit Preserve , But after am inserting the records into the Temp table and when i Issue the commit statement, the Temp table is getting Cleared.
    I really got surpised of this behaviour as i know that with the Option On Commit Preserve , the rows should retain in the Temp Table, Instead , it's getting cleared.
    Pelase suggest , what to do ??
    Raj

  • How to write two triggers on same table how it works?

    Hello sir..
    I have to write two triggers on same table for auditing different columns of different pages (may be different modules).
    I will have an audit table in which i will insert data such as (user_id,module_id,column_name,old_col_val,new_col_ val,timestamp)
    Now different users from different pages will update the data on same table may be same columns!
    If we write directly, we will not be able to know which column is updated from different pages.
    My question is how can we control the triggers to raise based on the pages

    A trigger is executed whenever the table is inserted / updated / deleted (depend on trigger definition). It won't know what 'page' caused the operation. You can prepare a trigger for one page.
    In order to fulfill your need, you need some way to tell the trigger where you are. There are many ways to accomplish this. Some possible methods are (please check the documents for detail)
    DBMS_SESSION.SET_IDENTIFIER
    DBMS_APPLICATION_INFO.SET_MODULEFor example, you can call DBMS_SESSION.SET_IDENTIFIER to set an ID from your page, and then call sys_context to read the ID back:
    In Page:
    exec dbms_session.set_identifier('Page1');
    ...In Trigger
    pageid  := sys_context('USERENV', 'CLIENT_IDENTIFIER') ;
    ...Note that if you use a connection pool, you may need to properly reset the session information before return, in order to avoid messing up the session information when the connection is used next time.

  • How many primary keys use in one table

    Hi,
    Please help me. Maximum How many primary keys use with in one table
    Regards,
    Sunil Kumar.T

    Hi,
    For my knowledge, It depends on the Database & version u r working.. Right..
    This is a sample description what I seen for a Database...
    Technical Specification of SAP DB Version 7.4
    Description                            Maximum Value
    Database size                    32 TB (with 8 KB page size)
    Number of files/volumes per database64...4096, specified by a configuration parameter
    File/volume size (data)      518 ...8 GB (dependent on operating system limitations)
    File/volume size (log)1      6 TB (dependent on operating system limitations)
    SQL statement length>=  16 KB (Default value 64 KB, specified by a system variable)
    SQL character string lengthSpecified by a system variable
    Identifier length                32 characters
    Numeric precision              38 places
    Number of tables unlimited
    Number of columns per table (with KEY)  1024
    Number of columns per table (without KEY)  1023
    Number of primary key columns per table  512
    Number of columns in an index  16
    Reward Points if useful

  • Using variables in table constaraints

    Hi,
    I am facing problem in using global variables in table constraints. It is giving error "911 : 42000 : java.sql.SQLException: ORA-00911: invalid character".Since I was not able to use project variable s,I have used global variables.
    following is the code
    insert into DEV_TGT.E$_TEST_TGT
         ERR_TYPE,
         ERR_MESS,
         CHECK_DATE,
         ORIGIN,
         CONS_NAME,
         CONS_TYPE,
         C1,
         C2
    select
         'F',
         sysdate,
         '(161666)TEST_2.TEST_TO_TETS_TGT',
         'CHK',
         'CK',     
         C1,
         C2
    from     DEV_TGT.I$_TEST_TGT TEST_TGT
    where     not      (
              TEST_TGT.C1=#GLOBAL.V_LOAD_ID
              )

    Hi,
    Did you refreshed or Assigned that variable before using in interface ?
    Flow :-
    Assgin/Refresh Variable -> interface (with contrsaint using variable)
    Also,
    If constarint is not an integer please use quotes ( '#GLOBAL.V_LOAD_ID' )
    Regards,
    Rathish
    Edited by: Rathish on Sep 24, 2009 5:44 PM

  • Using variables as table names. Ideas for alternative designs

    Hi,
    I am designing an application which uses synonyms to pull information from 'client' DBs via DB Links. The synonyms are created with a DB_ID in the name (example: CUSTOMER_100, CUSTOMER_200... where 100 and 200 are DB IDs from 2 separate client DBs.
    I have a procedure which selects data from the synonym based on what DB_ID is passed to the procedure. I want to be able to run this one procedure for any DB_ID that is entered. I am now aware I cannot use variable names for table names and using EXECUTE IMMEDIATE doesnt seem to fit for what I am trying to do.
    Does anybody have any suggestions or re-design options I could use to achieve this generic procedure that will select from a certain synonym based on the DB info input parameters? Thanks.
    CREATE OR REPLACE PROCEDURE CUSTOMER_TEST(p_host IN VARCHAR2, p_db_name IN VARCHAR2, p_schema IN VARCHAR)
    IS
       v_hostname     VARCHAR2 (50) := UPPER (p_host);
       v_instance     VARCHAR2 (50) := UPPER (p_db_name);
       v_schema     VARCHAR2 (50) := UPPER (p_schema);
       v_db_id  NUMBER;  
       v_synonym VARCHAR2(50);
       CURSOR insert_customer
       IS
         SELECT 
           c.customer_fname,
           c.customer_lname
         FROM v_synonym_name c;
    BEGIN
    -- GET DB_ID BASED ON INPUT PARAMETERS       
      select d.db_id
      into v_db_id
      from  t_mv_db_accounts ac,
      t_mv_db_instances i,
       t_mv_dbs d,
       t_mv_hosts h
      where ac.db_ID = d.db_ID
      and i.db_ID = d.db_ID
      and i.HOST_ID = h.host_id
      and upper(H.HOST_NAME) = v_hostname
      and upper(D.DB_NAME) = v_instance
      and upper(Ac.ACCOUNT_NAME) = v_schema;
      --APPEND DB_ID TO THE SYNOYNM NAME
      v_synonym := 'CUSTOMER_'||v_db_id;
      FOR cust_rec IN insert_customer
      LOOP
         INSERT INTO CUSTOMER_RESULTS (First_Name, Last_Name)
         VALUES (cust_rec.customer_fname, cust_rec.customer_lname);
      END LOOP;
      COMMIT;
    END;
    Rgs,
    Rob

    Hi
    rules engine style with table that holds the logic or code SQL directly in the procedure and IF THEN ELSE with db_id. Latter is better because SQL is native and objects are checked every time procedure is compiled.
    James showed the simplest way but this rather complex way gives you more flexibility between instances if ever needed.
    CREATE TABLE synonym_dml(db_id number not null primary key, sql_text clob)
    INSERT INTO synonym_dml VALUES (100, 'INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer100')
    INSERT INTO synonym_dml VALUES (200, 'INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer200')
    set serveroutput on size unlimited
    create or replace
    PROCEDURE Execute_Synonym_Dml(p_host VARCHAR2, p_db_name VARCHAR2, p_schema VARCHAR) IS
    BEGIN
      FOR r IN (
        SELECT sql_text FROM synonym_dml
        --  WHERE db_id IN (
        --    SELECT d.db_id
        --    FROM t_mv_db_accounts ac, t_mv_db_instances i, t_mv_dbs d, t_mv_hosts h
        --    WHERE ac.db_id = d.db_id
        --      AND i.db_id = d.db_id
        --      AND i.host_id = h.host_id
        --      AND upper(h.host_name)      = p_hostname
        --      AND upper(d.db_name)        = p_instance
        --      AND upper(ac.account_name)  = p_schema
      LOOP
        DBMS_OUTPUT.PUT_LINE('-- executing immediately ' || r.sql_text);
        --EXECUTE IMMEDIATE r.sql_text;
      END LOOP;
    END;
    create or replace
    PROCEDURE Execute_Synonym_Dml_Too(p_host VARCHAR2, p_db_name VARCHAR2, p_schema VARCHAR) IS
      PROCEDURE DB_ID_100 IS
      BEGIN
        DBMS_OUTPUT.PUT_LINE('-- executing DB_ID_100');
        --INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer100;
      END;
      PROCEDURE DB_ID_200 IS
      BEGIN
        DBMS_OUTPUT.PUT_LINE('-- executing DB_ID_200');
        --INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer200;
      END;
    BEGIN
      FOR r IN (
        SELECT 100 db_id FROM dual
        --  SELECT d.db_id
        --  FROM t_mv_db_accounts ac, t_mv_db_instances i, t_mv_dbs d, t_mv_hosts h
        --  WHERE ac.db_id = d.db_id
        --    AND i.db_id = d.db_id
        --    AND i.host_id = h.host_id
        --    AND upper(h.host_name)      = p_hostname
        --    AND upper(d.db_name)        = p_instance
        --    AND upper(ac.account_name)  = p_schema
      LOOP
        IF (r.db_id = 100) THEN
          DB_ID_100;
        ELSIF (r.db_id = 200) THEN
          DB_ID_200;
        ELSE
          RAISE_APPLICATION_ERROR(-20001, 'Unknown DB_ID ' || r.db_id);
        END IF;
      END LOOP;
    END;
    EXECUTE Execute_Synonym_Dml('demo','demo','demo');
    EXECUTE Execute_Synonym_Dml_Too('demo','demo','demo');
    DROP TABLE synonym_dml PURGE
    DROP PROCEDURE Execute_Synonym_Dml
    table SYNONYM_DML created.
    1 rows inserted.
    1 rows inserted.
    PROCEDURE EXECUTE_SYNONYM_DML compiled
    PROCEDURE EXECUTE_SYNONYM_DML_TOO compiled
    anonymous block completed
    -- executing immediately INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer100
    -- executing immediately INSERT INTO customer_results (first_name, last_name) SELECT customer_fname,customer_lname FROM customer200
    anonymous block completed
    -- executing DB_ID_100
    table SYNONYM_DML dropped.
    procedure EXECUTE_SYNONYM_DML dropped.

  • How to find memory used by page tables

    Is there a way to find out how much memory is currently being used by page tables? I am new to Solaris ;-)
    I want to quantify the advantages of Intimate Shared Memory (in the context of a large Oracle database with lots of concurrent users). I want to contrast this against Linux which does not have a method of allowing different processes to share page tables that map onto shared memory. Thus, with a large number of concurrent connections where each connection creates a new process that maps onto the Oracle shared memory, a significant amount of memory can be consumed just by the page table entries.

    Yes, a very recent acquisition :-) ......I'm busy working my way through it, just taught myself about mdb today but I still can't figure how to get the amount of memory being used by page tables only. The dcmd ::memstat can give me the total amount of memory being used by the kernel but I would like some more detail than that.
    On Linux you can simply look at /proc/meminfo and it contains a wealth of information. I was hoping Solaris would be similar....but isn't that always the case when doing something new? We hope it's like what we already know :-) Below is an example from Linux showing that 1860 kB have been to store page table entries.
    [root@makalu ~]# cat /proc/meminfo | grep PageTables
    PageTables: 1860 kB
    [root@makalu ~]#
    Edited by: BrettSchroeder on Mar 12, 2008 1:37 PM

  • How to improve performance using bulk collects with plsql tables or arrays

    Hi All,
    my procedure is like this
    declare
    cursor c1 is select ----------------------
    begin
    assigning to variables
    validations on that variables
    --50 validations are here --
    insert into a table
    end;
    we have created indexes on primary keys,
    i want to use
    DECLARE
    CURSOR a_cur IS
    SELECT program_id
    FROM airplanes;
    TYPE myarray IS TABLE OF a_cur%ROWTYPE;
    cur_array myarray;
    BEGIN
    OPEN a_cur;
    LOOP
    FETCH a_cur BULK COLLECT INTO cur_array LIMIT 100;
    ***---------can i assign cursor data to the plsql table variables or array***
    ***validate on the pl sql variable as---***
    i
    nsert into a table
    EXIT WHEN a_cur%NOTFOUND;
    END LOOP;
    CLOSE a_cur;
    END;
    Edited by: Veekay on Oct 21, 2011 4:28 AM

    Fastest way often is this:
    insert /*+append */
    into aTable
    select * from airplanes;
    commit;The select and insert part can even be done in parallel if needed.
    However if the oparation is complex or the dataset is very very very very very large or the programmer is decent but not excellent then the bulk approach should be considered. It is often a pretty stable and linear scaling approach.
    The solution depends a little on the database version.
    LOOP
      FETCH a_cur BULK COLLECT INTO cur_array LIMIT 100;
      EXIT WHEN a_cur.count = 0;
      forall i in a_cur.first.. a_cur.last
      insert into aTable (id)
      values (a_cur(i));
    END LOOP;
    ...If you have more then one column then you might need a single collection for each column. Other possibilities depend on the db version.
    Also: do not exit using a_cur%NOTFOUND. This is wrong! You might loose records from the end of the data set.

  • How to write SDO_GEOMETRY using PreparedStatements ?

    Hi there,
    I use JDBC and JDK 1.3+
    Currently I'm writing geometries into Spatial by using Strings and
    I meet some limitations for very huge geometries.
    That's why I need to use PreparedStatements and parameters to get
    rid of this limitation.
    My question is how can I write Object types by using JDBC. All
    the sample codes I found use oracle.sql and oracle.jdbc packages.
    My problem is that my code can be used by people that may not
    have an Oracle jdbc driver like "thin" for instance.
    thanks for your help,
    ALI

    Justin,
    I have a PL/SQL package that contains several functions. One of them does selection and filtering of spatial features based on a user's location and preferences. For this purpose a web-application runs this function.
    I would like this function to do the following:
    1. the function is called, user parameters are passed in
    2. a call to a java-stored-procedure is made. This java procedure creates a polygon based on the user's location and preferences.
    3. the polygon is returned to the PL/SQL function
    4. the funtion uses the returned polygon to query spatial features that intersect, etc.
    I can do the call to the java-stored-procedure but where I get stuck is how to get the polygon from java to pl/sql. I can return a String or a number from java but how can I return the polygon (e.g., STRUCT, java object)?
    The current solution uses a work-around by storing the polygon in a temporary table. I would like to change this because once the function has run, the polygon is not needed anymore so I would like to do without having to store the polygon.
    Markus

  • How to write rfc when value change in the screen (browser) in webdynpro.

    Hi,
    I want to know how can i write an RFC when screen value change in webdynpro. I already designed a rfc where all the value can be seen in the webdypro screen. Now when user change the value how can i pick the changed value in R/3 so that i can save it into the respective database.  Please send some code for understanding it easily as i am new to this field.
    Regards
    Deep

    Hi Deepak,
    Though I dint understand your requirment properly but as it is raised in Web Dynpro forum I considering that you want to send the data filled by the user to your backend using RFC calls. For this purpose you can refer to this two documents available on SDN.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20a%20web%20dynpro%20application%20accessing%20abap%20functions.pdf">Tutorial 4</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c">Tutorial 5</a>
    Regards
    Sid

  • How to find modules using a specific table in Designer 10g?

    Hi, we are in a conversion traject from Designer 6.0 to Designer 10g with patchset 10.1.2.5.
    Apart from a conversion problem for which we got a workaround (see bug number 8453702) it looks ok now.
    But with functional testing I found something strange:
    - in Des10g, when you look at the usages of a table, you do not see the "Used in Module Components" part anymore. That is pretty annoying. Now I found a way to show something with aid of the matrix diagrammer, but i'm not very happy with it.
    My questions:
    - How come this has changed? and
    - is there another way to quickly view these usages, or are we stuck with this?
    Regards, Paul.

    Hello
    Go to the repository object navigator. Go to the table definitions --> usages --> Used in sql query sets
    Regards Erik

  • How to write a procedure with the table name as an argument

    I'm very new to Oracle, usually developing in SQL server.
    I would like to write a procedure that accepts a table name and then does a
    SELECT * FROM [table name] order by CollectionDate.
    In SQL I would build up a varchar variable and then execute it.
    Thanks

    I often wonder why so many people new to Oracle want to do this as a first step, when most people who know what they are doing try and avoid it.
    SQL> create or replace function f (p_tab varchar2)
      2  return sys_refcursor as
      3    c sys_refcursor;
      4  begin
      5    open c for
      6      'select * from ' || p_tab || ' order by hiredate';
      7    return c;
      8  end;
      9  /
    Function created.
    SQL> var c refcursor
    SQL> exec :c := f('emp')
    PL/SQL procedure successfully completed.
    SQL> print c
    EMPNO ENAME      JOB          MGR HIREDATE      SAL   COMM DEPTNO
      7369 SMITH      CLERK       7902 12/17/1980    800            20
      7499 ALLEN      SALESMAN    7698 02/20/1981   1600    300     30
      7521 WARD       SALESMAN    7698 02/22/1981   1250    500     30
      7566 JONES      MANAGER     7839 04/02/1981   2975            20
      7698 BLAKE      MANAGER     7839 05/01/1981   2850            30
      7782 CLARK      MANAGER     7839 06/09/1981   2450            10
      7844 TURNER     SALESMAN    7698 09/08/1981   1500      0     30
      7654 MARTIN     SALESMAN    7698 09/28/1981   1250   1400     30
      7839 KING       PRESIDENT        11/17/1981   5000            10
      7900 JAMES      CLERK       7698 12/03/1981    950            30
      7902 FORD       ANALYST     7566 12/03/1981   3000            20
      7934 MILLER     CLERK       7782 01/23/1982   1300            10
      7788 SCOTT      ANALYST     7566 12/09/1982   3000            20
      7876 ADAMS      CLERK       7788 01/12/1983   1100            20
    14 rows selected.
    SQL>Note if you pass in a value to be used in the where clause like deptno, you should not use this technique, but use bind variables intead like this -
    Wrote file afiedt.sql
      1  create or replace function f (p_tab varchar2, p_deptno number)
      2  return sys_refcursor as
      3    c sys_refcursor;
      4  begin
      5    open c for
      6      'select * from ' || p_tab
      7        || ' where deptno = :p_deptno order by hiredate'
      8        using p_deptno;
      9    return c;
    10* end;
    SQL> /
    Function created.
    SQL> exec :c := f('emp', 10)
    PL/SQL procedure successfully completed.
    SQL> print c
    EMPNO ENAME      JOB          MGR HIREDATE      SAL   COMM DEPTNO
      7782 CLARK      MANAGER     7839 06/09/1981   2450            10
      7839 KING       PRESIDENT        11/17/1981   5000            10
      7934 MILLER     CLERK       7782 01/23/1982   1300            10
    SQL>

  • Using variable as table name in pl/sql query - Is possible?

    I am relatively new to PL/SQL and I am trying to create a function that accepts a table name and a rowid as arguments and returns a comma-delimited record string of the values of the table/rowid being passed. The problem is , I cannot code a select stmt as follows
    SELECT * FROM v_table_name
    WHERE rowid = v_row_id
    in PL/SQL. There must be a easy way to approach this.
    Thanks for any and all advice.
    GC

    I don't understand the use of the concat symbol along with the commas and field namesYou just need (if you really need it) to create variable which contains you column separated by comma:
    Simple example (in the second case separate variables are used to create
    the list of columns):
    SQL> declare
      2   rc sys_refcursor;
      3   cols varchar2(200) := 'ename, empno, sal';
      4   tab varchar2(30) := 'emp';
      5  begin
      6   open rc for 'select ' || cols || ' from ' || tab;
      7   close rc;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2   rc sys_refcursor;
      3 
      4   ename_col varchar2(10) := 'ename';
      5 
      6   empno_col varchar2(10) := 'empno';
      7 
      8   sal_col varchar2(10) := 'sal';
      9 
    10   tab varchar2(30) := 'emp';
    11 
    12  begin
    13 
    14   open rc for 'select ' || ename_col || ',' || empno_col || ',' || sal_col ||
    15   ' from ' || tab;
    16 
    17   close rc;
    18  end;
    19  /
    PL/SQL procedure successfully completed.Rgds.

Maybe you are looking for

  • Save For Web transparency problem: Overprint & CMYK documents

    OK, I had a weird problem crop up today (as far as I can tell) completely out of the blue. When I am working in overprint preview mode in a CMYK document, and I attempt to save an artboard as a PNG w/ transparency (via Save for Web), illustrator forc

  • Something wrong with one of my methods

    Hi, im having a little trouble, I have a list of companies which I am storing in an arraylist an this is method below is simply suppose to display how many companies are in each state. Now, as long as I have the try/catch wrapped around the while loo

  • Where is perf.zip

    Where can I get the performance test code mention in this doc http://www.oracle.com/technetwork/database/berkeleydb/berkeley-db-perf-128909.pdf Its not here http://www.oracle.com/technetwork/middleware/ias/perf-129688.zip or here http://www.oracle.co

  • IIOP NullPointer Exceptions

    I'm getting the following exception logged by my WebLogic server 6.1, running on Sun Solaris 2.6. It is intermittent and doesn't seem to be causing problems but I wondered if anyone else had encountered this or knew what may be causing it. We tried a

  • Integration with Motorola T505 bluetooth/RF adapter

    I never had a problem using phones and ipod's (using a bluetooth adapter) with my Motorola adapter but for some reason I just can't get it to work right with my new 3GS (my first iPhone). I can't voice dial with it but I CAN dial from the phone and h