COLLECT YAPISI

A  B 1
A  B 2
A  B 8
A  C 3
A  C 2
BU TABLOYU COLLECT EDERSEK

BÖYLE OLUYO

A B 11
A C 5

COLLECT

  select * from yutwm0003 into table gt_yutwm0003.

  loop at gt_itab.
    move-corresponding gt_itab to gt_itab_collect.
    gt_itab_collect-count = 1.
    collect gt_itab_collect.
  endloop.



ON CHANGE OF

ON CHANGE OF (field Name)


AT NEW

A B 1
A B 1
A C 2
A C 2


  data :  lv_bwlvs like ltak-bwlvs,
          lv_bwart like ltak-bwart.

  select * from ltap into corresponding fields of table gt_itab
           where lgnum in s_lgnum
             and matnr in s_matnr
             and werks in s_werks
             and charg in s_charg
             and qdatu in s_qdatu
             and pquit eq p_pquit
             and vltyp in s_vltyp
             and vlpla in s_vlpla
             and nltyp in s_nltyp
             and nlpla in s_nlpla.

  loop at gt_itab.
    at new tanum.
      clear : lv_bwlvs,lv_bwart.
      select single bwlvs bwart from ltak into (lv_bwlvs,lv_bwart)
             where lgnum eq gt_itab-lgnum
               and tanum eq gt_itab-tanum.

    endat.



    gt_itab-bwlvs = lv_bwlvs.
    gt_itab-bwart = lv_bwart.
    modify gt_itab.

  endloop.



Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com