Change the datatype of the Keyfigure

Dear all
I have a Keyfigure which was earlier defined as Decimal with 3 decimals places.But now with the change in the Customer's requirement , I need to make it with 8 decimal place. the  way out is to either increase the decimal places supported ( but this is not working , i tried ) or to change the datatype to FLTP , but again this option is non-editable , so i am not able to change it either.
I also tried to create a new InfoObject , but then i would have to change evrything from infosource to update rules.
BI-Guru's , Is there any way out here ?
Thanks
Ramesh

Hi,
you won't be able to change your KeyFig without reloading your target with your new key figure setting. Indeed changing to floating point will change your figures...
You have to create a new KeyFig, map your URules... an reload your data in your target; you could use a copy of your cube in order to do so.
hope this helps...
Olivier.

Similar Messages

  • How to change the datatype in the oracle table?

    Hi,
    I need to change the datatype of the column in Oracle table. That column contains some data. I do not want to loose those data.
    For altering a table/column condition are:
    1. either table should not contain any data.
    2. either that column should not contain any data.
    Please suggest how i can handle this situation.
    Thanks.

    Hello,
    Suppose you have currently datatype of column as VARCHAR and you want to convert it in NUMBER. Do following
    1-Add another column with NUMBER datatype in your table.
    ALTER table tablename
    ADD testcolumn NUMBER;2-Update your actual column data to this test column.
    UPDATE tablename
    SET testcolumn = actualcolumn;
    COMMIT;3-Update your actual column data to null;
    UPDATE tablename
    SET actualcolumn = NULL;
    COMMIT;4-Change Datatype of actual column.
    ALTER table tablename
    MODIFY actualcolumn NUMBER;5-Update actualcolumn to testcolumn
    UPDATE tablename
    SET actualcolumn = testcolumn;
    COMMIT;
    please mark if it help you or correct
    Regards,
    Danish

  • Why does my IN operator change the datatype

    Hi
    This doesn't make any sense, but i'm hoping there's an obvious answer which you guys have seen a million times before.
    I have this criteria in my WHERE clause
    AND rpg_id = (SELECT rpg_id
                                             FROM integration.rep_elig_groups
                                            WHERE pel_id IN(34))because of this clause no results are return in my query. However if i use a to_number function like this:
    AND rpg_id = to_number(SELECT rpg_id
                                             FROM integration.rep_elig_groups
                                            WHERE pel_id IN(34))OR
    AND to_char(rpg_id) = (SELECT rpg_id
                                             FROM integration.rep_elig_groups
                                            WHERE pel_id IN(34))i get the expected results returned.
    The sub query:-
    SELECT rpg_id
                                             FROM integration.rep_elig_groups
                                            WHERE pel_id IN(34)returns the value 226. rpg_id in this table is a NUMBER datatype. As is rpg_id in the original outer query.
    I looked at synonyms, views, and other objects it might be using for the rep_elig_groups table, but there are none.
    Then i tried changing the IN operator for an EQUALS operator and would you believe it, it worked.
    AND rpg_id = (SELECT rpg_id
                                             FROM integration.rep_elig_groups
                                            WHERE pel_id IN(34))can someone please explain what ORACLE is thinking here!!!
    Many thanks
    Edited by: tri_harder on Dec 9, 2008 4:48 PM missed the closing bracket in the final piece of code!
    Edited by: tri_harder on Dec 10, 2008 8:44 AM

    I ran the expain plans in TOAD for both queries, with the only difference changing the operator from IN to =. I'm very surprised there is such a difference between the two!!
    SELECT   tim_id,
                  rpg_id,
                                 ROUND(SUM(retail_value), 2) retail_value,
                                 ROUND(SUM(salesidx), 2) salesidx,
                                 ROUND(SUM(VALUE), 2) VALUE,
                                 ROUND(SUM(bva_salesidx), 2) bva_salesidx,
                                 ROUND(SUM(bva_value), 2) bva_value,
                                 ROUND(SUM(bva_retail_value), 2) bva_retail_value
                            FROM ms_stats_ol_ms
                           WHERE 1 = 1
                             AND fmt_id IN(SELECT ID
                                             FROM formats
                                            WHERE car_id = 0 OR 0 = 0)
                             AND fmt_id NOT IN(
                                   SELECT fmt.ID
                                     FROM formats fmt,
                                          class_formats clf
                                    WHERE fmt.ID = clf.fmt_id
                                      AND clf.cla_id IN(3, 6)
                                      AND fmt.car_id = 2)
                             AND cla_id = 3
                             AND rpg_id = (SELECT rpg_id
                                             FROM rep_elig_groups
                                            WHERE pel_id IN(34))
                             AND tim_id BETWEEN 4985 AND 5418
                        GROUP BY tim_id, rpg_idSo this is my original query that returned no results and produced the following Explain Plan:-
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 10,842  Bytes: 1,505  Cardinality: 35                                          
         17 HASH GROUP BY  Cost: 10,842  Bytes: 1,505  Cardinality: 35                                     
              16 HASH JOIN  Cost: 10,836  Bytes: 1,587,345  Cardinality: 36,915                                
                   1 TABLE ACCESS FULL TABLE INTEGRATION.FORMATS Cost: 2  Bytes: 90  Cardinality: 15                           
                   15 HASH JOIN RIGHT ANTI  Cost: 10,833  Bytes: 1,456,912  Cardinality: 39,376                           
                        6 VIEW VIEW SYS.VW_NSO_1 Cost: 4  Bytes: 6  Cardinality: 2                      
                             5 HASH JOIN  Cost: 4  Bytes: 24  Cardinality: 2                 
                                  2 TABLE ACCESS FULL TABLE INTEGRATION.FORMATS Cost: 2  Bytes: 12  Cardinality: 2            
                                  4 INLIST ITERATOR            
                                       3 INDEX RANGE SCAN INDEX (UNIQUE) INTEGRATION.CLF_PK Cost: 1  Bytes: 60  Cardinality: 10       
                        14 TABLE ACCESS BY INDEX ROWID TABLE CHARTDEV.MS_STATS_OL_MS Cost: 10,829  Bytes: 1,530,034  Cardinality: 45,001                      
                             13 BITMAP CONVERSION TO ROWIDS                 
                                  12 BITMAP AND            
                                       8 BITMAP INDEX SINGLE VALUE INDEX (BITMAP) CHARTDEV.MSST_OL_MS_RPG_ID_I      
                                            7 INDEX FAST FULL SCAN INDEX (UNIQUE) INTEGRATION.REG_PK Cost: 2  Bytes: 6  Cardinality: 1 
                                       10 BITMAP MERGE       
                                            9 BITMAP INDEX RANGE SCAN INDEX (BITMAP) CHARTDEV.MSST_OL_MS_TIM_ID_I
                                       11 BITMAP INDEX SINGLE VALUE INDEX (BITMAP) CHARTDEV.MSST_OL_MS_CLA_ID_I      The following script has the very small change of the operator changed from IN to =
    SELECT   tim_id,
                  rpg_id,
                                 ROUND(SUM(retail_value), 2) retail_value,
                                 ROUND(SUM(salesidx), 2) salesidx,
                                 ROUND(SUM(VALUE), 2) VALUE,
                                 ROUND(SUM(bva_salesidx), 2) bva_salesidx,
                                 ROUND(SUM(bva_value), 2) bva_value,
                                 ROUND(SUM(bva_retail_value), 2) bva_retail_value
                            FROM ms_stats_ol_ms
                           WHERE 1 = 1
                             AND fmt_id IN(SELECT ID
                                             FROM formats
                                            WHERE car_id = 0 OR 0 = 0)
                             AND fmt_id NOT IN(
                                   SELECT fmt.ID
                                     FROM formats fmt,
                                          class_formats clf
                                    WHERE fmt.ID = clf.fmt_id
                                      AND clf.cla_id IN(3, 6)
                                      AND fmt.car_id = 2)
                             AND cla_id = 3
                             AND rpg_id IN (SELECT rpg_id
                                             FROM rep_elig_groups
                                            WHERE pel_id IN(34))
                             AND tim_id BETWEEN 4985 AND 5418
                        GROUP BY tim_id, rpg_idAnd this returned the expected results and produced the following Explain plan:-
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 10,996  Bytes: 1,610  Cardinality: 35                                                    
         30 TEMP TABLE TRANSFORMATION                                               
              10 LOAD AS SELECT SYS.SYS_TEMP_0FD9D6614_166B4444                                         
                   9 MERGE JOIN CARTESIAN  Cost: 6  Bytes: 570  Cardinality: 30                                     
                        5 VIEW VIEW SYS.VW_NSO_1 Cost: 4  Bytes: 26  Cardinality: 2                                
                             4 HASH JOIN  Cost: 4  Bytes: 24  Cardinality: 2                           
                                  1 TABLE ACCESS FULL TABLE INTEGRATION.FORMATS Cost: 2  Bytes: 12  Cardinality: 2                      
                                  3 INLIST ITERATOR                      
                                       2 INDEX RANGE SCAN INDEX (UNIQUE) INTEGRATION.CLF_PK Cost: 1  Bytes: 60  Cardinality: 10                 
                        8 BUFFER SORT  Cost: 6  Bytes: 90  Cardinality: 15                                
                             7 TABLE ACCESS BY INDEX ROWID TABLE INTEGRATION.FORMATS Cost: 1  Bytes: 90  Cardinality: 15                           
                                  6 INDEX UNIQUE SCAN INDEX (UNIQUE) INTEGRATION.FMT_PK Cost: 0  Cardinality: 1                      
              29 HASH GROUP BY  Cost: 10,990  Bytes: 1,610  Cardinality: 35                                          
                   28 HASH JOIN  Cost: 10,989  Bytes: 4,600  Cardinality: 100                                     
                        11 TABLE ACCESS FULL TABLE (TEMP) SYS.SYS_TEMP_0FD9D6614_166B4444 Cost: 2  Bytes: 180  Cardinality: 30                                
                        27 HASH JOIN RIGHT SEMI  Cost: 10,987  Bytes: 34,280  Cardinality: 857                                
                             12 INDEX FAST FULL SCAN INDEX (UNIQUE) INTEGRATION.REG_PK Cost: 2  Bytes: 6  Cardinality: 1                           
                             26 TABLE ACCESS BY INDEX ROWID TABLE CHARTDEV.MS_STATS_OL_MS Cost: 10,984  Bytes: 1,310,574  Cardinality: 38,546                           
                                  25 BITMAP CONVERSION TO ROWIDS                      
                                       24 BITMAP AND                 
                                            16 BITMAP MERGE            
                                                 15 BITMAP KEY ITERATION       
                                                      13 INDEX FAST FULL SCAN INDEX (UNIQUE) INTEGRATION.REG_PK Cost: 2  Bytes: 6  Cardinality: 1 
                                                      14 BITMAP INDEX RANGE SCAN INDEX (BITMAP) CHARTDEV.MSST_OL_MS_RPG_ID_I
                                            18 BITMAP MERGE            
                                                 17 BITMAP INDEX RANGE SCAN INDEX (BITMAP) CHARTDEV.MSST_OL_MS_TIM_ID_I      
                                            22 BITMAP MERGE            
                                                 21 BITMAP KEY ITERATION       
                                                      19 TABLE ACCESS FULL TABLE (TEMP) SYS.SYS_TEMP_0FD9D6614_166B4444 Cost: 2  Bytes: 13  Cardinality: 1 
                                                      20 BITMAP INDEX RANGE SCAN INDEX (BITMAP) CHARTDEV.MSST_OL_MS_FMT_ID_I
                                            23 BITMAP INDEX SINGLE VALUE INDEX (BITMAP) CHARTDEV.MSST_OL_MS_CLA_ID_I           Can anybody suggest what's going on?? Why do i get results with one and not the other!!
    Edited by: tri_harder on Dec 10, 2008 10:00 AM
    altered the first query to change the IN operator to =

  • Change the datatype of all the columns

    Oracle version 10g.
    I have a table with 150 columns.
    I'd like to change the datatype of all the columns in my table to varchar.
    Do we have a query for this task?
    Thanks.

    Not knowing yet what you'll answer to John:
    If your table is empty, you can use the datadictionary to generate a statement and execute it using dynamic SQL or spool the query to a file that does the DDL and run that...
    Example:
    MHO%xe> create table bla (col1 number, col2 number);
    Tabel is aangemaakt.
    MHO%xe> select column_name, data_type from user_tab_columns where table_name = 'BLA';
    COLUMN_NAME                    DATA_TYPE
    COL1                           NUMBER
    COL2                           NUMBER
    MHO%xe> declare
      2    l_sql varchar2(4000);
      3    l_sep varchar2(1);
      4  begin
      5    l_sql := 'alter table BLA modify ('||chr(10);
      6    for rec in ( select column_name from user_tab_columns where table_name = 'BLA')
      7    loop
      8      l_sql := l_sql||l_sep||' '||rec.column_name||' varchar2(50)'||chr(10);
      9      l_sep := ',';
    10    end loop;
    11    --
    12    dbms_output.put_line(l_sql||' )');
    13    --
    14    execute immediate l_sql||' )';
    15    --
    16  end;
    17  /
    alter table BLA modify (
    COL1 varchar2(50)
    , COL2 varchar2(50)
    PL/SQL-procedure is geslaagd.
    MHO%xe> select column_name, data_type from user_tab_columns where table_name = 'BLA';
    COLUMN_NAME                    DATA_TYPE
    COL1                           VARCHAR2
    COL2                           VARCHAR2

  • Changing DataColumn DataType in the same DataTable

    hi,
    I have following requirement.
    In a DataTable, I have a DataColumn with String as DataType (This has dateTime data in String format). I want to change this DataType to DateTimeStamp and then sort it in ASC order.
    Could someone please share sample code to do this?
    Appreciate for your help.
    Many Thanks,
    Alex
    AC

    Hi Alex,
    >> In a DataTable, I have a DataColumn with String as DataType (This has dateTime data in String format). I want to change this DataType to DateTimeStamp and then sort it in ASC order. Could someone please share sample code to do this?
    As far as I know, the DateTimeStamp is an element in Exchange Server, there is “System.DateTime” in C#. Do you want to covert the string to System.DateTime, and sort it in ASC order? If so, I will recommend you add a new column, convert the string to DateTime,
    add the value of the DateTime to the new column, and then sort by the new column.
    For information about adding new column, you could refer the link below:
    # DataTable Class
    https://msdn.microsoft.com/en-us/library/system.data.datatable(v=vs.110).aspx
    For information about converting the string to DateTime, you could refer the link below:
    # How to: Convert a String to a DateTime (C# Programming Guide)
    https://msdn.microsoft.com/en-us/library/cc165448.aspx?f=255&MSPPError=-2147217396
    For information about sorting by the new column, you could refer the link below:
    # Dataset sorting in c#
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/adbd95cd-49d1-483d-b2b2-4b696a66e9a6/dataset-sorting-in-c?forum=netfxbcl
    If I misunderstand you, please feel free to let me know.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Is it possible to change the datatype of the Restricted Column?

    Hi,
    1. I created a Analytic View, and in the Analytic view applied the retricted Column.
        I have restricted the column SALES REVENUE(Measure) based on the Attribute Column Country.
        Have checkedin  Include. When i validate the process, I get an error as -
       "The aggregation type FORMULA can not be applied on calculated column RC_SALES of data type CHAR"
        Here RC_SALES is my Restricted Column and not Calculated Column, but in the errors it shows vice versa.
    2. Is it possible to change the data type of the Restricted Column. If so, where should i change it, I have tried in the Properties pane and also i have
        tried within the semantics of the Analytic view. Within Semantic, the aggregation type is set as SUM by default.
    Thanks and regards
    Sanjay

    Hi,
    In SQL*Plus, you can set the width of a DATE column the same way you do it for a VARCHAR2.
    COLUMN  dateacquired  FORMAT A12
    SELECT  SYSDATE  AS dateacquired
    FROM    dual;produces
    DATEACQUIRED
    29-JAN-09

  • How to change the datatype of a column having lots of data.

    My table :: select hrm_employeeentitlement_id, amount FROM hrm_employeeentitlement;
    need to change the Amount column :(
    From :: amount Number(18,0)
    To :: amount Number(10,2)
    I am using 10XE
    thanks in advance
    w\

    create a "temp" backup of your table, drop the original and create a new table. Fill this one with the "temp"
    SQL> create table t
      2  (amount number (18,0))
      3  /
    Table created.
    SQL> insert into t
      2  select rownum
      3    from all_objects
      4   where rownum <= 10
      5  /
    10 rows created.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter table t
      2  modify (amount number (10,2))
      3  /
    modify (amount number (10,2))
    ERROR at line 2:
    ORA-01440: column to be modified must be empty to decrease precision or scale
    SQL> create table temp
      2  as
      3  select *
      4    from t
      5  /
    Table created.
    SQL> drop table t
      2  /
    Table dropped.
    SQL> create table t
      2  (amount number (10,2))
      3  /
    Table created.
    SQL> insert into t
      2  select *
      3    from temp
      4  /
    10 rows created.
    SQL> drop table temp purge
      2  /
    Table dropped.

  • Question on changing the owner of spatial datatype

    create table test4 (
    COL1 NUMBER(38) NOT NULL,
    COL14 SCOTT.SDO_GEOMETRY
    ) TABLESPACE USERS;
    SQL> select table_owner, table_name FROM all_synonyms where synonym_name='SDO_GEOMETRY'
    OMETRY';
    TABLE_OWNER TABLE_NAME
    SCOTT SDO_GEOMETRY
    I want to change the owner of SDO_GEOMETRY to MDSYS. I know re-creating the table like "COL14 MDSYS.SDO_GEOMETRY" will get what i'm
    looking for but is there a way to ALTER the table to achieve the same without re-creating it?
    Thanks,
    Rajesh

    user11919950,
    . . . .If you're just messing around on a test machine, then give this a spin:
    -- "Identify obj# in table named obj$ for SDO_GEOMETRY owned by MDSYS
    select
       obj#,
       t.OBJECT_NAME,
       u.USERNAME,
       o.OWNER#
    from       sys.obj$ o,
       dba_users u,
       dba_objects t
    where      u.USER_ID = o.OWNER# (+)
    AND o.name = 'SDO_GEOMETRY'
    AND o.owner# = 46
    AND o.obj# = t.object_id;
          OBJ#   OBJECT_NAME  USERNAME   OWNER#
         45779  SDO_GEOMETRY  MDSYS      46
         48788  SDO_GEOMETRY  MDSYS      46
    -- "identify owner#/user_id for SCOTT"
    SELECT user_id FROM dba_users WHERE username = 'SCOTT'
       USER_ID
            54
    -- "Change the username of one,both of those records from MDSYS to SCOTT"
    -- "NOTE: untested SQL, but if it fails, just edit the table in Oracle Enterprise Manager"
    UPDATE obj$ SET owner# = &ScottUserID WHERE obj# = &ObjNum;
    COMMIT;
    {code}
    I've temporarily changed obj# values in this obj$ table to break associations between oracle objects that were throwing errors. I used Oracle Enterprise Manager's "view contents" form to view the obj$ table and to make those changes. See {message:id=4596120}
    Cheers,
    Noel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Change the datatype of the column in a datamodel

    Hi,
    I have a data model in place.
    I want to change the data type of 3 columns.
    How can I achieve it?

    Hi Avinash,
    Thanks for your reply !!
    This data model is based on Oracle BI Analysis.
    These columns are CHAR in the Db, rpd and in the Analysis.
    Only in the Data model these are specified as Number. I want to change these columns to CHAR.
    Any Ideas?

  • How to proceed with a requirement on changing the input type

    I have a requirement that seems rather simple yet I am having a hard time achieving it. What I have is a table where there is a Data_Value field and a Data_Type field. The Data_Value is stored in the database as a VARCHAR2(100) and the Data_Type contains the following values: STRING, DATE, DATETIME, NUMBER.
    The page I am working on is an update page, and what I am hoping to achieve through PPR is that whenever the user changes the Data_Type (I have these in a messageChoice) that the Data_Value will then be rendered with the correct settings.
    Originally I thought that I could just programmetically change the DataType property in the messageTextInput I am using, but this was causing errors since I had it bound to that field in the view which is a Varchar. I then thought that I could create one field of each type and render the one I want based on the selection, but I am getting an error saying: Data Type - Attribute set for DataType in view object Xo2cCustAcctUpdateVO1 failed whenever a new value is picked from my picklist.
    Does anyone have some suggestions on how I should tackle this issue? As a last resort I thought about just leaving that field as a String (which is how it is stored anyway) and do some validation in my controller to ensure it is formatted correctly.
    Thanks,
    Greg

    Greg,
    The simplest approach would be to define one field per data type and toggle them based on the data type selected from the choice bean. Use SPEL and PPR.

  • How can i change the Format of my DATE column?

    I need to change the date format for a whole column. At present i can do MM-DD-YYYY. I need to change this this to DD-MMM-YYYY.
    I know about the to_date function, i tried to apply it to change the format of my whole column by doing the following.....
    CREATE TABLE "IT220_DATEHOLIDAY"
    "DEPARTID" VarChar(2)NOT NULL ENABLE,
    "HOLCODE" VARCHAR2(2)NOT NULL ENABLE,
    "DEPARDATE" DATE,
    to_date('DATE','DD-MMM-YYYY'), <<<change DATE column to DD-MMM-YYYY
    CONSTRAINT "DATEHOLIDAY_PK" PRIMARY KEY ("DEPARTID") ENABLE
    ORA-00902: invalid datatype <<<<This was the error message i received.
    I am aware that the to_date function is supposed to be used to change strings into a certain format. I guess this means you cant do it with columns? Is there anyway i can format the whole column or do i have to do each string of data entered one by one?
    Thanks in advance!

    Hello Jay,
    I'm not sure you hit the right forum, as this doesn't seem to be a problem with APEX.
    Anyway:
    You can't use that function on a table like that, and as you already suggested, the to_date-function expects a string value.
    It seems you also have a misunderstanding of the basic datatypes in the database. DATE is such a datatype and is stored an internal format you don't need to care about. Each time your request the value, the database will give you a string representation according to either your locale or you give a certain formatting mask.
    The same applies to insert or update operations: you hand in either a variable of type DATE or use a function like to_date to create an "object" of type date.
    You may be interested in reading the documentation of the [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/toc.htm]Oracle Database Concepts. The section concerning datatype DATE can be found here:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/tablecls.htm#CBBGJHJC
    An overview of formatting options can be found here:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements004.htm#SQLRF00212
    So to answer your question: You would format it as part of your insert operation, taking a string and convert it using to_date.
    -Udo

  • Change the colour of the rectangle dynamically:

    Hi,
    I've some tiles in wpf application. (non clickable, drawn using Rectangle). I want to change the colour of the tile depending upon condition Ok, Warning, Error to the colour Blue, Yellow, Red respectively. 
    Can you please let me know how can I achieve this?
    Thanks,
    Santosh

    Thanks for the response.
    I'm using Datatemplate like below:
    <DataTemplate x:Key="Template1" DataType="{x:Type BusinessObjects:BindableCapability}">
                <Border x:Name="CapabilityBorder"
                              Background="{StaticResource GlobalHeaderBackgroundBrush}"
                              BorderBrush="{StaticResource TileBorderBrush}"
                              BorderThickness="1"
                              Margin="8"
                              Height="200"
                              Width="420">
                    <Grid>
                        <TextBlock x:Name="CapabilityTextBlock"
                                     Text="{Binding CapabilityIdentifierDescription}"
                                     Style="{StaticResource TileTitleTextStyle}"/>
                    </Grid>
                </Border>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding IsAvailable}" Value="False">
                        <Setter TargetName="CapabilityBorder" Property="Background" Value="{StaticResource TileErrorBrush}"/>
                        <Setter TargetName="CapabilityTextBlock" Property="Foreground" Value="{StaticResource TileErrorForegroundBrush}"/>
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>
            <DataTemplate x:Key="Template2" DataType="{x:Type BusinessObjects:BindableCapability}">
                <Border x:Name="CapabilityBorder"
                              Background="{StaticResource GlobalHeaderBackgroundBrush}"
                              BorderBrush="{StaticResource TileBorderBrush}"
                              BorderThickness="1"
                              Margin="8"
                              Height="200"
                              Width="202">
                    <Grid>
                        <TextBlock x:Name="CapabilityTextBlock"
                                     Text="{Binding CapabilityIdentifierDescription}"
                                     Style="{StaticResource TileTitleTextStyle}"/>
                    </Grid>
                </Border>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding IsAvailable}" Value="False">
                        <Setter TargetName="CapabilityBorder" Property="Background" Value="{StaticResource TileErrorBrush}"/>
                        <Setter TargetName="CapabilityTextBlock" Property="Foreground" Value="{StaticResource TileErrorForegroundBrush}"/>
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>
    Like Temlate1 and Templdate2, I should have one more template which fills the color dynamically for the above templates. I've 12 tiles (rectangles), I need to give some blue, some yellow and some red depending upon some condition.
    Please suggest how I can achieve this?
    Thanks,
    Santosh

  • How to change the colour of row in ALV depending on condition?

    Hi All,
    I want to change the color(from green to red )of perticular row in ALV depending on certain conditions like if amount in some field in row is more than 5000.
    Can anybody please tell me how to do that?
    expecting early reply.
    Thanks in advance,
    Rohini.

    Hi
    Check this sample report
    *& Report  ZALVCOLOR                                                   *
    REPORT  ZALVCOLOR                               .
    DATA : mara TYPE mara.                 " General Material Data
    TYPE-POOLS: slis.                      " ALV Global types
    FIELD-SYMBOLS :
      <data> TYPE table.                   " Data to display
    SELECT-OPTIONS :
      s_matnr FOR mara-matnr.              " Material number
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
    PARAMETERS p_max(2) TYPE n DEFAULT '50' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_1 = 'Maximum of lines to display'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      FIELD-SYMBOLS :
        <field>    TYPE ANY,
        <field2>   TYPE ANY,
        <header>   TYPE ANY,
        <header2>  TYPE ANY,
        <lt_data>  TYPE table.             " Data read from DB
      DATA:
        lp_struct  TYPE REF TO data,
        lp_struct2 TYPE REF TO data,
        lp_table   TYPE REF TO data,       " Pointer to dynamic table
        lp_table2  TYPE REF TO data,       " Pointer to dynamic table
        ls_lvc_cat TYPE lvc_s_fcat,
        lt_lvc_cat TYPE lvc_t_fcat.        " Field catalog
    * First column
      CLEAR ls_lvc_cat.
      ls_lvc_cat-fieldname = 'MATNR'.
      ls_lvc_cat-ref_table = 'MARA'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
    * 2nd column
      CLEAR ls_lvc_cat.
      ls_lvc_cat-fieldname = 'MAKTX'.
      ls_lvc_cat-ref_table = 'MAKT'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
    * 3rd column
      CLEAR ls_lvc_cat.
      ls_lvc_cat-fieldname = 'MATKL'.
      ls_lvc_cat-ref_table = 'MARA'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
    * Create 1st internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING it_fieldcatalog = lt_lvc_cat
        IMPORTING ep_table = lp_table.
      ASSIGN lp_table->* TO <lt_data>.
    * Read data into 1st internal table
      SELECT matnr maktx matkl
        INTO TABLE <lt_data>
        FROM v_matnr
          UP TO p_max ROWS
       WHERE matnr IN s_matnr.
    * Create 2nd internal table
    * Checkbox
      CLEAR ls_lvc_cat.
      ls_lvc_cat-fieldname = 'CHECKBOX'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
    * Table color
      CLEAR ls_lvc_cat.
      ls_lvc_cat-fieldname = 'TABCOLOR'.
      ls_lvc_cat-ref_table = 'CALENDAR_TYPE'.
      ls_lvc_cat-ref_field = 'COLTAB'.
      APPEND ls_lvc_cat TO lt_lvc_cat.
    * Create 2nd internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING it_fieldcatalog = lt_lvc_cat
        IMPORTING ep_table = lp_table2.
      ASSIGN lp_table2->* TO <data>.
    * Create structure = structure of the 1st internal table
      CREATE DATA lp_struct LIKE LINE OF <lt_data>.
      ASSIGN lp_struct->* TO <header>.
    * Create structure = structure of the 2nd internal table
      CREATE DATA lp_struct2 LIKE LINE OF <data>.
      ASSIGN lp_struct2->* TO <header2>.
    * Move data from 1st internal table --> 2nd internal table
      LOOP AT <lt_data> ASSIGNING <header>.
        DESCRIBE TABLE lt_lvc_cat.
        CLEAR <header2>.
    *   Fill the internal to display <data>
        DO sy-tfill TIMES.
          READ TABLE lt_lvc_cat INTO ls_lvc_cat INDEX sy-index.
    *     For each field of lt_lvc_cat.
          ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header>
                        TO <field>.
          IF sy-subrc NE 0. EXIT .ENDIF.
          ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header2>
                        TO <field2>.
          IF sy-subrc NE 0. EXIT .ENDIF.
          <field2> = <field>.
        ENDDO.
    *   Modify color
        ASSIGN COMPONENT 'TABCOLOR' OF STRUCTURE <header2>
                      TO <field2>.
        IF sy-subrc EQ 0.
          PERFORM f_modify_color USING 'MAKTX' <field2>.
          PERFORM f_modify_color USING 'MATKL' <field2>.
        ENDIF.
        APPEND <header2> TO <data> .
      ENDLOOP.
    ENDFORM.                    " f_read_data
    *      Form  F_DISPLAY_DATA
    FORM f_display_data.
    * Macro definition
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-down      = 'X'.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_layout   TYPE slis_layout_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv.  " Field catalog
    * Build Fieldcatalog - First column
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname   = 'MATNR'.
      ls_fieldcat-ref_tabname = 'MARA'.
      ls_fieldcat-key  = 'X'.
      APPEND ls_fieldcat TO lt_fieldcat.
    * Build Fieldcatalog - 2nd column
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname   = 'MAKTX'.
      ls_fieldcat-ref_tabname = 'MAKT'.
      APPEND ls_fieldcat TO lt_fieldcat.
    * Build Fieldcatalog - 3rd column
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname   = 'MATKL'.
      ls_fieldcat-ref_tabname = 'MARA'.
      APPEND ls_fieldcat TO lt_fieldcat.
    * Layout
      ls_layout-zebra = 'X'.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-box_fieldname = 'CHECKBOX'.
      ls_layout-coltab_fieldname = 'TABCOLOR'.
      m_sort 'MATNR'.                      " Sort by creation date
    * Display data
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = <data>.
    ENDFORM.                               " F_DISPLAY_DATA
    *      Form  F_modify_color
    FORM f_modify_color USING u_fieldname TYPE lvc_fname
                              ut_tabcolor TYPE table.
      DATA:
        l_rnd_value TYPE datatype-integer2,
        ls_tabcolor TYPE lvc_s_scol.
    * Random value
      CALL FUNCTION 'RANDOM_I2'
           EXPORTING
                rnd_min   = 0
                rnd_max   = 3
           IMPORTING
                rnd_value = l_rnd_value.
      CLEAR ls_tabcolor.
      ls_tabcolor-fname = u_fieldname.
      CASE l_rnd_value.
        WHEN 0.
          ls_tabcolor-color-col = 1.       " Blue.
          ls_tabcolor-color-int = 0.
          ls_tabcolor-color-inv = 0.
        WHEN 1.
          ls_tabcolor-color-col = 3.       " Yellow.
          ls_tabcolor-color-int = 0.
          ls_tabcolor-color-inv = 0.
        WHEN 2.
          ls_tabcolor-color-col = 5.       " Green.
          ls_tabcolor-color-int = 0.
          ls_tabcolor-color-inv = 0.
        WHEN 3.
          ls_tabcolor-color-col = 6.       " Red.
          ls_tabcolor-color-int = 0.
          ls_tabcolor-color-inv = 0.
      ENDCASE.
      INSERT ls_tabcolor INTO TABLE ut_tabcolor.
    ENDFORM.                               " F_MODIFY_COLOR
    Reward all helpfull answers
    Regards
    Pavan

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    TABLES
    t_outtab = it_ekko
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • Facing data type error when changing the order of fields in a query

    Hello Experts
    I am working on E sourcing 5.1.
    I have a query with some filters . I want to change the position of a particular filter.
    Basically I want to move a filter of type date to the top , so that it is the 1st parameter.
    I was able to do this by reorder option.
    However at runtime it gives me an error saying that "error  u201CORA-00932:  inconsistent datatypes:  expected NUMBER got date."
    Later I reverted back my changes so that the date filed is at its original position and faced no issues.
    Query worked fine.
    Is the order of filters important when executing a query.
    Please suggest how can I move the date filter to the top of the query's filter list.
    Regards
    Vikas

    Hello Vikas,
    Its not the SELECT statements that you need to change. You have to change the WHERE caluse.
    In the WHERE clause, some of the conditions will have some table column equated to a '?' symbol. This symbol is a place-holder for a filter prompt. There is a one-to-one correspondence between the '?' symbols and the filter prompts created in the query(under the Filter Prompt tab). This means that the first '?' corresponds to the first filter prompt, second '?' to the second filter prompt and so on.
    Keeping the above information in mind, you can attempt to make changes to your query. You can duplicate your existing query and try your hands at it.
    One more point worth mentioning : It is evident that if you need to use the same filter prompt at more than once place in the query definition, you have to create more than one instance of that query prompt.(Here by another instance I mean that the two filter prompts should have same values in their fields when you define them.) But even when you create more than one instance of a filter prompt, on the UI it will appear just as a single instance.
    If things have become more confusing than before (of which there is a high probability ) then please go through the online help for Queries. It has got an extensive documenation and will be surely be of some help to you.
    Good luck!!
    Devesh

Maybe you are looking for

  • Success with linux/mencoder/xvid on the Creative Zen

    I just encoded a youtube video with mencoder (using the xvid codec) on Linux and I'm watching it on the zen right now. I have to use the SD card on Linux for now, because I couldn't get gnomad2 to work with the Zen.

  • Problems setting up SSD in Mountain Lion - Cannot clone

    Hello, I have tried Carbon Copy, and I continue to get the lovely '?' folder when booting.  I partition the drive before transfering everything over with CCC, but still doesn't work. I have tried to restore the drive using Disk Utility, but I get the

  • ILife '11 turns iPhoto into useless junk

    So $50 well spent!!!!! iPhoto started and just shows a spinning icon. When you click on anything in the menu it fails with the error below. This was before and after the software update for iPhoto. Joy!!! Process: iPhoto [212] Path: /Applications/iPh

  • Error thrown when a link is clicked in OAF page

    Hi all experts, In OAF, based on a query, i am populating the rows in table. One of the columns is made as a link to a standard OAF page. The link is given below. Link 1: OA.jsp?OAFunc=PO_ORDER&PoHeaderId={@PoHeaderId}&PoReleaseId=&retainAM=Y&addBrea

  • Sun one directory server 5.2 download link

    Hi, I could not locate the URL to download the sunOne directory server. I had checked the download link at Oracle as well as under Sun products in https://edelivery.oracle.com Please help. Thanks, Sreenadh