SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Internal Tables
Internal Tables




         Objective:


           The following section explains :
           ‱ Defining Internal Tables
           ‱ Processing Internal Tables
           ‱ Accessing Internal Tables
           ‱ Initializing Internal Tables
Internal Tables


         Internal tables are structured data types provided by ABAP/4.
         Internal tables cannot be accessed outside the program
         environment.


         Purpose of internal tables

            ‱ Internal tables are used to reorganize the contents of
            database tables according to the needs of your program

            ‱ Internal tables are used to perform calculations on
            subsets of database tables.

            ‱ The number of lines in an internal table is not fixed.

            ‱ Internal tables exist only during the run time of a
            program.
Accessing Internal Tables

        ‱You access internal tables line by line. You must use a work
        area as an interface for transferring data to and from the table.

        ‱When you read data from an internal table, the contents of the
        addressed table line overwrite the contents of the work area..

        ‱ When you write data to an internal table, you must first enter
        the data in the work area from which the system can transfer the
        data to the internal table.
Types of internal tables

         There are two kinds of internal tables in ABAP/4:

         ·Internal tables with header line

          If you create an internal table with header line, the system
         automatically creates a work area with the same data type as
         the lines of the internal table.

         Note : Work area has the same name as the internal table.

         ·Internal tables without header line

         Internal tables without a header line do not have a table work
         area which can be used implicitly you must specify a work
         area explicitly.
Creating Internal Tables


         There are two ways by which you can create internal tables

         First create an internal table data type using the 'TYPES'
         statement and then create a data object referring that data
         type.

         Syntax : TYPES <t> <type> OCCURS <n>

         Eg: TYPES : BEGIN OF LINE,
               COLUMN1 TYPE I,
               COLUMN2 TYPE I,
               COLUMN3 TYPE I,
               END OF LINE.

            TYPES ITAB TYPE LINE OCCURS 10.
Creating Internal Tables




         Create an internal table data object by referring to a
         structure.

         Syntax: DATA <f> <type> [WITH HEADER LINE]

         Eg: TYPES : BEGIN OF LINE,
               COLUMN1 TYPE I,
               COLUMN2 TYPE I,
               COLUMN3 TYPE I,
               END OF LINE.
            TYPES ITAB TYPE LINE OCCURS 10.
             DATA ITAB1 TYPE ITAB.
             DATA ITAB2 LIKE ITAB1 WITH HEADER LINE.
Creating Internal Tables




         Creating Internal Tables with header line
         In this method an internal table is created with reference to
         existing structure ( another internal table or Dictionary
         object).

         Eg: DATA ITAB LIKE SFLIGHT OCCURS 10 WITH HEADER
         LINE.
Creating Internal Tables




         Create an internal table data object directly with the 'DATA'
         statement.

         Eg: DATA : BEGIN OF ITAB OCCURS 0,
               COLUMN1 TYPE I,
               COLUMN2 TYPE I,
               COLUMN3 TYPE I,
               END OF ITAB.

         Note : In this method a header line with same name as the
         internal table is created automatically.
Filling Internal Tables



          Appending Lines:
          To append a line to an internal table, use the APPEND
          statement as follows:

          Syntax
          APPEND [<wa> TO] <itab>.

          Eg: TYPES : BEGIN OF LINE,
                 COL1 TYPE C,
                 COL2 TYPE N,
                 END OF LINE.
          DATA TAB1 LIKE LINE OCCURS 10.
          LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
          APPEND LINE TO TAB1.
Filling Internal Tables




         Appending Lines depending on the Standard Key (COLLECT
         STATEMENT)

         To fill an internal table with lines which have unique standard
         keys.

         Syntax
         COLLECT [<wa> INTO] <itab>

         If an entry with the same key already exists(all non-numeric
         fields) the collect statement does not append a new line but
         adds the contents of the numeric fields in the work area to the
         contents of the numeric fields in the existing entry
Filling Internal Tables


          Eg: TYPES : BEGIN OF ITAB1 OCCURS 0,
                 COL1 TYPE C,
                 COL2 TYPE I,
                 END OF ITAB1.

          ITAB1-COL1 = ‘A’. ITAB1-COL2 = ‘1’.
          COLLECT TAB1.
          ITAB1-COL1 = ‘B’. ITAB1-COL2 = ‘2’.
          COLLECT TAB1.
          ITAB1-COL1 = ‘A’. ITAB1-COL2 = ‘1’.
          COLLECT TAB1.

          This Produces the output as follows:
          A      2
          B      2
Filling Internal Tables

          Inserting lines :

         To insert a new line before a line in an internal table, you use
         the INSERT statement as follows:

         Syntax

         INSERT [<wa> INTO] <itab> [INDEX <idx>].

         Eg: TYPES : BEGIN OF LINE,
                COL1 TYPE C,
                COL2 TYPE N,
                END OF LINE.
         DATA TAB1 LIKE LINE OCCURS 10.
         LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
         INSERT LINE INTO TAB1 INDEX 2.
Filling Internal Tables

          COPYING INTERNAL TABLES :
          To copy the entire contents of one internal table into another,
          use the MOVE statement.
          Syntax:
          MOVE <itab1> to <itab2>

          Eg: TYPES : BEGIN OF LINE,
                 COL1 TYPE C,
                 COL2 TYPE N,
                 END OF LINE.

          DATA TAB1 LIKE LINE OCCURS 10.
          DATA TAB2 LIKE LINE OCCURS 10.
          LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
          APPEND LINE TO TAB1.
          MOVE TAB1[ ] TO TAB2.
Filling Internal Tables

         Filling Internal Table from Database Table:

                 Example
                 TABLES SPFLI.

                 DATA ITAB LIKE SPFLI OCCURS 10 WITH HEADER
         LINE.

                 SELECT * FROM SPFLI INTO TABLE ITAB
                           WHERE CARRID = 'LH'.

                  LOOP AT ITAB.
                   WRITE: / ITAB-CONNID, ITAB-CARRID.
                  ENDLOOP.
         In this example, all lines from the database table SPFLI in which
         CARRID field contains "LH" are read into the internal table ITAB,
         where they can be processed further.
Filling Internal Tables


         To read data component by component into the internal table.

                 TABLES SPFLI.
                 DATA: BEGIN OF ITAB OCCURS 0,
                    NUMBER TYPE I VALUE 1,
                     CITYFROM LIKE SPFLI-CITYFROM,
                     CITYTO LIKE SPFLI-CITYTO,
                   END OF ITAB.

                 SELECT * FROM SPFLI WHERE CARRID = 'LH'.
                  MOVE-CORRESPONDING SPFLI TO ITAB.
                  APPEND ITAB.
                 ENDSELECT.
         In this example, all lines from the database table SPFLI in which
         CARRID field contains "LH" are read into the internal table ITAB
         one by one, where they can be processed further.
Reading Internal Tables




        To read the contents of internal tables for further processing,
        you can use either the LOOP or the READ statement.

        Reading Internal Tables Line by Line

        You use the the LOOP statement to read internal tables line by
        line.
Reading Internal Tables




               LOOP AT <itab> [INTO <wa>] [WHERE <condition>].
                .....
               ENDLOOP.

        Eg:    DO 3 TIMES.
               LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX *
               SY-INDEX.
               APPEND LINE TO TAB1.
               ENDDO.
               LOOP AT TAB1 WHERE COL1 > 2.
               WRITE : / TAB1-COL1.
               ENDLOOP.
Reading Internal Tables




        You can select a single line by the READ statement:

        Syntax:

        READ TABLE <itab> [INTO <wa>] WITH KEY<key> [BINARY
        SEARCH].
Reading Internal Tables




        Eg:
              TYPES : BEGIN OF LINE,
                 COL1 TYPE C,
                 COL2 TYPE N,
                 END OF LINE.
              DATA TAB1 LIKE LINE OCCURS 10.
              DO 3 TIMES.
              LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2.
              APPEND LINE TO TAB1.
              ENDDO.
              READ TABLE TAB1 INTO LINE WITH KEY COL2 = 4.
Reading Internal Tables




         The COMPARING addition, the specified table fields <f i > of
         the structured line type are compared with the corresponding
         fields of the work area before being transported. If the
         contents of the compared fields are the same, SY-SUBRC is
         set to 0. If the contents of the compared fields are not the
         same, it returns the value 2.
         Syntax:
         READ TABLE <itab> [INTO <wa>] INDEX <idx> COMPARING
         <fields>.
Reading Internal Tables




        Eg:
              TYPES : BEGIN OF LINE,
                 COL1 TYPE C,
                 COL2 TYPE N,
                 END OF LINE.
              DATA TAB1 LIKE LINE OCCURS 10.
              DO 3 TIMES.
              LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2.
              APPEND LINE TO TAB1.
              ENDDO.
              READ TABLE TAB1 INTO LINE INDEX 2 COMPARING COL1
              COL2.
Modifying Internal tables




         You can modify single line using MODIFY statement:

         Syntax :
          MODIFY itab [FROM wa] [INDEX idx].
Modifying Internal tables




         Eg:
               TYPES : BEGIN OF LINE,
                  COL1 TYPE C,
                  COL2 TYPE N,
                  END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.
               DO 3 TIMES.
               LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2.
               APPEND LINE TO TAB1.
               ENDDO.
               LINE-COL1 = ‘A’.
               MODIFY TAB1 FROM LINE INDEX 2.
Modifying Internal tables




         Syntax :
         MODIFY itab [FROM wa] [TRANSPORTING f1 ... fn [WHERE
         cond]].
Modifying Internal tables




         Eg:
               TYPES : BEGIN OF LINE,
                  COL1 TYPE C,
                  COL2 TYPE N,
                  END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.
               DO 3 TIMES.
               LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2.
               APPEND LINE TO TAB1.
               ENDDO.
               LINE-COL1 = ‘A’.
               MODIFY TAB1 FROM LINE TRANSPORTING COL1
               WHERE COL2 = 4.
Deleting Internal tables




         To delete lines from an internal table in a loop:
         Syntax:
          DELETE <itab>.
         Note: The System can process this statement only within an
                       LOOP..ENDLOOP block.
Deleting Internal tables




         Eg:    DO 3 TIMES.
                LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX *
                SY-INDEX.
                APPEND LINE TO TAB1.
                ENDDO.
                LOOP AT TAB1.
                 IF TAB1-COL1 > 2.
                  DELETE TAB1.
                 ENDIF.
                ENDLOOP.
Deleting Internal tables




         TO delete the lines using Index.
         Syntax:
           DELETE <itab> INDEX <idx>.
Deleting Internal tables




         Eg:
               TYPES : BEGIN OF LINE,
                   COL1 TYPE C,
                   COL2 TYPE N,
                   END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.
               DO 3 TIMES.
               LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX * SY-INDEX.
               APPEND LINE TO TAB1.
               ENDDO.
               DELETE TAB1 INDEX 2.
Deleting Internal tables




         TO delete the Adjacent Duplicates from the Internal Table.
         Syntax:
          DELETE ADJACENT DUPLICATE ENTRIES FROM <itab> [
         COMPARING
                     <comp>]
Deleting Internal tables




         Eg:
               TYPES : BEGIN OF LINE,
                   COL1 TYPE C,
                   COL2 TYPE N,
                   END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
               APPEND LINE TO TAB1.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
               APPEND LINE TO TAB1.
               DELETE ADJACENT DUPLICATE ENTRIES FROM TAB1
                                                 COMPARING COL1.
Deleting Internal tables




         TO delete the Adjacent Duplicates from the Internal Table.
         Syntax:
          DELETE ADJACENT DUPLICATE ENTRIES FROM <itab> [
         COMPARING
                     <comp>]
Deleting Internal tables



         Eg:
                TYPES : BEGIN OF LINE,
                   COL1 TYPE C,
                   COL2 TYPE N,
                   END OF LINE.
                DATA TAB1 LIKE LINE OCCURS 10.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
               APPEND LINE TO TAB1.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
               APPEND LINE TO TAB1.
               DELETE ADJACENT DUPLICATE ENTRIES FROM TAB1
               COMPARING ALL FIELDS.
Deleting Internal tables




         TO delete a set of selected lines from the Internal Table.
         Syntax:
          DELETE <itab> [FROM <n1>] [TO <n2>] [WHERE
         <condition>].
Deleting Internal tables




         Eg:
               TYPES : BEGIN OF LINE,
                   COL1 TYPE C,
                   COL2 TYPE N,
                   END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
               APPEND LINE TO TAB1.
               LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
               APPEND LINE TO TAB1.
               DELETE TAB1 WHERE COL2 = 2.
Sorting Internal Table




         TO Sort an Internal Table .
         Syntax:
          SORT <itab> [<order>] [AS TEXT] [BY <f1> [<order>]
         [AS TEXT] . . <fn>[<order>] [AS TEXT] ]   .
Sorting Internal Table




         Eg:
         TYPES : BEGIN OF LINE,
                COL1 TYPE C,
                COL2 TYPE N,
                END OF LINE.
            DATA TAB1 LIKE LINE OCCURS 10.
            LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
            APPEND LINE TO TAB1.
            LINE-COL1 = ‘A’. LINE-COL2 = ‘1’.
            APPEND LINE TO TAB1.
            SORT TAB1 BY COL2 ASCENDING .
Loop Processing




       Calculating the totals within loop
endloop.
       Syntax: SUM
Loop Processing




       Eg.
             TYPES : BEGIN OF LINE,
                COL1 TYPE C,
                COL2 TYPE I,
                END OF LINE.
             DATA TAB1 LIKE LINE OCCURS 10.
             DO 3 TIMES.
             LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2.
             APPEND LINE TO TAB1.
             ENDDO.
             LOOP AT TAB1.
             SUM.
             ENDLOOP.
Using Control Levels




         This topic describes how to use control level statement
         blocks which process only specific values within
         loop
endloop.
         Syntax:
             AT <line>
              <statement block>
             ENDAT.
Using Control Levels




        The line condition <line>, at which the statement block within
        AT-ENDAT. <Line>                         Meaning
        FIRST                   First line of the internal table
        LAST                    Last line of the internal table
        NEW <f>                 Beginning of a group of line with same
        contents in the fields <f> & in the fields of <f>.
        END OF <f>              End of a group of line with same contents
        in the fields <f> & in the fields of <f>.
        Note: Before working with control breaks, You should sort the
        internal table in the same order as its columns are defined.
Using Control Levels

        Hierarchy of AT-ENDAT statement.
        If the internal table has the columns <col1>,<col2>,
 and if it is
        sorted by the columns as they are defined, the loop is to be
        programmed as follows:
        LOOP AT <itab>.
              AT FIRST. 
..ENDAT.
                     AT NEW <col1>
.ENDAT.
                            AT NEW <col2>

ENDAT.
                            

.
                            <single line processing>
                            

...
                            AT END OF <col2>
..ENDAT.
                     AT END OF <col1>

ENDAT.
              AT LAST

ENDAT.
        ENDLOOP.
Using Control Levels

        Example:
        TYPES : BEGIN OF LINE,
                COL1 TYPE C,
                COL2 TYPE I,
                END OF LINE.
               DATA TAB1 LIKE LINE OCCURS 10.

                LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
                APPEND LINE TO TAB1.
                LINE-COL1 = ‘B’. LINE-COL2 = ‘1’.
                APPEND LINE TO TAB1.
                LINE-COL1 = ‘A’. LINE-COL2 = ‘3’.
                APPEND LINE TO TAB1.
                LINE-COL1 = ‘C’. LINE-COL2 = ‘4’.
                APPEND LINE TO TAB1.
                SORT TAB1 BY COL1.
Using Control Levels

        Cont..
        LOOP AT TAB1.
              AT FIRST.
                     WRITE:/ ‘HEADING’.
              ENDAT.
              AT NEW COL1.
                     WRITE:/ TAB1-COL1.
              ENDAT.
              AT END OF COL1.
                     SUM.
                     WRITE:/ TAB1-COL1, TAB1-COL2.
              ENDAT.
              AT LAST.
                     SUM.
                     WRITE:/ TAB1-COL1, TAB1-COL2.
              ENDAT.
        ENDLOOP.
Initializing Internal Tables

          To initialize an internal table with or without header line.
          Syntax :
          REFRESH <itab>.
          This statement resets an internal table.
          CLEAR <itab>.
          If you are working with an internal table with a header line ,
          the clear statement clears only the table work area
          resetting to initial values.
          CLEAR <itab>[ ].
          The square bracket after the name of the internal table refer
          to the body of the internal table.This statement also resets
          an internal table.
          FREE <itab>.
          You can release the memory with the FREE statement once
          initialized.
Initializing Internal Tables

         Example:
         TYPES : BEGIN OF LINE,
                 COL1 TYPE C,
                 COL2 TYPE I,
                 END OF LINE.
                DATA TAB1 LIKE LINE OCCURS 10.

                 LINE-COL1 = ‘A’. LINE-COL2 = ‘2’.
                 APPEND LINE TO TAB1.
                 LINE-COL1 = ‘B’. LINE-COL2 = ‘1’.
                 APPEND LINE TO TAB1.
                 CLEAR TAB1.
                 REFRESH TAB1.
                 IF TAB1 IS INITIAL.
                 WRITE:/ ‘TAB1 IS EMPTY’.
                 FREE TAB1.
                 ENDIF.

Weitere Àhnliche Inhalte

Was ist angesagt?

ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infosapdocs. info
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionaryRevanth Nagaraju
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questionskssr99
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced Listsapdocs. info
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questionsPradipta Mohanty
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPNoman Mohamed Hanif
 
Abap data dictionary
Abap data dictionaryAbap data dictionary
Abap data dictionarySmartGokul4
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Tablesapdocs. info
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart formsJugul Crasta
 
Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6bluechxi
 
Sap abap database table
Sap abap database tableSap abap database table
Sap abap database tableDucat
 
Sap abap material
Sap abap materialSap abap material
Sap abap materialKranthi Kumar
 
Sap Adobe Form
Sap Adobe FormSap Adobe Form
Sap Adobe FormTechneon AIS
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screensapdocs. info
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniquesJugul Crasta
 
Abap reports
Abap reportsAbap reports
Abap reportsMilind Patil
 

Was ist angesagt? (20)

Reports
ReportsReports
Reports
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
ABAP Advanced List
ABAP Advanced ListABAP Advanced List
ABAP Advanced List
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAP
 
Abap data dictionary
Abap data dictionaryAbap data dictionary
Abap data dictionary
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6Sap query creation and transport procedure in ecc6
Sap query creation and transport procedure in ecc6
 
Sap abap database table
Sap abap database tableSap abap database table
Sap abap database table
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Sap Adobe Form
Sap Adobe FormSap Adobe Form
Sap Adobe Form
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screen
 
Sap abap
Sap abapSap abap
Sap abap
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniques
 
Abap reports
Abap reportsAbap reports
Abap reports
 

Andere mochten auch

Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1Kranthi Kumar
 
data modelling1
 data modelling1 data modelling1
data modelling1Kranthi Kumar
 
Chapter 05 adding structures1
Chapter 05 adding structures1Chapter 05 adding structures1
Chapter 05 adding structures1Kranthi Kumar
 
Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1Kranthi Kumar
 
Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1Kranthi Kumar
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1Kranthi Kumar
 
Ale Idoc
Ale IdocAle Idoc
Ale IdocAmit Khari
 
Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on lineMilind Patil
 
Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1Kranthi Kumar
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Kranthi Kumar
 
Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Kranthi Kumar
 
0106 debugging
0106 debugging0106 debugging
0106 debuggingvkyecc1
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionaryvkyecc1
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applicationsKranthi Kumar
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Kranthi Kumar
 
table maintenance generator1
 table maintenance generator1 table maintenance generator1
table maintenance generator1Kranthi Kumar
 
Abap function module help
Abap function module helpAbap function module help
Abap function module helpKranthi Kumar
 

Andere mochten auch (20)

Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1Chapter 01 overview of abap dictionary1
Chapter 01 overview of abap dictionary1
 
data modelling1
 data modelling1 data modelling1
data modelling1
 
Chapter 05 adding structures1
Chapter 05 adding structures1Chapter 05 adding structures1
Chapter 05 adding structures1
 
Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1Chapter 02 abap dictionary objects1
Chapter 02 abap dictionary objects1
 
Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1Chapter 04 abap dictionary tables in relational databases1
Chapter 04 abap dictionary tables in relational databases1
 
Chapter 06 abap repository information system1
Chapter 06 abap  repository information system1Chapter 06 abap  repository information system1
Chapter 06 abap repository information system1
 
cardinality1
cardinality1cardinality1
cardinality1
 
Ale Idoc
Ale IdocAle Idoc
Ale Idoc
 
Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on line
 
Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1Chapter 07 abap dictionary changes1
Chapter 07 abap dictionary changes1
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1
 
Chapter 10 online help & documentation1
Chapter 10 online help & documentation1Chapter 10 online help & documentation1
Chapter 10 online help & documentation1
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 
0104 abap dictionary
0104 abap dictionary0104 abap dictionary
0104 abap dictionary
 
Sujith ~ cross applications
Sujith ~ cross applicationsSujith ~ cross applications
Sujith ~ cross applications
 
Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1Chapter 03 foreign key relationships1
Chapter 03 foreign key relationships1
 
Bapi jco[1]
Bapi jco[1]Bapi jco[1]
Bapi jco[1]
 
VIEWS
VIEWSVIEWS
VIEWS
 
table maintenance generator1
 table maintenance generator1 table maintenance generator1
table maintenance generator1
 
Abap function module help
Abap function module helpAbap function module help
Abap function module help
 

Ähnlich wie 05 internal tables

Sap internal
Sap   internalSap   internal
Sap internalkyashpal
 
Best SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | AspireBest SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | AspireAspire Techsoft Academy
 
Lecture06 abap on line
Lecture06 abap on lineLecture06 abap on line
Lecture06 abap on lineMilind Patil
 
Internal tables
Internal tablesInternal tables
Internal tableswaseem27
 
97102 abap internal_tables
97102 abap internal_tables97102 abap internal_tables
97102 abap internal_tablesAnasshare
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAPsapdocs. info
 
Spreadsheets[1]
Spreadsheets[1]Spreadsheets[1]
Spreadsheets[1]BBAMUMU2014
 
Lesson 1 introduction to oracle programming
Lesson 1   introduction to oracle programmingLesson 1   introduction to oracle programming
Lesson 1 introduction to oracle programmingACLC Antipolo
 
258lec11
258lec11258lec11
258lec11wingsrai
 
Spreadsheet for Year 8
Spreadsheet for Year 8Spreadsheet for Year 8
Spreadsheet for Year 8qistinahJR
 
ALTER TABLE Improvements in MariaDB Server
ALTER TABLE Improvements in MariaDB ServerALTER TABLE Improvements in MariaDB Server
ALTER TABLE Improvements in MariaDB ServerMariaDB plc
 
Bca data structures linked list mrs.sowmya jyothi
Bca data structures linked list mrs.sowmya jyothiBca data structures linked list mrs.sowmya jyothi
Bca data structures linked list mrs.sowmya jyothiSowmya Jyothi
 
Basic programming
Basic programmingBasic programming
Basic programmingJugul Crasta
 
Intro to Excel Basics: Part II
Intro to Excel Basics: Part IIIntro to Excel Basics: Part II
Intro to Excel Basics: Part IISi Krishan
 
Data structure lecture 5
Data structure lecture 5Data structure lecture 5
Data structure lecture 5Kumar
 

Ähnlich wie 05 internal tables (20)

Sap internal
Sap   internalSap   internal
Sap internal
 
Aspire it sap abap training
Aspire it   sap abap trainingAspire it   sap abap training
Aspire it sap abap training
 
Best SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | AspireBest SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | Aspire
 
Lecture06 abap on line
Lecture06 abap on lineLecture06 abap on line
Lecture06 abap on line
 
Internal tables
Internal tablesInternal tables
Internal tables
 
Abap internal tables
Abap internal tablesAbap internal tables
Abap internal tables
 
97102 abap internal_tables
97102 abap internal_tables97102 abap internal_tables
97102 abap internal_tables
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAP
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Spreadsheets[1]
Spreadsheets[1]Spreadsheets[1]
Spreadsheets[1]
 
DBMS Chapter-3.ppsx
DBMS Chapter-3.ppsxDBMS Chapter-3.ppsx
DBMS Chapter-3.ppsx
 
Lesson 1 introduction to oracle programming
Lesson 1   introduction to oracle programmingLesson 1   introduction to oracle programming
Lesson 1 introduction to oracle programming
 
258lec11
258lec11258lec11
258lec11
 
Spreadsheet for Year 8
Spreadsheet for Year 8Spreadsheet for Year 8
Spreadsheet for Year 8
 
ALTER TABLE Improvements in MariaDB Server
ALTER TABLE Improvements in MariaDB ServerALTER TABLE Improvements in MariaDB Server
ALTER TABLE Improvements in MariaDB Server
 
Bca data structures linked list mrs.sowmya jyothi
Bca data structures linked list mrs.sowmya jyothiBca data structures linked list mrs.sowmya jyothi
Bca data structures linked list mrs.sowmya jyothi
 
Basic programming
Basic programmingBasic programming
Basic programming
 
Intro to Excel Basics: Part II
Intro to Excel Basics: Part IIIntro to Excel Basics: Part II
Intro to Excel Basics: Part II
 
ADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASADADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASAD
 
Data structure lecture 5
Data structure lecture 5Data structure lecture 5
Data structure lecture 5
 

KĂŒrzlich hochgeladen

Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Riya Pathan
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsApsara Of India
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaRiya Pathan
 
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Riya Pathan
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...anamikaraghav4
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...anamikaraghav4
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Riya Pathan
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Riya Pathan
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerRiya Pathan
 
👙 Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Serviceanamikaraghav4
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...aamir
 
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...noor ahmed
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...noor ahmed
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolRiya Pathan
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEApsara Of India
 
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Riya Pathan
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

KĂŒrzlich hochgeladen (20)

Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Airport Kolkata 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
 
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service GulbargaVIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
VIP Call Girls in Gulbarga Aarohi 8250192130 Independent Escort Service Gulbarga
 
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 âŁïžđŸ’Ż Available With Room 24×7
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
 
👙 Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar đŸ’«đŸ’«7001035870 Model escorts Service
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
 
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
 

05 internal tables

  • 2. Internal Tables Objective: The following section explains : ‱ Defining Internal Tables ‱ Processing Internal Tables ‱ Accessing Internal Tables ‱ Initializing Internal Tables
  • 3. Internal Tables Internal tables are structured data types provided by ABAP/4. Internal tables cannot be accessed outside the program environment. Purpose of internal tables ‱ Internal tables are used to reorganize the contents of database tables according to the needs of your program ‱ Internal tables are used to perform calculations on subsets of database tables. ‱ The number of lines in an internal table is not fixed. ‱ Internal tables exist only during the run time of a program.
  • 4. Accessing Internal Tables ‱You access internal tables line by line. You must use a work area as an interface for transferring data to and from the table. ‱When you read data from an internal table, the contents of the addressed table line overwrite the contents of the work area.. ‱ When you write data to an internal table, you must first enter the data in the work area from which the system can transfer the data to the internal table.
  • 5. Types of internal tables There are two kinds of internal tables in ABAP/4: ·Internal tables with header line If you create an internal table with header line, the system automatically creates a work area with the same data type as the lines of the internal table. Note : Work area has the same name as the internal table. ·Internal tables without header line Internal tables without a header line do not have a table work area which can be used implicitly you must specify a work area explicitly.
  • 6. Creating Internal Tables There are two ways by which you can create internal tables First create an internal table data type using the 'TYPES' statement and then create a data object referring that data type. Syntax : TYPES <t> <type> OCCURS <n> Eg: TYPES : BEGIN OF LINE, COLUMN1 TYPE I, COLUMN2 TYPE I, COLUMN3 TYPE I, END OF LINE. TYPES ITAB TYPE LINE OCCURS 10.
  • 7. Creating Internal Tables Create an internal table data object by referring to a structure. Syntax: DATA <f> <type> [WITH HEADER LINE] Eg: TYPES : BEGIN OF LINE, COLUMN1 TYPE I, COLUMN2 TYPE I, COLUMN3 TYPE I, END OF LINE. TYPES ITAB TYPE LINE OCCURS 10. DATA ITAB1 TYPE ITAB. DATA ITAB2 LIKE ITAB1 WITH HEADER LINE.
  • 8. Creating Internal Tables Creating Internal Tables with header line In this method an internal table is created with reference to existing structure ( another internal table or Dictionary object). Eg: DATA ITAB LIKE SFLIGHT OCCURS 10 WITH HEADER LINE.
  • 9. Creating Internal Tables Create an internal table data object directly with the 'DATA' statement. Eg: DATA : BEGIN OF ITAB OCCURS 0, COLUMN1 TYPE I, COLUMN2 TYPE I, COLUMN3 TYPE I, END OF ITAB. Note : In this method a header line with same name as the internal table is created automatically.
  • 10. Filling Internal Tables Appending Lines: To append a line to an internal table, use the APPEND statement as follows: Syntax APPEND [<wa> TO] <itab>. Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1.
  • 11. Filling Internal Tables Appending Lines depending on the Standard Key (COLLECT STATEMENT) To fill an internal table with lines which have unique standard keys. Syntax COLLECT [<wa> INTO] <itab> If an entry with the same key already exists(all non-numeric fields) the collect statement does not append a new line but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry
  • 12. Filling Internal Tables Eg: TYPES : BEGIN OF ITAB1 OCCURS 0, COL1 TYPE C, COL2 TYPE I, END OF ITAB1. ITAB1-COL1 = ‘A’. ITAB1-COL2 = ‘1’. COLLECT TAB1. ITAB1-COL1 = ‘B’. ITAB1-COL2 = ‘2’. COLLECT TAB1. ITAB1-COL1 = ‘A’. ITAB1-COL2 = ‘1’. COLLECT TAB1. This Produces the output as follows: A 2 B 2
  • 13. Filling Internal Tables Inserting lines : To insert a new line before a line in an internal table, you use the INSERT statement as follows: Syntax INSERT [<wa> INTO] <itab> [INDEX <idx>]. Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. INSERT LINE INTO TAB1 INDEX 2.
  • 14. Filling Internal Tables COPYING INTERNAL TABLES : To copy the entire contents of one internal table into another, use the MOVE statement. Syntax: MOVE <itab1> to <itab2> Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DATA TAB2 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. MOVE TAB1[ ] TO TAB2.
  • 15. Filling Internal Tables Filling Internal Table from Database Table: Example TABLES SPFLI. DATA ITAB LIKE SPFLI OCCURS 10 WITH HEADER LINE. SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = 'LH'. LOOP AT ITAB. WRITE: / ITAB-CONNID, ITAB-CARRID. ENDLOOP. In this example, all lines from the database table SPFLI in which CARRID field contains "LH" are read into the internal table ITAB, where they can be processed further.
  • 16. Filling Internal Tables To read data component by component into the internal table. TABLES SPFLI. DATA: BEGIN OF ITAB OCCURS 0, NUMBER TYPE I VALUE 1, CITYFROM LIKE SPFLI-CITYFROM, CITYTO LIKE SPFLI-CITYTO, END OF ITAB. SELECT * FROM SPFLI WHERE CARRID = 'LH'. MOVE-CORRESPONDING SPFLI TO ITAB. APPEND ITAB. ENDSELECT. In this example, all lines from the database table SPFLI in which CARRID field contains "LH" are read into the internal table ITAB one by one, where they can be processed further.
  • 17. Reading Internal Tables To read the contents of internal tables for further processing, you can use either the LOOP or the READ statement. Reading Internal Tables Line by Line You use the the LOOP statement to read internal tables line by line.
  • 18. Reading Internal Tables LOOP AT <itab> [INTO <wa>] [WHERE <condition>]. ..... ENDLOOP. Eg: DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX * SY-INDEX. APPEND LINE TO TAB1. ENDDO. LOOP AT TAB1 WHERE COL1 > 2. WRITE : / TAB1-COL1. ENDLOOP.
  • 19. Reading Internal Tables You can select a single line by the READ statement: Syntax: READ TABLE <itab> [INTO <wa>] WITH KEY<key> [BINARY SEARCH].
  • 20. Reading Internal Tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. APPEND LINE TO TAB1. ENDDO. READ TABLE TAB1 INTO LINE WITH KEY COL2 = 4.
  • 21. Reading Internal Tables The COMPARING addition, the specified table fields <f i > of the structured line type are compared with the corresponding fields of the work area before being transported. If the contents of the compared fields are the same, SY-SUBRC is set to 0. If the contents of the compared fields are not the same, it returns the value 2. Syntax: READ TABLE <itab> [INTO <wa>] INDEX <idx> COMPARING <fields>.
  • 22. Reading Internal Tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. APPEND LINE TO TAB1. ENDDO. READ TABLE TAB1 INTO LINE INDEX 2 COMPARING COL1 COL2.
  • 23. Modifying Internal tables You can modify single line using MODIFY statement: Syntax : MODIFY itab [FROM wa] [INDEX idx].
  • 24. Modifying Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. APPEND LINE TO TAB1. ENDDO. LINE-COL1 = ‘A’. MODIFY TAB1 FROM LINE INDEX 2.
  • 25. Modifying Internal tables Syntax : MODIFY itab [FROM wa] [TRANSPORTING f1 ... fn [WHERE cond]].
  • 26. Modifying Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. APPEND LINE TO TAB1. ENDDO. LINE-COL1 = ‘A’. MODIFY TAB1 FROM LINE TRANSPORTING COL1 WHERE COL2 = 4.
  • 27. Deleting Internal tables To delete lines from an internal table in a loop: Syntax: DELETE <itab>. Note: The System can process this statement only within an LOOP..ENDLOOP block.
  • 28. Deleting Internal tables Eg: DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX * SY-INDEX. APPEND LINE TO TAB1. ENDDO. LOOP AT TAB1. IF TAB1-COL1 > 2. DELETE TAB1. ENDIF. ENDLOOP.
  • 29. Deleting Internal tables TO delete the lines using Index. Syntax: DELETE <itab> INDEX <idx>.
  • 30. Deleting Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX * SY-INDEX. APPEND LINE TO TAB1. ENDDO. DELETE TAB1 INDEX 2.
  • 31. Deleting Internal tables TO delete the Adjacent Duplicates from the Internal Table. Syntax: DELETE ADJACENT DUPLICATE ENTRIES FROM <itab> [ COMPARING <comp>]
  • 32. Deleting Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. DELETE ADJACENT DUPLICATE ENTRIES FROM TAB1 COMPARING COL1.
  • 33. Deleting Internal tables TO delete the Adjacent Duplicates from the Internal Table. Syntax: DELETE ADJACENT DUPLICATE ENTRIES FROM <itab> [ COMPARING <comp>]
  • 34. Deleting Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. DELETE ADJACENT DUPLICATE ENTRIES FROM TAB1 COMPARING ALL FIELDS.
  • 35. Deleting Internal tables TO delete a set of selected lines from the Internal Table. Syntax: DELETE <itab> [FROM <n1>] [TO <n2>] [WHERE <condition>].
  • 36. Deleting Internal tables Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. DELETE TAB1 WHERE COL2 = 2.
  • 37. Sorting Internal Table TO Sort an Internal Table . Syntax: SORT <itab> [<order>] [AS TEXT] [BY <f1> [<order>] [AS TEXT] . . <fn>[<order>] [AS TEXT] ] .
  • 38. Sorting Internal Table Eg: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE N, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. LINE-COL1 = ‘A’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. SORT TAB1 BY COL2 ASCENDING .
  • 39. Loop Processing Calculating the totals within loop
endloop. Syntax: SUM
  • 40. Loop Processing Eg. TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE I, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. DO 3 TIMES. LINE-COL1 = SY-INDEX. LINE-COL2 = SY-INDEX ** 2. APPEND LINE TO TAB1. ENDDO. LOOP AT TAB1. SUM. ENDLOOP.
  • 41. Using Control Levels This topic describes how to use control level statement blocks which process only specific values within loop
endloop. Syntax: AT <line> <statement block> ENDAT.
  • 42. Using Control Levels The line condition <line>, at which the statement block within AT-ENDAT. <Line> Meaning FIRST First line of the internal table LAST Last line of the internal table NEW <f> Beginning of a group of line with same contents in the fields <f> & in the fields of <f>. END OF <f> End of a group of line with same contents in the fields <f> & in the fields of <f>. Note: Before working with control breaks, You should sort the internal table in the same order as its columns are defined.
  • 43. Using Control Levels Hierarchy of AT-ENDAT statement. If the internal table has the columns <col1>,<col2>,
 and if it is sorted by the columns as they are defined, the loop is to be programmed as follows: LOOP AT <itab>. AT FIRST. 
..ENDAT. AT NEW <col1>
.ENDAT. AT NEW <col2>

ENDAT. 

. <single line processing> 

... AT END OF <col2>
..ENDAT. AT END OF <col1>

ENDAT. AT LAST

ENDAT. ENDLOOP.
  • 44. Using Control Levels Example: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE I, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. LINE-COL1 = ‘B’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. LINE-COL1 = ‘A’. LINE-COL2 = ‘3’. APPEND LINE TO TAB1. LINE-COL1 = ‘C’. LINE-COL2 = ‘4’. APPEND LINE TO TAB1. SORT TAB1 BY COL1.
  • 45. Using Control Levels Cont.. LOOP AT TAB1. AT FIRST. WRITE:/ ‘HEADING’. ENDAT. AT NEW COL1. WRITE:/ TAB1-COL1. ENDAT. AT END OF COL1. SUM. WRITE:/ TAB1-COL1, TAB1-COL2. ENDAT. AT LAST. SUM. WRITE:/ TAB1-COL1, TAB1-COL2. ENDAT. ENDLOOP.
  • 46. Initializing Internal Tables To initialize an internal table with or without header line. Syntax : REFRESH <itab>. This statement resets an internal table. CLEAR <itab>. If you are working with an internal table with a header line , the clear statement clears only the table work area resetting to initial values. CLEAR <itab>[ ]. The square bracket after the name of the internal table refer to the body of the internal table.This statement also resets an internal table. FREE <itab>. You can release the memory with the FREE statement once initialized.
  • 47. Initializing Internal Tables Example: TYPES : BEGIN OF LINE, COL1 TYPE C, COL2 TYPE I, END OF LINE. DATA TAB1 LIKE LINE OCCURS 10. LINE-COL1 = ‘A’. LINE-COL2 = ‘2’. APPEND LINE TO TAB1. LINE-COL1 = ‘B’. LINE-COL2 = ‘1’. APPEND LINE TO TAB1. CLEAR TAB1. REFRESH TAB1. IF TAB1 IS INITIAL. WRITE:/ ‘TAB1 IS EMPTY’. FREE TAB1. ENDIF.