ABAP Looping in internal tables

Hi,
I am working on alv report which fetches matnr with no transaction data by passing in ekpo,mseg,ekko tables and query is working is fine and append matnr in it_final to display.
But now I want to display matnr & matkx-makt but to get this field I have to compare with it_final-matnr to get the corresponding material description. correct values are fetched but issue is with display.
Code attached in file below.
Any help to sort out this would be appreciated.
Message was edited by: Drashti Amrutia

You could simplify you report
- Join MARA and MAKT
- Check non existence of records in subquery
Sample :
TYPES: BEGIN OF record,
          matnr TYPE mara-matnr,
          maktx TYPE makt-maktx,
        END OF record.
DATA: itab TYPE TABLE OF record,
       lo_table TYPE REF TO cl_salv_table.
PARAMETERS: p_mtart TYPE mara-mtart.
START-OF-SELECTION.
   SELECT * INTO CORRESPONDING FIELDS OF TABLE itab
     FROM mara
     JOIN makt
       ON mara~matnr EQ makt~matnr
     WHERE mara~mtart EQ p_mtart
       AND makt~spras EQ sy-langu
       AND NOT EXISTS ( SELECT * FROM ekpo WHERE matnr EQ mara~matnr )
       AND NOT EXISTS ( SELECT * FROM ekbe WHERE matnr EQ mara~matnr )
       AND NOT EXISTS ( SELECT * FROM mseg WHERE matnr EQ mara~matnr ).
END-OF-SELECTION.
   cl_salv_table=>factory(
     IMPORTING
       r_salv_table   = lo_table
     CHANGING
       t_table        = itab ).
   lo_table->display( ).
Now execute some performance comparison with your FOR ALL ENTRIES options, and decide yourself.
(How did you choice the tables to check EKPO & EKBE but no EBAN, no RESB ?)
Regards,
Raymond

Similar Messages

  • Avoiding performance issue due to loop within loop on internal tables

    Hi Experts,
                    I have a requirement where in i want to check whether each of the programs stored in one internal table are called from any of the programs stored in another internal table. In this case i am looping on two internal tables (Loop within a loop) which is causing a major performance issue. Program is running very very slow.
    Can any one advise how to resolve this performance issue so that program runs faster.
    Thanks in advance.
    Regards,
    Chetan.

    Forget the parallel cursur stuff, it is much to complicated for general usage and helps nearly nothing. I will publish a blog in the next days where this is shown in detail.
    Loop on loop is no problem if the inner table is a hashed or sorted table.
    If it must be a standard table, then you must make a bit more effort and faciliate a binary search (read binary search / loop from index exit)
    see here the exact coding Measurements on internal tables: Reads and Loops:
    /people/siegfried.boes/blog/2007/09/12/runtimes-of-reads-and-loops-on-internal-tables
    And don't forget, the other table must not be sorted, the loop reaches anyway every line. The parallel cursor requires both tables to be sorted. The additional sort
    consumes nearly the whole advantage of the parallel cursor compared to the simple but good loop in loop solutions.
    Siegfried

  • SAP QUERY LOOPS AND INTERNAL TABLE

    Hi All, I have a query which i have made. It runs from Table EKPO which has PO details and what I want to do is now via ABAP Code pull through the total of goods receipt for the PO and Line Item into a field. Sounds Easy enough..Problem now,
    The table which contains the GR data is EKBE which agains a PO and Line Item can have many 101 movements and 102 movements so what I want is an ABAP Statent to basically sum up the total of 101 for the PO & LINE ITEMS and then minus this from the total of 102 for the PO & LINE ITEMS and post the result in to this new field I have created.
    I am pretty decent with ABAP Code in Querys I.e Select statements etc but from what I can see i need to create an internal table and do a loop and collect statement but I keep on failing due to not enough knowledge. Please can some one help me with this and provide me with the code and explanation as i would like to understand,
    POINTS WILL BE REWARDED
    Thanks
    Kind Regards
    Adeel Sarwar

    Hi,
    This is the full code i have entered but its not working. Any help would be appreciated. If you could rectify the code and internal tables that would be great.
    Thanks
    TABLES: EKBE.
    DATA: PurO LIKE EKPO-EBELN,
          POLI LIKE EKPO-EBELP.
    *New Table and Vars defined
    DATA:   BEGIN OF IT_EKBE,
              IT_EKBE LIKE EKBE,
            END OF IT_EKBE.
    DATA:  BEGIN OF IT_SUM OCCURS 0,
              EBELN TYPE EBELN,
              EBELP TYPE EBELP,
              DMBTR TYPE DMBTR,
              MENGE TYPE MENGE,
          END OF IT_SUM.
    CLEAR: QTYD.
    MOVE: EKPO-EBELN TO PurO,
          EKPO-EBELP TO POLI.
    SELECT * FROM EKBE INTO IT_EKBE
        WHERE EBELN = PurO
        AND   EBELP = POLI
        AND   BEWTP = 'E'
    LOOP AT IT_EKBE.
      MOVE CORRESPOING IT_EKBE TO IT_SUM.
      IF IT_EKBE-BWART = '102'.
        IT_SUM-DMBTR = IT_SUM-DMBTR * -1.
        IT_SUM-MENGE = IT_SUM-MENGE * -1.
      ENIDF.
      COLLECT IT_SUM.
      CLEAR IT_SUM.
    ENDLOOP.
    ENDSELECT.
    If sy-subrc = 0.
      QTYD = IT_SUM.
    ELSE.
      QTYD = 0.
    ENDIF.

  • ABAP OO - Passing Internal Tables from Method to Method

    I'm new to writing methods.
    I have a need to build an internal table in METHOD1 and pass the internal table to METHOD2. I'm confused how to declare the table in 'Parameter' section of the METHOD2. I have specified the following:
    Parameter = WTAB1
    Type = Import
    Pass value = blank
    Optonal = Blank
    Typing Method = Type
    Associated type =  ZSCIW and this is declared in DDIC as a data type with fields ZZLINE(72) and ZZPOS(4)
    Default value = blank
    METHOD1 (simplified example)
    method METHOD1.
    Table of individual words from source code
      types: begin of wline,
               WORD(72),
               POSN(4),
             end of wline,
             wlines     type standard table of wline  with default key.
      data:  wx          type wlines,
               wa          like line of wx.
    Clear past results
      REFRESH: Wx.
    Look through source code...
      LOOP AT ref_include->lines into wa.
        APPEND wa.
      ENDLOOP.
    Call METHOD2 and pass internal table wa
    METHOD2 ( ).
    1. How to you define the parameters in METHOD2.
    2. What is the coding in METHOD1 to call METHOD2.
    Your help will really be appreciated.
    Thanks.
    Soyab

    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Check these links.
    http://www.henrikfrank.dk/abapuk.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    OO ABAP links:
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    go through these links
    http://www.erpgenie.com/abap/index.htm
    http://sic.fh-lu.de/sic/bic.nsf/(vJobangebote)/EC8AD2AE0349CE92C12572200026FDB8/$File/Intern%20or%20Working%20Student%20as%20ABAB%20OO%20Developer.pdf?Open
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    <b>good book on ABAP objects(OOPS)
    http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications</b>
    Rewards if useful..............
    Minal

  • Help with basic ABAP code (merge internal tables, sort of...)

    Hello,
    Can someone please help write some basic code for a Basis guy with limited ABAP knowledge?
    Should be some easy points for an experienced ABAPer!
    I have identicaly structured internal tables I_A and I_B and I_C which have already been filled by function models I called.
    How will I code the following?:
    I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
    Then I want to read I_B and:
    1)Update I_MASTER with NEW records
    2)Update existing records if the value of field MYFIELD in I_B is smaller than the value of MYFIELD in I_MASTER.
    Then I want to read I_C and:
    1)Update I_MASTER with NEW records
    2)Update existing records if the value of field MYFIELD in I_C is smaller than the value of MYFIELD in I_MASTER.
    Let me know if I can provide anymore information.
    Thanks in advance for you help!
    Adriaan
    Message was edited by: Adriaan
    Message was edited by: Adriaan

    Hi Adriaan ,
    I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
    <b>i_master[] = i_a[] .</b>
    loop at i_b .
    read table i_master with key myfiled < i_b-myfield .
    if sy-subrc = 0 .
    append i_master from i_b .
    endif.
    endloop.
    loop at i_c .
    read table i_master with key myfiled < i_c-myfield .
    if sy-subrc = 0 .
    append i_master from i_c .
    endif.
    endloop.
    Let me know if this helped .
    Regards,
    Varun .
    Message was edited by: varun sonu

  • Loop at internal Table inside Script

    Hi
       I am filling a table in a subroutine in a program  and calling it through 'Perform' from my Script,now the main issue is , How to display the table in my script ? 
                I want to loop through an internal table & display its content on my script , but i can't make changes in the calling program by any means.

    Hi Ajitabh ,
    With PERFORM inside SAPSCRIPT you can only pass individual fields and also get back individual fields .
    Check This
    http://help.sap.com//saphelp_470/helpdata/EN/d1/802fd3454211d189710000e8322d00/frameset.htm
    Only "USING" and CHANGING" options are allowed and that too only symbols available / defined in sapscript can be passed .
    Even if you populate an internal table in the program you are calling with "PERFORM" there is no way to pass this internal table back to sapscript , also in SAPSCRIPT there is no way to loop .
    If you are sure about the no of lines you are going to populate and all lines have only one column ( only one field ) you can try something like this .
    /: PERFORM GET_VALUE IN PROGRAM <ZNAME>
    /: USING &VAR1&
    /: USING &VAR2&
    /: CHANGING &ITAB1&
    /: CHANGING &ITAB2&
    /: CHANGING &ITAB3&
    /: CHANGING &ITAB4&
    /: ENDPERFORM
    Anothe way is to loop in the main print program and call WRITE_FORM . But I guess your main print program is a SAP std program which you dont want to copy and change.
    Cheers.

  • Program times out while looping at internal table with huge records - Needs fine tuning suggestions

    Hi,
    I am trying to execute a report. It times out while looping at vbap internal table. This internal table has 140000  records and does the validation within this loop and geenrates data for the output. Due to this huge volume, the program times out when executed foreground.
    There are no nested loops, so I cannot apply 'Parallel Cursor' here.
    Is there any way I can fine tune the program so that it doesn't timeout? Is it possible to apply 'Parallel Processing' . If yes, how?
    Thanks,
    Pavan

    Hi Pavan ,
                  ->sort your internal table by all primary key for vbap.
                  ->Read a Record from the table (use your condition here)
                  ->if record satisfys your where condition ,get that record index .
                  ->loop the table from the index (without condition) .
                  its like parallel cursor only but for single loop .;-)
                  ->use field symbols ,wherever possible .
               if still dump is coming ,contact your basis team .
    regards,
    Krishna.

  • Looping at internal table is taking lots of time

    Hi,
    I have two internal tables IT_1 and IT_2. My requirement is as below:-
    For record in table IT_1 if no record is found in table IT_2 then appned to the third table IT_3.
    I am using the below code for the same.
      LOOP AT tbl_articles INTO tbl_articles.
        READ TABLE tbl_prix_art WITH KEY matnr = tbl_articles-matnr.
        IF sy-subrc <> 0.
          MOVE tbl_articles TO tbl_articles_2.
          APPEND tbl_articles_2.
        ENDIF.
        CLEAR : tbl_articles, tbl_articles_2.
      ENDLOOP.
    But is taking huge amount of time due to larger number of records in tbl_articles .
    Is there any other way through which i can get the same functionality.
    Regards
    Sachin

    Sachin,
    Some food for thought.
    Irrespective of how you define the table it has to go through the n number of rows in tbl_articles because that is the basic functioanlity.
    I think your READ TABLE is what is delaying your process here. So try a Binary Search as below.
    Line 1 of change --> SORT tbl_prix_art asc ASCENDING matnr. 
    LOOP AT tbl_articles INTO tbl_articles.
    Line 2 of change --> READ TABLE tbl_prix_art BINARY SEARCH  WITH KEY matnr = tbl_articles-matnr.
    IF sy-subrc 0.
    MOVE tbl_articles TO tbl_articles_2.
    APPEND tbl_articles_2.
    ENDIF.
    CLEAR : tbl_articles, tbl_articles_2.
    ENDLOOP.
    I am confident this will solve your long run times.
    Thanks
    Mani

  • Using aggregation in ABAP code for internal table

    I have written following code to get cumulative amount on a date but i have to hit database for each record.
    Can't I use some function similar to SUM for doing the same thing on internal table??It would increase my performance.
    code is:
        SELECT SUM( DEB_CRE_LC ) FROM /BIC/AZFIAR_O500
         INTO LV_BALMONTH   WHERE   DEBITOR = LV_DEBITOR AND
        CALMONTH GE LV_STARTMONTH AND CALMONTH  LE LV_LASTCALMON.
    I want to put  ZFIAR data to internal table and read and do SUM thing..is it possible?? withotut usiong loop.
    regards,
    rakesh

    Hi Rajesh,
    types : begin of ty_tab,
                date type dats,
                DEB_CRE_LC   type .....     " delare type & is the filed need to summerized
                end of ty_tab,
    data: itab type standard table of ty_tab.
    SELECT date
                  SUM( DEB_CRE_LC )  as DEB_CRE_LC  FROM /BIC/AZFIAR_O500
                  INTO corresponding fields of itab
                  where CALMONTH GE LV_STARTMONTH AND CALMONTH LE LV_LASTCALMON
                  group by date.   " date is the field available in your ODS/transparent table
    simulate the above code in your program...
    Hope this will work..

  • Smartform loop into internal table problem

    hello experts,
    i am doing an example given in **************** regarding smartforms. I am getting problem which doing the smartforms . please help me.
    http://****************/Tutorials/Smartforms/SFMain.htm
    in that i am doing the program
    Working with loop.
    I have done exactly as the screen shots in the program.
    Now in the main window i created a loop.
    in that loop i am not getting the option internal table.
    But it is showing as operand . It is in the data tab of the loop.
    I searched the all the tabs in the loop but did not find the option  internal table.
    so then i ticked the operand and i did as speified in the screen shots.
    it_tab into fs_tab
    Then i created a text and then placed &fs_tab-vbeln& etc.
    then i executed the smartform now in the output i am not getting the sales order number , item etc.
    The output is showing like
    &fs_tab-vbeln&     &fs_tab-posnr&   etc.
    please guide me how to get the internal table option in  the loop. And also tell me how to rectify this problem

    thanks for all the replies.
    I will give all  at the time of closing my thread.
    Hi Sravanthi -> in loop node i am not getting the internal table insted of that i am getting operand in the data tab.
    This is my main problem.I dont why operand is comming there.
    my version is 4.7e
    Hi Karthik and swati -> i simply hard coded the statements in the text as shown in the example.
    Now i will try with the add field.
    But please tell me why i am not getting internal table option in loop.

  • How to update whole external table(in ABAP dictionary) from internal table at once

    Hi,
    How can I update the content of the external table (in ABAP dictionary) from the content of internal table data at once. I created the internal tables with out the header line, with the work area. I tried UPDATE TARGET_EXTERNAL_TABLE FROM TABLE INTERNAL_TABLE. But it returns 4 for sy-subrc and did not work.
    Thank you
    Regards.
    CHINTHAKA

    Hi Feiyun Wu,
    Thank you very much. Your code worked. Is there any way to replace the whole content of the external table from internal table data ?
    Regards,
    Chinthaka

  • WD abap Error - Two internal tables are neither compatible nor convertible

    Hi,
    I am trying to use a standard Function Module - HR_FBN_GENERATE_SEND_EMAIL in a Webdynpro ABAP Application to send email to a standard mailbox. I am getting this error. Did anyone come across this error?
    The following error text was processed in the development system: Two internal tables are neither compatible nor convertible.
    The error occurred on the application server Development and in the work process 2.
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Function: HR_FBN_GENERATE_SEND_EMAIL of program SAPLHRFBN00GENERAL
    Method: EXECUTE_HR_FBN_GENERATE_SEND_E of program /1BCWDY/42NDMCF1FS45LZXWDXDY==CP
    Method: IF_COMPONENTCONTROLLER~EXECUTE_HR_FBN_GENERATE_SEND_E of program /1BCWDY/42NDMCF1FS45LZXWDXDY==CP
    Method: ONACTIONLOADEMAILFORM of program /1BCWDY/42NDMCF1FS45LZXWDXDY==CP
    Method: IF_WDR_VIEW~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/42NDMCF1FS45LZXWDXDY==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
    Any help will be appreciated.
    Thanks
    RM
    Edited by: R M on Sep 14, 2008 2:54 PM

    Open an OSS ticket, this is probably a programming error which requires a note to fix it.
    CHeers,
    RIch Heilman

  • Error "Screen output are too small" when looping through internal table!

    Hello All:
         I have a huge internal table with some 79000 records and while looping through them and doing some other processing inside the loop, I am getting an error "Screen output are too small"! Could someone please help mw how to fix this issue? I can send the all the code if anyone wants to look at the code. Thanks in advance and rewards are assured.
    Mithun

    Hi,
    Check this
    new-page print off.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    destination = v_dest
    IMPORTING
    out_parameters = params
    valid = valid.
    * params-linct = '58'.
    * params-linsz = '170'.
    * params-paart = 'X_58_170'.
    * params-prtxt = v_spool_text.
    * params-primm = 'X'.
    * params-prrel = 'X'.
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    After the call fm GET_PRINT_PARAMETERS params internal table contains all the values for generating spool.
    aRs

  • Loop at internal table and get the right line

    Hi,
    I've a table like this sorted by material1 and date.
    Material 1...Date..........Material 2...Stock 
    A1.............01/01/08........A2..........100
    A1.............01/01/07........A2..........150
    B1.............01/05/08........B1..........50
    B1.............01/03/07........B2..........100
    B1.............01/02/07........B3..........75
    I need to put in another table only the line for material1 which has the highest date.
    For this example, line 1 and 3 should be selected.
    Can anyone tell me how to code this??
    Thanks.

    Hi tarick,
    Try this,,
    Create another internal table  itab2 of type itab1 and copy all entries of itab1 to itab2.
    itab2[] = itab1[].
    Now delete adjacent duplicates from itab2 comparing material1.
    DELETE ADJACENT DUPLICATES FROM itab2 comparing material1.
    Effect
    Deletes adjacent duplicate entries from the internal table itab2. If there are n duplicate entries in succession, the first entry is retained, and the following n-1 entries are deleted.
    Reward Points if Helpful.
    Regards,
    Sachin M M

  • How to send the edited output fields of an ABAP report into internal table

    Hi,
    I had edited the output fields of an ALV GRID report now how can i again update the fields of the internal table with this edited new data .
    Please suggest me if any method or FM exists for this.
    Thanks in advance
    With Regards
    Ajay

    hi,
    you have to use the following code in the user command
    *&      Form  command
    *       TO HANDLE USER ACTIONS AGAINST PF-STATUS
    *      -->UCOMM      text
    *      -->SELFIELD   text
    FORM COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
      DATA : LV_OKCODE TYPE SY-UCOMM.
      LV_OKCODE = UCOMM.
      CASE LV_OKCODE.
        WHEN 'PROCESS'. "button
               selfield-refresh = 'X'.
      ENDCASE.
    ENDFORM.                    "command
    hope this helps
    Regards
    Ritesh

Maybe you are looking for

  • Can't import any images into lightroom 5

    Working away in my studio and suddenly I can't import any images into lightroom 5 (version5.5) for macbook pro os x 10.9.5

  • Pro Applications Update didn't update

    I had a problem with an error message saying the "file is too new for this version of the software. I have FCP 6 (part of Final Cut Studio 2) I read here that the fix to the problem is an update which I just downloaded and installed, but my FCP 6 was

  • Need sql query to find out Joins attached with folders

    Hi, Can anyone let me know the sql query which can be used to identify the joins which are attached to the folders. We dont want to see those from front end(disc admin). Thanks abhishek

  • In IDT I am not able to publish the universe to Server

    Hi, I am using IDT 14.0.4 version installed on a Virtual Machine with SAP BusinessObjects BI platform 4. When I select Publish a Universe to repository, after selecting the Universes folder, the Next button is disabled. I give the name of the file an

  • The java class is not found:  com.sap.inst.migmon.exp. "During export "

    Hello all, I am trying to run export of PI system (ABAP+JAVA) uisng inst master NWSR3 I am hit with an issue before the export_ABAP starts . the following are the error lines java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (buil