Creating and selecting from a dynamic table

Hi,
Iam trying to create a table dynamically and selecting from it in same plsql block, but am getting "table doesnot exist" error. however if i just create a table dynamically and then do a select on it seperately it works..
below is sample code for the same,
working
Line: -----
DECLARE
loc VARCHAR2(20):='bglr';
l_cnt pls_integer;
BEGIN
-- create an employee information table
EXECUTE IMMEDIATE
'CREATE TABLE ' || 'emp_bglr' ||
empno NUMBER(4) NOT NULL,
ename VARCHAR2(10),
job VARCHAR2(9),
sal NUMBER(7,2),
deptno NUMBER(2)
end;
select count(*) from emp_bglr ...works and return me 0 rows
Line: -----
but when i include select in plsql block ..it throws "Table does not exists" error...(iam running below plsql block after dropping the created table)
not working
Line: -----
DECLARE
loc VARCHAR2(20):='bglr';
l_cnt pls_integer;
BEGIN
-- create an employee information table
EXECUTE IMMEDIATE
'CREATE TABLE ' || 'emp_bglr' ||
empno NUMBER(4) NOT NULL,
ename VARCHAR2(10),
job VARCHAR2(9),
sal NUMBER(7,2),
deptno NUMBER(2)
--COMMIT;
END;
Select count(*) into l_cnt from emp_bglr;
dbms_output.put_line('cnt is '||l_cnt);
end;
Line: -----

Becuase your code is first checked for syntax/object existance during compilation and throws an error saying the table does not exist.
Try this:
SQL> ed
Wrote file afiedt.buf
  1   DECLARE
  2   loc VARCHAR2(20):='bglr';
  3   l_cnt pls_integer;
  4   BEGIN
  5   -- create an employee information table
  6   EXECUTE IMMEDIATE 'CREATE TABLE emp_bglr(
  7   empno NUMBER(4) NOT NULL,
  8   ename VARCHAR2(10),
  9   job VARCHAR2(9),
10   sal NUMBER(7,2),
11   deptno NUMBER(2)
12   )';
14  Select count(*) into l_cnt from all_objects where object_name = 'EMP_BGLR';
15  dbms_output.put_line('tab cnt is '||l_cnt);
16  IF (l_cnt = 1) THEN
17  l_cnt := 0;
18  EXECUTE IMMEDIATE 'SELECT count(*) from apps.emp_bglr' into l_cnt;
19  dbms_output.put_line('data cnt is '||l_cnt);
20  END IF;
21* end;
SQL> /
tab cnt is 1
data cnt is 0
PL/SQL procedure successfully completed.
SQL> Edited by: AP on Aug 5, 2010 5:51 AM
Edited by: AP on Aug 5, 2010 5:52 AM

Similar Messages

  • To-Many relationship and selection from a lookup table

    I have a core data table that represents radios called 'Radio' and another that represents types of modulation (AM, FM, USB etc.) called 'Modulation'. I have defined a to-many relationship form 'Radio' to 'Modulation'. The 'Modulation' table is fixed in that I have defined the set of records in the table and I don't want the normal user to modify this.
    What I do want is the user to be able to manipulate the 'Radio' records, and in particular be able to select a 'Radio' record. I have set up NSArrayControllers for both entities and they are used by two NSTableViews. So far everything is working nicely.
    I want the user to be able to select a 'Radio' in the table and have the 'Modulation' table show the 'to-many' relationship by selecting the (multiple) entries that apply. Also I want the user to be able to select and deselect 'Modulation' records and have them reflected in the core data relationship.
    I have tried several things involving the 'Selected Indexes' bindings on both the 'Modulation' table and the NSArrayController (pointing back to the 'Radio' controllers 'selected' entry with the key path being the to-many relationship name but this seems to either throw lots of 'not key-value coding compliant' messages or stops the 'Modulation' from displaying anything. Obviously I'm not doing this right!!!!
    Can some kind soul please tell me how this can be done?
    Thanks
    Susan

    At least I'm consistent is being able to ask unanswerable questions!
    I got around this my creating a delegate routine that was called on each change of selection and did the necessary record selection in code.
    Susan

  • Update and Select from the same table

    Hello,
    i have this select - i tested it and its working
    [code]
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT
    else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end
    as KTBT_ISO,
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN
    else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end
    as KTZN_ISO,
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB
    else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
    end as KTAB_ISO,
    DTF_REEW_201301.brnrn,
    DTF_REEW_201301.ktat
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    [/code]
    With the result from KTBT_ISO, KTZN_ISO and KTAB_ISO i want to update the table "reewdq.DTF_REEW_201301" - and this table is in the select-statement!
    I believe, i tried every update-statement - but no update is working.
    I need something like this:
    [code]
    update reewdq.DTF_REEW_201301 t1 set t1.KTBT_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT
    else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
    end
    as KTBT_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    t1.KTZN_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN
    else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
    end
    as KTZN_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    t1.KTAB_ISO=
    select
    case
    when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB
    else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
    end as KTAB_ISO
       from
    reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301,
    reewdq.DTF_REEW_201301 DTF_REEW_201301
       where
    (DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
    and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT)
    and CTF_REEW_KUM_201301.KTMO = (DTF_REEW_201301.KTMO - 1)
    [/code]
    But this code isn´t working. Has someone an idea please? Can someone please help me.
    Best regards
    Heidi

    Use MERGE:
    merge
      into reewdq.DTF_REEW_201301 t1
      using (
             select  case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTBT 
                       else DTF_REEW_201301.KTBT - CTF_REEW_KUM_201301.KTBT
                     end as KTBT_ISO,
                     case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTZN 
                       else DTF_REEW_201301.KTZN - CTF_REEW_KUM_201301.KTZN
                     end as KTZN_ISO,
                     case
                       when DTF_REEW_201301.KTMO =1 then DTF_REEW_201301.KTAB 
                       else DTF_REEW_201301.KTAB - CTF_REEW_KUM_201301.KTAB
                     end as KTAB_ISO,
                     reewdq.ROWID as rid
               from  reewcore.CTF_REEW_KUM_201301 CTF_REEW_KUM_201301, 
                     reewdq.DTF_REEW_201301 DTF_REEW_201301
               where DTF_REEW_201301.BRNRN = CTF_REEW_KUM_201301.BRNRN
                 and DTF_REEW_201301.KTAT = CTF_REEW_KUM_201301.KTAT
                 and CTF_REEW_KUM_201301.KTMO = DTF_REEW_201301.KTMO - 1
            ) t2
      on (
          t1.rowid = t2.rid
      when mathed
        then
          update
             set t1.KTBT_ISO = t2.KTBT_ISO,
                 t1.KTZN_ISO = t2.KTZN_ISO,
                 t1.KTAB_ISO = t2.KTAB_ISO
    SY.

  • How  to delete(remove) one row(record) from a dynamic table

    Hi,
    I have adynamically created table.
    I want to delete 1 record(Row) from that Dynamic table.
    Say if my dynamic table contains 5 records(rows);after deletion of 1 record(1 complete row)from that dynamic table,the number of records(rows) should be 4 .
    Please suggest me how to proceed.
    Please provide me some sample code.Its not working
    I tried with these code:-Its not working-->
    IPrivateExportexView.IEt_WriteoffNode node=wdContext.nodeEt_Writeoff();
    IPrivateExportexView.IEt_WriteoffElement nodeEle= node.createEt_WriteoffElement(new Zfrm_Writeoff_P());
    node.removeElement(nodeEle);
    Please suggest
    Thanks
    -Sandip

    Hi,
    *int n=wdContext.nodeTable().getLeadSelection();*
    *wdContext.nodeTable().removeElement(wdContext.nodeTable().getTableElementAt(n));*   
    Further more , an example is given below for better understanding , do modifications according to your need.
    node :
           value node - Table (cardinality - 0..n , selection 0..1)
                              no    ( value attribute - string  )
                              name (value attribute - string )
       // create node elements 
         for(int i=0;i<5;i++)
        IPrivateClearnodeElements.ITableNode node = wdContext.nodeTable();
        IPrivateClearnodeElements.ITableElement ele = node.createTableElement();
        ele.setNo((101i)"");
        ele.setName("name :"(i1));
        node.addElement(ele);
    // Apply template Table -- select -- table node  or
    // create a table UI element and set the property Datasource - Table ( of the context)  
                             Insert Colum , in that column, next insert celleditor , of type text view  , bind the property text -- to "name " of Table node of the context
               Insert Colum , in that column, next insert celleditor , of type text view  , bind the property text -- to "no " of Table node of the context
    // create a action "removeElement"
    // create a button "Remove Element "  --> Event action -- removeElement
    // under the action write down the code :
    public void onActionremoveElement(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionremoveElement(ServerEvent)
        // before removing display elements
        wdComponentAPI.getMessageManager().reportSuccess("Before  deletion :");
         for(int i=0;i<wdContext.nodeTable().size();i++)
             wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeTable().getTableElementAt(i).getNo()) ;
         wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeTable().getTableElementAt(i).getName()) ;
        int n=wdContext.nodeTable().getLeadSelection();
        wdContext.nodeTable().removeElement(wdContext.nodeTable().getTableElementAt(n));
       // After deletion
        wdComponentAPI.getMessageManager().reportSuccess("After deletion :");
             for(int i=0;i<wdContext.nodeTable().size();i++)
                   wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeTable().getTableElementAt(i).getNo()) ;
                   wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeTable().getTableElementAt(i).getName()) ;
        //@@end
    If helpful , give points .
    Let me know if any problem u face .
    Thanks,
    Srini

  • Select from view -v- table

    Hi Guys,
    I was just hoping to get your opinion on something.
    I have a procedure in Production that is taking longer and longer to finish and sticks on one certain section of code.
    The code is an INSERT into the main dimension table.
    This same procedure runs fine on TEST and the section of code completes an awful lot quicker.
    The traffic on Production is a lot heavier and there have been applications developed by people other than myself which SELECT from this dimension table. I'm assuming, based on the fact the code in Test and Production are identical, that this increased traffic could be eating up the bandwith and slowing the jobs.
    So, I was thinking - if I create Views and let the other applications hit the views as opposed to the main table, will this help speed it up. I did this before on a Teradata platform using a 'dirty read' which worked quite well but Oracle doesn't seem to offer this option.
    What do you guys think? Could this work or do I need to take a different approach.
    Thank You.

    GerardMcL wrote:
    I meant ordinary views.
    I was wondering if there was a way of putting some locking code in or asking for a dirty read that would speed up the SELECT from the table?There is no such thing as a dirty read with Oracle -- Teradata, SQL Server, Sybase, IBM, etc., have different locking architectures where reads can block write and writes can block reads, and that is not an issue with Oracle.
    If there's a query performance problem, which is what that will be if the SELECTs are slow, then if you could follow the following links, that will help diagnosis immensely:
    [How to Post A Tuning Request|http://forums.oracle.com/forums/thread.jspa?threadID=863295&tstart=0]
    And:
    [When your Query takes too long|http://forums.oracle.com/forums/thread.jspa?messageID=1812597#1812597]
    There is such as thing as stale reads, against Materialized Views, which are views that actually materialize and store the results of a query, and which then can subsequently be queried.

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • How to assign tasks in Approval Workflow to a set of users selected from a Lookup table

    Hi all,
    I am new to Project Server and I am using Project Server 2013 On premises deployement. Please help me on how to achieve the below scenario:
    I have a requirement where, the initial PDP will have 2 fields (Reviewers and Approvers), wherein the engineer himself will select who the reviewer and approver from the Lookup tables.
    Now I have to start task process with these selected people for approval.
    Say for example , engineer has selected Alice and Bob as 2 reviewers, then
    In the workflow I have :
                 Start Task process with
    Project Data: Reviewers (which is giving error as
    [System.ArgumentException: AssignedTo at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager
    bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) ]
    Then I tried logging the value of Project Data: Reviewers, It logged the value as Alice, Bob (which looks pretty good),
    Then I tried assigning only 1 person as Reviewer, then also I get the same error.
    So can anybody please tell me where I went wrong. Is it not possible to fetch the data from the values selected as Project Data from the Lookup tables ? If not then what is the workaround I can use to achieve this ?
    Thanks,
    Shanky

    Hi Paul,
    Yes I am using SP designer for Workflows. And yes, You were right, there was a mismatch in the names of AD account and the Lookup table, now with 1 person selected from the lookup table it is assigning the task properly. However with multiple selection,
    it is failing.
    As Robert mentioned, the fetched value is a text as "Alice, Bob", which makes 2 usernames as a single text. So when I try to assign a task to this group, which returns value as "Alice, Bob", workflow fails to find such AD user, as it
    is an invalid value.
    So is there any way I can seperate this out to form 2 different username ? I checked for string extraction function in th Workflow, but nothing helped me for this scenario.
    Any input will be helpful.
    Thanks,
    Shanky

  • Selecting from 2 different tables

    is this possible?
    i just want to select from two different tables in one select statement and they have the same WHERE clause

    SELECT
      a.pkggrp,
      a.pkgtype,
      a.area,
      a.process,
      a.ww,
      count(a.ww) as LOTSGATED,
      sum(a.samplesize) as SUMSAMPLESIZE,
      sum(a.total_defects) as SUMTOTALDEFECTS,
      sum(case a.auditresult when 'pass' then 1 else 0 end) COUNTPASS,
      sum(case a.auditresult when 'fail' then 1 else 0 end) COUNTFAIL,
      case sum(case a.auditresult when 'fail' then 1 else 0 end)
        when 0 then 0
      else round(sum(case a.auditresult when 'fail' then 1 else 0 end) / count(a.ww) * 100,2)
        end LRR,
      case sum(case a.auditresult when 'fail' then 1 else 0 end)
        when 0 then 0
      else round(sum(case a.auditresult when 'fail' then 1 else 0 end) / sum(a.samplesize) * 1000000,0)
        end PPM,
      count(c.itrnum)
    FROM
      t_prodproc_monitoring a, t_itr c
    WHERE
      a.ww=c.ww
      and a.ww between 1 and 50
      and c.ww between 1 and 50
    GROUP BY
      a.pkggrp,
      a.pkgtype,
      a.area,
      a.process,
      a.ww
    ORDER BY
      a.pkggrp,
      a.pkgtype,
      a.area,
      a.process,
      a.ww ascthis gave me a
    "c". "ww": invalid identifier

  • SELECTing from a large table vs small table

    I posted a question few months back about teh comparison between INSERTing to a large table vs small table ( fewer number of rows ), in terms of time taken.
    The general consensus seemed to be that it would be teh same, except for teh time taken to update the index ( which will be negligible ).
    1. But now, following teh same logic, I m confused why SELECTINg from a large table should be more time taking ("expensive" ) than SELECTing from a small table.
    ( SELECTing using an index )
    My understanding of how Oracle works internally is this :
    It will first locate the ROWID from teh B-Tree that stores the index.
    ( This operation is O(log N ) based on B-Tree )
    ROWID essentially contains teh file pointer offset of teh location of the data in teh disk.
    And Oracle simply reads teh data from teh location it deduced from ROWID.
    But then the only variable I see is searching teh B-Tree, which should take O(log N ) time for comparison ( N - number of rows )
    Am I correct above.
    2. Also I read that tables are partitioned for performance reasons. I read about various partiotion mechanisms. But cannot figure out how it can result in performance improvement.
    Can somebody please help

    user597961 wrote:
    I posted a question few months back about teh comparison between INSERTing to a large table vs small table ( fewer number of rows ), in terms of time taken.
    The general consensus seemed to be that it would be teh same, except for teh time taken to update the index ( which will be negligible ).
    1. But now, following teh same logic, I m confused why SELECTINg from a large table should be more time taking ("expensive" ) than SELECTing from a small table.
    ( SELECTing using an index )
    My understanding of how Oracle works internally is this :
    It will first locate the ROWID from teh B-Tree that stores the index.
    ( This operation is O(log N ) based on B-Tree )
    ROWID essentially contains teh file pointer offset of teh location of the data in teh disk.
    And Oracle simply reads teh data from teh location it deduced from ROWID.
    But then the only variable I see is searching teh B-Tree, which should take O(log N ) time for comparison ( N - number of rows )
    Am I correct above.
    2. Also I read that tables are partitioned for performance reasons. I read about various partiotion mechanisms. But cannot figure out how it can result in performance improvement.
    Can somebody please helpIt's not going to be that simple. Before your first step (locate ROWID from index), it will first evaluate various access plans - potentially thousands of them - and choose the one that it thinks will be best. This evaluation will be based on the number of rows it anticipates having to retrieve, whether or not all of the requested data can be retrived from the index alone (without even going to the data segment), etc. etc etc. For each consideration it makes, you start with "all else being equal". Then figure there will be dozens, if not hundreds or thousands of these "all else being equal". Then once the plan is selected and the rubber meets the road, we have to contend with the fact "all else is hardly ever equal".

  • What is the defference between select single * from and select * from Where

    What is the defference between select single * from and select * from Where
    which is prefferable and best one.

    Hai,
    *Difference Between Select Single and Select * from table UpTo One Rows:*
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly:  to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.

  • Create and select procedure

    Hello,
    i want to create and select procedure in SQL commands editor:
    CREATE OR REPLACE PROCEDURE SLEEP AS BEGIN DBMS_OUTPUT.PUT_LINE('a'); END; SELECT SLEEP() from dual;
    but i get error Error at line 1: PLS-00103
    that says it was founded SELECT...
    can u help me ? thanx..
    and, can i execute php code on this server ? thanx

    if I execute this code as one statement:
    CREATE OR REPLACE FUNCTION SLEEP RETURN VARCHAR2 IS
    BEGIN
    RETURN 'a';
    END;
    select sleep from dual;
    i get error which says, that SELECT was founded...
    if I execute first
    CREATE OR REPLACE FUNCTION SLEEP RETURN VARCHAR2 IS
    BEGIN
    RETURN 'a';
    END;
    and then
    select sleep from dual;
    i get error ORA-06575 Package or function SLEEP is in an invalid state
    1.) whats wrong?
    2.) is possioble to execute a creating function and the select it in one statement ?
    3.) can I use my own jsp or php on apex.oracle.com ?
    Thank you

  • Finding missed sequence numbers and rows from a fact table

    Finding missed sequence numbers and rows from a fact table
    Hi
    I am working on an OLAP date cube with the following schema:
    As you can see there is a fact transaction with two dimensions called cardNumber and Sequence. Card dimension contains about three million card numbers. 
    Sequence dimension contains a sequence number from 0 to 255. Fact transaction contains about 400 million transactions of those cards.
    Each transaction has a sequence number in 0 to 255 ranges. If sequence number of transactions of a card reaches to 255 the next transaction would get 0 as a sequence number.
    For example if a card has 1000 transactions then sequence numbers are as follows;
    Transaction 1 to transaction 256 with sequences from 0 to 255
    Transaction 257 to transaction 512 with sequences from 0 to 255
    Transaction 513 to transaction 768 with sequences from 0 to 255
    Transaction 769 to transaction 1000 with sequences from 0 to 231
    The problem is that:
    Sometimes there are several missed transactions. For example instead of sequence from 0 to 255, sequences are from 0 to 150 and then from 160 to 255. Here 10 transactions have been missed.
    How can I find all missed transactions of all cards with a MDX QUERY?
    I really appreciate for helps

    Thank you Liao
    I need to find missed numbers, In this scenario I want the query to tell the missed numbers are: 151,152,153,154,155,156,157,158,159
    Relative transactions are also missed, so I think it is impossible to get them by your MDX query
    Suppose this:
    date
    time
    sequence
    20140701
    23:22:00
    149
    20140701
    23:44:00
    150
    20140702
    8:30:00
    160
    20140702
    9:30:00
    161
    20140702
    11:30:00
    162
    20140702
    11:45:00
    163
    As you can see the sequence number of the last transaction at the 20140701 is 150
    We expecting that the first transaction of the next day should be 151 but it is 160. Those 10 transactions are totally missed and we just need to
    find missed sequence numbers

  • No value is select  from  user define  table

    Hi ALL,
                 i am using  B1if , i am sending  data  B1 to  isr , i am using user define table  but problem  no value is select  from  user define  table  .
    my table ID  is @SSRPOD 
    <payload operation="">
         <ns0:MT_POD_B1_System xmlns:ns0="http://xxxx.com/SC/B1/Dlvr/CustDlvr/ExtPrfOfDlvr">
              <POD>
                   <Header>
                        <SalesOrderNumber>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_SalOrdNo" />
                        </SalesOrderNumber>
                        <ArrivalDate>
                             <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_TaxDate" />
                        </ArrivalDate>
                        <Detail>
                             <DOLineQuantity>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Quantity" />
                             </DOLineQuantity>
                             <UOM>
                                  <xsl:value-of select="$msg/BOM/BO/@SSRPOD/row/U_Unitmsr" />
                             </UOM>
                        </Detail>
                   </Header>
              </POD>
         </ns0:MT_POD_B1_System>
    </payload>
    I have set following things. 
    Inbound Channel
        scenirio step identifier :z.xxxx
        Inbound Channel(IPO):INB_B1_EVNT_ASYN_EVT
        InboundType:Asynchronous
        Process Trigger:B1Event
        Identification Method: B1Event
        Identification Parameter:n.a
        Identifier:?????                                  
        Identifier Namespace:??????
      can anyone help me?
    Edited by: Sinha_Sinha on Feb 3, 2012 7:47 AM

    Found an authorization object was missing, that enabled the case types to show but hitting the GO button brought a page that can not be viewed in IE.  on to the next hurdle..........

  • Select from a dynamically chosen table

    Hi everyone,
    I'm willing to retrieve information stored in a given column of a given table, both generated dynamically. Thus, I have a string S1 with the table name and a string S2 with a column name of this table.
    My aim would be to do something like that :
    +select single * into corresponding fields of X
    from (S1)
    where Y = 'SomeValue'.+
    X being like a line of the table (S1)
    Y being the column name stored in S2.
    But for this, I need to fine a correct way to define X and Y from S1 and S2, which I failed to do until now. My first idea was to use field-symbols but it didn't help me. It might be quite easy or maybe impossible, I don't even know as my knowledge in ABAP is far from being excellent, but any reply would be welcome.
    Best regards,
    François

    Hi,
    if you only want to select only the given column(s)
    (here 'BUTXT') use the 2nd alternative:
    REPORT  YMI_SG_NACHWEIS_A NO STANDARD PAGE HEADING.
    FIELD-SYMBOLS:
    <t001>, <fs>.
    DATA:
    lr_t001 TYPE REF TO data.
    CONSTANTS:
    s1(30) VALUE 'T001',
    s2(30) VALUE 'BUKRS',
    s3(30) VALUE 'BUTXT'.
    DATA:
    lt_where(72) OCCURS 0 WITH HEADER LINE,
    lt_field(72) OCCURS 0 WITH HEADER LINE.
    append s3 to lt_field.
    CREATE DATA lr_t001 TYPE (s1).
    ASSIGN lr_t001->* TO <t001>.
    ASSIGN (s1) TO <fs>.
    CONCATENATE s2 '=' '3000' INTO lt_where SEPARATED BY space.
    APPEND lt_where.
    SELECT *
    INTO <t001>
    FROM (s1)
    WHERE (lt_where).
      ASSIGN COMPONENT s3 OF STRUCTURE <t001> TO <fs>.
      WRITE: / s3, ': ', <fs>.
    ENDSELECT.
    *2nd alternative
    skip 2.
    write:/'2nd'.
    uline.
    select (lt_field) into corresponding fields of <t001>
    FROM (s1)
    WHERE (lt_where).
      ASSIGN COMPONENT s3 OF STRUCTURE <t001> TO <fs>.
      WRITE: / s3, ': ', <fs>.
    ENDSELECT.
    grx
    Andreas

  • To get the input values from the dynamic tables and save in the SAPdatabase

    HI EXPERTS,
    I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.

    >
    vadiv_maha wrote:
    > HI EXPERTS,
    >
    > I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.
    hi,
    1 there is one property OnAction of the button...
    2 So, in this event handler,you have to read the context node to which ur table is binded
    3 use the code wizard
    control+f7
    , and use the method
    get_static_attribute_table
    4 now u have got the vaues in internal table,so now as pointed in the previous reply, you can use the
    Update
    or
    Modify
    statement...
    regards,
    Amit

Maybe you are looking for

  • Crystal report files created, but why not all?

    I am using several (total 19) Crystal report files (*.rpt) in my project as report or subreport. When I delete these rpt files under my "...\bin\Debug" folder and run the application I see that some (exactly 14) of them are automatically retrieved ba

  • Please explain the meaning of "with control f" addition in loop at statemen

    loop at   g_MATERIALS_itab        into g_MATERIALS_wa        with control MATERIALS        cursor MATERIALS-current_line.        module MATERIALS_move.        module MATERIALS_get_lines.   endloop. please lemme know wht effect does "with control MATE

  • Need to download the original ps cs6 for mac

    need to download the original ps cs6 for mac as I lost my owned copy.    I am the register license holder of the copy.  Where can I do so.  Not looking for the cloud version.

  • IPhoto 9.1.5 crashing when going to external editor

    I have iPhoto set to open Photoshop as the external editor. But it keeps crashing my mac when I instruct iPhoto to open a pic in the external editor, not every time, but enought that it's so annoying, it causes a complete crash so I have to do a comp

  • Oracle JDBC4 errror!!!!

    I am trying to install weblogic 8.1.3 in silent mode . while installing i get an error WLJBDC4ORACLEHelperClass not found . in classpath ih had set weblogic.jar , but this class is not available in weblogic.jar .Can anybody helpme in this regard. tha