Sort itab by another itab?

Hi,
i have 2 itabs: itab0 with matnr and lgpbe. itab1 with matnr matkl brgew.
it sort itab0 by lgpbe.
Is it possiple to sort itab1 like itab0 without having lgpbe and without changing
the entries of itab1?
i look for any like "sort itab1 by itab0-matnr"???
Regards, Dieter

HI,
  you cannot use sort statement like this..
  how ever.. just do this way.
   loop at itab0.
   loop at itab1 where matnr  = itab0=matnr.
   itab2 = itab1.
   append itab2.
   endloop.
   endloop.
at end of this itab2 will have ur sorted data.

Similar Messages

  • How to insert data from itab to another itab ?

    Hi.
    Now, I have one PR which generates a lot of PO.
    Each PR number has one or more PO number.
    ITAB_EBAN has field BANFN, EBELN.
    ITAB_EKPO had fields EBELN, EBELP, BANFN.
    How do i insert the ekpo-ebelp into the itab_eban from itab_ekpo for each eban-banfn? One line of eban-banfn record maybe have a lot of ekpo-ebeln and ekpo-ebelp. So what should i do in order to make sure the record is displayed correctly? By duplicate the row of data inside itab_eban, so that each eban-banfn can have many ekpo-ebeln or ekpo-ebelp?
    Thanks in advance.

    Hi ,
    Do the following...............
    ITAB_EBAN has field BANFN, EBELN.
    ITAB_EKPO had fields EBELN, EBELP, BANFN.
    loop at ITAB_EKPO.
    ITAB_EBAN-BANFN =   ITAB_EKPO-BANFN .
    ITAB_EBAN-EBELN =   ITAB_EKPO-EBELN .
    Append ITAB_EBAN.
    endloop.
    delete duplicates
    Sort ITAB_EBAN by banfn descending ebeln descending.
    Delete adjacent duplicates from itab_eban comparing banfn ebeln.
    We will now have unique values for banfn/ebeln in itab_eban
    Regards
    Byju

  • Performance issue while transferring data from one itab to another itab

    hi experts,
    i have stored all the general material details in one internal table and description, valuation details of the meterial is stored in another internal table which is of standard table. now i need to tranfer all the data from these two internal tables into one final internal table but it is taking lot of time as it has to transfer lacs of data.
    i have declared the output table as shown below
    DATA:
      t_output TYPE standard TABLE
               OF type_output
               INITIAL SIZE 0
               WITH HEADER LINE.
    (according to the standard i have to declare like this and the two internal tables are declared similar to the above one)
    could somebody suggest me how shall I procced through this...
    thanks in advance....
    ragerds,
    Deepu

    Have a look at the following article which you may find useful:
      <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40729734-3668-2910-deba-fa0e95e2c541">Improving performance in nested loops</a>
    good luck, damian

  • How to move the two itab into third itab

    Hi sap guru ,
    my question : i have 3 internal table (i_vbrk , i_vbrp and itab)
    1.i_vbrk like vbrk .
    DATA: BEGIN OF I_VBRK OCCURS 0 ,
         VBELN LIKE VBRK-VBELN ,
         FKDAT LIKE VBRK-FKDAT ,
         FKART LIKE VBRK-FKART ,
         KUNAG LIKE VBRK-KUNAG ,
         END OF I_VBRK .
    2.i_vbrp like vbrp .
    DATA: BEGIN OF I_VBRP OCCURS 0 ,
          VBELN LIKE VBRP-VBELN ,
          MATNR LIKE VBRP-MATNR ,
          WERKS LIKE VBRP-WERKS ,
          END OF I_VBRP .
    but for THIRD internal table which i have ' itab ' should be having same FIELDS like both internal table (i_vbrk and i_vbrp)
    so  I have ,
    3. ITAB .
    TYPES: BEGIN OF ITAB  ,
           VBELN TYPE VBRK-VBELN,
           FKDAT TYPE VBRK-FKDAT,
           FKART TYPE VBRK-FKART,
           MATNR TYPE VBRP-MATNR,
           WERKS TYPE VBRP-WERKS,
           KVGR1 TYPE VBRP-KVGR1,
           END OF ITAB .
    IS THIS RIGHT ....
    NOW I WANT THAT THE DATA WHICH I WILL FETCH FROM DB-TABLE FOR THOUSE TWO INTERNAL TABLE (i_vbrk and i_vbrp) SHOULD MOVE INTO THIS THIRD ITAB ..PLZ TELL ME WHAT WILL BE THE CODE FOR THAT ?
    answer will be rewarded....

    Hi,
      Common suggestion can be to use 'INNER JOIN' but to have
    a good performance of the code You can try the following.
    types : BEGIN OF t_VBRK,
    VBELN LIKE VBRK-VBELN ,
    FKDAT LIKE VBRK-FKDAT ,
    FKART LIKE VBRK-FKART ,
    KUNAG LIKE VBRK-KUNAG ,
    END OF t_VBRK .
    types : BEGIN OF t_VBRP,
    VBELN LIKE VBRP-VBELN ,
    MATNR LIKE VBRP-MATNR ,
    WERKS LIKE VBRP-WERKS ,
    KVGR1 TYPE VBRP-KVGR1,
    END OF t_VBRP .
    TYPES: BEGIN OF ITAB ,
    VBELN TYPE VBRK-VBELN,
    FKDAT TYPE VBRK-FKDAT,
    FKART TYPE VBRK-FKART,
    MATNR TYPE VBRP-MATNR,
    WERKS TYPE VBRP-WERKS,
    KVGR1 TYPE VBRP-KVGR1,
    KUNAG LIKE VBRK-KUNAG , 
    END OF ITAB .
    data : i_vbrk type STANDARD TABLE OF t_vbrk,
           wa_vbrk type t_vbrk.
    data : i_VBRP type STANDARD TABLE OF t_VBRP,
           wa_VBRP type t_VBRP.
    data : i_itab type STANDARD TABLE OF itab,
           wa_itab type itab.
    */////write the select statements here.....//////
    loop at i_vbrk into wa_vbrk.
      wa_itab-vbeln = wa_vbrk-vbeln.
      wa_itab-FKDAT = wa_vbrk-FKDAT.
      wa_itab-FKART = wa_vbrk-FKART.
      wa_itab-KUNAG = wa_VBRK-KUNAG.
      READ TABLE i_VBRP into wa_vbrp
      with key vbeln = wa_itab-vbeln.
      wa_itab-MATNR = wa_vbrp-MATNR.
      wa_itab-WERKS = wa_vbrp-WERKS.
      wa_itab-KVGR1 = wa_vbrp-KVGR1.
      append wa_itab to i_itab.
    endloop. 
    Reward points if helpful..................

  • How to delete entries from a itab using values in another itab?

    Hi All,
    I am having two internal tables itab1, itab2 with one common field. Also two tables contains some records, what i want is to delete the entries from itab1 which are not in itab2.
    Example:
    itab1                
    A B C
    1 a  b 
    2 z a
    3 e t
    4 d r
    itab2
    A D E
    1 s d
    3 f g
    After the deletion itab1 should only contain records 1 & 3.
    I know we can do this using loop and read, but i want to know if there is someother better way to do this...
    Thanks in advance...
    Regards
    Karthik D

    Hi Karthik,
    this code should do it.
    data : temp type sy-tabix.
    clear temp.
    loop at itab1.                          "if internal table with header line
    temp = sy-tabix.
    read table itab2 with key A = itab1-A.  
    if sy-subrc = 4.
    delete itab index temp.
    endif.
    endloop.
    *else if without header line
    data : temp type sy-tabix.
    clear temp.
    loop at itab1 into wa_itab1.                          "if internal table is without header line
    temp = sy-tabix.
    read table itab2 with key A = itab1_wa-A into wa_itab2.  
    if sy-subrc = 4.
    delete itab index temp.
    endif.
    endloop.

  • Fastest way to move from one itab to another?

    What is the fastest way to move one internal table to another internal table (assuming two tables of similar structure)?
    a) append lines of table1 to table2.
    b) loop at table1.
    Move: table1-field1 to table2-field1,
    table1-field2 to table2-field2.
    Append table2.
    Endloop.
    c) table2[] = table1[].
    d) loop at table1.
    Move-corresponding table1 to table2.
    Endloop.
    e) move table1 to table2.
    I think it is option a). Is it correct?

    Hi,
    Yes option a. is fastest : append lines of table1 to table2
    In particular, the quickest way to fill a table line by line is to append lines to a standard table, since a standard table cannot have a unique key and therefore appends the lines without having to check the existing lines in the table.
    APPEND LINES OF inttab1 TO inttab2.
    This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
    This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX
    contains the index of the last line appended. When you append several lines to a sorted table, you must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime
    error will occur.
    Reference : SDN ABAP Book.
    thanx.

  • Filtering records from one internal table based on ranges in another itab

    Hi guys,
    I have 1 internal table with set of GL accounts. I have 2nd internal table where lower interval  and upper interval of GL accounts
    How to filter out records from 1 internal table by comparing with the GL account ranges present in 2nd internal table.
    Please reply.

    Hi
    Create a RANGE for GL Accounts.
    LOOP the second Internal Table.
    And assign HIGH & LOW to ranges from second ITAB.
    And Delete the accounts which are not there in the range.
    Use the below code as reference.
    DATA: itab TYPE TABLE OF mara WITH HEADER LINE.
    DATA: r_matnr TYPE RANGE OF matnr WITH HEADER LINE.
      SELECT * FROM mara INTO TABLE itab UP TO 10 ROWS.
      r_matnr-sign = 'I'.
      r_matnr-option = 'BT'.
      r_matnr-low  = '000000000016900036'.
      r_matnr-high = '000000000016900040'.
      APPEND r_matnr.
      DELETE itab WHERE matnr NOT IN r_matnr.

  • Field symbol to move column of one ITAB to row of another ITAB

    Hello , I need some help on this . I have two ITAB's
    Like ITAB1 with 1  field  and
    ITAB2 with say around 100 fields and all the field name are different in ITAB2 .
    Now ITAB1 has 1 column and 100 rows data in it . I want to move all the values from the rows of ITAB1 into next to next fields of ITAB2 on a single row . Like this.
    ITAB1
    1
    2
    3
    5
    I Want to move these five rows to ITAB2  like below
    ITAB 2
    1     2      3      4     5
    Not able to use do varrying as field names of ITAB2 are diff . Also dont want to write a lengthy code for manual field to field movement . Any help . is it possible to get this done using field symbol.
    Thanks
    J

    Solved . Below thing helped me .
    field-SYMBOLS <fs> TYPE any.
    FIELD-SYMBOLS <comp> TYPE ANY.
    ASSIGN wa_it2 to <fs>.    " target ITAB work area
    loop at it1.
      ASSIGN COMPONENT sy-tabix of STRUCTURE <FS> to <comp>.
      <comp> = it1-f1.
    endloop .
    append wa_it2 to it2.
    UNASSIGN : <fs> , <comp> .
    Cheers
    J

  • To move from one itab to another

    data:  it_pos    LIKE rfposxext OCCURS 1 WITH HEADER LINE,
    hi  all..............
    LOOP AT it_bseg_t INTO wa_bseg.
          it_pos-bwwrt  =    wa_bseg-dmbtr.
          it_pos-hkont  =    wa_bseg-hkont.
          it_pos-augdt  =    wa_bseg-augdt.
       IF it_pos-hkont = '0000207500' and it_pos-augdt NE '00000000'.
          it_pos-vertn = 'Cleared'.
             move it_pos-vertn to var.
           Elseif wa_bseg-hkont = '0000207500' and it_pos-augdt EQ '00000000'.
               it_pos-vertn = 'opened' .
             move it_pos-vertn to var.
        Endif .
          APPEND it_pos TO it_pos.
          CLEAR: it_pos.
        ENDLOOP.
      ENDIF.
    i want to move that it-vertn to it_bseg loop ....how can i do it ....its bit confusing pls help
    LOOP AT IT_BSEG WHERE BELNR = IT_POS-BELNR.
    READ TABLE IT_POS  WITH KEY HKONT = IT_POS-HKONT AUGDT = IT_POS-AUGDT.
    IT_BSEG-MSG = IT_POS-VERTN.
    APPEND WA_BSEG TO IT_BSEG .
    ENDLOOP.
    thank u so much

    Better way...
    FIELD-SYMBOLS: <FS_BSEG> LIKE LINE OF IT_BSEG,
                   <FS_POS> LIKE LINE OF IT_POS.
    LOOP AT IT_BSEG ASSIGNING <FS_BSEG>.
    READ TABLE IT_POS ASSIGNING <FS_POS>
    WITH KEY BELNR = <FS_BSEG>-BELNR.
    IF SY_SUBRC EQ 0 AND <FS_POS> IS ASSIGNED.
    <FS_BSEG>-MSG = IT_POS-VERTN.
    ENDIF.
    ENDLOOP.
    Greetings,
    Blag.

  • BSP Tableview error when trying to bind an itab within an itab

    Hello dear forum members,
    I got a requirement to dynamically generate tableviews and bind them to a model's attribute (an itab 'model->gt_prd_grps' which holds the actual internal table to display as tableview 'model->gt_prd_grps-prods_table' within it). Below code would give you a correct picture.
    BSP View code:
    LOOP AT model->gt_prd_grps INTO ls_prd_grps.
            lv_idx = sy-tabix.
            CONCATENATE 'ProductsList_' ls_prd_grps-prod_group INTO lv_tableid.
            CONCATENATE '//model/' 'gt_prd_grps[' lv_idx '].prods_table' INTO lv_bind_str.
            CREATE OBJECT lr_tableview.
            lr_tableview->id            = lv_tableid.
            lr_tableview->headertext    = ls_prd_grps-prod_grp_desc.
            lr_tableview->_table        = lv_bind_str.
            lr_tableview->headerVisible = 'true'.
            lr_tableview->footerVisible = 'true'.
            lr_tableview->filter        = 'SERVER'.
            lr_tableview->design        = 'alternating'.
            lr_tableview->sort            = 'SERVER'.
            lr_tableview->fillUpEmptyRows = 'false'.
            lr_tableview->selectionMode   = 'NONE'.
            lr_tableview->iterator        = lo_prdctschtb_iter.
            lr_tableview->emptyTableText  = 'No Products available.'.
            tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).   %>
      <%    lv_col_count_default = 1. lv_row_count_default = lv_row_count_default + 1.   %>
      <htmlb:gridLayoutCell columnIndex = "<%= lv_col_count_default %>"
                            rowIndex    = "<%= lv_row_count_default %>"
                            colSpan     = "3" >
                            <%= tableview_str %>
    </htmlb:gridLayoutCell>
    <% ENDLOOP. %>
    I am encountering dump while trying to run the above BSP view and the error says "BSP exception: No structure component with the name "PRODS_TABLE[1].PRODUCT_ID" exists"
    Actually the user would select from the tableview via a 'select' column which would be rendered as checkbox and the MVC binding would greatly reduce the effort of manually transferring the user selections to the respective model table(s).
    Please suggest if the above way is possible and if so how to overcome the exception i am facing OR do i have to manually capture the tableview selection via CL_HTMLB_MANAGER=>GET_DATA.
    Huge thanks in advance,
    Ram

    Hi Raja,
    I am getting the dump as soon as the view is called. The tableview to be displayed is indeed the nested table only and the user can select the records via the 'checkbok' column in the tableview.
    Also, when i debugged, the dump occurs exactly at the below point:
    tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).
    Regards,
    Ram
    Edited by: Ram Mohan Venkatraman on Mar 11, 2010 12:12 PM

  • Sort according to another field order

    say there are 2 input and 2 output fields
    The first input field is mapped to the first output field , after grouping similar values together
    e.g:
    input field1          output field1
    a                            a
    d                            a
    e                            d
    c                            d
    d                            c
    e                            e
    a                            e
    Now the 2 nd input field has to be mapped to 2nd output field according to the order in which the 1st field has been mapped.
    We can not use sortByKey here as the first field is not mapped in lexographical nor numerical order.
    How then can we map the 2nd field according to order of first?
    Thanks in advance
    Pratichi

    Hi Pratichi,
    The UDF that you are writting to group similar values together for the input field1.
    try chaging that  UDF with two arguments
    1. inputField1
    2. inputField2
    use the concept of Edit Java section(Declaring Global variable .To Know more about it refer
    http://wiki.sdn.sap.com/wiki/display/stage/UsingEditJavaSectioninMessageMapping)
    Declare a Global variable in the Global Variable section as
    String[] format = new String[30];
    while you are gouping inputField1 ,group inputField2 also and store in the global variable format.
    Write one more UDF to read values from the global variable and map it to OutputFiled2.
    (you can use same java code as you normally use to store and read values from the string array).
    Thanks and Regards,
    Kubra fatima.

  • [SOLVED, sort of] Yet another UEFI boot issue

    Hello everyone,
    Let me start by saying sorry for the long (first) post.
    I've ended up with a UEFI boot problem I can't solve. I've searched the forum and internet and I realize I'm not the only one who ran into problems with UEFI. Unfortunately, the problems other have had seem not similar to mine. I've spent almost 2 days now trying to figure this out, and I'm getting nowhere (though I've learnt some more about UEFI, which I guess is good). I was hoping someone here can give me some hints on how to proceed.
    So lets start with the background. I recently bought a new computer (Lenovo Thinkpad Edge E530 with Windows 8) and of course I want to run ArchLinux on it (been using ArchLinux for almost 7 years now and no plans on switching). Installation went ok with only a few problems during installation that I managed to solve (or so I thought). I must admit I didn't follow the guide fully. I didn't want to remove the Restore and Windows partitions, so I figured it would be safe to reuse the existing UEFI System Partition, as long as there was enough room, which there was. Anyway, I now have a computer I can boot into ArchLinux and also Windows 8, just the way I want it, almost. There is this one final issue I haven't been able to figure out how to solve.
    The problem
    Whenever I reset/power on the computer, I must press Enter during the initial screen (showing a Lenovo logo, and a message about pressing Enter to interrupt normal startup). If I don't press Enter before the timeout (a second or so), the screen will go white and that's it. No beep, no message, no nothing but a white screen. A power cycle is the only way to leave this state. Occasionally the screen will be a white bar at the top and random colours below, but I'm guessing this only represents what is in graphics memory at the time (0x00, 0xFF or any other random value).
    If i do press Enter however, then I'm presented with a menu where I can select what to boot; rEFInd (which is preselected) along with Windows 8 and some restore and diagnostic entries. Pressing enter will take me to the preselected rEFInd, pressing enter again (or wait for timeout) will boot linux, and I'm in. Nothing weird there. And if I select Windows in rEFInd, then windows boot, just as expected.
    There is no difference whether I'm switching from Windows to Linux or Linux to Windows or just reboot the same OS I was using again. The result is the same whatever I choose to boot.
    So the question is: Why do I have to select rEFInd manually and go through all these menus? Should I not be able to just power it on and let it boot the preselected rEFInd entry and continue from there, without me helping it?
    Trying to solve it
    Searching here and on the internet gave me some ideas on what to try, so here is a list of my attempts:
    efibootmgr show me there is a rEFInd entry, and that it is the first one in boot order
    I copied refindx64.efi to /boot/efi/EFI/Boot/bootx64.efi (replacing an existing entry)
    I've updated the EFI firmware (from Lenovo) to the latest and greatest
    One other guy had almost the same issue, but with a single boot of Windows. He solved it with Microsoft Boot Manager (there is an Automatic Repair, or something). I even dared trying this, though I must admit I was a bit hesitant about letting some Microsoft program trying to repair my computer. Anyway, it said it couldn't repair my problem, nor did it say I had one, so I am none the wiser.
    None of the above gave anything.
    So, that's it. I guess I can live with having to press Enter on every power up/reset, but it is very annoying having to do so, and even more so when I forget it because then I'm forced to power cycle it. I hope someone reading this can figure out what's going on, because I am clueless.
    Best regards,
    Johan
    Last edited by 6feet5 (2013-01-08 19:03:50)

    WonderWoofy wrote:@srs5694, have you thought about filing a bug report/feature request about the naming scheme here?  I would imagine that something coming directly from the upstream developer would be something that they should take into consideration.  Also, I imagine that renaming it to refindx64.efi kind of goes against the whole "vanilla packages" thing we tout around here... so it really makes me wonder why it is done in the first place.
    I've just done that:
    https://bugs.archlinux.org/task/33326
    It's not been very important until recently; but I've been putting a lot of effort into the ancillary support scripts (install.sh and mvrefind.sh). They necessarily rely on the files having certain names, so installing them under other names robs users of functionality.
    6feet5 wrote:I've decided to try and restore the whole unit, thinking it would take maybe an hour or two. It's been running now for almost 3 hours and only completed 20%.
    Good luck with that!
    FWIW, it seems that the number of EFI-related bug reports on Linux forums has gone way up recently. No doubt this is because EFI is now pretty much universal on new computers, so problems that used to affect one or two people now affect dozens or hundreds, and some of those post about them.

  • List of infoobject used in queries

    hello!
    can someone tell me how to find the list of the infoObjects (fields) that are being used in all queries based on some set of infoProviders?
    I would like to know what tables I should be looking for.
    What I'm trying to find is  the list of infoObjects used by all my users, from the genereal list of infoObjects found in the infoProviders they use.
    thank you very much,
    Roman

    Function Modules RSZ_I_BASIC_CHA_WHERE_USED and RSZ_DB_KEYFIG_WHERE_USED will be able to tell you which queries an InfoObject is used in. You can use the RSDIOBJ table to get a list of the InfoObjects that are active in your BW system.
    Create an ABAP program that does the following:
    1) SELECT all of the InfoObjects in RSDIOBJ into an ITAB where the RSDIOBJ-OBVERS = 'A' (Active) and RSDIOBJ-IOBJTP = 'CHA' or 'KYF' (Character and Key Figure respectively).
    2) Copy ITAB into another ITAB.
    3) Delete all records with InfoObject type of Key Figure in the first ITAB, so that you only have Characteristics in the ITAB.
    4) Delete all records with InfoObject type of Characteristics in the second ITAB, so that you only have Key Figures in that ITAB.
    5) LOOP through the Characteristics ITAB and call the RSZ_I_BASIC_CHA_WHERE_USED FM, for each row in the ITAB, with the Import Parameters of I_OBJNM being the InfoObject being processed, I_OBJVERS always equal to 'A' and I_QUERIES_ONLY always equal to 'X'. LOOP through the structure returned and populate to a third ITAB.
    6) After all Characteristics have been processed, LOOP through the Key Figures ITAB and call the RSZ_DB_KEYFIG_WHERE_USED FM, for each row in the ITAB, with the Import Parameters of I_OBJNM being the InfoObject being processed, I_OBJVERS always equal to 'A'. LOOP through the structure returned and populate to the third ITAB.
    Edited by: Dennis Scoville on Nov 3, 2009 3:34 PM

  • Multiple values in row in an alv grid

    Hi experts,
    I have to display data through alv grid control. The problem is I have multiple values in a row for one one field.
    How should i display the data for this field in an ALV.
    I need to display data like the fomatt:
    field1   field2    field3    field4
    1           2            5           6
                 3
                 4
    7           8           12          13
                 9
                10
                11

    Hi,
      first ur getting data like for 1st field having one itab with common field (eg) belnr is common field 1st field is (BLART) and 2nd field contain another itab with common field like that 3rd upto 4.
      In that common loop itself you have to find which field having more records use the code like
    itab1[] = gv_itab[]."pass the 1 field itab to another itab.
    DELETE TABLE itab1 WITH TABLE KEY fieldname NE field value. " delete without common value.
    DESCRIBE TABLE itab LINES li."1 field internal table
    like that you have to do 4 fields itab.
    Which is having more record loop the field itab table and use read statement for rest of field itab
    and use append statement for getting final itab.
    regards,
    Dhina..
    Edited by: Dhina DMD on Jun 16, 2011 1:17 PM

  • Sorting numbers using itab(urgent)

    hi,
       i want to sort the number using itab. i am writting the code as follows. but i am not getting itab sorted asending? pl. tell me why????
    Data: itab2 type table of string with header line.
    if IT_BOM1-LABST < IT_BOM1-MENGE.
      ITAB2 = MIN.
      append itab2.
      ELSE.
      itab2 = w_shortb.
      append itab2.
      ENDIF.
    if itab2[] is not initial.
        sort itab2 ascending.
      endif.
      read table itab2 index 1.
      If sy-subrc = 0.
      Write:/ 'The minimum batch is', itab2.
      endif.
      numb = itab2.
    write :/ numb.
    when i am debugging then itab not showing sorted in ascending

    Hi Samir,
    what about a slim solution?
    data:
      lt_mng type sorted table of mard-labst
        with unique key table line,
      lv_menge like line of lt_mng.
    insert:
      IT_BOM1-LABST into table lt_mng,
      IT_BOM1-MENGE into table lt_mng,
      w_shortb into table lt_mng.
    read table lt_mng into lv_mng index 1.
    Write:/ 'The minimum batch is', lv_mng.
    Regards,
    Clemens

Maybe you are looking for

  • Lost Ability to click & drag links to email after clean install of Firefox v-19.0

    Was experiencing numerous crashes on existing Firefox (v-18.0). Upgraded to 19.0 and still had same issues. Next performed a clean install altogether to v-19.0. So far that problem seems to have been resolved...however... Issues now being experienced

  • Sending Email if PO approver does not approved after 2 days

    Hi Experts, I am not sure whether I am posting to the right forum, but I will still try to asked. We have a requirement that we need a certain agent or report that will run checking all POs need for approval then sending it to each PO's approver outl

  • Videos from the PC to the TV - no signal

    I have a T500 with MS XP Professional and purchased a Laptop to HDTV - VGA Audio/Video Cable.  When I select the input I get no signal and have been told by PC folks more knowledgeable than I that I must upgrade my drivers.  There are so many drivers

  • How to find the form name  from VA02 T.code

    how to find the form name  from VA02 T.code

  • Massege to Terminated Employees

    Hi all, If the user will perform any  action like promotion and increment for the terminated employees by the time system has to generate one massege like the employee was teminated from the period.Please let explain me how could i resolve this issue