Sorting a table which is used as a reference

Hi,
I am not 100% sure that i have all the terminology correct here so please excuse me if i am calling "things" by there wrong name.
I have a table which has a list of racing car numbers which are not in any particular order.
!http://img571.imageshack.us/img571/4305/screenshot20100602at122.png!
I then have lots of smaller tables looking at this list, for instance, table 1 looks at the first car number cell then table 2 looks at the second car number cell etc..
So before the list of car numbers is sorted table 1 looks at the list and takes the first number off the list, in this example 5, and table 2 looks at the list and takes the second number off list, in this example 3. etc.....
so table 1 has a 5 in it and table 2 has a 3 in it.
to look this number up i use this formula
=IF(ISBLANK(Race 1::Data :: A6),"",Race 1::Data :: A6)
which if the cell it looks at is blank then it does not show anything.
The problem I have is that when I sort my list of car numbers into numerical order( 1,2,3,4,5,6,7,8,9,10) the table 1,table 2 etc do not sort.
So after sorting table 1 still as 5 in it and table 2 still has 3 in it.
How can i do it so after sorting the list of car numbers table 1 has 1 in it and table 2 has two in it.
I have tried making the cells in table 1, table 2 to absolute row/column but this did not work.
Thanks
Charlie

Charlie,
When your smaller table uses an expression like your "=IF(ISBLANK(Race 1::Data :: A6),"",Race 1::Data :: A6)", it will continue to access the same data even if you move that data about by sorting or other means. Numbers does this, as do all the other spreadsheet programs. They do it by tracking the movement and adjusting the references.
A way to avoid this is to use another form of addressing, such as indirect or indexed addressing. For example, you could have used:
=IF(ISBLANK(OFFSET(Data :: $A$1, 5,0)),"",OFFSET(Data :: $A$1, 5,0))
Now this particular expression will always grab the content of Race 1::Data :: A6.
Regards,
Jerry

Similar Messages

  • How can i create table which in use

    Dear all,
    How can i create a index on table which have much dml any time?

    In 10g :
    The CREATE ONLINE waits for existing transactions to commit before it can proceed. Once it starts, it uses a log table (MV Log) to track subsequent changes (i.e. it allows concurrent DML once it has started). At the end of the operation, it encounters another wait if there are existing transactions as it has to sync changes from the MV Log to the index.
    Here's an explanation by Jonathan Lewis : Re: Alter Index Rebuild Online
    In 11g :
    There's an improvement in that only the transactions that were active at the instant when the CREATE .. ONLINE was issued are the ones it waits for. It does not have to wait on subsequent transactions.
    Here's an explanation by Richard Foote : http://richardfoote.wordpress.com/2008/02/11/index-create-and-rebuild-locking-improvements-in-11g-ch-ch-ch-changes/
    Hemant K Chitale

  • Question about sorted, hashed tables, mindset when using OO concepts...

    Hello experts,
    I just want to make sure if my idea about sorted and hashed table is correct.Please give tips and suggestions.
    In one of my reports, I declared a structure and an itab.
    TYPES: BEGIN OF t_mkpf,
            mblnr           LIKE mkpf-mblnr,
            mjahr           LIKE mkpf-mjahr,
            budat           LIKE mkpf-budat,
            xblnr(10)       TYPE c,
            tcode2          LIKE mkpf-tcode2,
            cputm           LIKE mkpf-cputm,
            blart           LIKE mkpf-blart,
          END OF t_mkpf.
    it_mkpf       TYPE SORTED   TABLE OF t_mkpf WITH HEADER LINE
                                       WITH NON-UNIQUE KEY mblnr mjahr.
    Now, I declared it as a sorted table with a non-unique key MBLNR and MJAHR. Now suppose I have 1000 records in my itab. how will it search for a particular record?
    2. Is it faster than sorting a standard table then reading it using binary search?
    3. How do I use a hashed table effectively? lets say that I want to use hashed type instead of sorted table in my example above.
    4. I am currently practicing ABAP Objects and my problem is that I think my mindset when programming a report is still the 'procedural one'. How do one use ABAP concepts effectively?
    Again, thank you guys and have a nice day!

    Hi Viray,
    <b>The different ways to fill an Internal Table:</b>
    <b>append&sort</b>
    This is the simplest one. I do appends on a standard table and then a sort.
    data: lt_tab type standard table of ...
    do n times.
    ls_line = ...
    append ls_line to lt_tab.
    enddo.
    sort lt_tab.
    The thing here is the fast appends and the slow sort - so this is interesting how this will compare to the following one.
    <b>read binary search & insert index sy-tabix</b>
    In this type I also use a standard table, but I read to find the correct insert index to get a sorted table also.
    data: lt_tab type standard table of ...
    do n times.
    ls_line = ...
    read table lt_tab transporting no fields with key ... binary search.
    if sy-subrc <> 0.
      insert ls_line into lt_tab index sy-tabix.
    endif.
    enddo.
    <b>sorted table with non-unique key</b>
    Here I used a sorted table with a non-unique key and did inserts...
    data: lt_tab type sorted table of ... with non-unique key ...
    do n times.
    ls_line = ...
    insert ls_line into table lt_tab.
    enddo.
    <b>sorted table with unique key</b>
    The coding is the same instead the sorted table is with a unique key.
    data: lt_tab type sorted table of ... with unique key ...
    do n times.
    ls_line = ...
    insert ls_line into table lt_tab.
    enddo.
    <b>hashed table</b>
    The last one is the hashed table (always with unique key).
    data: lt_tab type hashed table of ... with unique key ...
    do n times.
    ls_line = ...
    insert ls_line into table lt_tab.
    enddo.
    <b>You Can use this Program to Test:</b>
    types:
      begin of local_long,
        key1 type char10,
        key2 type char10,
        data1 type char10,
        data2 type char10,
        data3 type i,
        data4 type sydatum,
        data5 type numc10,
        data6 type char32,
        data7 type i,
        data8 type sydatum,
        data9 type numc10,
        dataa type char32,
        datab type i,
        datac type sydatum,
        datad type numc10,
        datae type char32,
        dataf type i,
        datag type sydatum,
        datah type numc10,
        datai type char32,
        dataj type i,
        datak type sydatum,
        datal type numc10,
        datam type char32,
        datan type i,
        datao type sydatum,
        datap type numc10,
        dataq type char32,
        datar type i,
        datas type sydatum,
        datat type numc10,
        datau type char32,
        datav type i,
        dataw type sydatum,
        datax type numc10,
        datay type char32,
        dataz type i,
        data11 type numc10,
        data21 type char32,
        data31 type i,
        data41 type sydatum,
        data51 type numc10,
        data61 type char32,
        data71 type i,
        data81 type sydatum,
        data91 type numc10,
        dataa1 type char32,
        datab1 type i,
        datac1 type sydatum,
        datad1 type numc10,
        datae1 type char32,
        dataf1 type i,
        datag1 type sydatum,
        datah1 type numc10,
        datai1 type char32,
        dataj1 type i,
        datak1 type sydatum,
        datal1 type numc10,
        datam1 type char32,
        datan1 type i,
        datao1 type sydatum,
        datap1 type numc10,
        dataq1 type char32,
        datar1 type i,
        datas1 type sydatum,
        datat1 type numc10,
        datau1 type char32,
        datav1 type i,
        dataw1 type sydatum,
        datax1 type numc10,
        datay1 type char32,
        dataz1 type i,
      end of local_long.
    data:
      ls_long type local_long,
      lt_binary type standard table of local_long,
      lt_sort_u type sorted table of local_long with unique key key1 key2,
      lt_sort_n type sorted table of local_long with non-unique key key1 key2,
      lt_hash_u type hashed table of local_long with unique key key1 key2,
      lt_apsort type standard table of local_long.
    field-symbols:
      <ls_long> type local_long.
    parameters:
      min1 type i default 1,
      max1 type i default 1000,
      min2 type i default 1,
      max2 type i default 1000,
      i1 type i default 100,
      i2 type i default 200,
      i3 type i default 300,
      i4 type i default 400,
      i5 type i default 500,
      i6 type i default 600,
      i7 type i default 700,
      i8 type i default 800,
      i9 type i default 900,
      fax type i default 1000.
    types:
      begin of measure,
        what(10) type c,
        size(6) type c,
        time type i,
        lines type i,
        reads type i,
        readb type i,
        fax_s type i,
        fax_b type i,
        fax(6) type c,
        iter type i,
      end of measure.
    data:
      lt_time type standard table of measure,
      lt_meantimes type standard table of measure,
      ls_time type measure,
      lv_method(7) type c,
      lv_i1 type char10,
      lv_i2 type char10,
      lv_f type f,
      lv_start type i,
      lv_end type i,
      lv_normal type i,
      lv_size type i,
      lv_order type i,
      lo_rnd1 type ref to cl_abap_random_int,
      lo_rnd2 type ref to cl_abap_random_int.
    get run time field lv_start.
    lo_rnd1 = cl_abap_random_int=>create( seed = lv_start min = min1 max = max1 ).
    add 1 to lv_start.
    lo_rnd2 = cl_abap_random_int=>create( seed = lv_start min = min2 max = max2 ).
    ls_time-fax = fax.
    do 5 times.
      do 9 times.
        case sy-index.
          when 1. lv_size = i1.
          when 2. lv_size = i2.
          when 3. lv_size = i3.
          when 4. lv_size = i4.
          when 5. lv_size = i5.
          when 6. lv_size = i6.
          when 7. lv_size = i7.
          when 8. lv_size = i8.
          when 9. lv_size = i9.
        endcase.
        if lv_size > 0.
          ls_time-iter = 1.
          clear lt_apsort.
          ls_time-what = 'APSORT'.
          ls_time-size = lv_size.
          get run time field lv_start.
          do lv_size times.
            perform fill.
            append ls_long to lt_apsort.
          enddo.
          sort lt_apsort by key1 key2.
          get run time field lv_end.
          ls_time-time = lv_end - lv_start.
          ls_time-reads = 0.
          ls_time-readb = 0.
          ls_time-lines = lines( lt_apsort ).
          get run time field lv_start.
          do.
            add 1 to ls_time-readb.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_apsort
              assigning <ls_long>
              with key key1 = lv_i1
                       key2 = lv_i2
              binary search.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do.
            add 1 to ls_time-reads.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_apsort
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_apsort
              assigning <ls_long>
              with key key1 = lv_i1
                       key2 = lv_i2
              binary search.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_b = lv_end - lv_start.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_apsort
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_s = lv_end - lv_start.
          collect ls_time into lt_time.
          clear lt_binary.
          ls_time-what = 'BINARY'.
          ls_time-size = lv_size.
          get run time field lv_start.
          do lv_size times.
            perform fill.
            read table lt_binary
              transporting no fields
              with key key1 = ls_long-key1
                       key2 = ls_long-key2
              binary search.
            if sy-index <> 0.
              insert ls_long into lt_binary index sy-tabix.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-time = lv_end - lv_start.
          ls_time-reads = 0.
          ls_time-readb = 0.
          ls_time-lines = lines( lt_binary ).
          get run time field lv_start.
          do.
            add 1 to ls_time-readb.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_binary
              assigning <ls_long>
              with key key1 = lv_i1
                       key2 = lv_i2
              binary search.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do.
            add 1 to ls_time-reads.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_binary
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_binary
              assigning <ls_long>
              with key key1 = lv_i1
                       key2 = lv_i2
              binary search.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_b = lv_end - lv_start.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_binary
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_s = lv_end - lv_start.
          collect ls_time into lt_time.
          clear lt_sort_n.
          ls_time-what = 'SORT_N'.
          ls_time-size = lv_size.
          get run time field lv_start.
          do lv_size times.
            perform fill.
            insert ls_long into table lt_sort_n.
          enddo.
          get run time field lv_end.
          ls_time-time = lv_end - lv_start.
          ls_time-reads = 0.
          ls_time-readb = 0.
          ls_time-lines = lines( lt_sort_n ).
          get run time field lv_start.
          do.
            add 1 to ls_time-readb.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_n
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do.
            add 1 to ls_time-reads.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_n
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_n
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_b = lv_end - lv_start.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_n
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_s = lv_end - lv_start.
          collect ls_time into lt_time.
          clear lt_sort_u.
          ls_time-what = 'SORT_U'.
          ls_time-size = lv_size.
          get run time field lv_start.
          do lv_size times.
            perform fill.
            insert ls_long into table lt_sort_u.
          enddo.
          get run time field lv_end.
          ls_time-time = lv_end - lv_start.
          ls_time-reads = 0.
          ls_time-readb = 0.
          ls_time-lines = lines( lt_sort_u ).
          get run time field lv_start.
          do.
            add 1 to ls_time-readb.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_u
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do.
            add 1 to ls_time-reads.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_u
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_u
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_b = lv_end - lv_start.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_sort_u
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_s = lv_end - lv_start.
          collect ls_time into lt_time.
          clear lt_hash_u.
          ls_time-what = 'HASH_U'.
          ls_time-size = lv_size.
          get run time field lv_start.
          do lv_size times.
            perform fill.
            insert ls_long into table lt_hash_u.
          enddo.
          get run time field lv_end.
          ls_time-time = lv_end - lv_start.
          ls_time-reads = 0.
          ls_time-readb = 0.
          ls_time-lines = lines( lt_hash_u ).
          get run time field lv_start.
          do.
            add 1 to ls_time-readb.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_hash_u
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do.
            add 1 to ls_time-reads.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_hash_u
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data11 = sy-index.
            endif.
            get run time field lv_end.
            subtract lv_start from lv_end.
            if lv_end >= ls_time-time.
              exit.
            endif.
          enddo.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_hash_u
              assigning <ls_long>
              with table key key1 = lv_i1
                             key2 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_b = lv_end - lv_start.
          get run time field lv_start.
          do fax times.
            lv_i1 = lo_rnd1->get_next( ).
            lv_i2 = lo_rnd2->get_next( ).
            read table lt_hash_u
              assigning <ls_long>
              with key key2 = lv_i1
                       key1 = lv_i2.
            if sy-subrc = 0.
              <ls_long>-data21 = sy-index.
            endif.
          enddo.
          get run time field lv_end.
          ls_time-fax_s = lv_end - lv_start.
          collect ls_time into lt_time.
        endif.
      enddo.
    enddo.
    sort lt_time by what size.
    write: / ' type      | size   | time        | tab-size    | directread  | std read    | time direct | time std read'.
    write: / sy-uline.
    loop at lt_time into ls_time.
      write: / ls_time-what, '|', ls_time-size, '|', ls_time-time, '|', ls_time-lines, '|', ls_time-readb, '|', ls_time-reads, '|', ls_time-fax_b, '|', ls_time-fax_s.
    endloop.
    form fill.
      lv_i1 = lo_rnd1->get_next( ).
      lv_i2 = lo_rnd2->get_next( ).
      ls_long-key1 = lv_i1.
      ls_long-key2 = lv_i2.
      ls_long-data1 = lv_i1.
      ls_long-data2 = lv_i2.
      ls_long-data3 = lv_i1.
      ls_long-data4 = sy-datum + lv_i1.
      ls_long-data5 = lv_i1.
      ls_long-data6 = lv_i1.
      ls_long-data7 = lv_i1.
      ls_long-data8 = sy-datum + lv_i1.
      ls_long-data9 = lv_i1.
      ls_long-dataa = lv_i1.
      ls_long-datab = lv_i1.
      ls_long-datac = sy-datum + lv_i1.
      ls_long-datad = lv_i1.
      ls_long-datae = lv_i1.
      ls_long-dataf = lv_i1.
      ls_long-datag = sy-datum + lv_i1.
      ls_long-datah = lv_i1.
      ls_long-datai = lv_i1.
      ls_long-dataj = lv_i1.
      ls_long-datak = sy-datum + lv_i1.
      ls_long-datal = lv_i1.
      ls_long-datam = lv_i1.
      ls_long-datan = sy-datum + lv_i1.
      ls_long-datao = lv_i1.
      ls_long-datap = lv_i1.
      ls_long-dataq = lv_i1.
      ls_long-datar = sy-datum + lv_i1.
      ls_long-datas = lv_i1.
      ls_long-datat = lv_i1.
      ls_long-datau = lv_i1.
      ls_long-datav = sy-datum + lv_i1.
      ls_long-dataw = lv_i1.
      ls_long-datax = lv_i1.
      ls_long-datay = lv_i1.
      ls_long-dataz = sy-datum + lv_i1.
      ls_long-data11 = lv_i1.
      ls_long-data21 = lv_i1.
      ls_long-data31 = lv_i1.
      ls_long-data41 = sy-datum + lv_i1.
      ls_long-data51 = lv_i1.
      ls_long-data61 = lv_i1.
      ls_long-data71 = lv_i1.
      ls_long-data81 = sy-datum + lv_i1.
      ls_long-data91 = lv_i1.
      ls_long-dataa1 = lv_i1.
      ls_long-datab1 = lv_i1.
      ls_long-datac1 = sy-datum + lv_i1.
      ls_long-datad1 = lv_i1.
      ls_long-datae1 = lv_i1.
      ls_long-dataf1 = lv_i1.
      ls_long-datag1 = sy-datum + lv_i1.
      ls_long-datah1 = lv_i1.
      ls_long-datai1 = lv_i1.
      ls_long-dataj1 = lv_i1.
      ls_long-datak1 = sy-datum + lv_i1.
      ls_long-datal1 = lv_i1.
      ls_long-datam1 = lv_i1.
      ls_long-datan1 = sy-datum + lv_i1.
      ls_long-datao1 = lv_i1.
      ls_long-datap1 = lv_i1.
      ls_long-dataq1 = lv_i1.
      ls_long-datar1 = sy-datum + lv_i1.
      ls_long-datas1 = lv_i1.
      ls_long-datat1 = lv_i1.
      ls_long-datau1 = lv_i1.
      ls_long-datav1 = sy-datum + lv_i1.
      ls_long-dataw1 = lv_i1.
      ls_long-datax1 = lv_i1.
      ls_long-datay1 = lv_i1.
      ls_long-dataz1 = sy-datum + lv_i1.
    endform.".
    Thanks & Regards,
    YJR.

  • Urgent-How to find the tables which are used in  DB02 transaction

    Hi,
    Can anybody help me in finding the tables  in Tablespaces tabstrip & Tables n Indexes tabstrip  in DB02 transaction??

    Hi,
    open the following link.
    http://books.google.co.in/books?id=jTTrZjucb_QC&pg=PA37&lpg=PA37&dq=dbo2%2Bsap&source=web&ots=FgA9pC3u24&sig=sOG3EJRm5HGW2aFpkVVH_oxBjjo&hl=en#PPP1,M1
    Master data load failure
    Reward if Helpful
    Jagadish

  • Is there a way to sort a table by a column of scripture references?

    Here's some sample data:
    Book
    Reference
    Genesis
    1:2
    Genesis
    1:26
    Genesis
    1:6-19
    Genesis
    1:6-8
    Genesis
    12:1
    Genesis
    12:3
    Genesis
    2:2
    My table has certain references from all the books of the Bible (sans Apocrypha), so it's prohibitively hefty, but this gives you a few of my problems:
    It's really hard to sort by books, as they weren't included in the canon in, um, alphabetical order. But I can get around that.
    The verses (the numbers after the colon in the Reference column) are sorted in A-Z style, which is where the bulk of my problem is:
    All chapters beginning with "1" will sort ahead of chapter 2... this is a problem.
    All verses that begin with a lower ordinal will precede any verse that begins with a higher one--in the example above, "26" sorts ahead of "6-19".
    It may be that I'm asking too much of Numbers' built-in sorting tool... any ideas on how I can straighten this out? Short of breaking the chapters and verses apart, of course... I have like 9,000 rows to this table and am not really keen on breaking that format up if I can avoid it, though I'm thinking I won't be able to.
    Thoughts?

    Hi Mikey,
    Numbers sorts numbers in numerical order, and text in 'alphabetical order'.
    You can sort books into the order they appear by adding a column containing a number equivalent to the book's position in the Book.
    Chapter and verse can be handled in several ways:
    Separate book, chapter and verse into four columns. book in two columns (number in the first, name in the second), chapter (as a number) in the third, verse (as a number) in the fourth.
    A three stage sort, on book number, then on chapter number, then on verse number will then put everything back in the original order. Note that a 'three stage sort' is NOT the same as 'three single rule sorts'.
    First two columns as above, chapter and verse combined in column 3. This will require a change in your chapter:verse notation. Here are two possibilities:
    1. Use a numeric notation, replacing the colon with a decimal point. Add one or two leading zeroes to the verse part (after the decimal) to maintain three places after the decimal..
    2. Use text notation, retaining the colon separator. pad the chapter number and the verse number with leading zeroes to maintain three digits before and after the colon.
    (Three places are needed before the colon to allow for the 150 'chapters' in Psalms. Two will be sufficient after the colon unless there is a chapter with more than 99 verses. Unnumbered verses may be accommodated by appending a letter to the number for the past numbered verse (in the text notation), or by extending the decimal part by one digit (for up to nine unnumbered verses in sequence, or by two digits for sequences containing more then nine, but fewer that 100 unnumbered verses. I didn't do a search to determine which of these would be necessary.
    Either of the C&V notations above could be constructed from the 'standard' notation using a formula, and placed in a column which may be hidden, and used only for sorting.
    Regards,
    Barry

  • Trying to import tables from datapump file which done using transportable mode

    Hi using impdp on oracle 11.2.0.3 and have a dumpfile which contains export of tables which done using transportable tablespace mode.
    Want to import 3 of the tables just form file cobncerned into another database using impd but not working
    Error
    ORA-39002: invalid operation
    ORA-39061: import mode FULL conflicts with export mode TRANSPORTABLE
    {code}
    userid=archive/MDbip25
    DIRECTORY=TERMSPRD_EXTRACTS
    DUMPFILE=archiveexppre.964.dmp
    LOGFILE=por_200813.log
    PARALLEL=16
    TABLES=ZPX_RTRN_CDN_STG_BAK,ZPX_RTRN_STG_BAK,ZPX_STRN_STG_BAK
    REMAP_TABLESPACE=BI_ARCHIVE_DATA:BI_ARCHIVE_LARGE_DATA
    REMAP_TABLESPACE=BI_ARCHIVE_IDX:BI_ARCHIVE_LARGE_IDX
    {code}
    Any ideas

    Hi,
    Export command
    {code}
    procedure export_old_partitions_to_disk (pi_SEQ_num NUMBER)
    is
      h1 number; -- Datapump handle
      dir_name    CONSTANT    ALL_directories.DIRECTORY_NAME%type :='DATA_EXPORTS_DIR'; -- Directory Name
    v_file_name varchar2(100);
      v_log_name  varchar2(100);
    v_job_status ku$_Status;          -- The status object returned by get_status
        v_job_state VARCHAR2(4000);
        v_status ku$_Status1010;
        v_logs ku$_LogEntry1010;
        v_row PLS_INTEGER;
        v_current_sequence_number archive_audit.aa_etl_run_num_seq%type;
        v_jobState                user_datapump_jobs.state%TYPE;
    begin
    -- Set to read only to make transportable
    execute immediate ('alter tablespace ARCHIVED_PARTITIONS read only');
    -- Get last etl_run_num_seq by querying public synonym ARCHIVE_ETL_RUN_NUM_SEQ
    -- Need check no caching on etl_run_num_seq
    select last_number - 1
    into v_current_sequence_number
    from ALL_SEQUENCES A
    WHERE A.SEQUENCE_NAME = 'ETL_RUN_NUM_SEQ';
    v_file_name := 'archiveexppre.'||PI_SEQ_NUM||'.dmp';--v_current_sequence_number;
    v_log_name  := 'archiveexpprelog.'||PI_SEQ_NUM||'.log';--v_current_sequence_number;
    dbms_output.put_line(v_file_name);
    dbms_output.put_line(v_log_name);
    -- Create a (user-named) Data Pump job to do a schema export.
    -- dir_name := 'DATA_EXPORTS_DIR';
      h1 := dbms_datapump.open(operation =>'EXPORT',
      job_mode =>'TRANSPORTABLE',
      remote_link => NULL,
      job_name    => 'ARCHIVE_OLD_PARTITIONS_'||PI_SEQ_NUM);
      dbms_datapump.add_file(handle =>h1,
                             filename => v_file_name,
                             directory => dir_name,
                             filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE,
                             reusefile => 1); -- value of 1 instructs to overwrite existing file
      dbms_datapump.add_file(handle =>h1,
                             filename => v_log_name,
                             directory => dir_name,
                             filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE,
                             reusefile => 1); -- value of 1 instructs to overwrite existing file
      dbms_datapump.metadata_filter(    
          handle => h1,
          name   => 'TABLESPACE_EXPR',
         VALUE    => 'IN(''ARCHIVED_PARTITIONS'')'
    dbms_datapump.metadata_filter(handle =>h1,
                             name => 'TABLE_FILTER',
                             value => 'BATCH_AUDIT');
    --dbms_datapump.set_parameter(h1, 'TRANSPORTABLE', 'ALWAYS');
    -- Start the datapump_job
      dbms_datapump.start_job(h1);
      begin
          NULL;
         --dbms_datapump.detach(handle => h1);
      end;
      dbms_output.put_line('Job has completed');
      dbms_datapump.wait_for_job(h1,v_jobState);
      dbms_output.put_line('Status '||v_jobState);
       dbms_output.put_line('Job has completed');
    execute immediate ('alter tablespace ARCHIVED_PARTITIONS read write');
    exception
        when others then
          dbms_datapump.get_status(handle => h1,
                                 mask => dbms_datapump.KU$_STATUS_WIP,
                                 timeout=> 0,
                                job_state => v_job_state,
                                status => v_job_status);
                   dbms_output.put_line(v_job_state);
            MISC_ROUTINES.record_error;
             raise;
          --  RAISE_APPLICATION_ERROR(-20010, DBMS_UTILITY.FORMAT_ERROR_BACKTRACE||' '||v_debug_table_name);      
        -- RAISE_APPLICATION_ERROR(-20010,DBMS_UTILITY.format_error_backtrace);
    end export_old_partitions_to_disk;
    {code}

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Which table i can use to find out the condition type in PO item ?

    Hello, erveryone. Which table i can use to find out the condition type in PO item ? Thank you.
    Xinzhou.

    hi
    The Table name used to find the Tax Values are
    KOMV: Pricing Communications-Condition Record
    KONV: Conditions (Transaction Data)
    From the above tables you can refer the fields below.
    KAWRT
    KBETR
    for excise check table J_1IEXCHDR for header
    J_1IEXCDTL for item excise
    Fetch the corresponding records based on the field
    KNTYP
    regards
    kunal

  • Which table i can use to get standard price of previous periods ?

    Hello, all.
        Which table i can use to get standard price of previous periods ? Example, current period is 2008/11, i want to get the standard price of period 2008/05 .
    Thanks.
    Xinzhou.

    Look in MBEW and MBEWH.
    Regards

  • Which PO and PR table can be used to get the WBS element field.

    Which PO and PR table can be used to get the WBS element field. Thanks.

    HI,
    In the PO the concerned field for WBS element shall be tracked in the Item details and the account assignment tab in PO.
    It shall be checked from EKKO table with PS_POSI feld.
    The same shall also be tracked in PR from EBAN table .please refer the account assignment tab in the PR item details.
    Hope this helps.
    Regards,
    Prasanna
    Award pls if helpful.

  • Which table field is used for getting Release quantity

    Hi friends,
    please tell me which table and field used to get "Release Quantity" also i want "Cumulative GR by release" table and field please do reply if u know.
    Thanks
    Yogesh

    Hi,
    RSEVENTCHAIN       Event
    Chain Processing Event Table
    RSEVENTHEAD        Header
    for the event chain
    RSEVENTHEADT        Header
    for the event chain
    RSPCCHAIN     Process
    chain details
    RSPCCHAINATTR      
    Attributes for a Process Chain
    RSPCCHAINEVENTS      Multiple
    Events with Process Chains
    RSPCCHAINT      Texts
    for Chain
    RSPCCOMMANDLOG     System
    Command Execution Logs (Process Chains)
    RSPCLOGCHAIN      
    Cross-Table Log ID / Chain ID
    RSPCLOGS
    Application Logs for the Process Chains
    RSPCPROCESSLOG     Logs for
    the Chain Runs
    RSPCRUNVARIABLES      
    Variables for Process Chains for Runtime
    RSPC_MONITOR     Monitor
    individual process chains
    Regards
    Ashwin

  • Need a table which all custom tables used in the program

    HI to all experts.
    I need a table  which contains  all the custom table used in the program . Or any other method which can accomplish this.

    hi max,
    thanks for u r reply . if we use the statement tables in the report and write some tables
    for example: tables: zf020
                                    zf023
    is there any table which stores this .

  • Can sorting facilty in internal tables can be used on char fields?

    Can sorting facilty in internal tables can be used on char fields?

    there is no restriction to sort by any TYPE. u ve the freedom to sort on any TYPE of fields.
    sort itab by ascending / descending F1 F2 F2.
    abap doubts, i request you to try and practise your doubts befor posting here in forums. I can understand you are a buddy.Please remember, PRACTISE MAKES MAN PERFECT. Try to master on own and approch forum in worst case.
    Also award points to all helpful answers.
    All the Best
    Thanks & Best Regards
    Kiran

  • How can I sort a table using more than one column in Numbers or in Pages?

    How can I sort a table using more than one column in Numbers or in Pages?

    Hi Ron,
    On the right side of the Toolbar click the Sort and Filter button, then select Sort.
    You can then set up a multiple column sort.
    Click Add A Column, Specify the sort for that column, Repeat.
    Jerry

  • Retaining row selection in a new  table which uses the same model.

    hi can anybody help me
    actually i have a table which allows multiple selections.like it allows to select row1 & row 4 if
    there are 5 rows.Now on click of a button i show a dialog with another table but with the same model
    applied to it.
    now my problem is that iam not able to make the selction of 1 & 4 rows in the new table.
    if i use a selectSingleRow in a for loop only 4rth row is getting selected.
    if i use a selection interval method it selects all the 4 rows from 1 to 4.
    is there any way i could select only the 1st and the 4rth row ?

    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    class Testing
      public void buildGUI()
        JTable table = new JTable(10,3);
        JScrollPane sp = new JScrollPane(table);
        sp.setPreferredSize(new Dimension(300,200));
        JFrame f = new JFrame();
        f.getContentPane().add(sp);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
        table.changeSelection(1,0,true,false);
        table.changeSelection(4,0,true,false);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

Maybe you are looking for

  • Trying to use my Time Capsule as a Hard Drive.. Help!!

    I have recenly inherited an old Time Capsule from a family member and I've been trying to figure out for two hours how to use it as an external hard drive. I connected it and added it to my existing network as an extention. Then, I turned off its wir

  • Font looks sort of 'distorted'

    Lately on some places like Photobucket's Upload Button, Livestream's chat box, and flash games, the font seems to look kinda distorted, having it be terribly pixelated with blue inside, here's an example: http://i652.photobucket.com/albums/uu249/Cele

  • Can't download Adobe Reader or FlashPlayer

    I have been trying to download Adobe Reader and Flash Player and keep getting a 'UI_Installer' dialogue saying 'Only a single instance of this application can run'. I have tried different download sites and different browsers but just get the same. C

  • How to Find Oracle instances?

    Hi all, Could you please guide how to check oracle instances? Thanks in advance!!

  • App store don't open suddenly

    i start i some bug erros, my email crash but i can fix it, next some icons in lauch pad desapear, now i see that my appstore won´t open anymore, even  in same mode. any idea? Tnks