SELECT Query in a Procedure

how do I create a procedure for a SELECT query like the following? When I create a procedure; I get an error "
Error(80,1): PLS-00428: an INTO clause is expected in this SELECT statement"
PROCEDURE  MyProc
IS
BEGIN
select 'Dakota' as ALIAS
      ,A.StartDate
      ,B.EndDate
from Customer A
    ,Clients b
where  a.cType = b.cType
and b.Active =0
ORDER BY StartDate, EndDate
END  MyProc;

I get an error:
Error(4,29): PLS-00103: Encountered the symbol "SYS_REFCURSOR" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "SYS_REFCURSOR" to continue. 
Package:
PROCEDURE  MyProc(c out OUT SYS_REFCURSOR)
Package Body:
PROCEDURE  MyProc(c out OUT SYS_REFCURSOR)
IS
BEGIN
  open c for
            select 'Dakota' as ALIAS
                        ,A.StartDate
                        ,B.EndDate
            from Customer A,Clients b
            where  a.cType = b.cType
                 and b.Active =0
            ORDER BY StartDate, EndDate;
END  MyProc;

Similar Messages

  • Call the Function against a select query in 500 procedures...

    Hello Gurus,
    I have a scenario, where i had made one function(UDF Function) to calculate something and in every procedure i call that function and calculate my requirement.
    Yesterday, i made a select query using reg exp for the same calculation..
    So my question is, what should be the proper approach..
    I need to implement this on 500 procedures...
    And the UDF function is
    CREATE OR REPLACE FUNCTION "UDF_TEXTSPLIT" (
    p_list VARCHAR2,
    p_del VARCHAR2 := ','
    ) RETURN split_tbl pipelined
    IS
    l_idx PLS_INTEGER;
    l_list VARCHAR2(7999) ;
    l_value VARCHAR2(7999);
    BEGIN
    l_list := p_list;
    LOOP
    l_idx := INSTR(l_list,p_del);
    IF l_idx > 0 THEN
    pipe ROW(SUBSTR(l_list,1,l_idx-1));
    l_list := SUBSTR(l_list,l_idx+LENGTH(p_del));
    ELSE
    pipe ROW(l_list);
    EXIT;
    END IF;
    END LOOP;
    RETURN;
    END Udf_Textsplit;
    I have made this query:
    SELECT a.b,z. b1 FROM
    (SELECT ROWNUM d,REGEXP_SUBSTR(str1, '[^> ]+', 1, LEVEL) b
    FROM (SELECT 'xxx>zzz>gg' str1 FROM dual)
    CONNECT BY REGEXP_SUBSTR(str1, '[^> ]+', 1, LEVEL) IS NOT NULL)a,
    (SELECT ROWNUM d,REGEXP_SUBSTR(str1, '[^> ]+', 1, LEVEL) b1
    FROM (SELECT '100>500>20' str1 FROM dual)
    CONNECT BY REGEXP_SUBSTR(str1, '[^> ]+', 1, LEVEL) IS NOT NULL)z
    WHERE a.d=z.d
    Do i use the same select query in all 500 procedures or call the (UDF Function) in every procedure..
    So which will be faster...
    Your approach would be very much appreciated...
    Thanks,
    Haraprasad...

    Hmm, do I edit 500 procedures to replace a function call with a SQL statement, or edit 1 function to use a sql statement instead of the current algorithm?
    This is why we use code modules that do one thing and do it well. As long as the new version of the function takes the same arguments and returns the same results as the old, then the callers will never know that the way the function works has changed.
    Whenther you put the select statement in 500 procedures, or 1 function, there will still be a context switch every time you use it. The tiny additional overhead of calling a function before the context switch would be unnoticeable.
    John

  • SELECT QUERY USING STORED PROCEDURE

    Hi,
    I am using stored procedure in package, i need to execute select statement using
    stored procedure.
    regards,
    p.kumaran

    ? not framed properly i think so if u dnt mind plz check it out once
    if u wnt to invoke a proc from package 2 ways r there
    1) execute pac_name.proc_name[(arg_list)];
    2) pl/sql
    [declare]
    begin
    pac_name.proc_name[(arg_list)];
    end;
    /

  • How to get result of select query from  oracle  in VC

    Dear All ,
    I have a application in oracle which insert the data in the oracle database table.
    Now i want to show all the data that has been inserted into the database table in my VC application but i don't know how to handle select query in VC.
    Regards
    Krishan

    Hi Goivndu
    Thanks for your reply .
    I know all those things.
    I have created the system & alias  for my backend oracle system.
    I can also see all the stored procedure that are there in my oracle system.
    I just want to know how to write a select query in a stored procedure .
    you can insert data , Update data through oracle procedure but i don't think there is any way to get the result of select query in stored procedure .
    If you know any way to do that please do let me know .
    Regards
    Krishan

  • Can we get data return from stored procedure in a select query ?

    Hello,
    Suppose i have a function GetSum(x,y) that returns sum of two numbers x and y .We can call this function from within a sql function like this :
    select GetSum(4,5) SUM from dual;But is this possible through a stored procedure ? i.e., can i call a stored procedure from within a select query like i have done in above code ?

    Hi,
    bootstrap wrote:
    Hello,
    Suppose i have a function GetSum(x,y) that returns sum of two numbers x and y .We can call this function from within a sql function like this :
    select GetSum(4,5) SUM from dual;But is this possible through a stored procedure ? i.e., can i call a stored procedure from within a select query like i have done in above code ?The short answer has already been given.
    Why can't you use a function?
    Suppose you could use a procedure. What results would you want to see from:
    SELECT  my_proc (4, 5)
    FROM    dual
    ;? Why?
    Explain what you want to do, and somebody will help you find a good way to do it.

  • Ora-04044 error on a Select . . . Into query in a procedure in an Form

    Hi,
    I am getting the following error upon the execution of any select . . . into query in my procedure.
    Ora-04044 procedure, function, package or type is not allow here.
    I am using an Oracle 10g database on Linux with a client/server configuration of Forms 6i.
    Here is the code snippet that is erroring:
    procedure validate_area is
    begin
    if :ib.area_id is not null then
    declare
    s_ds_type varchar2(1);
    begin
    select building, ds_id, ds_allow_issue, ds_emp_id, latitude, longitude, map_num, room, loc_descr, n_area_code, ds_type
    into :ib.building, :ib.ds_id, :ib.allow_issue, :ib.rpt_emp_id, :ib.latitude, :ib.longitude, :ib.map_num, :ib.room, :ib.loc_descr, :n_area_code, s_ds_type
    from area, dosi_subj
    where area.area_id = :ib.area_id and area.ds_id = dosi_subj.id;
    ... more code ....
    end;
    end if;
    end validate_area;
    It is on this select . . . into statement that the above error was thrown.
    Any ideas?

    Ernie,
    Please check all the tables and columns involved in that query if there is a function, package or procedure with that same name.
    I tried myself, but everything seems fine. I included an example of an ORA-04044 at the end, however.
    SQL> create table area
      2  as
      3  select 1 area_id, 1 ds_id from dual
      4  /
    Tabel is aangemaakt.
    SQL> create table dosi_subj
      2  as
      3  select 1 id, 1 building, 1 ds_allow_issue, 1 ds_emp_id, 1 latitude, 1 longitude, 1 map_num
      4       , 1 room, 'z' loc_descr, 'A' n_area_code, 'A' ds_type
      5    from dual
      6  /
    Tabel is aangemaakt.
    SQL> select building, ds_id, ds_allow_issue, ds_emp_id, latitude, longitude, map_num, room, loc_descr, n_area_code, ds_type
      2  from area, dosi_subj
      3  where area.area_id = 1 and area.ds_id = dosi_subj.id
      4  /
      BUILDING      DS_ID DS_ALLOW_ISSUE  DS_EMP_ID   LATITUDE  LONGITUDE    MAP_NUM       ROOM L N D
             1          1              1          1          1          1          1          1 z A A
    1 rij is geselecteerd.
    SQL> create procedure validate_area is
      2    l_ib_building    dosi_subj.building%type;
      3    l_ib_ds_id       area.ds_id%type;
      4    l_ib_allow_issue dosi_subj.ds_allow_issue%type;
      5    l_ib_rpt_emp_id  dosi_subj.ds_emp_id%type;
      6    l_ib_latitude    dosi_subj.latitude%type;
      7    l_ib_longitude   dosi_subj.longitude%type;
      8    l_ib_map_num     dosi_subj.map_num%type;
      9    l_ib_room        dosi_subj.room%type;
    10    l_ib_loc_descr   dosi_subj.loc_descr%type;
    11    l_n_area_code    dosi_subj.n_area_code%type;
    12    c_area_id        number := 1;
    13  begin
    14  if 1 is not null then
    15
    16  declare
    17
    18  s_ds_type varchar2(1);
    19
    20  cursor c1 (c_area_id NUMBER) is
    21  select building, ds_id, ds_allow_issue, ds_emp_id, latitude, longitude, map_num, room, loc_descr, n_area_code, ds_type
    22  from area, dosi_subj
    23  where area.area_id = c_area_id and area.ds_id = dosi_subj.id;
    24
    25  begin
    26  dbms_output.put_line('open c1 cursor to retrieve data');
    27  open c1(1); --code errors when opening the cursor
    28
    29  dbms_output.put_line('fetch area data variables');
    30  fetch c1 into l_ib_building, l_ib_ds_id, l_ib_allow_issue, l_ib_rpt_emp_id, l_ib_latitude, l_ib_longitude, l_ib_map_num
    31  , l_ib_room, l_ib_loc_descr, l_n_area_code, s_ds_type;
    32  dbms_output.put_line('area data has been fetched');
    33  end;
    34  end if;
    35
    36  end validate_area;
    37  /
    Procedure is aangemaakt.
    SQL> exec validate_area
    open c1 cursor to retrieve data
    fetch area data variables
    area data has been fetched
    PL/SQL-procedure is geslaagd.
    SQL> drop table area
      2  /
    Tabel is verwijderd.
    SQL> create procedure area is begin null; end;
      2  /
    Procedure is aangemaakt.
    SQL> select building,ds_emp_id
      2    from dosi_subj, area
      3  /
      from dosi_subj, area
    FOUT in regel 2:
    .ORA-04044: procedure, function, package, or type is not allowed hereRegards,
    Rob.

  • SELECT query from within a stored procedure

    DB Version:10gR2
    For auditing purpose, i just want to execute the query within the IF condition, and get the results for spooling. But i am getting PLS-00428 error. Can't i just execute a SELECT query and get its results displayed in SQLPLUS so that i can spool them?
    SQL> create or replace procedure ship_dtl_aud
      2  is
      3  v_exists number;
      4 
      5  begin
      6  
      7  Select count(1) into v_exists
      8  From ship_dtl
      9  WHERE track_code = 10
    10  AND mod_date_time < SYSDATE - 1/(24*60);
    11 
    12   if v_exists>0
    13   then
    14            select s.username,s.sid, s.serial#, s.terminal,p.spid
    15   from v$session s, v$process p
    16   where s.paddr = p.addr and s.sid in (select SESSION_ID from V$LOCKED_OBJECT);
    17 
    18          end if; 
    19  end;
    20  /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE ship_dtl_aud:
    LINE/COL ERROR
    14/11    PLS-00428: an INTO clause is expected in this SELECT statement

    Within PL/SQL code, the results of a query have to be returned from the SQL engine to the PL/SQL engine, hence why it is asking you to include an INTO within your query. Note that the PL/SQL engine is running on the database server so it has no interface to display output to. To output from within PL/SQL you would have to write the data out yourself to whatever output you want e.g. use DBMS_OUTPUT to put the data to the standard output buffer (which can then be read by SQL*Plus if serveroutput is set to "on") or written out to a file on the server, or written out to a table.
    You are assuming that because you can execute SQL from SQL*Plus and spool the output, you can do the same within PL/SQL. This is not the case. When SQL*Plus issues a SQL statement, it goes to the SQL engine and the results of that cursor (as an SQL query is a cursor) are collected by SQL*Plus and it displays them itself. When PL/SQL issues a SQL statement, it goes to the SQL engine and the results of that cursor come back to PL/SQL. PL/SQL doesn't have a display mechanism, so the results have to be collected INTO something.
    Hope that's clear.

  • Design a procedure which returns a result set of a select Query

    Hi...
    Can some one help me out with a brief design or work around for creating a stored procedure which runs a select Query and Returns a result set...
    If not a stored procedure, at least a function which makes the job simple....
    Awaiting help in this regard ........

    Hi...
    I am sorry for providing insufficient Info...
    Actually I am using Oracle 10G DB...
    I have a select Query..
    Since I am a part of team which is building a Complete Data Driven site, Even an SQL Query and a PL/SQL function body was stored in the Table itself to bring in some kind of Dynamism in the site.... But the master table was loaded with a lot of data and hence Now we decided to Store everythin in a generic package..
    I used REF CURSORS to store a result set of a simple SELECT Query.... and declaring it as an out parameter in my Procedure body so that the JAVA team can directly access the Procedure from the JAVA layer....
    Now I want to know can I do anything more efficient to carry out the above operation....

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How to optimize the select query that is executed in a cursor for loop?

    Hi Friends,
    I have executed the code below and clocked the times for every line of the code using DBMS_PROFILER.
    CREATE OR REPLACE PROCEDURE TEST
    AS
       p_file_id              NUMBER                                   := 151;
       v_shipper_ind          ah_item.shipper_ind%TYPE;
       v_sales_reserve_ind    ah_item.special_sales_reserve_ind%TYPE;
       v_location_indicator   ah_item.exe_location_ind%TYPE;
       CURSOR activity_c
       IS
          SELECT *
            FROM ah_activity_internal
           WHERE status_id = 30
             AND file_id = p_file_id;
    BEGIN
       DBMS_PROFILER.start_profiler ('TEST');
       FOR rec IN activity_c
       LOOP
          SELECT DISTINCT shipper_ind, special_sales_reserve_ind, exe_location_ind
                     INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
                     FROM ah_item --464000 rows in this table
                    WHERE item_id_edw IN (
                             SELECT item_id_edw
                               FROM ah_item_xref --700000 rows in this table
                              WHERE item_code_cust = rec.item_code_cust
                                AND facility_num IN (
                                       SELECT facility_code
                                         FROM ah_chain_div_facility --17 rows in this table
                                        WHERE chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                                          AND div_id = (SELECT div_id
                                                          FROM ah_div --8 rows in this table
                                                         WHERE division = rec.division)));
       END LOOP;
       DBMS_PROFILER.stop_profiler;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          NULL;
       WHEN TOO_MANY_ROWS
       THEN
          NULL;
    END TEST;The SELECT query inside the cursor FOR LOOP took 773 seconds.
    I have tried using BULK COLLECT instead of cursor for loop but it did not help.
    When I took out the select query separately and executed with a sample value then it gave the results in a flash of second.
    All the tables have primary key indexes.
    Any ideas what can be done to make this code perform better?
    Thanks,
    Raj.

    As suggested I'd try merging the queries into a single SQL. You could also rewrite your IN clauses as JOINs and see if that helps, e.g.
    SELECT DISTINCT ai.shipper_ind, ai.special_sales_reserve_ind, ai.exe_location_ind
               INTO v_shipper_ind, v_sales_reserve_ind, v_location_indicator
               FROM ah_item ai, ah_item_xref aix, ah_chain_div_facility acdf, ah_div ad
              WHERE ai.item_id_edw = aix.item_id_edw
                AND aix.item_code_cust = rec.item_code_cust
                AND aix.facility_num = acdf.facility_code
                AND acdf.chain_id = ah_internal_data_pkg.get_chain_id (p_file_id)
                AND acdf.div_id = ad.div_id
                AND ad.division = rec.division;ALSO: You are calling ah_internal_data_pkg.get_chain_id (p_file_id) every time. Why not do it outside the loop and just use a variable in the inner query? That will prevent context switching and improve speed.
    Edited by: Dave Hemming on Dec 3, 2008 9:34 AM

  • Select query gives result in abc order instead of creation order

    Hi,
    I used the following command in sql command window to insert some rows to my table:
    SQL>
    SQL> insert into regions (Region_ID, Region_Name) values (1 , 'Zafon');
    1 row inserted
    SQL> insert into regions (Region_ID, Region_Name) values (2 , 'Hasharon');
    1 row inserted
    SQL> insert into regions (Region_ID, Region_Name) values (3 , 'Merkaz');
    1 row inserted
    SQL> insert into regions (Region_ID, Region_Name) values (4 , 'Jerusalem');
    1 row inserted
    SQL> insert into regions (Region_ID, Region_Name) values (5 , 'Hashfela');
    1 row inserted
    SQL> insert into regions (Region_ID, Region_Name) values (6 , 'Darom');
    1 row insertedWhen I use select * query to see the table, I get the content in abc order:
    SQL> SELECT * FROM REGIONS;
    REGION_ID REGION_NAME
            6 Darom
            2 Hasharon
            5 Hashfela
            4 Jerusalem
            3 Merkaz
            1 Zafon
    6 rows selectedHow can I get the result in the creation order (first created- first shown)?
    Thanks

    >
    How can I get the result in the creation order (first created- first shown)?
    >
    You can't - not unless you use a solution that you should NEVER use unless absolutely necessary.
    WHY do you need to do this? You never provide a reason.
    To get a result in creation order there are two requirements:
    1. Use an ORDER BY when you query the table - this is the only requirement others have mentioned
    2. Control and specify the creation order when you INSERT the data
    Unfortunately there is only ONE way that I am aware of to implement #2 above (i.e. to control the insertion order) and that is to SERIALIZE the insertion of rows into the table. That means that only ONE user can insert rows into the table at a time perhaps by using a stored procedure to perform the insert.
    In a multi-user system a USER can NOT see uncommitted data of other users. If a user uses a trigger and a SEQUENCE generator to generate ascending numbers another user can use that same trigger and sequence to generate numbers also. If the first user performs an INSERT and gets number 37 but doesn't commit a second user can perform an INSERT, get number 38 and COMMIT before the first user commits.
    That means that the row with 38 was created (committed) first but has a higher sequence than the row with 37.
    The best you can do is use a sequence generator to generate unique ascending numbers. Then you can query the data using an ORDER BY on the column that contains the sequence value. But, as shown above, that doesn't guarantee that the rows were actually committed in that order.
    That may sound like a trivial distinction but it has a very important implication. It means that you can NOT use that sequenced column to extract data reliably for batch-type processing. For the above example supposed your batch process extracted data for values from 1 to 38 and then that first user did a COMMIT.
    The next extract would be for values from 39 to 50 (or some other value) and the row with 37 would never be extracted. For the same reasons you can't use a CREATION_DATE value for such extract purposes either since you would have the same issue.

  • SQL select query having more than 1000 values in 'IN' clause of predicate.

    Hi,
    We are executing a select query from a table and showing it through a front end screen. When the count of values given in the 'IN' clause of predicate are exceeding 1000 , it is throwing error.
    eg. select * from Employees where emp.Id. in('111',123','121','3232',........1001 Ids)
    We are using Oracle version 10.2.0.
    Please suggest how to tackle such issue.
    Regards,
    Naveen Kumar.C.
    Edited by: Naveen Kumar C on Aug 30, 2008 10:01 PM

    Use a nested table:
    create or replace type numbertype
    as object
    (nr number(20,10) )
    create or replace type number_table
    as table of numbertype
    create or replace procedure tableselect
    ( p_numbers in number_table
    , p_ref_result out sys_refcursor)
    is
    begin
    open p_ref_result for
         select *
    {noformat}     from   employees
         ,        (select /*+ cardinality(tab 10) */ tab.nr
                   from   table(p_numbers) tab) tbnrs
         where id = tbnrs.nr;
    end;
    /{noformat}
    Using nested tables will reduce the amount of parsing because the sql statement uses binded variables! The cardinality hint causes Oracle to use the index on employees.id.

  • How to create a Type Object with Dynamic select query columns in a Function

    Hi Every One,
    I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
    I have tried by
    SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
    c :=DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
    l_status := DBMS_SQL.EXECUTE(c);
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
    END LOOP;
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.COLUMN_VALUE(c,j,v_val);
    END LOOP;
    But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
    Thanks,
    mallikj2

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • Select query in routing(operation,sequence)

    Hello frds,
         i am into change routing BDC actually i want a select query .....for like existing of operation for a particular sequence in routing....
    if i will found operation for particular sequence i will run the bdc code lese i will exit...any one can help me...
         just provide me a query....to check existnece of operation for a particular sequence......ASAP...

    Why on earth would you want to keep the queries separate? As Tom Kyte would say, databases are born to join!
    Providing emp_id has an index on it (and it should, assuming it's the table's primary key!) your "complex" (or, what I would call simple*), it'll most likely be faster than doing it separately. You've not got the context switches for one thing.
    If you want to see what the optimizer does with your query, you should run a trace on the query. An explain plan would give you an idea of what it's going to do, too.
    In general, doing something like this procedurally is going to almost certainly be worse than doing it in SQL (and by worse, I mean slower).
    * I'd hate to see what you'd call some of the monster queries I work with, if you think that query is complex!

  • Dynamic Select Query including Dynamic Tables with For all Entries

    Hello everyone,
    I need to create a select query which involves using of Dynamic Tables.
    Suppose I have a dynamic table <d1> which consist of let say 10 records.
    Now i need to make a select query putting data into another dynamic table <d2>
    CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
            FOR ALL ENTRIES IN <d1>
    WHERE (g_condition).
    But it is giving dump.
    Please help me on this....

    Short text
        A condition specified at runtime has an unexpected format.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "WRITE_ARCHIVE_PROD" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The current ABAP program has tried to execute an Open SQL statement
        which contains a WHERE, ON or HAVING condition with a dynamic part.
        The part of the WHERE, ON or HAVING condition specified at runtime in
        a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
    CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
    FOR ALL ENTRIES IN <dyn_table>
      WHERE (g_condition).

Maybe you are looking for

  • I have no idea how to update my apps on my iPod using the new iTunes

    My iPod Touch says that I have 27 updates which I know is right but when I click to go on the Apps Store and update them it just takes me to a white screen... So I tried using the newly updated iTunes which I'm not use to yet but I don't have a clue

  • Conformation Cancellation error

    Hi i am trying to cancel one confirmation of which the last operation is Inspection. At this time one error is coming. Deficit of BA stock in quality inspection. Please help me as early as possible. Regards, Anand

  • Can't start LV7.1 after installing NI-DAQmx 7.5, on win2K, SP2

    After I installed the NI-DAQmx 7.5 on a Win2K(sp2) machine, I just simply cannot start LabVIEW7.1. The following lines are included in the error log: FLEXlm checkout error: Local checkout filter rejected request Feature:       LabVIEW_LabVIEW License

  • Hang up on finishing loses photos

    When downloading photos from Canon Powershot to iPhoto, there was a hang up at finishing. I had to force quit iPhoto and upon it reopening, half of my photos were gone. Any suggestions? I am sick......Trip of a lifetime. Gone.

  • Obsolete context programs will be regenerated by the system

    Hi, I´ve installed a SRM 7.0 SAP system and when I connect to the system I obtain this : Note: Obsolete context programs will be regenerated by the system Message no. 33018 can someone help me ??????? I know that is only a message but I want to remov