Abap İnternal Tabloya Veri Ekleme

&———————————————————————
& Report ZMK_TEST_INTERNAL_VERIEKLE_ORN
*&———————————————————————

&
*&———————————————————————

REPORT ZMK_TEST_INTERNAL_VERIEKLE_ORN.

TYPES: BEGIN OF ty_personel,
id(5) TYPE n,
Ad(20) TYPE c,
END OF ty_personel.

DATA: gs_personel TYPE ty_personel.

DATA: itab type TABLE OF ty_personel,
itab2 type TABLE OF ty_personel,
itab3 type TABLE OF ty_personel,
itab4 type TABLE OF ty_personel.

gs_personel-ID = 1.
gs_personel-AD = ‘Ahmet’.
INSERT gs_personel INTO TABLE itab.

gs_personel-ID = 2.

gs_personel-AD = ‘Hasan’.
INSERT gs_personel INTO TABLE itab.

gs_personel-ID = 3.

gs_personel-AD = ‘Mehmet’.
INSERT gs_personel INTO TABLE itab.

gs_personel-ID = 4.
gs_personel-AD = ‘Ali’.
INSERT gs_personel INTO TABLE itab.

WRITE: ‘itabdaki tüm satırları itab2ye ekle’ COLOR 4.

INSERT LINES OF itab INTO TABLE itab2.

WRITE: / ‘itab2”dekiler’ COLOR 1.
WRITE: / ‘id’ COLOR 5,7 ‘ad’ color 5.

LOOP at itab2 INTO gs_personel.
WRITE: / gs_personel-ID, gs_personel-AD.
ENDLOOP.

ULINE.

WRITE: / 'itabdaki 2. ve 3. satırları itab3''e ekle ' COLOR 4.

INSERT LINES OF itab FROM 2 to 3 INTO TABLE itab3.
WRITE:/ 'İtab3''dekiler' color 1.

WRITE: / 'id' COLOR 5,7 'Ad' color 5.
LOOP AT itab3 INTO gs_personel.
  WRITE:/ gs_personel-ID, gs_personel-AD.
  ENDLOOP.

  ULINE.


  gs_personel-ID = 1.
  gs_personel-AD = 'Fatih'.
  INSERT gs_personel INTO TABLE itab4.

   gs_personel-ID = 4.
  gs_personel-AD = 'Ozan'.
  INSERT gs_personel INTO TABLE itab4.

  WRITE:/ 'itab4''dekiler' COLOR 1.
  WRITE:/ 'ID' COLOR 5,7 'Ad' COLOR 5.

  LOOP at itab4 INTO gs_personel.
    WRITE: / gs_personel-ID, gs_personel-AD.
    ENDLOOP.

    ULINE.

    WRITE: / 'itab''deki 2. ve 3. satırları itab4''ün 2. satırından itibaren ekle.' color 4.

    INSERT LINES OF itab FROM 2 to 3 INTO itab4 INDEX 2.

    WRITE:/ 'itab''dekiler' COLOR 1.
    WRITE:/ 'ID' COLOR 5,7 'Ad' COLOR 5.

    LOOP at itab4 INTO gs_personel.
      WRITE: / gs_personel-ID, gs_personel-AD.
      ENDLOOP.

      ULINE.

Mehdi Kapsal

Bilgisayar Mühendisi

Sence de böyle mi?

%d blogcu bunu beğendi: