Initializing work areas and Internal Tables using ABAP 7.4


How to initialize internal table and work area with ABAP 7.4 ? Example initializing internal table ABAP 7.4

A+ A-

In SAP ABAP Internal Tables are core and very important concepts in ABAP programming, In this lesson you will be learning some of the Internal table concepts with ABAP 7.4 .

With ABAP 7.4, SAP introduced new concept to initialize work areas and internal tables using keyword VALUE, with this ABAP Developers initialize work areas and internal tables in a simple and easy way

Initializing work areas with ABAP 7.4

TYPES: BEGIN OF TY_MARA,
       MATNR TYPE MARA-MATNR,
       MTART TYPE MARA-MTART,
      END OF TY_MARA.

DATA: WA_MARA TYPE TY_MARA.
    wa_mara = VALUE #( MATNR = 0001 MTART = 'FERT'  ).

Initializing internal table with ABAP 7.4

TYPES: BEGIN OF TY_MARA,
       MATNR TYPE MARA-MATNR,
       MTART TYPE MARA-MTART,
      END OF TY_MARA.

DATA: IT_MARA TYPE TABLE OF TY_MARA.

    it_mara = VALUE #( ( MATNR = 0001 MTART = 'FERT' )
                    ( MATNR = 0001 MTART = 'HALB' )
                    ( MATNR = 0003 MTART = 'HAWA' )
                    ( MATNR = 0004 MTART = 'FERT' )
                    ( MATNR = 0005 MTART = 'FERT' )
                    ( MATNR = 0006 MTART = 'HALB' )
                    ( MATNR = 0007 MTART = 'HAWA' ) ).


Learner Questions

No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question


    Was this lesson helpful to you? Yes No 2 People out of 2 think this lesson helpful

    Lesson Navigation

    ABAP 7.4 Select Statements OPEN SQL← Previous Lesson
    Next Chapter →