Need to change the column attribute in PIVOT

Please find the below table.
IT     Col1     col2     Col3     Col4     Grand Total
Depreciation     200     200     200     200     800
Development     100     100     100     100     400
Infrastructure     100     100     100     100     400
Grand Total     400     400     400     400     1600
Instead of Depreciation need to display as 3rd Party. But 3rd Party not present in Database.
Is there any other way to achieve in PIVOT.
Appreciate your immediate help.
Cheers,
Sathyan :x

You should be able to use a case statement in the criteria column formula like this: CASE WHEN TABLE.COLUMN_NAME = 'Depreciation' then '3rd Party' else TABLE.COLUMN_NAME end
Replace TABLE.COLUMN_NAME with your source column name.
Award points if helpful.
Thanks!
Edited by: BIPuser on Mar 19, 2010 2:20 PM

Similar Messages

  • Need to change the column constrain from NOT NULL to NULL

    Hi,
    My requriment is I have to change the column constraint (NOT NULL) to NULLable (column having data), I used below query for that
    alter table table_name modify transaction_cost2 default null
    even command is successfull, but column constrain is still NOT NULL.
    can you any one help on this.. ( steps to change column constain from not null to null)
    Thanks,

    ALTER TABLE table_name
      MODIFY( transaction_cost2 NUMBER NULL )That assumes that the data type of the TRANSACTION_COST2 column is NUMBER-- you'll want to use the current data type if it is something else. I'm hoping that the fact that you have a column named TRANSACTION_COST2 doesn't imply that you have an incorrectly normalized data model. But the name of the column certainly implies that you do.
    Justin

  • How to read in a file and change the column attributes

    Hi,
    I'm new to java and i'm stuggling to find a way to read in a text file and perform calculations on the data, such as to normalise it.
    What in want to do is normalise the data by finding the greatest value in a column and then divide all the other values in the column with that value.
    I know how to read a file in and store each line in a vector but for this problem i think i need to store each column in an array, but i'm not sure how to do this.
    Can anyone help please?
    Thanks

    Hi,
    I'm new to java and i'm stuggling to find a way to
    read in a text file and perform calculations on the
    data, such as to normalise it.
    What in want to do is normalise the data by finding
    the greatest value in a column and then divide all
    the other values in the column with that value.
    I know how to read a file in and store each line in a
    vector but for this problem i think i need to store
    each column in an array, but i'm not sure how to do
    this.
    Can anyone help please?
    ThanksI think this should work but I wrote it out without completely thinking about it (hopefully to get things started).
    So if you had this:
    age height earnings
    0 2 100
    1 3 50
    2 1 0
    For the age column you'd take 2 as the largest and then divide 0 and 1 by two to get 0, .5.
    First build up test files that seperate the columns in different ways. With spaces, tabs, and the ASCI Control character for null ( I think it's 0 ). Your program should detect
    numbers and spaces, tabs control character, commas and periods (for money). Because numbers don't have spaces it should be easy to keep track of which column
    you're in.
    Store each line into a 3D String array with each index containing a String built up from the chars scanned in on each line, when a blank area is found followed by another
    number iterate the column index. When you come to the end of the line set column == 0 and row+1.
    private String[][][] test = new String[2][6][1];
    20     3      11      14      44       0
    4      5       7      80      91      49
    test[0][0][0] would be row 1 col 1 value 1 ((20))
    test[0][1][0] would be r1, c2, v1 ((3))
    test[1][0][0] would be r2, c1, v1 ((4))
    test[1][2][0] would be r2, c3, v1 ((7))
    test[1][5][0] would be r2, c6, v1 ((49))
    package source.Final;
    import javax.swing.*;
    import java.io.*;
    public class S7
         public static void main(String[] args)
              getContents();
              System.exit(0);
         public static void getContents()
              String lineSep = System.getProperty("line.separator");
              char c = ' ';
              int iterator = 0;
              int i = 0;
              int charNum = 1;
              int lineCount = 1;
             //declared here only to make visible to finally clause
             BufferedReader input = null;
             BufferedWriter out = null;
             try {
                         String line = null;
                          * This implementation reads / writes one line at a time
                          * using the buffered reader / writer Java classes.
                         input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\test1.txt" ));
                           out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Read\\test2.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies1.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies1.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies2.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies2.txt" ));
                         //input = new BufferedReader( new FileReader( "C:\\Scan file test\\Read\\booked_policies3.txt" ));
                           //out = new BufferedWriter( new FileWriter( "C:\\Scan file test\\Write\\booked_policies3.txt" ));
                         out.write( "Character\tLine Number\tCharacter Number\tAscii Value" + lineSep );                     
                              while (( line = input.readLine()) != null)
                              i = 0;
                              charNum = 1;
                              iterator = 0;
                              while( i < line.length() )
                                               c = line.charAt(iterator);                                             
                                            if( (int)c == 0 || (int)c == 9 )
                                                 break;
                                            else if( c >= '[' && c <= '_')
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c <  ' ' )// && (int)c != 0 && (int)c != 9  )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  ';' && c <= '@' && c != '=')
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >= '!' && c < '"' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  'z' && c < '~' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c == '%' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            else if( c >  '~' )
                                                 {out.write( "["+c+"]\t\t"+"["+lineCount+"]\t\t"+"["+charNum+"]\t\t\t"+"["+(int)(c)+"]"+lineSep );}
                                            charNum += 1;
                                               iterator += 1;
                                               i++;
                                    lineCount += 1;
             catch (FileNotFoundException ex) {ex.printStackTrace();     System.out.println("File not found.");}
                 catch (IOException ex){ex.printStackTrace();               System.out.println("IO Error.");}
             finally{ try{ if( input != null ) input.close();                if( out != null ) out.close();}
                    catch (IOException ex){ex.printStackTrace();        System.out.println("IO Error #2.");}
        }

  • How to change the column width in Smartforms..?

    Hi All..
    I need to change the column width in a smartform.
    The requirement has been mentioned as follows...
    Adjust the column width of the following columns:
    MATERIAL: 14 char
    DESCRIPTION: 20 char
    How to perform this..??
    Where can i find the column width of various columns of a smartform..???
    Please Help me...
    Regards
    Pavan

    In the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
    When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Changing the naming attributes of o to ou

    Hi ,
    I need to change the naming attribute of 'o' to 'ou' so that whenever i create an organisation it will be referred to ou instead of o .Is there a way to do it?

    I don't know how to do that, but it sounds awfully dangerous to be making a fundamental change like that. Why not just use the OrganizationalUnit objectclass instead? I took a quick look at the schema and they use the same attributes, except for "o" and "ou".
    Just my $.02,
    Roger S.

  • I need to change the sum of a column's total with javascript.

    Hi,
    The HTML output of a SUM column is as follows:
    <td align="center" headers="COST" class="t2data"><b> 827.49</b></td>
    I need to change the sum total with javascript.
    The initial loading of the page SUMs the DB values correctly. Then onchange JS for a couple of factors may change one items COST.
    When that one item's COST changes I need to reSUM the total with JS.
    I was trying the following.. I don't know JS to well.
         var tds = document.getElementsByTagName('td');
         for (var xtd in tds) {
         //alert('Here:'+xtd.headers);
         if (xtd.headers=="COST") {
         // you found the element, do what you need
         alert(xtd.innerHTML);
         After inserting the above code into my javascript is popups up
         my alert, "Here:undefined"
         and never hits the alert(xtd.innerHTML);

    Hi Ya'll,
    I got the following working. See any problems?
    headers=="COST" actually showed up in each row of the whole column, including the SUM. So it ended up being great so I could sum it in the JS.
    I had to change the column type to NUMBER from VARCHAR2 for the initial SUM to work, so adding any formating to the SQL was not good. It looks pretty much what Andy has though... I found a slight hesitation it it though.. I have to work out a bug that prints the old total instead of the first.
    var ltotal =0;
    var tds = document.getElementsByTagName('td');
    for (var k=0; k<tds.length; k++) {
    if (tds[k].headers=="COST") {
    var inputObjs= tds[k].getElementsByTagName('input');
    if(inputObjs.length>0) {
    for (var j=0;j<inputObjs.length;j++) {
    ltotal+= parseFloat(inputObjs[j].value);
    //alert(inputObjs[j].value);
    //alert(ltotal);
    }else{
    tds[k].innerHTML=ltotal;
    Message was edited by:
    changed i to k to avoid the italics
    Bill Carlisle

  • What to do if my master page is too small for custom master page column, I need to change the papers

    What to do if my master page is too small for custom master page column, I need to change the papersize from A4 to US letter size *

    My 2nd gen works fine with WPA2 and AES encryption.
    You may need to go back and start over.  Reset the router back to factory defaults, log on as the admin, set up security, DHCP, and make sure the IP address pool has enough IP addresses to lease to ALL of the computers/devices that will connect to that the router.

  • CWB-Need to change the eligible salary column from yearly to monthly

    Hi All,
    I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
    Kindly help me guys
    Regards,
    Sajid

    You can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.

  • Report Painter- Scaling in the Column Attributes

    Hi all,
    I would like to ask for some help/assistance on report painter
    We have customized reports using Report Painter. These reports normally
    use the thousands ('000)as the number format (scaling). The problem we are
    encountering now is that users who have expert mode access can access
    the reports and change the number format (scaling) to actual
    figures.Then when this specific user saves these new scaling
    settings , the next user of the report will be misled thinking the
    numbers being shown are still in the orginal number format (scaling)
    which is in thousands
    1) How can we strict the user's expert mode access to limit them so
    that they can change the number settings but they should not be able to
    save these settings
    or
    2) Can we change the header of the report so that it follows the column
    attributes of the report ( meaning if the column attributes are set to
    thousands then the header will have a desciption of "in thousands" as
    well)
    Currently the scaling settings are not available as a variable in the
    report header
    Thanks.
    Regards,
    Marizenne Bejasa

    You don't need the image tags but only image names:
    SELECT   username "User",
             MAX
                (DECODE (FUNCTION,
                         'Text1', 'check.png>',
                         '1px_trans.gif'
                ) "Image_Text1",
             MAX (DECODE (FUNCTION, 'Text1', 1, '1px_trans.gif')) "Text1",
             MAX
                (DECODE (FUNCTION,
                         'Text2', 'check.png>',
                         '1px_trans.gif'
                ) "Image_Text2",
             MAX (DECODE (FUNCTION, 'Text1', 1, '1px_trans.gif')) "Text2",
             MAX
                (DECODE (FUNCTION,
                         'Text3', ' check.png>',
                         '1px_trans.gif'
                ) "Image_Text3",
             MAX (DECODE (FUNCTION, 'Text1', 1, '1px_trans.gif')) "Text3",
             MAX
                (DECODE (FUNCTION,
                         'Text4', ' check.png>',
                         '1px_trans.gif'
                ) "Image_Text4",
             MAX (DECODE (FUNCTION, 'Text1', 1, '1px_trans.gif')) "Text4"
        FROM my_table
    GROUP BY usernameDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to set up a column link to the column attribute in a report

    Hi All
    I have 6 column in a sql report in a page, column names are (Devicename devicerole,from etc).
    Now i need to set a link to this column and this need to link to the another page
    Thanks & Regards
    Srikkanth.M
    Edited by: Srikkanth.M on Apr 6, 2011 6:17 PM

    Hi
    Read this and follow it...
    >
    Go to the report attributes, then click on the edit link button by the side of the column you want to be a link to get to the column attributes.
    >
    So...
    1. Go to edit the page that contains your report.
    2. Click on the report region as if you were going to edit the report query.
    3. Click the Report Attributes tab.
    4. Click the button at the side of the column in question.
    5. Scroll down to the Column Link section and fill in the details.
    I really can't put it much more simply than that...
    Cheers
    Ben

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • Error while changing the Display Attribute into Navigational Attribute

    Hi all.. Gud Mrng.
    I was changed the attribute (product) from display attribute into navigational attribute and while save and activating the info object it is not getting activated and it is throwing the below error message.
    Error Message: u201CThe Info object is being used in several data targetsu201D
    My Questions:
    i)     Do I need to delete the data from all the data targets (where this info object is using)??
    ii)     Do I need to delete data only from the main info object (Zmaterial)? Is this single action enough?
    Please suggest me which action I need to follow & What are the precautions need to take while changing the Display Attribute (product) into Navigational attribute of info object (Zmaterial).
    Thanks in advance.
    Thanks & Regards,
    B Venugopal

    Hi Garima
    Only in case of key figures we cannot change it from display to navigational.
    If the info object is a characteristics then in the General tab of the info object if you select 'attribute only' then the iobj would be a display attribute only. If you leave it unmarked then you can use the iobj as a navigational atribute.
    I am sure you know that these settings only mean if a IOBJ can be used as display or navigational.  To  use it as a navigational within another object you will have to change the settings from 'DIS' to 'NAV' for the said info object in the 'Attributes' tab of its parent info object.
    Further if you use the parent info object in any data target / infio provider you will have to further mark the info object as 'navigational' while defining the attrbute of the said data target / info provider. The info object gets displayed in the data target / info provider attribute properties as 'parent IOBJ_info object'
    Cheers
    Umesh

  • I need to change the height of a Captivate playbar using Flash Pro

    I need to change the height of a playbar in Adobe Captivate.  I have Flash Pro. I am very new to Flash Pro. I read.. "To change the height of the playbar, adjust the height of pbcBk_mc movie clip inside cpPlaybar symbol in Library".  The problem is I CAN'T FIND pbcBk_mc anywhere.  I see the cpPlaybar attrbute.  When I click on it and look at the timeline I am not seeing an attribute for pbcBk_mc or height.  Where in the world is it??

    You start with a source / authoring file for the "static" content (e.g., Name, Last:). Say this is an MS Word file.
    You master the "static" content..
    You keep this authoring file and have a backup of this file.
    You output a PDF and use Acrobat to build and fine tune the "form" (form = the form fields, not the "static" content).
    The authoring file  and output PDF (with form fields) gives you "rev 00".
    Now, you must change something in the "static" content.
    Open the authoring file and save as to a new version (e.g., "wordfile_v00"  becomes "wordfile_v01).
    Output this to "pdffile_v01".
    Use Acrobat to open the PDF form file "pdffile_v00". Save As to a new file name ("pdffile_v00update").
    Using Acrobat XI Pro the click-path Tools - Pages - Replace lets you replace a page or pages of "pdffile_v00update" with a page or pages from "pdffile_v01".
    This replaces the "static" PDF page content and does not affect the form fields on the page.
    (you may have to adjust position of form fields)
    Save "pdffile_v00update" to "pdffile_v01" to reflect the revised status of the PDF form file.
    Be well...

  • How to change the columns in more than one playlist

    I am trying to change the columns in my playlists for all of my audio books. I have over thirty books on my computer with a play list for every cd adding up to over 500 playlists inside of folders for each book. I want to change all of the play lists to have audiobook related columns only. I was wondering if there is any shortcuts besides going into every folder and every playlist and manually changing them all.
    What I already know: Changing the view options of a folder containing a playlist or other folder doesn't change the view options of all containing folders and playlists.
    Doug's Applescript "Assimilate view options" is for changing all of my playlists to match the view options as the library and I cannot change the library because I have over 1500 album playlists.
    If anyone could tell me how to change that I would really appreciate the help

    Hi Manish,
    There is no need to delete/inactive those entres.
    It is the funtionality provided by SAP to store the short texts for catalog in multiple languages.
    If you go to QS42 transaction with another language key selected during login.  You can find another language short text.
    Regards
    Amit

  • Is it possible to change the column headings when ever i execute the query

    in the runtime i want to change the column headings is that is possible.
    Ex: if write a timestampadd(.......) function in the table heading is that change the dates automatically whenever i execute the query?
    is this is possible?
    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10

    Product name 1-2-10 5-6-10
    aaaa 5 6
    bbfff 6 10It looks like the dates are values in a column? Put that column in the Columns section of the Pivot Table and Product Name in the Rows section and it should produce what you are looking for.
    Edited by: David_T on May 19, 2010 2:33 PM

Maybe you are looking for

  • ???????  / unessary question marks in e-mail

    Good morning: When I forward e-mails to a PC the people mget several ??? in the copy of the e-mail. Any explanation?

  • How to achieve this in plsql

    this is my test_script.sql DECLARE   l_deptno  NUMBER;   l_count   NUMBER;   l_empno   NUMBER;   l_empname VARCHAR2(100); BEGIN   Dbms_Output.put_line('Enter Deptno:');   l_deptno:=&deptno;   SELECT COUNT(*) INTO l_count FROM dept WHERE deptno=l_dept

  • Creating a Left Navigation Layout Similar to Oracle Instant Portal

    I am a new user of Oracle AS Portal and have started to use AS Portal after I first warmed up using Oracle Instant Portal. Using Oracle AS Portal, I would like to create a left navigation layout using similar to Oracle Instant Portal that allows the

  • Ctrl+shift+O = weird carret behaviour

    While looking for some shorcut key combinations that will not conflict with anything i tryed ctrl+shift+O on a JEditorPane and turned on a strange carret mode: The carret appears to have a flag on it and keeps jumping back to the start of the line. I

  • Cant  Deauthorise Computers

    I currently have 2 iTunes Accounts, the old one was authorised on 5 PC's that I no longer have access to, likewise I do not have access to the old account email address. I do however have the music on my iPhone and can use it. I have copied this cont