Giving Error When Selecting From a Custom Table

There is a custom report 'Z*'  which archives data.
In this report, while selecting data(needs to be archived) from a custom table 'Z*_T', giving runtime error in Production Server.
The select statement is written below :
*data izX like z_t occurs 1000 with header line._
*select * from z*t into table i_zX.*_
How can I change the select statement so that it will work properly?

Sas..
From your example code it appears you are trying to use a wild card for both your dbtable and the internal table.
To do this, you will lilkely need to use a Field Symbol for the target internal table and your FROM will need to be a varible
FROM (dbtabname)
The ABAP Helps gives this example for the Select Table
DATA  TABNAME(10).
DATA: BEGIN OF WA,
        ID   LIKE SCUSTOM-ID,
        NAME LIKE SCUSTOM-NAME,
        REST(134),
      END OF WA.
TABNAME = 'SCUSTOM'.
SELECT * INTO WA FROM (TABNAME).
  WRITE: / WA-ID, WA-NAME.
ENDSELECT.

Similar Messages

  • Error when selecting from view created by OLAP_TABLE

    Hi all,
    I used OWB 10.2.0.4 to create a MOLAP datawarehouse.
    I created a view with this:
    CREATE OR REPLACE VIEW sales_view AS
    SELECT *
    FROM TABLE(OLAP_TABLE(
    'dw duration session',
    'MEASURE samt AS number(16,0) FROM SALES_SAMT
    DIMENSION cust_code AS varchar2(30) FROM cust
    DIMENSION prod_code AS varchar2(30) FROM prod
    DIMENSION sman_code AS varchar2(30) FROM sman
    DIMENSION time_id AS varchar2(30) FROM time
    DIMENSION orgn_code AS varchar2(30) FROM orgn'));
    and I try to run the following:
    select count(*) from sales_view;
    and I got the following error:
    Error starting at line 1 in command:
    select count(*) from sales_view
    Error report:
    SQL Error: ORA-29400: data cartridge error
    ORA-00600: internal error code, arguments: [xsvaluekeyget: type], [114], [], [], [], [], [], []
    29400. 00000 - "data cartridge error\n%s"
    *Cause:    An error has occurred in a data cartridge external procedure.
    This message will be followed by a second message giving
    more details about the data cartridge error.
    *Action:   See the data cartridge documentation
    for an explanation of the second error message.
    Can somebody give me some idea?
    Many thanks!
    - Andrew

    Brijesh,
    Really appreciate your help!
    With your hint (#2), I found my problems.
    I had 2 problems:
    1) I'm missing the 'Model' clause at the end of my view creation (in bold )
    2) I shouldn't do a count on all rows (e.g. I get result if I select with parameters)
    Here's my working view:
    CREATE OR REPLACE VIEW SALES_VIEW2
    AS
    SELECT * FROM TABLE(OLAP_TABLE(
    'DW DURATION SESSION',
    MEASURE SAMT FROM SALES_SAMT1
    DIMENSION PROD_CODE FROM PROD
    DIMENSION SMAN_CODE FROM SMAN
    DIMENSION TIME_CODE FROM TIME
    DIMENSION CUST_CODE FROM CUST
    DIMENSION ORGN_CODE FROM ORGN
    MODEL
    DIMENSION BY(PROD_CODE, CUST_CODE, SMAN_CODE, TIME_CODE, ORGN_CODE)
    MEASURES(SAMT)
    RULES UPDATE SEQUENTIAL ORDER();
    -----

  • ORA-01031 insufficient privileges  error when selecting from a view

    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4

    JSebastian wrote:
    OK I think this might be a dumb question but I can't figure it out:
    User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
    User John can issue select * from FRED.table1; and it works just fine.
    User John has then been granted SELECT privilege (directly, not via a database role) to schema
    MARK.view1;
    MARK.view1 only selects from FRED.table1. No other tables are in the view1.
    Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
    I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
    Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
    I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
    To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
    John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
    Any thoughts?
    Oh, Oracle EE 10.2.0.4Are you certain John has been granted select on Mark.view1 ? In order for that to work Mark would have to have been given select on Fred.table1 WITH GRANT OPTION ... otherwise the grant would fail and then John would not be able to select from the view because the grant was never successfully issued.
    Here's a basic test case (which i think conforms to what you've outlined) to get it working.
    drop user u1 cascade;
    drop user u2 cascade;
    drop user u3 cascade;
    create user u1 identified by u1;
    grant connect, resource to u1;
    create user u2 identified by u2;
    grant connect, resource, create view to u2;
    create user u3 identified by u3;
    grant connect, resource to u3;
    connect u1/u1@orcl
    create table test1 (col1 number);
    grant select on test1 to u2 with grant option; --> this is the important part
    grant select on test1 to u3;
    connect u2/u2@orcl
    create view test2 as select * from u1.test1;
    grant select on test2 to u3;
    connect u3/u3@orcl
    select * from u2.test2;

  • XSU ERROR when reading from a OR-Table

    When i try to read Data (SELECT * from named_pointlist) from a Nasted Table with the function "getXMLString()" i get the following Error:
    java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: oracle
    .jdbc.oracore.OracleTypeCOLLECTION: method getElementType()Loracle/jdbc/oracore/
    OracleType; not found at...
    reading Data from a normal Table or a Table with Object Type's works fine. Only Lists, Arrays make problems.
    I tried it also with the example from Steven Muench in the Topic "http://technet.oracle.com:89/ubb/Forum11/HTML/003915.html"
    Hope to get Help
    Regards Remo

    Sas..
    From your example code it appears you are trying to use a wild card for both your dbtable and the internal table.
    To do this, you will lilkely need to use a Field Symbol for the target internal table and your FROM will need to be a varible
    FROM (dbtabname)
    The ABAP Helps gives this example for the Select Table
    DATA  TABNAME(10).
    DATA: BEGIN OF WA,
            ID   LIKE SCUSTOM-ID,
            NAME LIKE SCUSTOM-NAME,
            REST(134),
          END OF WA.
    TABNAME = 'SCUSTOM'.
    SELECT * INTO WA FROM (TABNAME).
      WRITE: / WA-ID, WA-NAME.
    ENDSELECT.

  • Parition issue when selecting from the main table

    I have a partitioned table where i jsut did a partition
    exchange with another temp table.
    when I query the partition it looks good, i.e. the data is there, but when I query the data directly
    on the table no rows are returned.
    for example
    select count(*)
    from sales partition (2007)
    12455
    select count(*)
    from sales
    where year = 2007
    0 rows
    I've reviewed the parition 2007 and esnured the 'where year = ' clause is accurate via previous years.
    why am i not seeing this data in the second query?
    db = 10G R2
    thanks

    create table SALES
    nologging
    parallel
    partition by range (year,fscl_period,channel)
    PARTITION p_200701_5 values less than (2008,200702,6) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_6 values less than (2008,200702,7) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_7 values less than (2008,200702,8) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_8 values less than (2008,200702,9) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_9 values less than (2008,200702,10) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_10 values less than (2008,200702,11) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_11 values less than (2008,200702,12) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_12 values less than (2008,200702,13) TABLESPACE SALES_2007_DATA,
    PARTITION p_200701_13 values less than (2008,200702,14) TABLESPACE SALES_2007_DATA,
    PARTITION p_200702_5 values less than (2008,200703,6) TABLESPACE SALES_2007_DATA,
    as select * from table...
    note: year,fscl_period,channel are all NUMBER datatype.
    Fiscal period is month bascially
    I am wondering if doing this all this in a range partition, and not a range/list which channel may be better qualified for data wise, is the issue. Or perhaps range by year, sub by month, then list by channel. What will the impact be either way?
    Interestingly, the data will come back on a star query i.e. when the SALES table is joined to the calendar_dim (via a day_id field) and use the 2007 predicate from the calendar_dim rather than the one on SALES (the one used for the part. definition).
    Also, i did the partition exchange originally with the novalidation option. We tried again without that and the exchange failed saying some data doesn't qualify. But reviewing the data it appears it all should.
    We then just did a giant insert statement and it all went through, but i have not had teh chance to validate what partitions the data live in now.
    thanks for any help.
    jeff
    Message was edited by:
    jeffs

  • Error When Adjust Width in Custom Table Headers "The width key is not valid"

    I tried to custom headers for a table of MAC Addresses. I used the following expression and it worked fine.
    Get-WmiObject win32_networkadapterconfiguration -Filter "DHCPEnabled=True" | Select-Object @{Expression={$_.DNSHostname};Name="Workstation"},@{Expression={$_.Description};Name="Adapter"}, @{Expression={$_.MACAddress};Name="MAC"}
    When I tried to adjust the width of the columns by including that in the Custom Headers I got an error.
    Get-WmiObject win32_networkadapterconfiguration -Filter "DHCPEnabled=True" | Select-Object @{Name="Workstation";width=25;Expression={$_.DNSHostname}},@{Name="Adapter";Expression={$_.Description}},@{Name="MAC";Expression={$_.MACAddress}}
    Select-Object : The width key is not valid.
    At line:1 char:78

    You have a couple of useful options:
    #1
    Get-WmiObject win32_networkadapterconfiguration -Filter 'DHCPEnabled=True' |
    Select-Object @{E={$_.DNSHostname};N="Workstation"},
    @{E={$_.MACAddress};N="MAC"},
    @{E={$_.Description};N="Adapter"} |
    Format-Table -Auto
    #2
    Get-WmiObject win32_networkadapterconfiguration -Filter 'DHCPEnabled=True' |
    Format-Table @{N="Workstation";W=25;E={$_.DNSHostname}},
    @{N="MAC";W=18;E={$_.MACAddress}},
    @{N="Adapter";E={$_.Description}}
    ¯\_(ツ)_/¯

  • CRX operations giving error when invoking from Form

    Hi All,
    I am facing a weird problem while invoking CRX operations from the form.
    I have a submit button on the form where on clicking that button I am calling a LiveCycle process. The LiveCycle process which I am calling contains CRX opeartions like CreateFolder and StoreContent. I have a string variable that is the input to this process and the issue is that when I am calling this process from the form I am getting a error saying "Unable to locate [/]". But if i call the process by giving the input string within the workbench then the process is getting executed without any error.
    I am not able to figure the reason behind this since I am giving the same input to the process from the form and within the workbench.
    Could anyone please let me know if you have any inputs on this?
    Thanks,
    Balaji

    Hi Wasil,
    Thanks for your response.
    I have checked in the form and the URL that is pointing to is correct. I am able to call the process from the form, only when executing the CRX operation I am getting the error. I have other few operations in the same process which are getting executed without any issues. Let me know your inputs on this.
    Thanks,
    Balaji

  • Job server giving error when accessing from other servers and clients

    I am facing one issue at customer site with DS 4.0.
    -     Job Servers are installed on two machines M1 and M2. JS1 on M1 and JS2 on M2.
    -     Both the job servers are in server group
    -     Sitting on machine M1, I am able to run jobs selecting JS1 and JS2 individually
    -     On Machine M2, JS2 is working fine however while running jobs on JS1 it says Job Server is not working
    o     In Designer screen, I can see the job server icon at the bottom without cross mark, which means it is working. However, when I move the cursor on this icon, following text is displayed on the tray
    Job Server: (servername:3500) - notification server error (BODI-1241023)
    I have checked the firewall on both the servers, and port 3500 is open.
    Any idea what the problem can be?

    You may also search for Access help at http://search.microsoft.com/search.aspx?mkt=en-US&setlang=en-US

  • ORA-00933 error when selecting from remote DB

    Hi to all.
    Consider the following:
    SELECT col1, col2 FROM Table1@remoteOK.
    SELECT col1, col2 FROM Table1@remote LEFT JOIN Table2@remote ON (...)OK.
    INSERT INTO Local_Table (a, b)SELECT col1, col2 FROM Table1@remote
    OK.
    INSERT INTO Local_Table (a, b)SELECT col1, col2 FROM Table1@remote LEFT JOIN Table2@remote ON (...)
    ORA-00933: SQL command not properly ended.
    Is this some kind of restriction or is this a bug? Any workaround?
    Any advice will be appreciated.
    Best regards, beroetz

    Yes but this is a regular operation and the INSERT is the only opportunity.
    BTW, look at what else I have just found:
    INSERT INTO Local_Table (a, b)SELECT col1, col2 FROM DUAL INNER JOIN Table1@remote ON (1=1) LEFT JOIN Table2@remote ON (...)
    OK.

  • Select MAX(BUDAT) from ztab (custom table) where... NOT work!

    We use the following statement where BUDAT is one of the fields in our custom table ztab:
    Select MAX(BUDAT) from ztab (custom table) where...
    When activating the above code, get the following error:
    "Unknown column name "MAX(BUDAT)". not determined until runtime, you cannot specify a field list."
    How to resolve this problem to get a max value of the field BUDAT in custom table ztab (it's not an internal table)?
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 3:56 PM

    HI,
    Tyr having a space after and before BUDAT.
    ( BUDAT ).
    Hope it helps,
    Shreekant

  • How to avoid ORA-3113 when selecting from XMLTYPE table

    Hi,
    If I register an XML-schema, Oracle automatically creates a table xxxxxx_tab of XMLTYPE. (I use Oracle 9.2.0.1)
    When I do a DESCRIBE or a SELECT from this table I get the error: 'ORA-03113:
    end-of-file on communication channel' and my connection is dropped.
    I opened a TAR for this and Oracle says: 'It is an internal bug so cannot be viewed in metalink. This is fixed in release 10i.' (do they mean oracle DB rel 10i, or a new version of XDK?)
    I saw an example in Oracle Magazine (Jan
    2003) "Make XML Native and Relative" about Oracle 9i Rel 2 and XML. As you can see in codeListing 7, the author also does a select from such a
    table (CD331_tab): Why doesn't he have any problems?
    Is there a workaround for this bug? What's the purpose of being able to automatically upload XML-data to a registered schema if you can't do a select of the data?
    Thank you!

    It appears that the XML Schema is not entirely valid. Specifically, the definition of element "DeviceCategory" has two definitions of element "Audio" appearing within a <choice> model i.e. something like :
    <element name="DeviceCategory">
    <choice>
    <sequence>
    <element name="Audio">
    </sequence>
    <sequence>
    <element name="Audio">
    </sequence>
    </choice>
    This is disallowed by XML Schema spec per. the Unique Particle Attribution Constraint. The general idea is that a XML Schema describes a determinstic content model i.e. schema processor can always unambiguosly determine the matching declaration when it encounters an element. However that's not the case with the declaration above. On encoutering "Audio", it could match either the first or the second declaration of the element. Hence the error.
    You will have to rework the schema to avoid this constraint. One mechanism could be to define complexType and their restrictions.
    - Ravi

  • ORA-1722 ERROR WHEN SELECTING MFG_LOOKUPS TABLE

    제품 : AOL
    작성날짜 : 2003-04-07
    ORA-1722 ERROR WHEN SELECTING MFG_LOOKUPS TABLE.
    ================================================
    PURPOSE
    Problem Description
    sqlplus 에서 mfg_lookups table을 select할때,
    ORA-1722 Invalid number 에러발생
    Workaround
    Solution Description
    =======================================================
    CREATE OR REPLACE VIEW mfg_lookups(
    lookup_type,
    lookup_code,
    meaning,
    description,
    enabled_flag,
    start_date_active,
    end_date_active,
    created_by,
    creation_date,
    last_update_date,
    last_updated_by,
    last_update_login
    AS
    SELECT lv.lookup_type,
    TO_NUMBER(lv.lookup_code) lookup_code, <==== Wrong code!!!
    lv.meaning,
    lv.description,
    lv.enabled_flag,
    lv.start_date_active,
    lv.end_date_active,
    lv.created_by,
    lv.creation_date,
    lv.last_update_date,
    lv.last_updated_by,
    lv.last_update_login
    FROM fnd_lookup_values lv
    WHERE lv.LANGUAGE = USERENV('LANG') AND
    lv.view_application_id = 700 AND
    lv.security_group_id =
    fnd_global.lookup_security_group(lv.lookup_type,
    lv.view_application_id)
    =================================================================
    MFG_LOOKUPS 은 view로 fnd_lookup_values의 lookup_code값을 가지고 오는
    방식이나, to_number로 변환하게 되어 있어 숫자가 아닌 문자의 경우
    이와 같은 에러를 발생한다.
    이번 경우, 고객이 새로 등록한 Lookup code였고, code값을 숫자의 format으로
    다시 등록하니 해결됨.
    Reference Documents
    -------------------

    Yes but this is a regular operation and the INSERT is the only opportunity.
    BTW, look at what else I have just found:
    INSERT INTO Local_Table (a, b)SELECT col1, col2 FROM DUAL INNER JOIN Table1@remote ON (1=1) LEFT JOIN Table2@remote ON (...)
    OK.

  • LTR - Error occurred when selecting from database

    Hi,
    We created couple of configurations using LTRC in our SLT systems. When i try to check these in transaction LTR, they are not displayed, just getting the error - Error occurred when selecting from database (Attached screenshot). All the required SICF for SLT has already been activated. Any suggestions how to fix this issue?
    Thanks,
    Saravanan

    Hi Experts,
    Did anybody get the solution of this error ,if yes please reply?
    I am getting below error when I am refreshing the current config or creating a new one in LTR
    " Error occurred when selecting from database"
    Thanks for your help,
    Balwant

  • 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

  • Lightroom encountered and error when reading from it preview cache and needs to quit

    A power outage caused my Lightroom 5.2 to shut down without closing.  When I powered back up and opened lightroom it gives me an error "Lightroom encountered and error when reading from it preview cache and needs to quit" and then it says it will try to fix it the next time it opens. I have opened it 20 times and it is not fixing it. I removed the program completely and upgraded to 5.5 AND it is still giving me the same error.  Is my catalog corrupt or something? I had it set to automatically load the most currently used catalog, so it is not allowing me to open or start a new catalog either. HELP!!!

    Search the forum, this has been answered many times.

Maybe you are looking for

  • DiskUtility Permissions Inquiry

    Heres a quick run down...I used a blank WD5000AAKS w/ FW enclosure to install and test leopard with my machine. Currently its on 10.5.0 and will run the 10.5.2 combo later tonight, but was curious about this in Disk Utility as its always shown up aft

  • Spry:repeat works in Mozilla and not IE 6

    I made this little test in Spry. It happens to work in Mozilla but not in Internet Explorer 6 which is quite weird since I almost copy/pasted from one of the included examples (the example worked fine everywhere). Can anyone point me in the right dir

  • VI:s corrupt after storage on old Apple Server

    Many of our vi:s won't open in LabView 6 or 7 after beeing stored on MacOS ASIP (under MacOS 8.6). They are created on PC:s generally, stored for backup purposes on ASIP server, and will not open when copied back to PC (WinXP). Where shall one look f

  • Unlock varizon iphone 4s outside US (Thailand)

    I am in Thailand now. A friend of mine just received an Iphone 4s from his relative living in US. The phone is locked or not activated. I already restored the phone to IOS 6.1.3. However, we still need to activate the phone. When I look at the sim ca

  • Ipad 1 - Unable to charge/restart

    Hi. I am having an ipad1. I have not used it for months. The charge has run out and now when I plug in - it would not charge. Tried pressing 'home' and 'sleep' buttons together for 10 sec/ 15 sec. But in vain. Is there a hope? Pls help. Thanks in adv