Copy a certain row of data into the next row in a same internal table ??

HI, guys.
May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
For example:-
*at first...
ebeln1   ebelp1   xblnr1
ebeln2   ebelp2   xblnr2
ebeln3   ebelp3   xblnr3
*after that, become...
ebeln1   ebelp1   xblnr1
ebeln2   ebelp2   xblnr2
ebeln2   ebelp2   xblnr4
ebeln2   ebelp2   xblnr5
ebeln3   ebelp3   xblnr3
Thanks in advance.

hi,
If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
so in this case,
loop at itab1.
  v_index = sy-tabix.
  loop at itab2 into wa where pri_key = itab1-pri_key.
  v_index = v_index + 1.
  insert  wa into itab index v_index.
  endloop.
endloop.
Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

Similar Messages

  • How to extract data into excel file from more than one internal table

    Hi Guys
                 I want to extract the data from module pool screen.
                 In screen there are two internal tables
                      1. header
                      2. items.
                 I want to extract the data as same format looking in the screen.
                 With simple Download FM we cannot do this one, because in this we   will display as continuous rows.
    <b> But my requirement is saving as table with heading, date, header details</b>
    Note that it is not the simple down load . Suggest me with example  coding

    Hi Guys,
      I think it depends on which software you will use to see the result.
      If U are using Excel, it's very easy to achieve it.
      1. Define a structure as string, the lenth depend on your need.And use the structure to define a internal table, supposed is as A..
      2. Concatenate the head data using some separator, for ex. a comma; and then add this into A.
      3. The above step's concatenate is depend on your format for request;For ex, you want to place the date at the 4th cell in excel, that means you should put three separator before the date field.
      4 Concatenate the item data into the download table.
      5. Download the table to file.
      6. Display the file, using your defined separator.
    Hope this helpful.
    Bob

  • Concatenate all data in one row to all data in the next row

    I have been trying to do this, I'm sure simple procedure, with no luck
    Table
    A B
    1 5
    2 4
    3 3
    4 2
    5 1
    and put all the data from each row into a single cell to look like this
    Table
    C
    1:5, 2:4, 3:3, 4:2, 5:1
    I imagine I need to use some kind of recursive formula but not sure how to do that in Numbers

    hoshi,
    in C, fill with: =A&":"&B
    Very simple.
    By the way, nothing recursive will work in Numbers. An error message will be generated if the result of a particular cell depends in any way upon its own content.
    Jerry

  • Format data in the flat file while downloading from internal table

    Just I used 'GUI_DOWNLOAD' with WRITE_FIELD_SEPARATOR = 'X'. In my case one of the field contains large quantity. Bcoz of this value , it pushes the remaining filed position values in that particular row. The fields in the internal table refers the stadard data elements.I need the field values should be under corresponding field names.Can anyone help me?

    Hi,
    declare another internal table in the format in which you want to download .
    say itab_text.
    itab is your orginal internal table .
    than loop at itab.
    MOVE-CORRESPONDING Itab TO Itab_text.
    APPEND ITab_text.
    endloop.
    now pass the itab_text to gui_download.
    Thanks

  • Linking image to image causes image to jump to the next row down.

    I am doing a simple website.
    I have images three across, edge to edge, on my index page.
    When I add a link to any image, the one or two images following it in the row jump down to the next row down.

    Dear John,
    Thanks for response.
    I added your code as best I could but no difference.
    The same thing is happening even when I hyperlink text.
    All the best,
    Clifford

  • Adding rows based on current and next row

    I got some excellent help on multiplying rows based on start and end date in this
    thread, resulting in the query below. It helps me follow Vehicle activity and Vehicle allocation of our vehicles day by day. Now I would like to add another feature to the query, if it is possible.
    The problem is that in our database, only actual tasks are registered, which means that the time when the vehicle is between tasks is not showing. I could of course calculate total available time per vehicle and month, but that would not tell me where the
    vehicles are waiting, when during the day, etc.
    So I would like to insert rows for when the vehicles are standing still, and the logic would be something like this:
    If vehicle number on current row equals vehicle number on the next row and End (date/time) of current row < Start (date/time) of next row, insert row after current row. Set Start=End of current row and End=Start of next row. Set From=To
    of current row and To=To of current row. Set Vehicle activity to "Not active". Finaly copy all other fields from current row.
    Is this possible to achieve in Power Query?
    Brgds,
    Caj
    let
        Source = Sql.Databases("sql10"),
        SLM = Source{[Name="SLM"]}[Data],
        dbo_V_LKPI = SLM{[Schema="dbo",Item="V_LKPI"]}[Data],
        RenamedColumns = Table.RenameColumns(dbo_V_LKPI,{{"ActualDeparture", "Start"}, {"ActualArrival", "End"}}),
         Records = Table.ToRecords(V_LocoKPI),
          DateTime.IsSameDay = (x, y) => Date.Year(x) = Date.Year(y) and Date.Month(x) = Date.Month(y) and Date.Day(x) = Date.Day(y),
          Expand = (x) => List.Generate(
              () => Record.Combine({x, [End=Date.EndOfDay(x[Start])]}),
              (record) => record[Start] <= x[End],
              (record) => let
                  NextStart = Date.StartOfDay(Date.AddDays(record[Start], 1)),
                  NextEnd = Date.EndOfDay(NextStart),
                  ThisEnd = List.Min({NextEnd, x[End]})
              in
                  Record.Combine({record, [Start=NextStart, End=ThisEnd]})),
          Transformed = List.Transform(Records, each if DateTime.IsSameDay([Start], [End]) then {_} else Expand(_)),
          Combined = List.Combine(Transformed),
          Result = Table.FromRecords(Combined)
      in
          Result
    Csten

    Here's some sample code. Again, we use List.Generate to build either a record or a list of records and then use List.Combine to bring the results back together before converting them to a table.
    let
        CombineTwoRows = (x, y) =>
            let
                combine = x[Vehicle] = y[Vehicle] and x[End] < y[Start],
                added = Record.Combine({x, [Start=x[End], End=y[Start], Active=false]}),
                result = if combine then {added, y} else {y}
            in result,
        GenerateStandingRows = (table, combine) =>
            let
                Handle = (x, y) => {x, y},
                buffered = Table.Buffer(table),
                n = Table.RowCount(buffered),
                windows = List.Generate(
                    () => {1, {buffered{0}}},
                    (x) => x{0} <= n,
                    (x) => {x{0} + 1, if x{0} < n then combine(buffered{x{0}-1}, buffered{x{0}}) else {buffered{x{0}}}},
                    (x) => x{1})
            in
                windows,
        InsertInactivity = (table) => Table.FromRecords(List.Combine(GenerateStandingRows(table, CombineTwoRows))),
        TestData = Table.FromRows({
            {1, #datetime(2014, 2, 23, 13, 0, 0), #datetime(2014, 2, 23, 13, 10, 0), true},
            {1, #datetime(2014, 2, 23, 13, 20, 0), #datetime(2014, 2, 23, 13, 30, 0), true},
            {2, #datetime(2014, 2, 23, 13, 20, 0), #datetime(2014, 2, 23, 14, 0, 0), true},
            {2, #datetime(2014, 2, 23, 14, 20, 0), #datetime(2014, 2, 23, 14, 40, 0), true},
            {2, #datetime(2014, 2, 23, 16, 0, 0), #datetime(2014, 2, 23, 17, 0, 0), true},
            {2, #datetime(2014, 2, 24, 2, 0, 0), #datetime(2014, 2, 24, 3, 0, 0), true},
            {3, #datetime(2014, 2, 24, 1, 0, 0), #datetime(2014, 2, 24, 8, 0, 0), true},
            {3, #datetime(2014, 2, 24, 9, 0, 0), #datetime(2014, 2, 24, 10, 0, 0), true}
            }, {"Vehicle", "Start", "End", "Active"})
    in
        InsertInactivity(TestData)

  • I typed in data into the highlighted text box, and then tried to print my form.  However, when printed, the copy only showed a portion of my answer.  Is there a way to expand Adobe Reader's highlighted text to show my full response, or should I make my re

    I typed in data into the highlighted text box, and then tried to print my form.  However, when printed, the copy only showed a portion of my answer.  Is there a way to expand Adobe Reader's highlighted text to show my full response, or should I make my responses only as long as the highlighted portion allows?

    While printing any pdf file it will print the visible text only. To overcome this, the form needs to be dynamic so that it expands in layout while entering more data. Usually dynamic forms are developed by Adobe LiveCycle Designer.
    ~Deepak

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Creating a collection from a query in Apex 4.2 is not populating the data into the collection.

    I have a process that creates a collection with data from multiple tables. The query returns multiple rows in 'Sql commands' tab. The same query is used to create the collection in 'Before Header' and when i create a region with Region source as
    Select * From apex_collections Where collection_name = 'load_dashboard';
    At the time of rendering the page shows me 'no data found'.
    what could be the problem? Are there any prerequisites before creating the collection?
    Thanks in Advance,
    Sriram

    Hi Denes,
    Below is my code for creating and saving data into the collection.
    if apex_collection.collection_exists(p_collection_name =>'load_dashboard') then
       apex_collection.delete_collection(
             p_collection_name =>'load_dashboard');
    end if;
    apex_collection.create_collection_from_query(
        p_collection_name => 'load_dashboard',
        p_query => 'select a.rowid
                   ,b.first_name
                   ,b.last_name
                   ,c.job_title
                   ,d.parent
                   ,d.child_level_1
                   ,d.child_level_2
                   ,a.resource_allocation
                   ,a.person_id
                   ,a.month_id
                   ,a.oracom_project_id    ,wwv_flow_item.md5(a.rowid,b.first_name,b.last_name,c.job_title,d.parent,d.child_level_1,d.child_level_2,a.resource_allocation,a.person_id,a.month_id,a.oracom_project_id)
    from oracom_resource_management a, oracom_people b,oracom_job c ,oracom_project d where a.supervisor_id=886302415 and a.month_id=201312 and a.oracom_job_id=c.job_id and a.person_id=b.person_id and a.oracom_project_id=d.oracom_project_id',
       p_generate_md5 => 'YES'
    Sriram.

  • Uploading Meter data into the system

    Can some one please describe the process of uploading the meter data into CC&B.
    What is the content of the flat file that i upload.can i upload a meter read XML file directly into the staging tables.....kindly explain the steps..I have not been able to upload any daat into the system using staging control and staging upload page.
    Also i found out that there are batch process MUP1 and MUP2 which need be rum in order to upload the meter data into the system from the meter read staging table.Is this correct.
    With regards to the meter upload staging table, i referred to the MR staging table : CI_MR_STAGE_UP
    there is some data available with the installation as demo data.
    For column MR_UP_STATUS_FLAG, there are values such as E, P, C...I unsersatnd there meaning.
    1) For Pending P status, i submitted the batch processes MUP1 and then MUP2, expecting that teh status might change to Complete, c.......at the same time i ran MRUP-PRG ........well i was going to write nothing happened , but i saw that after some time all teh rows with ataus P and C are not present any more..........
    2)How do i rectify the data with E status.........
    Please helpp me uploading more data to the CI_MR_STAGE_UP Meter read staging table.

    Hi,
    thanks for the reply..
    can u please tell me what is the content of the flat file that i upload.can i upload a meter read XML file directly into the staging tables.....kindly explain the steps..I have not been able to upload any daat into the system using staging control and staging upload page.
    if u can give a flat file sample content for the meter read.
    Also is it advisable to insert data into upload staging table through SQL drectly.
    And can u pls tell me the difference between XAI upload staging table and other upload staging table such as for MR, FA etc.

  • I'm typing dates across the top row. I want the date to be 12/13 and the program changes it to Dec. 13. It is making me mad. How do I get it to stop doing the change? I want a numerical number.

    How do I get the numbers program to type a numerical date across the top row? It wants to change it to Dec. 13 instead of 12/13.

    Amy,
    I hope that you can forgive Numbers for converting the date you enter as 12/13 into the default format of "December 13, 2011", one that is popular with many users.
    You can change to any of the supported date formats by using the Cells Inspector, Date and Time options.
    Select the top row of cells and use the inspector to set the format. You may do this before or after making the entries.
    Jerry

  • How can i retrieved data into the infocube from archived files

    hi,
    i have archived cube data and i have to load data into the cube from archived files.
    so now i want to find archived files and how to load data into the cube.
    thanks

    Hi.....
    Reloading archived data should be an exception rather than the general case, since data should be
    archived only if it is not needed in the database anymore. When the archived data target is serving also as a
    datamart to populate other data targets, Its recommend that you load the data to a copy of the original
    (archived) data target, and combine the two resulting data targets with a MultiProvider.
    In order to reload the data to a data target, you have to use the export DataSource of the archived data
    target. Therefore, you create an update rule based on the respective InfoSource (technical name 8<data
    target name>). You then trigger the upload either by using ‘Update ODS data in data target’ or by
    replicating the DataSources of the MYSELF source system and subsequently scheduling an InfoPackage
    for the respective InfoSource
    If you want to read the data for reporting or
    control purposes, you have to write a report, which reads data from the archive files sequentially.
    Alternatively, you can also use the Archiving Information System (AS). This tool enables you to define an
    InfoStructure, and create reports based on these InfoStructures. The InfoStructures define an index for
    the archive file data. At the moment, the archiving process in the BW system does not fill the
    InfoStructures during the archiving session automatically. This has to be performed manually when
    needed.
    Another way of displaying data from the archive file is by using the ‘Extractor checker’ (TCODE RSA3).
    Enter the name of the export DataSource of the respective data target (name of the data target preceded
    by ‘8’), and choose the archive files that are to be read. The extractor checker reads the selected archive
    files sequentially. Selection conditions can be entered for filtering but have to be entered in in internal
    format
    It will remain same in the change log table.
    Check this link :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b32837f2-0c01-0010-68a3-c45f8443f01d
    Hope this helps you...........
    Regards,
    Debjani............

  • How to insert data to the specified row column of the multi column list box

    Hi All
    How do i insert data into the specified column of the multi cplumn list box?
    I have a table that containsall station nos and name.Then another table contains the data the various stations having at  for 24 hrs.That is 12 am to 11 pm.
    And i want to display each stations details as follows using a multi column list box/table
    My stationinfo table
    stnno   stnname......................
    s1           stn1
    s2            stn2
    s3             stn3
    The other table
    stnno      sysdatetime       data
    s1             12am                   1
    s2              12am                   4
    s1               1  am                 2
    So the station s1,s2.... will have data for 24 hrs.
    And i want to display it as follows using a multicolumn listbox
    stnname        12am   1 am ......................................11pm
    s1                   ...................
    s2                 ........................
    What i have in my  mind is to get all station nos
    and in a for loop get the station's data from 12 am to 11 pm
    or
    select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
    Or any other better query available?
    Can anybody suggest me a good idea?
    One more thing...how to insert data into the specified field row or column of a multi column list box?
    Thanks in advance

    hi
    i want to know,,can u say ur need clearly...and i attached two image u see that one
    Indrajit
    | [email protected] | [email protected] .
    Attachments:
    station.JPG ‏35 KB
    station2.JPG ‏79 KB

  • Insert multiple rows of records into the database

    The codes below allow me to insert a row of record into the database. How would I changed these to insert multiple rows at once? Please help!
    String sql = "INSERT INTO EMPLOYEES" +
    "(First_Name, Last_Name, Title, Phone) " +
    " VALUES " +
    PreparedStatement statement = conn.prepareStatement(sql);
    statement.setObject (1, First_Name);
    statement.setObject (2, Last_Name);
    statement.setObject (3, Title);
    statement.setObject (4, Phone);
    boolean returnValue = statement.execute();

    Hi mystiqueX,
    As wmolosho has suggested in his answer to this very same question that you also posted to the JavaServer Pages forum, you can create a batch of inserts and perform them using the "executeBatch()" method. I will use Craig's sample code to demonstrate:
    (Note that this code is untested!)
    conn.setAutoCommit(false);
    PreparedStatement statement = conn.prepareStatement(sql);
    // assume you have an array of objects here
    for (int i = 0; i < data.length; i++) {
      statement.setString(1, data<i>.getFirstName());
      statement.setString(2, data<i>.getLastName());
      statement.setString(3, data<i>.getTitle());
      statement.setString(4, data<i>.getPhone());
      statement.addBatch();
    statement.executeBatch();
    conn.commit();If you are not familiar with it, allow me to suggest looking at the Making Batch Updates lesson on the Java Tutorial.
    Hope it helps.
    Good Luck,
    Avi.

  • How to display rows of data into different columns?

    I'm new to SQL and currently this is what I'm trying to do: 
    Display multiple rows of data into different columns within the same row
    I have a table like this:
        CREATE TABLE TRIPLEG(
            T#              NUMBER(10)      NOT NULL,
            LEG#            NUMBER(2)       NOT NULL,
            DEPARTURE       VARCHAR(30)     NOT NULL,
            DESTINATION     VARCHAR(30)     NOT NULL,
            CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (T#, LEG#),
            CONSTRAINT TRIPLEG_UNIQUE UNIQUE(T#, DEPARTURE, DESTINATION),
            CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (T#) REFERENCES TRIP(T#) );
        INSERT INTO TRIPLEG VALUES( 1, 1, 'Sydney', 'Melbourne');
        INSERT INTO TRIPLEG VALUES( 1, 2, 'Melbourne', 'Adelaide');
    The result should be something like this:
    > T#  | ORIGIN  | DESTINATION1  |  DESTINATION2 
    > 1   | SYDNEY  | MELBORUNE     | ADELAIDE
    The query should include the `COUNT(T#) < 3` since I only need to display the records less than 3. How can I achieve the results that I want using relational views???
    Thanks!!!

    T#
    LEG#
    DEPARTURE
    DESTINATION
    1
    1
    Sydney
    Melbourne
    1
    2
    Melbourne
    Adelaide
    1
    3
    Adelaide
    India
    1
    4
    India
    Dubai
    2
    1
    India
    UAE
    2
    2
    UAE
    Germany
    2
    3
    Germany
    USA
    On 11gr2, you may use this :
      SELECT t#,
             REGEXP_REPLACE (
                LISTAGG (departure || '->' || destination, ' ')
                   WITHIN GROUP (ORDER BY t#, leg#),
                '([^ ]+) \1+',
                '\1')
        FROM tripleg
        where leg#<=3
    GROUP BY t#;
    Output:
    1 Sydney->Melbourne->Adelaide->India
    2 India->UAE->Germany->USA
    Cheers,
    Manik.

Maybe you are looking for

  • My itune wont let me open my account..

    My itune wont let me open my account... my itouch say "cannot connect ot itunes store" so i tried my pc and it says "We're sorry. We cannot complete your request on the itunes store at this time" Can someone please help? I also Run Diagnostics and it

  • How do I actually get my Officejet 7500A WF printer to print... There's no program....

    OK HP, I'm so over this one. I'm on my 3rd brand new one because of different problems, first was a broken screen, 2nd the printer wouldn't talk to the computer, (I can't remember the excuse w/o looking it up)  now every time I scan more than 4 thing

  • Can I use the iPhone 5 out of the box as a wifi device?

    Can I buy an Unlocked iPhone 5 from Apple when it is released and use it out of the box as a wifi device without needing unlock codes and sim cards? I do not plan on getting phone service right away and would like for the device to be functional (bas

  • Starting managed servers from admin console vs. command line

    Will the arguments I enter in the "Arguments" section of the "Server start" admin console page also be used if I start the managed server from the command line using startManagedWeblogic.sh? And conversely, will changes I make to the scripts take eff

  • How to read certain span of data from SQL-databa​se ?

    Hi All, I'm using LV 8.5 with Database Connectivity Toolset My aim is read certain time span data from MySQL-database. Let's assume that I have rocorded data from 1.1.2008 to 25.1.2008. My database table contain two columns "timestamp" and "data". Ho