Question about sort technique

we have a report that shows a list of contacts and we have an sub-report that displays (1) one field max(history completed date) so we can see that last time the contact was talked to.   The issue is: if we want to have a sort parameter sorts on the max(history completed date) field.  How would we do this?
1) pass the field value from the sub-report to the main report?
2) don't created a sub-report, create field value in the main report using sql
Please comment on the approaches above or any other methods that I might not have thought of.

Better yet, here's a sample of what your query should look like.
Insert it into 'Add Command'
select contact_names,
(select max(lasttime) from time.table b where a.contactID=b.contactID)
from table.contacts a
Enjoy,
Zack H.

Similar Messages

  • Question about sorting files in media library

    Hey,
    I'm Sam Hoste from Belgium and I have a question about sorting music files in my media library in iTunes.
    My music collection mainly exists of complete albums instead of individual songs. The problem is that I can not play the songs of an album in the same order as on the tracklist of the album in the media library of iTunes.
    I also take very good care of the ID3 tags from my mp3-files, but that doesn't help.
    For example, if I had an album with the following tracklist,
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5
    06. Artist - Song 6
    07. Artist - Song 7,
    every music file would have an ID3 tag for tracknumber (1, 2, 3, ...), an ID3 tag for artist ("Artist" or "Artist ft Otherartist"), an ID3 tag for title (Song 1, ...) and an ID3 tag for album ("Albumname").
    When I load this album in my media library in iTunes, I cannot get them sorted by album and by tracknumber on that album. When I sort by artist I get this list:
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    06. Artist - Song 6
    07. Artist - Song 7
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5.
    But that's normal, but even if I sort by album I get the same list:
    01. Artist - Song 1
    02. Artist - Song 2
    03. Artist - Song 3
    06. Artist - Song 6
    07. Artist - Song 7
    04. Artist ft Otherartist - Song 4
    05. Artist ft Otherartist - Song 5.
    So the songs aren't in the same order as they are supposed to be on the CD. And I would really like my albums to play in the same order than on the tracklist on the CD.
    I think the problem is caused by the fact that when you sort by "album" in iTunes media library, iTunes first sorts by albumname, and second by artistname, and third by tracknumber. In stead of sorting first by albumname, and then second by tracknumber in stead of the artist.
    My question: Is there a way to make sure iTunes sorts by albumname, and then by tracknumber in stead of artist, so I can play my albums in the same order as on the CD? Or is there an other solution for this issue?
    Thanks and kind regards,
    Sam Hoste

    See my previous post on Grouping Tracks Into Albums, in particular the topics Use an album friendly view and
    Tracks out of sequence.
    tt2

  • 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.

  • HELP???Question about the technique RM COPY. Please Help

    PLEASE HELP
    Im wondering if anyone can help me. I recently got a reply to a post that I wrote about deleting duplicated files. Mainly MP3s. I have not done this method yet though. Does it work? I have around 9000 mp3s that Itunes seems to always duplicate and I need to get rid of them. Can I open one of my ex-Harddrives that pretty much hold mp3s and run this command? Im looking for a completely faster method than individually deleting them in Itunes. One last question too. Where do I type this command? How do I access the directorys where my mp3s are in my ex-HD? If anyone can help me Id greatly appreciate it. The reply is below my name
    Jamie
    posternut:
    If none of the original filenames contains the lettering " copy", you can do what you want quite easily.
    Open Terminal, navigate to the folder that contains the files, and enter the following command (exactly as it appears here):
    rm *" copy"*
    That's all there is to it. All 9000 duplicate files will be removed very quickly.
    If you need help "navigating to the folder" or if some of your original filenames contain the lettering “ copy”, then post back here.
    Greg

    Launch Terminal.app
    Type cd followed by a space. Do not hit return key just yet.
    In Finder, navigate to folder containing the files you want to blow away.
    Drag and drop that folder (in the finder) into the Terminal.app window. It'll autofill the path to the directory containing the files you're wanting to blow away. Now hit the return key.
    You could type ls (that's a lower-case ell) and see the directory listing of all the files in your current directory. Probably a good idea to do just to doublecheck that you really are in the directory that you want to blow away all these files from.
    Now do what Greg said.
    Don't get impatient because Terminal is just sitting there and you're not getting an immediate command prompt. It'll take a while to blow away 9000 files.
    For entertainment, instead of rm *" copy"* use rm -v *" copy"* so you can watch all 9000 file names be printed in your terminal window as they are being deleted.
    Will it work? Oh yes .... irreversibly (if it doesn't, that's coz' there are some file ownership and/or file permission issues that need to be looked at, but assuming those are "compatible" with your current Terminal user environment, those guys'll be toast. Any file that's in the working directory where you are in Terminal that has the five characters " copy" in its filename will be history.
    The assumption in Greg's command is that all the files you want to blow away all reside in the one directory that you have navigated to.

  • HELP???Question about the technique RM COPY

    Im wondering if anyone can help me. I recently got a reply to a post that I wrote about deleting duplicated files. Mainly MP3s. I have not done this method yet though. Does it work? I have around 9000 mp3s that Itunes seems to always duplicate and I need to get rid of them. Can I open one of my ex-Harddrives that pretty much hold mp3s and run this command? Im looking for a completely faster method than individually deleting them in Itunes. One last question too. Where do I type this command? If anyone can help me Id greatly appreciate it. The reply is below my name
    Jamie
    posternut:
    If none of the original filenames contains the lettering " copy", you can do what you want quite easily.
    Open Terminal, navigate to the folder that contains the files, and enter the following command (exactly as it appears here):
    rm *" copy"*
    That's all there is to it. All 9000 duplicate files will be removed very quickly.
    If you need help "navigating to the folder" or if some of your original filenames contain the lettering “ copy”, then post back here.
    Greg

    Launch Terminal.app
    Type cd followed by a space. Do not hit return key just yet.
    In Finder, navigate to folder containing the files you want to blow away.
    Drag and drop that folder (in the finder) into the Terminal.app window. It'll autofill the path to the directory containing the files you're wanting to blow away. Now hit the return key.
    You could type ls (that's a lower-case ell) and see the directory listing of all the files in your current directory. Probably a good idea to do just to doublecheck that you really are in the directory that you want to blow away all these files from.
    Now do what Greg said.
    Don't get impatient because Terminal is just sitting there and you're not getting an immediate command prompt. It'll take a while to blow away 9000 files.
    For entertainment, instead of rm *" copy"* use rm -v *" copy"* so you can watch all 9000 file names be printed in your terminal window as they are being deleted.
    Will it work? Oh yes .... irreversibly (if it doesn't, that's coz' there are some file ownership and/or file permission issues that need to be looked at, but assuming those are "compatible" with your current Terminal user environment, those guys'll be toast. Any file that's in the working directory where you are in Terminal that has the five characters " copy" in its filename will be history.
    The assumption in Greg's command is that all the files you want to blow away all reside in the one directory that you have navigated to.

  • A question about sorting tables.

    Hello All!
    Just a quick question: performance wise, which is better, declare an itab with the 'sorted table of' or use the 'sort itab' later.
    Thanks in advance!
    Moderator message: please try yourself and search for available information and previous, similar discussions.
    Edited by: Thomas Zloch on Feb 23, 2012

    Hi Kevin,
    follow for example more or less the code given in this thread: Functionality to dynamically sort tableview columns and implement a <i>compare</i> method corresponding to your needs (for example using <i>compareToIgnoreCase</i> method of <i>String</i>).
    Hope it helps
    Detlev

  • NEED HELP!  Possibly easy question about 'sorting' on your iPod

    I can't find the answer anywhere... You know when you sort on 'artist' (or probably anything) on your iPod, if the artist's name is "The Beatles", the artist will be found under the letter "B", not "T". Or if the artist's name is "A Perfect Circle", the artist will be found under "P" and not "A". Etc...
    Is there a way to change this? I actually don't mind it, but was curious because:
    Is there a way to add words that it would do this for? i.e. add the word "Tha" in iTunes for your iPod so artist "Tha Dogg Pound" is found under "D" and not under "T".
    Sorry if this answer is somewhere but I cannot find it. Any help would be greatly appreciated! Thank you in advance!!!

    In iTunes for Windows the auto-sort feature is controlled by the file C:\Program Files\iTunes\iTunes.Resources\<Region Code>.lproj\SortPrefixes.plist. For English the words ignored for sorting are "A ", "An " & "The ". You could edit this list or just use the Sort Artist, Sort Album Artist etc. fields as necessary when you'd like something sorted into a different position. I can't recall ever testing to see if the iPod picks up on changes made to this file so it may be that another properties file would need editing on the classic in order to achieve the same end.
    tt2

  • Question about sort after commit

    Hello!
    I have a view object. I put in "order by clause" some sort(In query tab of this view object). I created jsf page and dropped this view object like table. I also dropped a Commit operation as button. When I change some value in row and press Commit button, my "order by clause" on view object doesn't perform and I get unsorted data. When I press Commit second time, "order by clause" perform. Can you suggest how to workaround this "Commit" behavior?
    JDeveloper version 11.1.2.2.0
    Thank's for answers.
    Regards, Stanislav

    Hi,
    Perform Execute after the commit. You can do this by executing both the actions in the actionListener of the commit button. Search in this forum for how to execute the action binding from backing bean.
    -Arun

  • Question about sorting of items...

    ...when their perspective is published as a portlet. We have a perspective published as a portlet, and the items are seemingly sorted in some random order. How are these items sorted? Thanks for the help.

    I assume you're using Portal 3.0. There's not much you can do to control the sorting in the category or perspective portlets. In Portal Release 2, the custom search portlet replaces the category/perspective portlets and gives you additional control, including control over the sort order if you don't have Oracle Text enabled.
    As a workaround, you could write a custom report or dynamic page using the content area views to display content anyway you want.
    Regards,
    Jerry
    Portal PM

  • Question about sorting

    I'm sorting many, many dozens of pictures into folders.
    When I move pics from the "Last 12 Months" view into a folder, the view switches to that folder. To resume sorting, I have to go back to the 12-month view, re-find the pics I left off on, select the new ones, move them, and - bamm - I'm now seeing the folder I just moved THOSE to. Lather, rinse, repeat.
    Is there any way to stay in the 12 Months view as I move pictures into other folders? This is such a tedious waste of time!
    Thanks in advance for any advice.

    You need to clarify terms.
    Folder in iPhoto don't contain photos. They hold Albums (which do contain photos) or other folders.
    So what are you moving to?
    Also, 'Last 12 months' isn't a "place" in iPhoto. It's just a list.

  • Question about sorting arrays

    Hi,
    I have posted information from an one-dimensional array on to a list widget. When a user selects an item in the list(index value = 3), presses the delete button, the item would be removed. Likewise, the element of the array at index value 3 would also be removed (or set to null?).
    The trouble I am having is, how would you move up the elements that are subsequent to the element index value 3? For example, moving element index value 4 up to 3, 5 up to 4, 6 up to 5....etc.?
    Here is my code:
    public void delete()
    list.delItem(list.getSelectedIndex());
    student[list.getSelectedIndex()]=null;
    Thanks alot!!

    It's usually faster to use System.arraycopy() to close up the "hole" when removing something from an array: public void delete() {
        int index = list.getSelectedIndex() ;
        list.delItem(index) ;
        // if not removing last item... close up hole...
        if (index < (student.length-1)) {
            System.arraycopy(student, index+1, student, index, student.length - 1 - index) ;
        // clear out space made empty at end of array
        student[student.length-1] = null ; // or whatever represents 'empty' in your student[]

  • Sorting technique used by oracle for "order by" clause.

    Hi All,
    it could be very help to me if you provide some information about sorting technique used by oracle engine for order by clause.
    Issue i am facing :
    Table : xx
    Line Date
    1 05-06-2013 00:00:00
    2 05-06-2013 00:00:00
    when we query above table using order by date, it is returning line 2 prior to line 1. we would like to know why it is returning line 2 first?
    Regards,
    Ram

    >
    it could be very help to me if you provide some information about sorting technique used by oracle engine for order by clause.
    >
    Well ok - but be warned that many people wind up being sorry they ask that question. Hopefully Hemant's answer is what you really wanted.
    See 'Linguistic Sorting and String Searching' in the Oracle® Database Globalization Support Guide
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch5lingsort.htm
    Sorting will be controlled by the settings of NLS_LANGUAGE, NLS_SORT and NLS_COMP.
    Here is the doc page for NLS_SORT
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch3globenv.htm#i1008393
    >
    NLS_SORT specifies the type of sort for character data. It overrides the default value that is derived from NLS_LANGUAGE.
    NLS_SORT contains either of the following values:
    NLS_SORT = BINARY | sort_name
    BINARY specifies a binary sort. sort_name specifies a linguistic sort sequence.
    >
    And the one for NLS_COMP
    http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch3globenv.htm#i1008458
    >
    The value of NLS_COMP affects the comparison behavior of SQL operations.
    You can use NLS_COMP to avoid the cumbersome process of using the NLSSORT function in SQL statements when you want to perform a linguistic comparison instead of a binary comparison. When NLS_COMP is set to LINGUISTIC, SQL operations perform a linguistic comparison based on the value of NLS_SORT. A setting of ANSI is for backward compatibility; in general, you should set NLS_COMP to LINGUISTIC when you want to perform a linguistic comparison.

  • Which sorting technique is most efficient?

    Which of these four sorting technique is most efficient, And why?
    Bubble sort, Insertion sort, or, Merge sort?
    Just getting some opinions.

    georgemc wrote:
    punter wrote:
    ejp wrote:
    No need to actively mislead him thanks.I have given him my opinion,which he had asked for and not a hard and fast fact.If he is dumb enough to believe it,may be he deserves that.But what about the innocent noob who, in the course of doing the right thing and googling, comes across this thread and takes your opinion to be canon?Then they are dumb enough to be pushed out of the profession as well. Punter said this:
    Bubble sort. Why ? Because I like that name "Bubble Sort".
    It's not only obvious he's not being serious, it's equally obvious that he wasn't even trying to pretend to be serious.
    His answer was like somebody asking "how fast is Java" and you answering "7". It's just too obviously non-applicable to the question to cause any harm.
    Plus, he went on to encourage to the OP to do some research to test the validity of his own statement. Which is anything but misleading.
    Edited by: endasil on 22-Dec-2009 12:21 PM

  • Questions about using a PDF form online

    I have a client who wants to create an online version of a PDF form that they are currently using. I am currently trying to explain to them that this would be best done as an HTML web form, but I may not win this argument. I have only used PDFs for printed forms (either hand-written or using form fields) so I am not familiar with any problems that converting the form for use online would entail.
    When the 'Submit' button is pressed on the form, is there a way to redirect to another web page after the data is submitted? (i.e. does the PDF have access to it's outer 'environment'?)
    Are there any security issues submitting data using the PDF form as opposed to using a standard web form? (There may be sensitive data being submitted)
    I'm not sure how they plan to handle the data that is submitted, but there are several options in the submitForm parameters - I am assuming that using the HTML option would submit the data in the same format as a web form would. Am I correct here?
    Can the PDF be prevented from being downloaded or printed? This form should only be used to submit data to their server, not as a printed form.
    Are there any other 'gotchas' that I need to look out for? Does anyone have a recommendation for a site which contains any tutorials or guidelines for using PDF forms online?

    Thanks for the information.
    Yes, I agree that there is less reason for it to be a PDF form (Actually, no real reason other than the original form already exists in PDF), but I am unfortunately in the position that my input in this project is not necessarily being considered (my company is following direct -and inconsistent- directions from the client, and I have no contact with the client to ask questions about what their actual needs are). I have been told to give the client the 'Tomato' that they are asking for, even though they are describing an 'Apple'.
    The reason this form is not meant to be printed is that we have replaced the 'Signature' fields from the original form with checkboxes that the user must check to confirm they have 'signed' the document. If they are to print/fax/whatever the document, they should use the original form, not this one. And I am still trying to explain to them that this would be better served with an HTML web form, but I fear I am losing that battle.
    I have brought up the fact that it is not 100% guaranteed that Acrobat will be available in the browser, although I can only guess that it is less than likely that anyone will not have some sort of PDF viewer available to their browser.
    I will also mention that issues may arise if the file is not submitted from within the browser.

  • Had to change my Apple ID because the original email address is no longer valid.  How do I change the iCloud user name on iMac?  I found instructions about signing out of iCloud and signing back end.  It asks questions about contact, etc.

    Had to change Apple ID due to email address no longer valid.  Trying to change id for icloud...saw direction online about signing out of icloud and signing back in...when it ask questions about contacts, photos, etc. being deleted how do I answer those?  That just sort of freaks me out.

    For the ones that give you an option, select the option you want (keep on the Mac or Delete). For the ones that are simply warning you, click on Delete from Mac.
    They will all come back when you sign back on, since all you did was change your existing Apple ID to a new email address. It's the same iCloud account, just with a different name.
    It's the only way to get your updated ID signed onto iCloud.
    Cheers,
    GB

Maybe you are looking for