Error while creating pivot table in recording macro

im getting error " Run time error 1004: unable to get the pivottables property of the worksheet class
below is the code
Sub Macro16()
' Macro16 Macro
' Keyboard Shortcut: Ctrl+t
    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "Premium Data!R1C1:R25000C11", Version:=xlPivotTableVersion14). _
        CreatePivotTable TableDestination:="", TableName:= _
        "PivotTable14", DefaultVersion:=xlPivotTableVersion14
    Sheets("Premium Pivot").Select
    Cells(2, 2).Select
    With ActiveSheet.PivotTables("PivotTable14").PivotFields("RM")
        .Orientation = xlRowField
        .Position = 1
    End With
    ActiveSheet.PivotTables("PivotTable14").AddDataField ActiveSheet.PivotTables( _
        "PivotTable14").PivotFields("KL"), "Sum of KL", xlSum
End Sub

You have TableDestination:="" which means you are not specifying a destination and therefore a new sheet gets created and it becomes the active sheet. You are selecting Sheets("Premium Pivot") which will not
have the pivot table and the remainder of the code references the ActiveSheet.
Either delete the line Sheets("Premium Pivot").Select or set the table destination like the following.
TableDestination:="'Premium Pivot'!R3C1"      (Note the single quotes around the sheet name that contains a space. Edit the range on the destination to suit your requirements.)
Regards, OssieMac

Similar Messages

  • Out of Disk Space Error while Generating Pivot Table

    Hi!
    I encountered the following error while Generating Pivot Table -
    View pivotTableView!1 returned the following message:
    Odbc driver returned an error (SQLExtendedFetch).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC
    Location: saw.odbc.statement.fetch,
    saw.cube.engine.execute.dataTraversal, saw.cube.engine.execute,
    saw.cube.cache.processCube, saw.views.pivottable.displayer,
    saw.subsystem.portal, saw.httpserver.request,
    saw.rpc.server.responder, saw.rpc.server,
    saw.rpc.server.socketServer, saw.threadPool, saw.threadPool,
    saw.threads
    File: ./project/webodbcaccess/odbcresultsetimpl.cpp, Line: 182
    State: S1000. Code: 10058. [NQODBC] [SQL_STATE: S1000] [nQSError:
    10058] A general error has occurred. Out of disk space. (S1000)

    user11204020, what's your question?? :)
    You're getting an out of disk space error ... which means you've run out of disk space, no?
    Since it's saw related I'm guessing you'll need to make more space available to your OracleBIdata/tmp directory

  • Getting error while creating a table

    Hi there,
    I have created a user 'ram' and gave "create table" permissions for that user.
    After that, when I tried to create a table using the command
    create table countries as select * from hr.countries;
    where hr is another user and countries is the name of table in that schemagetting error message
    ERROR at line 1:
    ORA-00942: table or view does not existNOTE: The same error occurs even while creating a table in 'ram' schema after granting sysdba rights to 'ram'
    Thanks
    Rajiv

    Hi,
    dose the user ram has SELECT rights on the table hr.countries. Can he do SELECT in that table.
    Thanks

  • I am receiveing error while creating Z table: Entry in table TAORA missing

    Hi Experts,
    I am receiving "Entry in table TAORA missing" while creating Z table.
    Please help
    Edited by: N_niki on Jun 11, 2011 9:22 AM

    Hi
    1) Check for the DB System. The Table name in  "Entry in table TAORA missing", meant to save the "DATA CLASS of the ORACLE application"., OR
    2) check for the Data Class you Selected, on Creation of the Z Table, for which an Entry exists in the TAORA or the Available DATA CLASS in the TAORA Table to fix it.
    Regards
    Gopu

  • Error while creating external table

    Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
    In the temp directory i've a text file countries1.txt
    the text file has the below information
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.The creation of external table query is
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
      LOCATION ('Countries1.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;And the error is
    SQL> select *from countries_ext;
    select *from countries_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    SQL> Please help me in this

    You are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
    Step1: Check the file is actually there.
    C:\oracle\product\10.2.0>mkdir temp
    C:\oracle\product\10.2.0>cd temp
    C:\oracle\product\10.2.0\temp>dir
    Volume in drive C is C_Drive
    Volume Serial Number is 8A93-1441
    Directory of C:\oracle\product\10.2.0\temp
    07/30/2011  12:00 PM    <DIR>          .
    07/30/2011  12:00 PM    <DIR>          ..
    07/30/2011  12:00 PM                79 countries1.txt
                   1 File(s)             79 bytes
                   2 Dir(s)  50,110,582,784 bytes free
    C:\oracle\product\10.2.0\temp>type countries1.txt
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,Welsh
    C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
    SQL> show user
    USER is "SYS"
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.
    SQL>Step 3: Table definition.
    C:\>sqlplus scott@orclsb/tiger
    SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE TABLE countries_ext (
      2    country_code      VARCHAR2(5),
      3    country_name      VARCHAR2(50),
      4    country_language  VARCHAR2(50)
      5  )
      6  ORGANIZATION EXTERNAL (
      7    TYPE ORACLE_LOADER
      8    DEFAULT DIRECTORY ext_tables
      9    ACCESS PARAMETERS (
    10      RECORDS DELIMITED BY NEWLINE
    11      FIELDS TERMINATED BY ','
    12      MISSING FIELD VALUES ARE NULL
    13      (
    14        country_code      CHAR(5),
    15        country_name      CHAR(50),
    16        country_language  CHAR(50)
    17      )
    18    )
    19    LOCATION ('Countries1.txt')
    20  )
    21  PARALLEL 5
    22  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> SELECT * FROM countries_ext;
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    ENG   England
    English
    SCO   Scotland
    English
    IRE   Ireland
    English
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    WAL   Wales
    Welsh

  • Error when creating pivot table in BI publisher template

    When I try to create a chart or pivot in BI publisher it keeps throwing error
    'Please load Datasource first'
    It allows me to create table so I am not sure why is complaing when creating a pivot.

    Hi
    This error you are getting while creating RTF template right?
    yes, before proceeding to use the columns you need to load the XML data of your data model into your template
    1. Open Microsoft Word.
    2. From the Oracle BI Publisher menu, select Log On.
    3. Enter your BI Publisher credentials and the URL for the BI Publisher server. (Contact your system administrator if you do not know the URL.)
    4. The Open Template dialog presents the same folder structure as your BI Publisher Reports home page. Select the report for which you want to build a template.
    5. Select Open Report to load the data to the Template Builder; or double-click <New> in the Layout Templates pane.
    Note that any existing templates will be listed in the Layout Templates pane.
    select <New> in Layout template section than select Open layout tempate to get automatically load your data into template..
    ELSE
    do manually,
    in publisher,
    after saving your report go to view the report
    select data template and import that to your local drive.
    now in your MS-Word.. in bi publisher toolbar
    you find Data option, then select the load xml and give that path...
    after this you can carry on creating charts or tables..
    Hope this is what you want..
    Thanks & Regards
    Kishore Guggilla

  • Error while creating temporary table

    Hi All,
    I am trying to integrate ODI and BAM . I have followed all the steps given in the guide.While creating interface i am getting the error while LKM is working.
    I am using LKM SQL to SQL and IKM Oracle BAM Insert ( as the inserted data should be captured after inserting).
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bam_odi.htm
    Please use this link for clarification.For me drop work table and create work table failed (C$ -work table). Anyone have any idea about this could you help me?
    Thanks in advance,
    Gnanaprakasam

    It seems the table(MMMORDERFILE_C$_REQUEST ) already exist in the work schema,so cant able to create and throw an error. can you tell me which KM you are using?

  • Error while creating partition table

    Hi frnds i am getting error while i am trying to create a partition table using range
    getting error ORA-00906: missing left parenthesis.I used the following statement to create partition table
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION SO99Q1 VALUES LESS THAN TO_DATE(‘01-APR-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q2 VALUES LESS THAN TO_DATE(‘01-JUL-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q3 VALUES LESS THAN TO_DATE(‘01-OCT-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q1 VALUES LESS THAN TO_DATE(‘01-APR-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q2 VALUES LESS THAN TO_DATE(‘01-JUL-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q3 VALUES LESS THAN TO_DATE(‘01-OCT-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2001’, ‘DD-MON-YYYY’)
    ;

    More than one of them. Try this instead:
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE) (
    PARTITION SO99Q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')))In the future, if you are having problems, go to Morgan's Library at www.psoug.org.
    Find a working demo, copy it, then modify it for your purposes.

  • Error while creating a pricing condition record.

    Hi
    I am trying to use the Material Group 1 (MVGR1) field from the field catalog to create a pricing condition table(9 series). I was able to create the table with MVGR1 as one of the columns but when I try to maintain condition records in the table, System gives me the following error. I have maintained certain values in the config for material group1. there is neither F4 values for the field Material group nor I can type in config values of MVGR1 in that field. I am getting this error. Any help on how to get past this issue will be highly appreciated.
    Thanks
    Object Material group 1 not provided with characteristic AS. (Note other fields!)
    Message no. VK432
    Diagnosis
    The value entered in a field is not permitted.
    System response
    The system issues an error message.
    Procedure
    Check the entry and make the necessary corrections. Note any relationships between the individual fields. Entries in other fields may also be incorrect.
    Example: There are two fields for maintaining the country and region. These fields are linked. The country chosen would be permitted if it were by itself. So would the region. But the region may not be in the the country chosen. In this case, an error message is issued. The country should then be corrected, not the region!
    Edited by: Suraj Ramakrishnan on Dec 24, 2009 2:45 AM

    Message no. VK432
    Check note 750841
    thanks
    G. Lakshmipathi

  • Error while creating adf table in jdev 11.1.1.2.0

    Hi
    I am getting below error while running the jsf page.
    =======
    <UIXInclude><_setupIncludeContext> Illegal call to setup the context of an include that is already in context
    <UIXInclude><_tearDownIncludeContext> Illegal call to tear down the context of an include that is not in context
    <UIXPageTemplate><tearDownVisitingContext> Tear down of page template context failed due to an unhandled exception.
    java.util.NoSuchElementException
    =======
    In this jsf page I just dragged view object to create a table.
    What could be the reason?
    Thanks

    Hi,
    Did you drop it as ADF table? Can you post the code snippet of your jspx page?
    -Arun

  • Syntax error while creating Derieved table in universe

    Hi Guru,s
    I really need help here.
    I am trying to create relational universe based on oracle 10g and while creating one of the derieved table when I am writing a SQL sysntax it gives me an Invalid prompt defination error , first of all here is the SQL syntax"
    SELECT
      ITEM.ID,
      ITEM.AMOUNT,
      ITEM.POSTEDORISSUE
    FROM
      ACCOUNT,
      ITEM,
      ITEMTYPES,
      ACCOUNTPOOL,
      COMPANY
    WHERE
      ( ACCOUNT.COMPANYID=COMPANY.ID  )
      AND  ( ACCOUNT.POOLID=ACCOUNTPOOL.ID  )
      AND  ( ACCOUNT.ID=ITEM.ACCOUNTID  )
      AND  ( ITEMTYPES.ID=ITEM.DCIP  )
      AND
       COMPANY.NAME  =  'MLC BA Cat Accounting PRD1'
       AND
       ITEM.POSTEDORISSUE  BETWEEN  @Prompt('Start Date','D','Date\Post Date',mono,free,persistent,{'01-10-2011 00:00:00'},'1')  AND  @Prompt('End Date','D','Date\Post Date',mono,free,persistent,{'01-10-2011 00:00:00'},'2')
    Now thw error I get is that when I trying to parse or validate the query.
    "Invalid Prompt defination" (WIS 00005)
    Seems like its not validating the query through database.
    I have checked the prompt sysntax and nothing seems to be wrong, Can anyone pls look into this and advise what am I doing wrong interms of syntax, I would really appreciate your help.
    Regards.
    MD

    Hi,
    I am getting the correct results, when i can use like below
    @prompt('Enter Product Equal','A',{'TTTT','YYYYY','oooo'},Mono,Constrained,Persistent,User:1,Optional)
    @prompt('Enter Product Not Equal','A',{'TTTT','YYYYY','oooo'},Mono,Constrained,Persistent,User:2,Optional)
    If i can start using like below, not getting the correct results, Any suggestion why?
    @prompt('Enter Product Equal','A','Table_Name\Product',Mono,Constrained,Persistent,User:1,Optional)
    @prompt('Enter Product Not Equal','A','Table_Name\Product',Mono,Constrained,Persistent,User:2,Optional)
    I am thinking something issue with class name/Object Name  in BI 4.0. In XIR3  I changed the same derived table with class name and object name, it;s working fine.
    Any suggestions/advice please
    Praveen

  • Error to create pivot table

    I want to create a pivot table, The version of jdeveloper is 11.1.1.6.0 I create a read only view object for the pivot table, but in the last step instead or return the data, only shows this error Invalid UTF8 encoding.
    Can anyone help me to correct the error, the fragment and the view has utf-8 encoding.

    I want to create a pivot table, The version of jdeveloper is 11.1.1.6.0 I create a read only view object for the pivot table, but in the last step instead or return the data, only shows this error Invalid UTF8 encoding.
    Can anyone help me to correct the error, the fragment and the view has utf-8 encoding.

  • Error while creating new table

    Hi
    First I had deleted one custom table. Then I try to create the same table with different fields. Now I am gettinh the errors.
    1.    ZLV_COMP_TABLE: Inconsistency DD <-> DB (check table with analysis tool)
    2.   A table called ZLV_COMP_TABLE exists in the database
    3.   No active nametab exists for ZLV_COMP_TABLE
    4.   Termination due to inconsistencies
    5.  Table ZLV_COMP_TABLE (Statements could not be generated)
      6.  Error number in DD_DECIDE (9)
    Please help me ... how can I create a table with same name.
    thanks
    Subhankar

    Hello,
    goto SE14 -- Give the table name
    use Tables Radio button
    click on Edit
    check the Delete Data Radio button
    click on ACTIVATE AND ADJUST DATABASE.
    Now check the table in SE11.
    If it still exits you can change the same table or Delete it again & create a new table with Same Name.
    This might help your query.
    Anil.

  • Error while creating database table

    Hi
    I am creating a table with 2 key fields of length 255 chars each. its giving me error Key field is greater than 780. Please suggest.
    Regards
    Aditya

    Hi,
    Since table key can be max of 255 length,we rarely make use of a single key field of 255,
    so, reduce the length of field.
    Constraints
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.
    Edited by: Sreesudha Gullapalli on Feb 6, 2009 8:19 AM

  • Error while creating dynamic Table

    Hi All,
    I have a node 'SEG' with 3 attributes, ATTR1.2.3, I am tring to crate dynamic table using this context node. Initialy i am displaying view with button, when click on this button i want to create table dynamically.. if click again one more table i have to create.. its giving dump... here is the code... How to do this???
    data: wd_node_info type ref to if_wd_context_node_info,
            wd_node type ref to if_wd_context_node,
            lr_container type ref to cl_wd_uielement_container,
            lv_tablename type string,
            lt_db_data type ref to data,
            lr_table type ref to cl_wd_table.
      field-symbols: <lt_data> type any table.
      wd_node_info = wd_context->get_node_info( ).
      wd_node = wd_context->get_child_node( name = 'SEG' ).
    lr_container ?= view->get_root_element( ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
    " Creating internal table with the same structure as our dynamic
      context node
      CALL METHOD CL_WD_DYNAMIC_TOOL=>CREATE_TABLE_FROM_NODE
        EXPORTING
          UI_PARENT = lr_container
          TABLE_ID  = 'MY_TABLE'
          NODE      = wd_node
        RECEIVING
          TABLE     = lr_table.
      cl_wd_matrix_data=>new_matrix_data( element = lr_table ).
      lr_table->bind_data_source( path = 'SEG' ).
    Thanks'
    Madhan.

    Hi Sarbjeet,
    The code is working fine, when i use in wddomodify view method without button click on first time.( I checked this by creating another component). But I am creating dynamic table when click on button(view contains one button initially), for this i created two attributes FLAG OF TYPE wdy_boolean and count of type int1. and in button action i write this code :
      DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_flag LIKE ls_context-flag.
      get element via lead selection
        lo_el_context = wd_context->get_element( ).
      get single attribute
        lo_el_context->set_attribute(
            name =  `FLAG`
            value = abap_true ).
      DATA lv_count LIKE ls_context-count.
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `COUNT`
        IMPORTING
          value = lv_count ).
    lv_count = lv_count + 1.
    lo_el_context->set_attribute(
        EXPORTING
          name =  `COUNT`
          value = lv_count ).
    and in wddomodify view method following code..
    Method WDDOMODIFYVIEW
    DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_flag LIKE ls_context-flag.
      get element via lead selection
        lo_el_context = wd_context->get_element(  ).
      get single attribute
        lo_el_context->get_attribute(
          EXPORTING
            name =  `FLAG`
          IMPORTING
            value = lv_flag ).
      DATA lv_count LIKE ls_context-count.
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `COUNT`
        IMPORTING
          value = lv_count ).
    if lv_flag = abap_true. ......
    Remaining code same post previously************8
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->set_attribute(
        EXPORTING
          name =  `FLAG`
          value = abap_false ).
    endif.
    endmethod...
    I created like this i am not getting other UI elements(input, ddbykey,button).
    And if i click view button again it going to dump..
    Thanks,
    Madhan.

Maybe you are looking for