Custom table column based on value scale

I want to custom table column based on the vaules.
I understood I need to to /1000000 in the column definition and custom ###,###,###M.
But sometimes it can be Kilos and sometimes Billions.
I don't want to display 0.02M or 200000M.
How can I define conditional custom according to the current value?

Try doing what I said here and see if it works for you...
Re: Represent numbers in thousands

Similar Messages

  • How to hide table column based on country molga value

    Hi Experts,
    I am doing some enhancement in ess application. I want to hide table column based on country code i.e. Molga value.
    I want to hide coulm for only Japan country reset of them i need to be show those coulmn.
    Could you please provide me a sample code.
    Regards
    Chakri

    Hi Chakri,
    Your setting the table value that time you will get the Country Code.
    1.Create the attribute like Country_Column_Visible Data Type bind the com.sap.ide.webdynpro.uielementdefinitions.Visibility this value  you need to bind the table country column.
    2.In Table You need to check the country code Japan is available you need follow this below sample code.
    for(int i=0;i<tablesize;i++)
         tablesithValue=wdContext.nodeTable().getTablenode(i);
         if(null != tablesithValue.getcountrycode)
         if(tablesithValue.getcountrycode.equalsIgnoreCase("Japan"))
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.NONE);
         }else
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.VISIBLE);
    Use the above code you condition it will work.I hope it will help you.
    BR,
    Durga

  • Different tables' column have same value

    Hi,
    How to find out which coulmns in database are stoing a value. ex: 'Tier'
    I need to know different table's column in database have value 'Tier'.
    table1.col1 ='Tier'
    table2.col16='Tier'
    table3.col21='Tier'Thanks
    Sandy

    One possible solution is below. Take care with the performance, as the procedure is checking every schema.table.column VARCHAR ou CHAR. The number of columns can easily go to thousands and affect the overall performance of your DBMS.
    The example is explicitlly avoiding tables in schema SYS and SYSDBA.
    set serveroutput on size 999999
    declare
    cnt number;
    sql_comm varchar2(1000);
    begin
    for TRec in (select owner, table_name, column_name, data_length
                   from all_tab_columns
                  where data_type IN ('VARCHAR2', 'CHAR')
                    and owner not in ('SYS', 'SYSTEM')
                    and data_length >= 4
                  order by 1, 2, 3) loop
        sql_comm := 'select count(*) from '||TRec.owner||'.'||TRec.table_name||' where '||TRec.column_name||'= ''Tier''';
        execute immediate sql_comm into cnt;
        if cnt>0 then
            dbms_output.put_line(TRec.owner||'.'||TRec.table_name||'.'||TRec.column_name||' has '||cnt||' rows.');
        end if;   
    end loop;         
    end;
    Miguel

  • How to track changes in a custom table and based on that run an interface

    I have an interface. The pre-condition for running the interface is "Run the interface only if there is new entry added to the table( a custom table). Now I have created a change document object using tcode SCDO for the custom table. Now how do i proceed further. Please tell me the steps which i need to follow to check if the custom table has been changed and also the entries changed  before running the interface.

    Hello,
    SAP has provided many changes tracking related programs for Sales order, Vendor changes etc.
    They all use the standard function Module
      call function 'CHANGEDOCUMENT_READ_HEADERS'
    call function 'CHANGEDOCUMENT_READ_POSITIONS'
    so with these you can get the changed records
    Let me know if this helps you
    Thanks and Regards
    Pushkar Joshi

  • Update column based on values of same table

    I have table T1 with 4 columns 'col1','col2','col3','col4', 'col5','col6' as follows
    Col1     Col2     Col3     Col4     Col5     Col6
    1111     City1     C     AA     DDD     A1
    2222     City 1          DD     HHH     A1
    3333     City2     B     EE     OOO     
    4444     City 1     B     JJ     SSS     A1
    5555     City2     C     KK     VVV     
    6666     City2          RR     QQQ     
    7777     City2     B     XX     BBB     
    I have already updated Column 6with value ‘A1’ where Column 2 is ‘City1’.
    Now I want to update col 6 where col2 is ‘S’ with following conditions
    If Col 3 = ‘B’ then Col6 should be = col4
    else it should be = col5

    SET col6=DECODE(col3,'B',col4,col5)
    WHERE col2='S'

  • Insert value into a column based on value of another column

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance.

    Hi,
    I am trying to insert a value into a record based on a column in
    the record, using a trigger. The complication arises because
    the new value is selected from the same table. For example:
    SELECT COL1, COL2, COL3, COL4 from TABLE1
    I want to set COL2 and COL3 based on the value of COL4. And to
    get the value of COL2 and COL3, I will go back to TABLE1 and set
    the condition to TABLE1.COL1 = :NEW.COL4
    I cannot seem to execute the trigger as I get the message "ORA-
    04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
    see it" everytime.
    Is this the correct way to achieve what I wanted? Or is there
    another way?
    Appreciate your feedback. Thank you in advance. I'm not sure what you mean when you insert a value into a
    record, but if you are setting a value in a column of the same
    record using a trigger, then it's easy.
    :new.COL2 := ....:new.COL4...
    :new.COL3 := ....:new.COL4...
    The trigger must be 'INSERT or UPDATE' and 'FOR EACH RECORD'.
    If you are setting a different record in the same table, the
    solution is much more difficult.

  • Reading dynamic table column based on user selection

    Hi there,
    I am having a problem of reading and manipulating the data stored in a standard SAP table. The following example simulates the table and what i am trying to do:
    Table: Storing sales data for sales person
    SALES_PERSON    REGION   YEAR   MTH_S1  MTH_S2  MTH_S3 MTH_S4...
    Richard  S               NORTH    2007     100          200         300        400
    John K                    SOUTH    2007      50           100         100        20
    Brad P                    NORTH    2007     300          100         100        50
    User have have the following selection option:
    1. Month.
    The program will calculate the sales based on the individual month selected
    Example, if user select Month = 3, then program take only MTH_S3 column value
    So total sales = 300100100=500
    2. Month range
    The program will calculate the sales based on the month range selected
    Example, if user select Month 2 to 4, then program take MTH 2 to MTH_S4 columns value
    So total sales = 400 (for MTH_S2) + 500 (for MTH_S3) + 470 (for MTH_S4) = 1370
    How should i write the logic or code for this requirement?
    Hope someone can help.
    Thanks,
    Pang HK

    Try something like this
    TABLES:
    t247.
    SELECT-OPTIONS:
      s_month FOR t247-mnr NO-EXTENSION.
    DATA:
      BEGIN OF fs_data,
        person(30),
        area(10),
        year(4),
        mon1 TYPE kbetr,
        mon2 TYPE kbetr,
        mon3 TYPE kbetr,
        mon4 TYPE kbetr,
        mon5 TYPE kbetr,
      END OF fs_data,
      t_data LIKE STANDARD TABLE OF fs_data,
      w_no_months TYPE i,
      w_kbetr TYPE kbetr,
      w_total TYPE kbetr.
      LOOP AT t_data INTO fs_data.
        CLEAR w_kbetr.
        DO 5 TIMES VARYING w_kbetr FROM fs_data-mon1
                                                          NEXT fs_data-mon2.
        IF sy-index IN s_month.
          w_total = w_total + w_kbetr.
        ENDIF.
        ENDDO.
      ENDLOOP.
    change the value 5, according to the no.of months in ur internal table

  • Count of Column  based on Value

    Hi All
    In our database table we have 3 columns closedate,empcode,status.
    I am using the following query to fetch the data required :
    select closedate,count(empcode) COUNT,EMPCODE,status from dbcleaning WHERE STATUS='Fixed' and EMPCODE='E315' group by closedate,STATUS,EMPCODE.
    the result is like this :
    closedate count EMPCODE STATUS
    2010-10-10 98 E315 Fixed
    2010-10-11 15 E315 Fixed
    However i want the data to be based on DISTINCT EMPCODE , fo Eample :
    closedate EMPCODE(ST001)       EMPCODE(ST002) STATUS
    2010-10-10 *98 125* Fixed
    2010-10-11 *128 225* Fixed
    I hope i had explained properly
    Replies are highly appreciated.
    Thank You
    Edited by: user9366471 on Jun 30, 2010 12:29 AM

    It's always a better idea to post DDL of your table and INSERT statement. Also don't forget to mention the output you required. It's even better if you use tag for those DDL and DMLs.
    Your database version is a important thing for exact solution.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Dynamic Link Column Based on Value

    I'm using Apex version 4.1.
    This is driving me nuts, I can't get it to work. I'm trying to create a dynamic link on a column (in a SQL report) based on the value. Here's my query:
    SELECT STRUCTURE_ENTITY_ID AS "Market ID",
    Structure_entity as "Market Name",
    CASE WHEN NVL2((select 'A' from PC_PAYROLL_DISTRIBUTION PD
    WHERE PROCESSING_YEAR = SUBSTR('2011-08',1,4)
    AND PROCESSING_MONTH = TO_NUMBER(SUBSTR('2011-08',6,2))
    AND PD.OPS_MARKET = SE.STRUCTURE_ENTITY_ID
    AND ROWNUM = 1),'Ready','Not Ready') = 'Ready' THEN '' ||'' ELSE 'Not Ready' END AS Status
    FROM STRUCTURE_ENTITY SE
    So when the value in that CASE statement equals 'Ready' then I need it to show the word Ready (in the Status column) as a hyperlink, otherwise it needs to show 'Not Ready' in normal text that's not clickable.
    The URL string I have in there DOES pick up the correct values for my parameters, but it stilll appears in the report as the whole string, and it's not clickable. Any help would be greatly appreciated!
    Thanks,
    Greg

    I see an a instead of <a and no </a> in this code.
    Oh, I guess your {a is <a ... B-)  Still no end tag, though.
    Edited by: InoL on Oct 7, 2011 2:27 PM                                                                                                                                                                                                                                                                                                                       

  • Sort column based on value

    Hi All,
    Query result gives ou put like in the following order
    CITY NAME
    CHENNI
    DELHI
    LONDON
    RIO DEGENERO
    How to get output in the following sort order
    LONDON
    CHENNAI
    DELHI
    RIO DEGENERO
    i dont want to hardcode the column values ..it will be great if i get option to genrate dynamically.
    Thanks!

    Hi,
    user601042 wrote:
    Hi All,
    Query result gives ou put like in the following order
    CITY NAME
    CHENNI
    DELHI
    LONDON
    RIO DEGENERO
    How to get output in the following sort order
    LONDON
    CHENNAI
    DELHI
    RIO DEGENERO
    i dont want to hardcode the column values ..it will be great if i get option to genrate dynamically.If the sort order isn't hard-coded, how do you get it?
    If you call a function to get the sort order, then just call the function in the ORDER BY clause:
    ORDER BY  sort_key (city_name)If the sort order is in a table, join to that table, so you can use the appropriate column
    FROM     table_x  x
    JOIN      cities   c  ON  c.city_name = x.city_name
    ORDER BY  c.sort_key
    user601042 wrote:... i want to display the following order in screen
    3 LONDON
    1 CHENNI
    2 DELHI
    4 RIO DEGENEROThe question is, how do you determine that order? I don't see anything obvious in the data itself.
    If you were sorting by the id, either ascending or descending, then 1 wouldn't come between 3 and 2.
    If you were sorting by alphabetic order, either ascending or descending, then 'CHENNI' wouldn't come between 'LONDON' and 'DELHI'.
    If you were sorting by the length of the name, either ascending or descending, then 'DELHI' (5 characters) wouldn't come between 'CHENNI' (6 CHARACTERS) and 'RIO DEGENERO' (12 characters).
    By what are you sorting? If you can explain it in English, then someone can help you code it in SQL.
    Edited by: Frank Kulash on Oct 17, 2012 2:40 PM

  • Filter column based on values in second column

    I have a 7 columns (A-G). I want to add a filter to return rows if the value in column D exists anywhere in column C (values in column D and C do not necessarily match).
    Is this possible? I tried creating a filter for column D based on column C using the 'Filter based on results of another request' functionality, but it did not work.
    Create/Edit Filter>Filter based on results of another request
    Column: column D
    Relationship: is equal to any
    Saved Request: same request
    Use values in Column: column C

    Okay, it looks like you are using the same query for both the main and subquery. That won't work.
    1) Create a query with one column, column D. Name it and save it.
    2) Now build your main report with all the columns you desire and on column C, apply the filter "based on results..." and have it point to column D of the subquery in step 1.

  • Color a column based on value in another column in tableview

    I am using a tableview iterator to display data in a bsp page. I want to color a cell in particular column (column 4), when a value in another column (column 2) on that same row is greater than 20. I can color the cell in column 2 but am not able to color the cell in column 4. How can I accomplish this?
    This is what I have. Looks like val1 is losing it's value.
    CASE p_column_index.
        WHEN 2.
          ASSIGN p_row_data_ref->* TO <row>.
          ASSIGN COMPONENT 'ZTGT' OF STRUCTURE <row> TO <col>.
          VAL = <col>.
          IF VAL GT '20'.
            val1 = p_row_index.
            p_style = 'celldesign:CRITICALVALUE_DARK'.
          ENDIF.
        WHEN 4.
            if p_row_index = val1.
              p_style = 'celldesign:CRITICALVALUE_DARK'.
            endif.
        WHEN OTHERS.
    do nothing
      ENDCASE.

    The reason val1 is "loosing its' value" is presumably because you have defined it in the method as a local variable. So each time you call the RENDER_CELL_START method it is is newly initialised. So if you make this an instance attribute it will retain its' contents across method calls.
    Cheers
    Graham Robbo

  • Issue in populating values in a column based on values in other columns

    I have a situation as below:
    Src        Tar             New tar
    AC001  TAC001  
    AC002  TAC001      AC002
    AC003  TAC001
    AC011  TAC011
    AC012  TAC011      AC012
    AC021  TCA021
    AC022  TCA021
    Now, wherw I have New target as AC002, I need to copy the same value to TAC001 which is the 1st and 3rd row. Similarly, I need to copy AC012 to 4th record. And my last 2 rows will be null as I do not have any values for TCA021..Any thoughts on this would be apprecated..
    Thanks in advance..

    Hi
    almost all is said so i tip you How to Fish (with Pictures) - wikiHow because it is good asset for future when you are hungry
    Read also http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174
    "Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time.
    Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. All joins and all WHERE, GROUP BY, andHAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDERBY clause.
    Analytic functions are commonly used to compute cumulative, moving, centered, and reporting aggregates."

  • Cannot update table data based on values of numeric fields

    I have a button on a form with two numeric fields: P11_numeric1 and P11_numeric2.
    I want to be able to either run a stored procedure or execute the update logic. We're on apex 4.0.
    I tried the follow syntax in a process run by a button:
    begin
    schema.procname(:P11_numeric1,:P11_numeric2);
    end;
    And nothing happened.
    If I try to run the proc in toad with hard coded parameter values, the proc works.
    I tried this:
    begin
    update schema.tablename
    set value=:P11_numeric1
    where id=:P11_numeric2;
    commit;
    end;
    And this doesn't work.
    I tried:
    begin
    update schema.tablename
    set value=1
    where id=2;
    commit;
    end;
    And that worked, so I assume the issue is with getting the numeric field values. Am I using incorrect syntax?

    I'm on apex 4.0.2 btw. I had two main problems: 1) the process that my procedure was in was in a sequence number lower than the MRU process sequence number. I didn't want to use the MRU so I changed it to being called by ajax calls only (which I don't have on the page, effectively not firing this process on page submit). Changing the sequence number of the process call to the procedure higher then allowed me to run the stored procedure.
    The next problem was that the fields weren't being passed into the proc.
    It looks like the type of the field made a bit of a difference to sending in the parameter for the procedure. The data is either integer or numeric and if the fields were set to a text field, and the proc was changed to accept varchar2 data and convert using to_number in the proc that the data was accepted and was fine. For the integer fields, I was able to (and wanted to) change the field type to display only as this is a read only screen with an button to save the data. For the numeric fields, for some reason the display field type did not allow the field value to be passed to the stored proc.
    I'll take a look at the session values not getting set but has anyone heard of that happening to display only fields with numeric data specifically?

  • ALV Tree - Color Specific Column based on value in that cell?

    Hi Forums,
    I have searched the forum and I am unable to find the answer to my question.
    I am using an ALV tree and I would like to color a cell RED is the value in the cell is negative.
    I have set my field catalog to many different emphasize numbers and no luck either?
      CLEAR ls_fieldcatalog.
      ls_fieldcatalog-fieldname  = 'ORG_TXT'.
      ls_fieldcatalog-coltext    = text-d02.
      ls_fieldcatalog-scrtext_m  = text-d02.
      ls_fieldcatalog-col_pos    = 2.
      ls_fieldcatalog-outputlen  = '30'.
      ls_fieldcatalog-no_out     = 'X'.
      ls_fieldcatalog-emphasize  = 5.
      APPEND ls_fieldcatalog TO et_fieldcatalog.
    I am using 
        gr_alv_tree_control  TYPE REF TO cl_gui_alv_tree
    as my class to display my tree and I have found no methods that would set the color in there either?
    What else could be checked?

    To those interested, i was able to color the TEXT of a First coloumn of the TREE. Using this code:
    That said it will not work without BOTH
           ls_layout_item-fieldname = gr_alv_tree_control->c_hierarchy_column_name.
          ls_layout_item-style   =
                               cl_gui_column_tree=>style_intensifd_critical.
        IF ls_vip_display-vip_diff_tot > 0.
           ls_layout_item-fieldname = gr_alv_tree_control->c_hierarchy_column_name.
          ls_layout_item-style   =
                               cl_gui_column_tree=>style_intensifd_critical.
        ENDIF.
        IF ls_vip_display-vip_diff > 0.
          ls_layout_item-style   =
                               cl_gui_column_tree=>style_intensifd_critical.
        ENDIF.
        ls_layout_item-t_image = '@GZ@'.
        ls_layout_item-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
        APPEND ls_layout_item TO lt_layout_item.
    *   add leaf nodes
        CALL METHOD gr_alv_tree_control->add_node
          EXPORTING
            i_relat_node_key     = lv_parent_id
            i_relationship       = cl_gui_column_tree=>relat_last_child
            i_node_text          = lv_node_text
            is_outtab_line       = ls_vip_display
            it_item_layout       = lt_layout_item
            is_node_layout       = ls_node_layout
          IMPORTING
            e_new_node_key       = lv_new_key
          EXCEPTIONS
            relat_node_not_found = 1
            node_not_found       = 2
            OTHERS               = 3.
    Anybody else who can shed some light to why both are needed OR possibly how I can change the position of the colored text to a different cell?
    Edited by: Keith Warnock on Feb 9, 2011 6:48 PM

Maybe you are looking for

  • Font in all PDF documents is wingdings - in all readers

    Hi, No matter what PDF reader I use and no matter what PDF document I use, this is what the PDF file looks like: http://i.imgur.com/XppSj.png This happens in all PDF readers EXCEPT for xpdf, leading me to believe that for some reason poppler is creat

  • 10.9.3 DIsk Permissions need fixing constantly

    I am running 10.9.3 on an imac. I have to repair the disk permission several times a day. How I know they are needing repair is the computer's performance becomes significantly impaired.

  • Assigning two alignment rules to a table

    Is it possible to create a table where each columnn is left justified, and yet centered with in it's column? I know I can use tabs to accomplish this, but my company is creating a large product catalog where we would like to avoid manually changing t

  • Reduce number of rings before Voicemail

    I would like to reduce the number of rings before my voicemail comes on on my Blackberry Z10. It is forwarded from my desk phone and that means that customers are waiting an excessive amount of time before my voicemail kicks in on my BB. I called my

  • Re: Cannot update Safari on OS Snow Leopard 10.6.8

    So what do I do when websites inform me that Safari 5.1.10 is no longer supported, while I am strongly opposed to surrendering OS 10.6.8 Snow Leopard on my MacBook Pro? The Snow Leopard OS is by far the best operating system ever made! And the Lion o