Working Area for Internal Table

Hi,
  i know that process of internal table if it is with headerline but i don't know how the data pass to our internal table if it is with out header line plzz give me the example code for that.
Thanks in advance

The following example shows two programs with the same function. One uses a header line, the other does not.
With header line:
TYPES: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1
WITH HEADER LINE.
DO 4 TIMES.
ITAB-COL1 = SY-INDEX.
ITAB-COL2 = SY-INDEX ** 2.
INSERT TABLE ITAB.
ENDDO.
ITAB-COL1 = 2.
READ TABLE ITAB FROM ITAB.
ITAB-COL2 = 100.
MODIFY TABLE ITAB.
ITAB-COL1 = 4.
DELETE TABLE ITAB.
LOOP AT ITAB.
WRITE: / ITAB-COL1, ITAB-COL2.
ENDLOOP.
Without header line:
TYPES: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA: ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,
WA LIKE LINE OF ITAB.
DO 4 TIMES.
WA-COL1 = SY-INDEX.
WA-COL2 = SY-INDEX ** 2.
INSERT WA INTO TABLE ITAB.
ENDDO.
WA-COL1 = 2.
READ TABLE ITAB FROM WA INTO WA.
WA-COL2 = 100.
MODIFY TABLE ITAB FROM WA.
WA-COL1 = 4.
DELETE TABLE ITAB FROM WA.
LOOP AT ITAB INTO WA.
WRITE: / WA-COL1, WA-COL2.
ENDLOOP.
The list, in both cases, appears as follows:
1 1
2 100
3 9

Similar Messages

  • Difference between Field symbols and work area for Internal tables

    Hi,
    In ECC versions we all know that we need to declare the internal tables without headerline, and for handling the internal tables we need to use exclusive work areas.
    Currently i have an issue that we have been asked to use field symbols instead of work areas...can any one help me how to use the field symbols and also let me know how it will improve the performance of the program..
    Thanks and Regards,
    Kathir

    Hi
    DATA: WA TYPE ITAB.
    LOOP AT ITAB INTO WA.
    IF WA-FIELD = .....
    ENDIF.
    ENDLOOP.[(code]
    FIELD-SYMBOLS <WA> TYPE ANY.
    LOOP AT ITAB ASSIGNING <WA>.
    ENDLOOP.
    Now the problem is you can't know the name of the fields of the table at runtime, so you can't write:
    IF <WA>-FIELD = .....
    ENDIF.
    Anyway you can create a field-symbols strcturated like the table:
    [code]FIELD-SYMBOLS <WA> TYPE ITAB.
    LOOP AT ITAB ASSIGNING <WA>.
      IF <WA>-FIELD = .....
      ENDIF.
    ENDLOOP.
    I don't know which are the differences for the performance between to use a field-symbol and to use a structure as work-area.
    The differnce between the field-symbols and work-area is the field-symbol is assigned directly to the record, so u don't need to do a MODIFY statament to change something:
    LOOP AT ITAB INTO WA.
      WA-FIELD =
      MODIFY ITAB FROM WA.
    ENDLOOP.
    LOOP AT ITAB ASSIGNING <WA>.
      <WA>-FIELD =
    ENDLOOP.
    These two pieces of abap code do the same action, so probably the field-symbol improve the performance because it do an access directly to the record without to use an external structure as workarea.
    Max

  • The type of the database table and work area (or internal table)...

    Hello
    I am trying to use a database and select all records from it and store them into an internal table.
    My code:
    Select * from xixi_dbcurrency into table gt_currency.
    The error:
    "The type of the database table and work area (or internal table) "GT_CURRENCY" are not Unicode-convertible . . . . . . . . . .     "
    Any suggestions?
    Thank you

    Hi Thomas,
    Thank you for your inputs above.
    But as you suggested is we use INTO CORRESPONDING FIELDS OF TABLE then it resolve the error.
    But I have below piece of code:
    DATA:    it_new_source TYPE STANDARD TABLE OF _ty_s_sc_1,
                  wa_source TYPE _ty_s_sc_1,
                  wa_new_source TYPE _ty_s_sc_1,
                  ls_target_key TYPE t_target_key.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_new_source
           FROM /bic/afao06pa100
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    But since this is reading into corresponding fields of table the data load from one DSO to other DOS is running for long more that 15 hours and still not getting completed and giving dump.
    So if I switch the search to below:
    SELECT * FROM /bic/afao06pa100
       INTO TABLE it_new_source
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    Then I am getting below error:E:The type of the database table and work area (or internal table) "IT_NEW_SOURCE" are not Unicode convertible.
    Can you please advice on this, as performance need to improve in start routine code.
    Thank You.

  • The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat,

    ***Data declaration
    TYPES : BEGIN OF t_zle_lagerplanung,
               SEl,                               "stores which row user has selected
               kdauf TYPE zle_lagerplanung-kdauf,
               kdpos TYPE zle_lagerplanung-kdpos,
               etenr TYPE zle_lagerplanung-etenr,
               papiermaschine TYPE zle_lagerplanung-papiermaschine,
               runnr TYPE zle_lagerplanung-runnr,
               prio  TYPE zle_lagerplanung-prio,
               werk TYPE zle_lagerplanung-werk,
               durchmesser TYPE zle_lagerplanung-durchmesser,
               breite TYPE zle_lagerplanung-breite,
               anzle TYPE zle_lagerplanung-anzle,
             occupied TYPE zle_lagerplanung-text30,
             free TYPE zle_lagerplanung-text30,
               lgpla TYPE zle_lagerplanung-lgpla,
               lgtyp  TYPE zle_lagerplanung-lgtyp,
               art TYPE zle_lagerplanung-art,
               anzhoehe TYPE zle_lagerplanung-anzle,
             zindicator TYPE zle_lagerplanung-text30,
               fa TYPE zle_lagerplanung-fa,
               field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_zle_lagerplanung.
    I am getting the data in internal table by using thiis select statement.
      SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
             anzle lgpla lgtyp art anzhoehe fa
        FROM zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
       WHERE kdauf IN s_kdauf
    "     AND kdpos = p_kdpos
          AND KDPOS IN s_kdpos
         AND werk = p_werks.
    But while updating the particular field in ztable using this statement
          UPDATE zle_lagerplanung from table it_zle_lagerplanung.
    it is giving syntax error
    "The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat, or
    contains reference or internal tables as components. components.
    components. components. components."
    Could any one help me out how to resolve this problem....
    Thanks in advance

    Hi Shyamal,
    lvc_s_styl is a structure so you will get the same error.
    for your select and update statement you dont need field "field_style".
    regards
    rea

  • Difference between work area and internal tables.

    Hi  I wanna know the difference between work area and internal tables.
    what happend if i give with out header line in internal table.
    also how to assosiate work area to internal table in that scenario.

    Hi Balaji..
    The internal table is an ABAP runtime object which has two parts the Body and the header.
    Whereas a work area cannot have a body.. It is mere a field or group of fields which can hold values at runtime..
    In the SAP higher versions mySAP ERP, the use of tables with header line is made obsolete.. But there is absolutely no problem with the same..
    Just think that when you define an internal table with occurs or with header line statement, the system automatically creates a workarea with this table, using which you can access the contents in the bosy of tyhe table.. You can read a record from the table body to this header or add a record in the header to the internal table body..
    When you work with a table ITAB without a header line, you can not use statements like READ TABLE, APPEND, INSERT etc without giving an explicit work area..
    Suppose i have an internal table like:
    DATA : itab TYPE STANDARD TABLE OF t001.
    This table will not have a header with it.
    If you will use APPEND itab. The compilor will give error.
    Here i will create a work area with same structure of the table.
    DATA : e_wa TYPE t001.
    Now i will write:
    APPEND e_wa TO itab.
    READ TABLE itab INTO e_wa WITH KEY xxxxxx
    LOOP AT itab INTO e_wa...           etc..
    In a better approach we use Field symbols with such tables, instead of structures
    FIELD-SYMBOLS: <fs_itab> TYPE t001.
    So,
    LOOP AT itab ASSIGNING <fs_itab>
    READ TABLE itab ASSIGNING <fs_itab> etc.. However we can not use field symbols in few cases..
    I hope this will help you..
    Thanks and Best Regards,
    Vikas Bittera.
    **Points for usefull answers**

  • Work area and internal table

    hi friends,
    Please let me know when do we use work area and when do we use internal table.
    Thanks in advance
    Tina Wilson

    Work areas are used with internal tables.  For example if you have an internal table defined like this.
    data: itab type table of mara.
    This internal table can hold many rows of data, right?  SO say you need to read this data.  Well you will need to LOOP or READ the internal table, since this internal table has no header line(please to put the read data), you need to have a work area to put the data into.
    <b>data: wa like line of itab.</b>
    Loop at itab <b>into wa</b>.
    endloop.
    Now if you defined the internal table with a header line, there is no reason to have the work area and you can just do the same like this.
    data: itab type table of mara <b>with header line</b>.
    Loop at itab.
    endloop.
    It is now best practice to use work areas instead of header lines because in ABAP OO, header lines are not allowed.
    Regards,
    Rich Heilman

  • Why using workarea for internal table is better in performance

    Please tell me
    why using workarea for internal table is better in performance

    Hi Vineet ,
      Why would we choose to use an internal table without a header line when it is easier to code one  with a header line?
    it has following reason.
    1)Separate Internal Table Work Area:
         The work area (staging area) defined for the internal table   is not limited to use with just one internal table.
    take ex-
    Suppose you want two internal tables for EMPLOYEE – one to contain all records and one to contain only those records where country = ‘USA’.  You could create both of these internal tables without header lines and use only one work area to load data into both of them. You would append all records from the work area into the first internal table.  You would conditionally append the ‘USA’ records from the same work area into the second internal table.
    2)  Performance Issues:  Using an internal table without a header line is more efficient than one  with a header line
    3) Nested Internal Tables:  If you want to include an internal table within a structure or another   internal table, you must use one without a header line.
    If this one is helpful ,then rewards me
    Regards
    Shambhu

  • Extended Program check for internal table

    TYPES:BEGIN OF TY_FINAL,
            VBELN TYPE VBAP-VBELN,
            VBELV TYPE VBAP-VBELV,
            POSNV TYPE VBAP-POSNV,
            WERKS TYPE VBAP-WERKS,
            ZZ_MODEL_NO TYPE VBAP-ZZ_MODEL_NO,
            VKORG TYPE VBAK-VKORG,
            TEXT(70) TYPE C,
          END OF TY_FINAL.
    Declaration of Variables                                            *
    DATA: IT_VBAK  TYPE STANDARD TABLE OF TY_VBAK ,
          IT_VBAP  TYPE STANDARD TABLE OF TY_VBAP ,
          IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE.
    DATA: W_VBAK         TYPE TY_VBAK            ,
          W_VBAP         TYPE TY_VBAP            ,
          W_FINAL        TYPE TY_FINAL           ,
          W_LAYOUT       TYPE SLIS_LAYOUT_ALV    ,
          W_VARIANT_SAVE TYPE C                  ,
          W_REPID        TYPE  SY-REPID          .
    In the above code i have declared IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE. in extended program check iam getting error as( Tables with headers are no longer supported in the OO context.
    can any one plz suggest me to avoid this error.
    Thanks in Advance.
    Moderator message - Duplicate post locked
    Edited by: Rob Burbank on May 19, 2009 9:12 AM

    Hi,
    DATA: IT_VBAK TYPE STANDARD TABLE OF TY_VBAK ,
    IT_VBAP TYPE STANDARD TABLE OF TY_VBAP ,
    " If you declare the internal table with header line in OO context it wll give you error. As OO wil not
    " support the header line concept. Declare Internal table without header line and create the work area
    " for the internal table
    IT_FINAL TYPE STANDARD TABLE OF TY_FINAL. "  WITH HEADER LINE.
    DATA: W_VBAK TYPE TY_VBAK ,
    W_VBAP TYPE TY_VBAP ,
    W_FINAL TYPE TY_FINAL ,                    " Use this work area
    W_LAYOUT TYPE SLIS_LAYOUT_ALV ,
    W_VARIANT_SAVE TYPE C ,
    W_REPID TYPE SY-REPID

  • What are nested Internal tables

    Hi Guru's,
    I am new to ABAP ...just trying to learn things.Can you please explain me what are nested internal tables and what is the purpose of nested internal table?where can it be used and why a header line is not written in a Nested Internal table...
    Kindly explain it (scenario where nested internal tables are used) with an example it will be helpful.
    Cheers,
    Priyanka

    Hi,
    When storing data in internal tables, you often use one internal table for each database you read.
    Each one contains some or all columns of the relevant database table. It is up to you whether
    you create an internal table with a flat structure for each database table or if you create, for
    example, internal tables with nested structures. If you have several tables, each one with a flat
    structure, you have to work with redundant key fields to link the tables. If, on the other hand, you
    use nested internal tables, you can store the data from the database tables hierarchically.
    Saving and processing very large amounts of data in internal tables has disadvantages. If you
    divide up the data into different internal tables, processing it can be very runtime-intensive, since
    the tables have to be processed individually. Furthermore, it requires a lot of storage space,
    since internal tables are not stored in compressed form. The system may even need to store the
    dataset outside of its working memory. This means that processing it takes even longer.
    An example of nested internal table:
    Assume the following program is linked to the logical database [Page 1163] F1S.
    REPORT DEMO.
    DATA: SUM TYPE I, CNT TYPE I.
    NODES: SPFLI, SFLIGHT, SBOOK.
    DATA: BEGIN OF WA_SBOOK,
    BOOKID TYPE SBOOK-BOOKID,
    SMOKER TYPE SBOOK-SMOKER,
    CLASS TYPE SBOOK-CLASS,
    LUGGWEIGHT TYPE SBOOK-LUGGWEIGHT,
    WUNIT TYPE SBOOK-WUNIT,
    END OF WA_SBOOK.
    DATA: BEGIN OF WA_SFLIGHT,
    FLDATE TYPE SFLIGHT-FLDATE,
    SBOOK LIKE TABLE OF WA_SBOOK,
    END OF WA_SFLIGHT.
    DATA: BEGIN OF WA_SPFLI,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    CITYFROM TYPE SPFLI-CITYFROM,
    CITYTO TYPE SPFLI-CITYTO,
    SFLIGHT LIKE TABLE OF WA_SFLIGHT,
    END OF WA_SPFLI.
    DATA TAB_SPFLI LIKE TABLE OF WA_SPFLI.
    START-OF-SELECTION.
    GET SPFLI.
    REFRESH WA_SPFLI-SFLIGHT.
    GET SFLIGHT.
    REFRESH WA_SFLIGHT-SBOOK.
    GET SBOOK.
    MOVE-CORRESPONDING SBOOK TO WA_SBOOK.
    APPEND WA_SBOOK TO WA_SFLIGHT-SBOOK.
    GET SFLIGHT LATE.
    MOVE-CORRESPONDING SFLIGHT TO WA_SFLIGHT.
    APPEND WA_SFLIGHT TO WA_SPFLI-SFLIGHT.
    GET SPFLI LATE.
    MOVE-CORRESPONDING SPFLI TO WA_SPFLI.
    APPEND WA_SPFLI TO TAB_SPFLI.
    END-OF-SELECTION.
    SORT TAB_SPFLI BY CITYFROM CITYTO CONNID.
    LOOP AT TAB_SPFLI INTO WA_SPFLI.
    SKIP.
    WRITE: / WA_SPFLI-CARRID,
    WA_SPFLI-CONNID,
    'from', (15) WA_SPFLI-CITYFROM,
    'to', (15) WA_SPFLI-CITYTO.
    ULINE.
    SORT WA_SPFLI-SFLIGHT BY FLDATE.
    LOOP AT WA_SPFLI-SFLIGHT INTO WA_SFLIGHT.
    SKIP.
    WRITE: / 'Date:', WA_SFLIGHT-FLDATE.
    WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
    ULINE.
    SORT WA_SFLIGHT-SBOOK BY CLASS SMOKER BOOKID.
    SUM = 0.
    CNT = 0.
    LOOP AT WA_SFLIGHT-SBOOK INTO WA_SBOOK.
    WRITE: / WA_SBOOK-BOOKID UNDER 'Book-ID',
    WA_SBOOK-SMOKER UNDER 'Smoker',
    WA_SBOOK-CLASS UNDER 'Class'.
    SUM = SUM + WA_SBOOK-LUGGWEIGHT.
    CNT = CNT + 1.
    ENDLOOP.
    ULINE.
    WRITE: 'Number of bookings: ', (3) CNT,
    / 'Total luggage weight:',
    (3) SUM, WA_SBOOK-WUNIT.
    ENDLOOP.
    ENDLOOP.
    Thanks.

  • Data area for accessing table is too small., error key: RFC_ERROR_SYSTEM_FA

    Hi all,
    I build a java applicatio to call a sap function.
    This FM have only an import parameter as structure, the last field of this structure is 16000 characters long.
    When I start the application if the long field is empty all works fine, but if I fill it the java compiler send me this runtime error:
    [code]
    Exception in thread "main" com.sap.aii.proxy.framework.core.BaseProxyException:
    Data area for accessing table is too small.,
    error key: RFC_ERROR_SYSTEM_FAILURE
         at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:150)
         at bi9032.BI_9032_PortType.zhr_Bi_9032(BI_9032_PortType.java:16)
         at bi9032.Startapp.main(Startapp.java:50)
    [/code]
    Any one can me explain the problem?
    It's possible that I can't pass a large data quantity?
    thanks and regards,
    enzo
    Message was edited by: Enzo Porcasi

    I understood that it's a sap problem,
    so I will write in the abap forum,
    bye
    enzo

  • System Variable For Internal table count

    Can anybody tell me what the system variable for internal table count?
    I just wants to know how many recoreds are there in my internal table ?
    Regards,
    pandu.

    Hi ,
    DESCRIBE TABLE <itab> [LINES <l>] [OCCURS <n>] [KIND <k>].
    If you use the LINES parameter, the number of filled lines is written to the variable <lin>. If parameter, the you use the OCCURS value of the INITIAL SIZE of the table is returned to the variable <n>. If you use the KIND parameter, the table type is returned to the variable <k>: ‘T’ for standard table, ‘S’ for sorted table, and ‘H’ for hashed table.
    using variable
    SY-TFILL
    After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3798358411d1829f0000e829fbfe/content.htm
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 21, 2008 4:53 PM

  • SELECT-OPTIONS sel FOR Internal Table

    Hello,
    I would like to use select-options. Normally you can specify a selection tab (sel) and a row of an table being registered in the ABAP dictionary.
    I would like to use an internal table instead.
    First I read data into the internal table. Next I would refer on one column of that internal using the select-options:
    SELECT * FROM database-tab INTO itab
    WHERE key1 = 'a'.
    SELECT-OPTIONS: sel FOR itab.
    It does not work, although the internal table is filled!!!
    Can I use internal tables with select-options?
    thx, holger

    Hallo Holger,
    i think i get it now - thanks Amit !
    here's an example:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR matnr-low.
      SELECT matnr maktg FROM m_mat1t
      INTO CORRESPONDING FIELDS OF TABLE f4_itab
      WHERE mtart = 'DIEN'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield     = 'MATNR'
                dynpprog     = sy-repid
                dynpnr       = sy-dynnr
                dynprofield  = 'MATNR'
                window_title = 'select material no.'
                value_org    = 'S'
           TABLES
                value_tab    = f4_itab[].
    Andreas

  • What are the internal table events

    hi experts
    can u help me for this

    Hi ramesh,
    There are basically internal table events are as below...
    at first / endat
    at last / endat
    at new / endat
    at end of / endat
    sum
    on change of / endon
    Use the at first and at last statements to perform processing during the first or last loop pass of an internal table.
    Use the at new and at end of statements to detect a change in a column from one loop pass to the next. These statements enable you to execute code at the beginning and end of a group of records.
    Use the sum statement to calculate totals for the rows of a control level.
    Another statement you can use to perform control break processing is on change of. It behaves in a manner similar to at new.
    on change of differs from at new in the following respects:
    It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    You can use else between on change of and endon.
    You can use it with loop at it where . . ..
    You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    <b>Reward Points if it useful....</b>
    Thanks and Regards
    Sreenivasa sharma k.

  • What are dyanmic internal tables and what s the exact use of forall entries

    what are dyanmic internal tables and what s the exact use of forall entries?

    hi,
    <u><b>dynamic internal table.</b></u>
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci912390,00.html
    http://www.sap-img.com/ab030.htm
    <u><b>
    FOR ALL ENTRIES</b></u> is an effective way of doing away with using JOIN on two tables.
    You can check the below code -
    SELECT BUKRS BELNR GJAHR AUGDT
    FROM BSEG
    INTO TABLE I_BSEG
    WHERE BUKRS = ....
    SELECT BUKRS BELNR BLART BLDAT
    FROM BKPF
    INTO TABLE I_BKPF
    FOR ALL ENTRIES IN I_BSEG
    WHERE BUKRS = I_BSEG-BUKRS
    AND BELNR = I_BSEG-BELNR
    AND BLDAT IN SO_BLDAT.
    *******************************8
    look another example
    what is the use of FOR ALL ENTRIES
    1. INNER JOIN
    DBTAB1 <----
    > DBTAB2
    It is used to JOIN two DATABASE tables
    having some COMMON fields.
    2. Whereas
    For All Entries,
    DBTAB1 <----
    > ITAB1
    is not at all related to two DATABASE tables.
    It is related to INTERNAL table.
    3. If we want to fetch data
    from some DBTABLE1
    but we want to fetch
    for only some records
    which are contained in some internal table,
    then we use for alll entries.
    1. simple example of for all entries.
    2. NOTE THAT
    In for all entries,
    it is NOT necessary to use TWO DBTABLES.
    (as against JOIN)
    3. use this program (just copy paste)
    it will fetch data
    from T001
    FOR ONLY TWO COMPANIES (as mentioned in itab)
    4
    REPORT abc.
    DATA : BEGIN OF itab OCCURS 0,
    bukrs LIKE t001-bukrs,
    END OF itab.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    itab-bukrs = '1000'.
    APPEND itab.
    itab-bukrs = '1100'.
    APPEND itab.
    SELECT * FROM t001
    INTO TABLE t001
    FOR ALL ENTRIES IN itab
    WHERE bukrs = itab-bukrs.
    LOOP AT t001.
    WRITE :/ t001-bukrs.
    ENDLOOP.
    Hope this helps!
    Regards,
    Anver

  • Aggregate functions for internal table.

    Hi Gurus,
    I'm just wondering whether we can use aggregate functions for internal table. I wanted to know the max value for a particular column in my internal table. How can I achieve this easily and quickly.
    Thanks,
    David.

    sort the table on which you want the maximum value and read it. Please find below example code.
    TYPES : BEGIN OF ty_mvke,
            matnr TYPE mvke-matnr,
            vkorg TYPE mvke-vkorg,
            vtweg TYPE mvke-vtweg,
           AUMNG type mvke-AUMNG,
            END OF ty_mvke.
    DATA : wa_mvke TYPE ty_mvke,
           it_mvke TYPE STANDARD TABLE OF ty_mvke.
    data : temp_AUMNG type AUMNG.
    START-OF-SELECTION.
      SELECT matnr vkorg vtweg AUMNG FROM mvke INTO
            table it_mvke.
    sort it_mvke by AUMNG.
    read TABLE it_mvke into wa_mvke INDEX 1.
    if sy-subrc = 0.
    move wa_mvke-AUMNG to temp_AUMNG.
    write : temp_AUMNG.
    endif.
    Thanks,
    Sreekala.

Maybe you are looking for

  • Web Service sync error

    Hi Gurus, I have a proxy to WS sync interface. This interface was working all time in 2 different enviroments, and now exactly the same interface is failing in one of the 2 enviroments. It sounds crazy but it's a fact!! When we send a message to the

  • Fast moving stock list

    i would like to get fast moving stock items for monthly random checking ,please if you know any transaction code for that, i used the T-code MC46 for slow moving items but i couldn't generate any good report from it,please advice for tutorial how to

  • Painting an image in a JComponent

    I have a series of JComponents placed inside a JPanel. Each JComponent draws an Image class object. I have the following lines in my paintComponent method: Image test_image = Toolkit.getDefaultToolkit().createImage("foo.gif"); try { MediaTracker trac

  • TopLink workbench won't run (can't find "~1\bin\javaw.exe" error)

    Hello, I'm having a tough time getting the TopLink WorkBench to run on Windows XP. I'm trying to run TopLink WorkBench 10g Release 3 (10.1.3.0.0) Build 060118. I've also installed Oracle Application Server 10g Release 3 (10.1.3.0.0) which is working

  • Qosmio X505-898 about install windows 7 in solid state drive

    I've just bought X505-898 recently, and it came with SSD. My friends suggest me installing windows 7 in the SSD, but I'm not good at this part. Could anyone give me a clear instruction to help me?