Read table statement

hi,
while reading the internal table, if the subrc value is 8 .
what does it mean.
any help will be appreciated.

Hi rajkumar,
here's an example :
*in progtab are 2 entries
*now entry is'nt found:
sy-subrc = <b>8</b> , sy-tabix = number of entries + 1 = <b>3</b>.
DATA:  BEGIN OF PROGTAB OCCURS 10,
       NAME LIKE TRDIR-NAME,
       END OF PROGTAB.
MOVE TRDIR-NAME TO PROGTAB-NAME.
READ TABLE PROGTAB WITH KEY PROGTAB BINARY SEARCH.  
IF SY-SUBRC <> 0.                                   
   INSERT PROGTAB INDEX SY-TABIX.                    
ENDIF.
regards Andreas

Similar Messages

  • How to get the number of hits ("returned rows") in read table statement

    Hi Experts
    I have the statement shown below, which seems not to work as I would like it to. My problem is that I would like to do two different things depending on weather or not a read table statement results in 0 hits or 1 (or more) hits.
        READ TABLE g_ship_item
            WITH KEY
         l_ztknum = DATA_PACKAGE-/bic/ztknum
         BINARY SEARCH.
          IF sy-subrc is initial.
          no hits found
            DATA_PACKAGE-/BIC/ZSTAGEERR = 1.
          ELSE.
          hits where found and we will do something else...
            DATA_PACKAGE-/BIC/ZSTAGEERR = 0.
    Hope someone can help me out of my problem...
    Thanks in advance, regards
    Torben

    Hi,
    As you are using READ statement with Binary search, check whether the internal table g_ship_item is sorted with field /bic/ztknum or not. If it is not sorted then the result of this READ statement is not correct.
    Below is the correct code.
    sort  g_ship_item by /bic/ztknum.
    READ table g_ship_item with key g_ship_item = xxx.
    Thanks,
    Satya

  • Need help regarding Dynamic Read Table statement

    Hello
    I know that the syntax for dymanic read table statement is
    READ TABLE  <ITAB> WITH KEY (KEY1) = VALUE1  (KEY2) = VALUE2 .....(KEYN) = VALUEN
    Here is my problem..
    I am dynamically creating an internal table based on parameter table entered by user.
    The key for this table can be determined only at runtime.
    The table entered might have by one field as key field or 10 key fields..
    How can I use the dynamic read in this situation ?
    Thanks for your help in advance,
    Santosh
    Edited by: Santosh Kulkarni on Jan 3, 2010 6:58 AM
    Edited by: Santosh Kulkarni on Jan 3, 2010 7:01 AM

    Hello Santosh,
    please check out the following solution. The program demonstrates how to use the dynamic read statement with three key field conditions. Additional key fields can be added in the same way.
    REPORT z_dynamic_read.
    DATA: gt_itab TYPE REF TO data,
          ge_key_field1 TYPE char30,
          ge_key_field2 TYPE char30,
          ge_key_field3 TYPE char30,
          go_descr_ref TYPE REF TO cl_abap_tabledescr.
    FIELD-SYMBOLS: <gt_itab> TYPE STANDARD TABLE,
                   <gs_key_comp> TYPE abap_keydescr,
                   <gs_result> TYPE ANY.
    PARAMETERS: pa_table TYPE tabname16 DEFAULT 'SPFLI',
                pa_cond1 TYPE string DEFAULT sy-mandt,
                pa_cond2 TYPE string DEFAULT 'LH',
                pa_cond3 TYPE string DEFAULT '0123'.
    START-OF-SELECTION.
    * Create and populate internal table
      CREATE DATA gt_itab TYPE STANDARD TABLE OF (pa_table).
      ASSIGN gt_itab->* TO <gt_itab>.
      SELECT * FROM (pa_table) INTO TABLE <gt_itab>.
    * Get the key components into the fields ge_key_field1, ...
      go_descr_ref ?= cl_abap_typedescr=>describe_by_data_ref( gt_itab ).
      LOOP AT go_descr_ref->key ASSIGNING <gs_key_comp>.
        CASE sy-tabix.
          WHEN 1.
            ge_key_field1 = <gs_key_comp>-name.
          WHEN 2.
            ge_key_field2 = <gs_key_comp>-name.
          WHEN 3.
            ge_key_field3 = <gs_key_comp>-name.
        ENDCASE.
      ENDLOOP.
    * Finally, perform the search
      READ TABLE <gt_itab> ASSIGNING <gs_result>
              WITH KEY (ge_key_field1) = pa_cond1
                       (ge_key_field2) = pa_cond2
                       (ge_key_field3) = pa_cond3.
      IF sy-subrc = 0.
        WRITE / 'Record found.'.
      ELSE.
        WRITE / 'No record found.'.
      ENDIF.
    One note: When an internal table is created dynamically like in my program above, the table key is not the key defined in the DDIC structure -- instead, the default key for the standard table is used (i.e. all non-numeric fields).
    Hope this helps,
    David

  • Doubt in read table statement.

    hi friends
    i have a doubt in read statement
    please suggest me which one i can use.
    i have one master table
    with fields like
    contract contract line wbs
    500060    10                XXX
    500070     10               XXX
    and the transaction table has
    500060     10             01              01              01
    500060      10            02              02              02
    500070       10            01              01             01
    500070       10            02              02              02
    what i am doing is like
    loop at master table into wamastertable
    read table tranintertab into tranintertab1 with key contract=wamastertable-contract                                                                               
    contractline = wamastertable-contractline.
    endloop.
    As my read query satifies multiple lines of transaction internal table i am in a posistion to do this
    but if i do like the above it is giving error that tranintertab1 is not the line type of tranintertab
    please provide me ur valuable suggestions.

    >
    janagar sundaramoorthy Nadar wrote:
    >
    contract contract line wbs
    > 500060    10                XXX
    > 500070     10               XXX
    > and the transaction table has
    > 500060     10          01              01              01
    > 500060     10          02              02              02
    > 500070     10          01              01             01
    > 500070     10          02              02              02
    >
    >
    loop at master table into wamastertable
    > read table tranintertab into tranintertab1 with key contract=wamastertable-contract
    >                                                                                contractline = wamastertable-contractline.
    > endloop.
    >
    Try it like this..........
    loop at tranintertab into tranintertab1.
    read table master table into wamastertable with key
                                                                           contract = tranintertab1-contract
                                                                      contractline = tranintertab1-contractline.
    endloop.
    Regards,
    Suneel G

  • READ TABLE statement in ECC 6.0

    hi,
    in 4.6, my statement was
    READ TABLE S_XVTTS WHERE TKNUM = S_XVTTK-TKNUM
    AND NOT S_XVTTS-VSTEL IS INITIAL.
    This wont work in ECC 6.0, hence I need to modify this. so i write like
    READ TABLE S_XVTTS INTO wa_vttsvb WITH KEY TKNUM = S_XVTTK-TKNUM ..................................
    how to accomodate the check for NOT initial of S_XVTTS-VSTEL .. how will my statement look like ? thks

    Hi Sdnuser1,
    Try to use LOOP statement as follow.
    "// This LOOP read only one line of table s_xvtt exactly as READ TABLE do.
    LOOP AT s_xvtts INTO wa_vttsv WHERE tknum EQ s_xvttk-tknum AND s_xvtts-vstel IS NOT INITIAL.
      EXIT.
    ENDLOOP.
    IF sy-subrc IS INITIAL.
       "// You can use wa_vttsv
    ELSE.
        "// Do something
    ENDIF.
    I hope it helps yous.
    Greetings.
    Marcelo Ramos

  • Hello experts read table statement is not working properly

    Hello Experts.
    my code is like this.
    sort it_matnr by matnr.
    loop at itab_result.
    read table it_matnr with key matnr = itab_result-matnr  binary search.
    endloop.
    there are nearly 2000 records in it_matnr . The records which satisfy the above condition is there here in this internal table. But it is unable to read the record which matches the condition. One thing is that , there are more than one record with the same material. ie mblnr is different but material is the same. In it_matnr table i have only 1 field ie matnr ,so i need to compare only with the matnr.I also tried by sorting it_result by matnr but of no use. Then finally I used loop at where matnr = it_result-matnr , it is working fine. But due to performance reasons we should not use this. so please tell me what to do and correct the code.

    1. Make sure that the table IT_MATNR is not getting updated inside the loop. Because it will then destroy the sorting.
    2. Secondly, if there are multiple records in IT_MATNR for the same material then it will search for the first record encountered in binary algo. So it is advisable that you may provide further filter criteria if possible. check if ITAB_RESULT & IT_MATNR have any other matching field that can be put in filter criteria.
    3.Thirdly, check if your requirement can be achieved by STABLE SORT.
    <b>SORT <itab> ... STABLE BY <f1>[ASCENDING/DESCENDING].</b>
    It will allows you to perform a stable sort, that is, the relative sequence of lines that are unchanged by the sort is not changed. If you do not use the STABLE option, the sort sequence is not preserved. If you sort a table several times by the same key, the sequence of the table entries will change in each sort. However, a stable sort takes longer than an unstable sort.
    4. Lastly, you can use parallel cursor technique of multiple loops which is given below:
    LOOP AT itab_result.
      READ TABLE it_matnr
        WITH KEY matnr = itab_result-matnr
        BINARY SEARCH.
    Process record
      LOOP AT it_matnr FROM sy-tabix.
        IF it_matnr <> itab_result-matnr.
          EXIT.
        ENDIF.
    Process record based on yuor condition
      ENDLOOP.
    ENDLOOP.

  • Field symbols and READ TABLE with system code 4

    Hi,
    I have a hashed table and I am using field symbols to point to it to retrieve the field content. I then use it in the READ TABLE statement in the following way:
    Loop at x_data assign <fs>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c1>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c2>.
    READ TABLE ZZZZ assign <fs> with table key a1 = <c1>
                                               a2 = <c2>.
    If sy-subrc = 0.
    endif.
    I ran the debugger and I keep getting a 4. I am not able to get the value from a1 and a2 to see what it is and why it is causing a 4 sy-subrc. I know the value from the hashed table and the values c1 and c2 are the same, so the sy-subrc should be 0.
    How would I read a hashed table using field symbols? I know that usig a standard table, I have to sort the table on the key fields() before I actually can do the READ TABLE using the binary search.
    Please advise. Thanks
    RT

    Hai Rob
    Go  through the following Code
    Field-Symbols are place holders for existing fields.
    A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.
    Field-Symbols are like Pointers in Programming language ‘ C ‘.
    Syntax check is not effective.
    Syntax :
    Data : v1(4) value ‘abcd’.
    Field-symbols <fs>.
    Assign v1 to <fs>.
    Write:/ <fs>.
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.
    DO 4 TIMES.
    LINE-COL1 = SY-INDEX.
    LINE-COL2 = SY-INDEX ** 2.
    APPEND LINE TO ITAB.
    ENDDO.
    READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.
    <FS>-COL2 = 100.
    READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING <FS>.
    DELETE ITAB INDEX 3.
    IF <FS> IS ASSIGNED.
    WRITE '<FS> is assigned!'.
    ENDIF.
    LOOP AT ITAB ASSIGNING <FS>.
    WRITE: / <FS>-COL1, <FS>-COL2.
    ENDLOOP.
    The output is:
    1 1
    2 100
    4 16
    Thanks & regards
    Sreenivasulu P

  • Read   table and loop at

    Hi EXpert,
    I have an internal table say itab and I need to fetch a single record with some given conditions.
    Hence I have used READ table statement ,
    But on using this read table statement , I am unable to fetch the record :-(((( . It gives sy-subrc  =  4.
    And the same conditions when are put in Loop at itab  statement, then I am able to fetch the data .
    My requirement is only 1 record for the given conditions ( in where clause in case of loop at statement).
    I think I am probably missing out on some minor thing..
    <removed_by_moderator>
    Warm Regards,
    SUDHA
    Edited by: Julius Bussche on Feb 7, 2009 2:48 PM

    Hi,
    Test the following Code hope it will solve out your problem,
    PARAMETERS: key TYPE i .
    TYPES: BEGIN OF t_test,
      s_no TYPE i,
      name(15),
      END OF t_test.
    DATA: it_test TYPE STANDARD TABLE OF t_test WITH HEADER LINE.
    DO 10 TIMES.
      it_test-s_no = sy-index.
      it_test-name = 'SDN'.
      APPEND it_test TO it_test.
    ENDDO.
    READ TABLE it_test INTO it_test WITH KEY key.
    IF sy-subrc = 0.
      WRITE: 'sy-subrc = ' , sy-subrc,
             /1 it_test-s_no, 15 it_test-name.
    ELSE.
      WRITE: 'sy-subrc = ' , sy-subrc,
             / 'Sorry there is no Records with this Key'.
    ENDIF.
    Kind Regards,
    Faisal
    Edited by: Faisal Altaf on Feb 7, 2009 6:59 PM

  • Read Table : Error Stating mandt field is not filled.

    Dear members,
    I am get syntax error when using Read table statement saying mandt field is not filled, however if I remove the KEY field. it is working fine.
    please let me know, where I am doing mistake. thank you.
    Data : spfli_tab like STANDARD TABLE OF spfli with HEADER LINE.
    SELECT *
           FROM spfli
           INTO TABLE spfli_tab
           WHERE carrid = 'LH'.
    READ TABLE spfli_tab
               WITH TABLE KEY carrid = 'LH'
                                           connid = '2402'.
    IF sy-subrc = 0.
    ENDIF.

    Hi...
    As Eric Said there are two ways...
    For your case use WITH KEY...
    SELECT *
    FROM spfli
    INTO TABLE spfli_tab
    WHERE carrid = 'LH'.
    READ TABLE spfli_tab
    WITH KEY carrid = 'LH'
    connid = '2402'.
    IF sy-subrc = 0.
    WRITE : 'DONE'.
    ENDIF.
    If u specify WITH TABLE KEY then u will hv to pass all key fields mentioned in DDIC...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • Regarding the internal table data by using read table it_mard into wa_mard

    hi,
    i am reading the internal table it_mard with key matnr .
    my code is like this.
    *loop at it_final into wa_final.*
    *wa_second-matnr  = wa_final-matnr.*
      wa_second-bwart = wa_final-bwart.
    wa_second-bwtar = wa_final-bwtar.
    *read table it_mard into wa_mard with key matnr = wa_final-matnr*
                                                                              *binary search.*
    *if sy-subrc = 0.*
    *wa_second-labst = wa_mard-labst.*
    *endif.*
    *append wa_second to it_second.*
    clear :wa_final.
    *endloop.*
    final internal table haveing duplicate values because this table it_final having movement types
    so that i am not using delete statement .
    is there any logic for handling the duplicate values inside the loop statement
    by using read table statement.
    could u plz explain clearly  \[removed by moderator\]
    Edited by: Jan Stallkamp on Jul 11, 2008 2:11 PM

    this is my code could u plz explain  regarding duplicate material number .
    LOOP AT IT_MSEG INTO WA_MSEG.
        WA_FINAL-MBLNR = WA_MSEG-MBLNR.
        WA_FINAL-MATNR = WA_MSEG-MATNR.
        WA_FINAL-BWART = WA_MSEG-BWART.
        WA_FINAL-BWTAR = WA_MSEG-BWTAR.
        WA_FINAL-MENGE = WA_MSEG-MENGE.
        WA_FINAL-SOBKZ = WA_MSEG-SOBKZ.
        COLLECT WA_FINAL INTO IT_FINAL.
        CLEAR WA_FINAL.
      ENDLOOP.
      LOOP AT IT_FINAL INTO WA_FINAL.
        READ TABLE IT_MARD INTO WA_MARD WITH KEY MATNR = WA_FINAL-MATNR
                                                                                    BINARY SEARCH.
    this is reading the duplicate records i need to control duplicate records here .
    the   labst       value is repeating the number of times because of the meterial number duplication
    how can i restrict plz explain
        IF SY-SUBRC = 0.
          WA_FINAL-LABST = WA_MARD-LABST.
        ENDIF.
        READ TABLE IT_MKPF INTO WA_MKPF WITH KEY MBLNR = WA_FINAL-MBLNR
                                                                                    BINARY SEARCH.
        IF SY-SUBRC = 0.
          WA_FINAL-BUDAT = WA_MKPF-BUDAT.
        ENDIF.
        MODIFY IT_FINAL FROM WA_FINAL.
        CLEAR WA_FINAL.
      ENDLOOP.
      LOOP AT IT_FINAL INTO WA_FINAL.
        WA_SECOND-BWTAR = WA_FINAL-BWTAR.
        IF WA_FINAL-BWART = '101' OR WA_FINAL-BWART = '501' OR WA_FINAL-BWART = '561'.
          WA_SECOND-MENGE11 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '201'.
          WA_SECOND-MENGE12 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '541' AND WA_FINAL-SOBKZ = 'O' .
          WA_SECOND-MENGE13 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '601'.
          WA_SECOND-MENGE14 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '543'.
          WA_SECOND-MENGE15 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '702'.
          WA_SECOND-MENGE16 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '313'.
          WA_SECOND-MENGE17 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '315'.
          WA_SECOND-MENGE18 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '122' OR WA_FINAL-BWART = '161'.
          WA_SECOND-MENGE19 = WA_FINAL-MENGE.
        ENDIF.
        COLLECT WA_SECOND INTO IT_SECOND.
        CLEAR WA_SECOND.
      ENDLOOP.

  • Read Table with condition

    Hi,
    can i write a Read table like for example,
    read table itab into wa_itab with key matnr ne '4'.
    as its giving me an error.
    can suggest any other way to write the Read Table statement.
    Thanks in advance.
    Robert

    Hi,
    it is not possible.
    try this way..
    "delete the material which is not equal to 4 ..now itab contains values matnr ne4
    delete table itab where matnr ne '4'.
    or
    loop at itab into wa_itab wher matnr ne '4'.
    "move to another table
    endloop.
    or
    loop at itab into wa_itab .
    if wa_itab-matnr ne '4'.
    continue
    "move to another table
    else.
      delete itab index sy-tabix.
    endif.
    endloop.
    prabhudas

  • Read table and checking condition in PAI

    Hi,
    I have a requirement where I need to check and compare with (Custom table) Bankn with Partner Bank`s bankn.
    I have wrote a code in PAI like this.
    MODULE CHECK_BANKN INPUT.
       Data: l_bankn like (Custom table)-bankn.
       select bankn from (Custom Table) into l_bankn
           where recno = g_recno.
       IF NOT g_head-bankn IS INITIAL.
      Read table i_bvtyp with key bankn = i_bvtyp-bankn .
         IF l_bankn <> i_bvtyp-bankn.--------->" Comparison of (custom table) Bankn with internal table I_BVTYP-BANKN
           MESSAGE w022 WITH text-w06.
         ENDIF.
       ENDIF.
    ENDMODULE.
    My Read Table statement is seems to be wrong and my checking condition is also wrong.
    So, how to resolve this?
    regards,
    Kiran

    Hi Kiran,
    If you observe your read statement, you are comparing the field with it's own table field.
       Read table i_bvtyp with key bankn = i_bvtyp-bankn .
    Untill unless you read I_BVTYP, i_bvtyp-bankn will be initial and you cannot find the matching record with Null-Value.
    So, I think you need compare with l_bankn.
       Read table i_bvtyp with key bankn = i_bankn .
    Then you can directly raise a message using SY-SUBRC value.
       Read table i_bvtyp with key bankn = i_bankn
          if SY-SUBRC <> 0 .
              <MESSAGE>    
         endif.
    Regards,
    Vijay

  • Sy-tabix in relation to LOOP AT and READ TABLE

    Hi All,
    As per SAP documentation,
    1) While looping through an internal table (LOOP AT), sy-tabix contains the index number of current row(for standard and sorted tables)
    2)When successfully reading from an internal table(READ TABLE), sy-tabix is set to the index of the result row.
    But what happens when READ TABLE is used while looping through another internal table?
    i.e. Loop at TAB1...
    write sy-tabix.
    READ TABLE TAB2...
    write sy-tabix.
    endloop.
    If we are looping through 1st row of TAB1 and the result of read statement is found in 3rd row of TAB2, I expected that sy-tabix before READ would be 1 and after the READ be 3.
    But, I found that sy-tabix remains unchanged at 1. Can someone expalin why?
    Thanks,
    Jagan

    Hi
    If after reading the table TAB2 the system variable SY-TABIX has still the previous value, that menas the READ TABLE fails or it was read the first record of TAB2.
    After READ TABLE TAB2 try to check the SY-SUBRC:
    LOOP AT TAB1.
       WRITE: / 'TAB1 index:', SY-TABIX.
       READ TABLE TAB2 .........
       IF SY-SUBRC = 0.
         WRITE: 'TAB2 index:', SY-TABIX.
    Try this:
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
          END   OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
            FIELD1,
          END   OF ITAB2.
    DATA: INDEX TYPE I.
    DO 10 TIMES.
      APPEND ITAB.
    ENDDO.
    DO 10 TIMES.
      APPEND ITAB2.
    ENDDO.
    LOOP AT ITAB.
      WRITE: / 'ITAB:', SY-TABIX.
      INDEX = SY-TABIX + 2.
      READ TABLE ITAB2 INDEX INDEX.
      IF SY-SUBRC = 0.
        WRITE:  'ITAB2:', SY-TABIX.
      ENDIF.
    ENDLOOP.
    Max

  • URGENT : select from table statement in ABAP OO

    Hi all,
    I am an absolute ABAP OO beginner and need some quick help from an expert. How can I make a selection from an existing table (eg MARA) in an BADI which is programmed according to ABAP OO principles.
    In the old ABAP school you could make a TABLES statement at the beginning and the do a SELECT¨* FROM but this does not work in ABAP OO.
    How should i define such simple selections from existing tables. Anyone ?
    Thanks a lot,
    Eric Hassenberg

    *define internal table
    data: i_mara like standard table of mara.
    *select to this table
    select * from mara into table i_mara.
    Also you have to define work area for this internal table in order to use it.
    data:w_mara like line of i_mara.

  • Conflict: READ TABLE itab2 INDEX 1 vs  Modify itab1 from index sy-tabix

    The below simple code is for each itab1 line, create a new itab2 by using select statement, and then grab the max value of field f in itab2 and fill it into a corresponding field in itab1.
    However the statement:
    READ TABLE itab2 into gs_itab1 INDEX 1.
    causes the conflict with our another statement in the end of itab1 loop:
    Modify itab1 from gs_itab1 index sy-tabix.
    that the below Modify statement always modify itab1 at 1st row and also causes an unlimited loop that the program is hung up. Our code looks as the following:
    Loop AT itab1 into gs_itab1.
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into gs_itab1 INDEX 1.
             Modify itab1 from gs_itab1 index sy-tabix.
    EndLoop.
    However the last two lines of statements in the itab1 loop causes the program hang!
    Any solution?
    Thanks in advance!

    Hi,
    I got confused while going thru the code...
    according to code
    first u loop itab1 and get tht in gs_itab1 and then a select query to get data from some table and store in itab2.
    Here are u using any where condition, if yes u may probably check aganst gs_itab1 rite? if yes
    first suggestion...why cant u put the select statement above the loop and get all the values to an internal table and then read the internal table in the loop stmt. Yes i can see u r sorting it based on some 'f'..just a suggestion
    Now here can u follow this code...
    Loop AT itab1 ASSIGNING <fs_itab1>,
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into <fs_itab1> index 1.
    EndLoop.
    Please let me know if its not ok
    <REMOVED BY MODERATOR>
    Regards,
    ABAPer007
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:26 PM

Maybe you are looking for

  • Sap r/3 rel 4.6c - F-03 Process open Items Column Width standard tab output

    Hello All: I use SAP R/3 Release 4.6C.  I am learning how to use the F-03 Clear G/L Account function.  On the front page of F-03 you enter the account number and then click process open items. The output comes on the screen in the "standard" tab.  In

  • How do I add the Acrobat Distiller Printer to my list of printers.

    I have Adobe Acrobat 5.0 full version. I would like to know how to convert MS Works files to PDF files. I keep getting the following message when I try to open a file as a PDF file. When I open the MIcrsoft Works program and try to print ot the Acrob

  • Custom Report Item CustomData evaluation problem in a subreport loop

    Came across a strange problem with the custom report item CustomData property evaluation when using a sub report loop. I have a master report, which contains a sub report component within a List. The List is bound to a dataset from which a numeric va

  • Chmod operation not permitted

    I tried to burn a data DVD, got Error code 0x80020000, and the Finder created a burn folder (although I NEVER set my preferences for this and hate it) that is locked and the √ for Locked is greyed. I want to ditch the burn folder because I always lik

  • Maximum Line-Items in FB60

    Hi,    How many maiximum lin-items I can specify in FB60.   Awaiting replies.