Add column with row number to table

Hi,
to a table view I'd like to add a new column that contains the row number for each row.
I have many data sources (twelve) and with the union operator I create one output dataset. The output data is sorted by the arrangement of the input ports of the union operator.
Is there a way to add a column with its corresponding entry number?
Regards, FT

I have a similar question to the original post. It seems your answer will fill the new field in all rows with the same value. But, what if we want an actual row number?
I am simply looking to add a row number to a table. I only have one data source. The business scenario is that the output of the data service is sorted in descending order on value. I want to be able to select the first 10 (i.e. the top 10 items based on that value).
Even if I can solve my business scenario without using a row number field after the sort, it seems like a technique that would come in handy. 
Any ideas? I'm pretty new to using Visual Composer so I may be missing something obvious.

Similar Messages

  • Add column with preq number to ALV grid in me53n

    hi all,
    i am trying to add column with preq number (BANFN) to ALV with preq items in ME53N. it is not available in column set, when trying to add by "change layout" button - i dont understand why, when the strcucture MEREQ3211GRID contains it :-(
    i also tried to add new field ZZBANFN into the structure CI_EBANMEM and after that, i could add the new field to ALV through change layout, but it was empty of course. so i implemented EXIT_SAPLMEREQ_001 from MEREQ001, but ZZBANFN is still empty, because this exit is not called when opening ME53N, but when clicking on tab "customer data" in preq item detail.
    how to solve this? is there any exit that is called before displaying the ALV grid?

    Here is some more detail. I included my code from the Enhancement.
    ENHANCEMENT-POINT MM06EFPO_POT_AUFBAUEN_02 SPOTS ES_MM06EFPO_POT_AUFBAUEN INCLUDE BOUND.
       ENHANCEMENT 1  Z_MM06EFPO_POT_AUFBAUEN_1.    "active version
      SELECT SINGLE zz_old_material FROM mara
        INTO pot-zz_old_material
        WHERE matnr = pot-matnr.
    ENDENHANCEMENT.
    You will also need to change the layout in Item Overview to bring your field in.

  • Filling column with Row Numbers

    How to fill a column with row number in power query like below? is there any function in power query?
    Color       Row Number
    Red         1
    Green      2
    Blue         3

    Hi...
    You can use "Add Index Column" function in Add column tab as below :
    Table.AddIndexColumn(Source, "Row Number", 1, 1)
    Regards,

  • MS SQL - Add column with all rows being "0"

    Add column with all rows being "0"

    nevermind
    "lee" <[email protected]> wrote in message
    news:e3b5kt$mch$[email protected]..
    > Add column with all rows being "0"
    >
    >
    >

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

  • UPDATE value in column with value in SAME TABLE

    Hi all,
    Here's my issue...
    I have a table which records all incidents for a person.
    The table looks something like this:
    tbl_connect(person_Id NUMBer,
    OLD_ID VARCHAR2(24),
    CASE_NUMBER     VARCHAR2(10),
    CASE_TYPE     VARCHAR2(10),
    PERSON_ROLE     VARCHAR2(30),
    INCIDENT_TYPE     VARCHAR2(40));
    The table is populated from a source table with all fields except person_id. Person_id is a sequence number that gets generated if the person comitting the incident is a NEW PERSON to our system. OLD_Id is the unique identifier between the source table and tbl_connect to identify a person.
    The problem: If an existing person commits a new incident, a new record will be inserted into tbl_connect without PERSON_ID. Since the person already is in the database the person_id already exists in tbl_connect for that person. I now need to UPDATE person_id column with the person_id that already exists for this person. How can i achieve this.
    Ive been trying all sorts of update queries but nothing seems to work. ANy help will be appreciated. Thanks in advance.

    Frank,
    Thanks for the speedy reply. Here is a sample table.
    I know it's a bit confusing. The data that is being dumped into this table is information from a old system. The OLD_ID is in here because it is the relationship between this table and the old table. PERSON_ID is new to this system to identify a person uniquely. That is why i need them both in this table for right now.
    So say my tbl_connect got populated with new info from the old table. As you can see, old_id=567A has comitted another incident. Since he already exists in tbl_connect, now i need to update person_id with the value of 1. Does that make sense now????? If old_id did not exist, all i would do is insert a new row and set person_id to the next sequence number.
    TBL_CONNECT
    PERSON_ID OLD_ID      CASE_NUMBER CASE_TYPE          
    1     567A     12345          IR          
    1     567A     15236          MV
         567A     98547          IR<--newly inserted record of same person

  • Need to add a blank row to a table when checkbox selected

    Hi ALL,
    I have a custom page having 2 check boxes and few fields , i am doing search operation by entering one checkbox checked and few other fields and data displaying in table region.
    my requirement is when i select second check box and click one button as add new row it should create a blank row in the table, means table should  availabe with a blank row so that user can insert data,
    please help me on thsi
    Thnaks

                 Hi there ,
                 If you 're working with advance table then you have an default option to create a blank row , please through topic 'add another row '
                 in jdev guide .
                 If you are working the regular table region then you might follow the below code suggested .
                 Create a new item of the type button ( not submit button ) and handle the event in PFR of your controller class
                String addRow=pageContext.getParameter(EVENT_PARAM);   //  "addRow " is an event attached to table
                if("addAnotherRow".equals(addRow))  
                      am.invokeMethod("AddRow");
              In AMimplementation class :
       public void AddRow()
        OAViewObject headerVO = (OAViewObject)getsdaPacelineWorkupHeaderUpdateVO1();
        sdaPacelineWorkupHeaderUpdateVORowImpl rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl)headerVO.getCurrentRow();
        rowh.getPacelineHeaderId();
        OAViewObject lineVO = (OAViewObject)getsdaPacelineWorkupLineUpdateVO1();
        Row lineRow = lineVO.createRow();
        Row lineRo = lineVO.last();
        lineRow.setAttribute("PacelineHeaderId",rowh.getPacelineHeaderId());   
        lineRow.setNewRowState(Row.STATUS_INITIALIZED);
        lineVO.last();
        lineVO.next();
        lineVO.insertRow(lineRow);
        lineVO.setCurrentRow(lineRow);
        lineVO.setCurrentRow(lineVO.last());
      Note : Replace your vo name in place of sdaPacelineWorkupHeaderUpdateVO1()
       Please let me know if you have any questions .
      Regards ,
    Keerthi

  • Problems with Row Number showing up in report

    I have a report question. When I have already created a report, and then I go back into the report to edit it, I want to be able to add the row number to the report. I go to tools, options, sheet, and select show row numbers. Even though the show row numbers option is selected, the report doesnt show the row numbers. Is this a bug? It'd be a major pain to go back and re-build 250 reports becasue I can't add the row number to a report after it is already built.
    Thanks in advance,
    -Mark

    Hey user519817.
    This is perplexing as it simply should work. I'm presently at a site running 4.x (hard after being at a site running 10gr2) and if I go to Tools -> Options -> Table, I can turn on or off the 'row numbers' box and it works as expected.
    If I alter it to a xtab, then the option isn't even there to choose from.
    I went into the Disco Admin as well thinking maybe there was a privilege (wierd but worth a look) that allowed you to have / have not row numbers, but nothing there.
    So it sounds like a 'feature'.
    What version / type of Disco are you running (ie: 4.x desktop, 10i Plus, etc.)?
    Russ

  • Populate columns with row values in Sql Server Reporting Services

    I have got a dataset with 2 columns named Row and Title. There are 8 rows in this dataset and I want to display those 8 titles within columns in a table. So I create a table with 8 columns and set each column's expression to
    =LookUp(Fields!Row.Value,1,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,2,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,3,Fields!Title.Value,"Titles")
    However only the first column displays a title. The other 7 display nothing. Is my expression wrong?

    Hi,
    Is the row datatype non-numeric?  Maybe the lookup is failing for that reason.  You coulr try adding a conversion to the field:
    =LookUp(cint(Fields!Row.Value),1,Fields!Title.Value,"Titles")
    Could you, perhaps, instead use a tablix table and put the Title column on the row group?  That would pivot the data the way that you want it.
    Mark

  • SRM - Add column to Response and awards table

    Hello,
    I have a requirement to add a column in the compare responses table (please see print attached), i've found the WDA program, that is the /SAPSRM/WDC_AODC_BEV_CMP, View: V_BID_COMP_ITEM, but the part of the table that is in the print attached is created dinnamicly so i have not found where do i go to add a column there.
    Has any of you guys done that?
    Thanks a lot!
    Joe

    Hello Madhu,
    Thanks so far for the responses, but now my questions are in a more technical way. I've found where the column is created but now i have 2 other problems.
    1 - The place that the columns are created is the method: /SAPSRM/IF_CLL_DOTM_BEV_C_I~VIEW_GENERATE. I've created a enhancement at the end of the code. There is a DO for every bid line to create the grouped columns. My question is, i'm able to place a column only on the last grouped columns, because is the last one instanciaded on the standad do end do code. Is it possible to re-instance a grouped columns to add a column there? Ex:
    Add the column group to the table
    lr_table->add_grouped_column(
    the_grouped_column = lr_group_col ).
    ENDDO.
    My code is here after the enddo. The lr_group_col will be used to create a instance for every grouped column, and i my code when i use the lr_group_col only get reference to the last one created get it?
    2 - In the code, it creates the columns, with the fields referencing a context, Ex: BID_COMP_ITEM.PRICE_1. It's created dinamycly, and i'm not able to read/change theses values because is not like reading context for regular context node on WDA. Do you know how can i do it? Like importing thoses values to change and bind it again...
    Thanks for the responses so far, i'm almost here
    Joe

  • ALV column with variable number of decimals to be displayed

    Hi,
    I've an ALV where I need to display a numeric column with a variable number of decimal row-by-row, from 0 (no decimals) to 4.
    I've declared the numeric field as TYPE P DECIMALS 4.
    I've tried with DECMLFIELD in ALV catalog, and this works for 1 to n decimals, but when  I leave the field indicated in DECMLFIELD equal to 0, ALV shows the default number of decimals of the field (4 in that case).
    Any help will be very appreciated.
    Thanks.
    Jordi

    No, I didn't try EDIT_MASK.
    How should I use it to format output to display decimals or not depending on the row?
    I have 2 kinds of values, all stored in a TYPE P DECIMALS 4: Those that really are an integer (decimals should not be displayed for that ones) and the values that really have 4 decimals (which should be displayed with decimals in ALV).
    Example:
    13,0000 should be displayed as 13
    0,4567 should be displayed as 0,4567
    With EDIT_MASK could I do that?
    Thank you very much.

  • How do I add remove Multiple rows in a table

    Guys,
    Can somebody tell me How do I add and remove <u><b>Multiple</b></u> rows between two tables.
    <u>Also, I want the row or rows to disappear from the source table as soon as it is moved or added to the second table and appear again once its been removed from the second table.</u>
    The data is being fed by a BI query not a BAPI..
    thanks,
    Naseer

    Hi Jarrod,
    Thanks for replying. Even though it seemed like it might not be possible. But we figured it out.
    We are using signals to basically LOOP and do an ADD and REMOVE.
    Thanks again,
    Naseer

  • AdvancedDataGrid - Add columns with ActionScript

    I'm trying to add columns to an AdvancedDataGrid via ActionScript.
    I can't get it to work.
    I've tried two approaches -- One with an intermediary array to store the columns then set the adg's columns to the array; One where I assign the columns directly to the adg's columns array.
    They both fail in their own way.  The columns don't "take" and the adg uses the dataProviders defaults, or there are no columns at all.
    "adg_test.mxml" has the AdvancedDataGrids/code. 
    "adg_test_renderer.mxml" is a renderer for one of the columns.
    Would appreciate learning what I'm doing wrong.
    Thanks for any help.
    === START adg_test_renderer.mxml  ===
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:Button id="btnTest" label="Renderer Working"/>
    </mx:VBox>
    === END adg_test_renderer.mxml  ===
    == START adg_test.mxml ====
    <?xml version="1.0"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        initialize="init()">
        <mx:Script>
          <![CDATA[
             import mx.collections.ArrayCollection;
             [Bindable]
             private var dpADGExplicit:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
             [Bindable]
             private var dpADGActionScript:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
            private function init():void
                var arr:Array=[];//Intermediary array that will become the AdvancedDataGridColumn array
                var col:AdvancedDataGridColumn = new AdvancedDataGridColumn();
                col.dataField = "Artist";
                arr.push(col);
                col.dataField = "Album";
                col.visible = false;
                arr.push(col);
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                arr.push(col);
                adgActionScript.columns = arr;
                //ALTERNATE UNSUCCESFUL APPROACH
                col.dataField = "Artist";
                adgActionScript.columns.push(col);
                col.dataField = "Album";
                col.visible = false;
                adgActionScript.columns.push(col);
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                adgActionScript.columns.push(col);
          ]]>
        </mx:Script>
        <mx:Label text="Explicit Columns"/>
        <mx:AdvancedDataGrid
            id="adgExplicit"
            width="100%" height="100%"
            sortExpertMode="true"
            dataProvider="{dpADGExplicit}">
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Artist" />
                <mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
                <mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
            </mx:columns>
       </mx:AdvancedDataGrid>
       <mx:Label text="ActionScript Columns (If ActionScript works: Arist column should be hidden. Should see Album column with data and Price column with buttons."/>
        <mx:AdvancedDataGrid
            id="adgActionScript"
            width="100%" height="100%"
            sortExpertMode="true"
            dataProvider="{dpADGActionScript}">
       </mx:AdvancedDataGrid>
    </mx:Application>
    == END adg_test.mxml ====

    Thanks so much for your help.
    Here's how I altered your code for my example.  This logic allows easier assignment of additional column parameters.
    === START adg_test_renderer.mxml  ===
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Button id="btnTest" label="Renderer Working"/>
    </mx:VBox>
    === END adg_test_renderer.mxml  ===
    == START adg_test.mxml ====
    <?xml version="1.0"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        initialize="init()">
        <mx:Script>
          <![CDATA[
             import mx.collections.ArrayCollection;
             [Bindable]
             private var dpADGExplicit:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
             [Bindable]
             private var dpADGActionScript:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
            private function init():void
                var arrCols:Array = adgActionScript.columns;
                var col:AdvancedDataGridColumn;
                col = new AdvancedDataGridColumn;
                col.dataField = "Artist";
                arrCols.push(col);
                col = new AdvancedDataGridColumn;
                col.dataField = "Album";
                col.visible = false;
                arrCols.push(col);
                col = new AdvancedDataGridColumn;
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                arrCols.push(col);   
                adgActionScript.columns = arrCols;
                adgActionScript.validateNow();
          ]]>
        </mx:Script>
        <mx:Label text="Explicit Columns"/>
        <mx:AdvancedDataGrid
            id="adgExplicit"
            width="100%"
            height="100%"
            dataProvider="{dpADGExplicit}">
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Artist" />
                <mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
                <mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
            </mx:columns>
       </mx:AdvancedDataGrid>
       <mx:Label text="ActionScript Columns"/>
        <mx:AdvancedDataGrid
            id="adgActionScript"
            width="100%"
            height="100%"
            dataProvider="{dpADGActionScript}">
       </mx:AdvancedDataGrid>
    </mx:Application>
    == END adg_test.mxml ====

  • Add / Delete a row in a table without using a button

    Hi,
    I was just wondering if it was possible to remove or add a row in a table without using the button?  I noticed that in all examples, it always involve putting code in the button click event but I wanted to add or delete a row in a table based on the fact if the row contains a certain value or not.  Is that possible?
    Much appreciated,
    Vincent

    Vincent,
         Here is the updated file..
    https://acrobat.com/#d=bVDBNM0pnS2IpfE58V01Tg
    You have checked the checkbox "Repeat subform for each Row" for Header Row under IndTable1. You need to do at Row1 level of Table1.
    I bound the Row1 of Table1 to <Row1> tag in your XML which can repeat multiple times.
    I wrote the code in the Doc Ready event of the Test1 field to check whether the value is existing or not. If it does not have a value, then I am removing the instance of the Row1 by passing the current index.. (You can check the code)..
    While creating a data connection using XML you need to make sure that the below structure is repeated atleast 2 times. And while previewing you can use make a copy of this same XML and remove Row1.
      <Row1>
        <Test1>Individual Name 1</Test1>
      </Row1>
    Thanks
    Srini

  • Locating row with invalid number from  table with few million rows

    We need to query the a table or a view of same to obtain a id of type VARCHAR with bind value being NUMBER. Any attempts in this regard I try seem to result ORA-01722: invalid number. Once case is below here
    SQL> select TEXT_ID FROM ATT_TABLE where to_number(TEXT_ID) = 9411956;
    select TEXT_ID FROM ATT_TABLE where to_number(TEXT_ID) = 9411956
    ERROR at line 1:
    ORA-12801: error signaled in parallel query server P010
    ORA-01722: invalid number
    1. TEXT_ID column is meant to have numeric values in VARCHAR type. It is possible that some record / row is not complying. How can I locate the non-complying records ?
    2. What would be a VIEW definition that would return only records with valid numeric data in TEXT_ID column.
    Edited by: bonjonbovi on Feb 13, 2009 3:58 PM

    Of course the regexp_like is really cpu expensive, but there's no other solution in your situation
    The only way to differ numberic value from character, is REGEXP_LIKE function
    But you can do it using PL/SQL
    BEGIN
       FOR c IN (SELECT TO_NUMBER (ID) ID
                   FROM test_number)
       LOOP
          DBMS_OUTPUT.put_line (c.ID);
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          NULL;
    END;

Maybe you are looking for

  • How to make a simple Plugin system?

    hey guys, first let me say I see very much hostility here, and I'm not here to annoy anyone, so if you don't feel like answering then simply don't. I want to design a simple Plugin System for my application. I think what I need is a bit of reassuranc

  • How do I remove the "Lost Phone" message from my IPhone4?

    I recently upgraded my IPhone 4 to an IPhone 5c.   In the process my old IPhone 4 was deactivated, by using the "Find My Phone" Icon.  All is fine now, except that there is a message remains that states, "My IPhone is lost, please call (XXX) XXX-XXXX

  • Having problems with itunes on my itouch.  keeps repeating songs when its in shuffle .  Any help please.

    All of a sudden I am not able to play in shuffle mode, it just keeps replaying the same song over and over again.

  • Only one record is adding

    Hey Experts, I Tried loading from many DataSources to different ODS's, but everytime i am facing the same problem, the number of record added is 1. like if i have ODS structure with: KeyField1, DataField1 and for these corresponding fields i have 100

  • Why is deploytool missing from JavaStudio Creator

    I have installed both the the Sun App Server and Studio Creator/w App Server. But the icon for the deploytool is not added to my start menu (windows). It is there on the App Server without Creator. I have tried starting the deploytool from the comman