METHOD_PREPARE

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > ABAP Tutorial > ABAP Workbench Tools > Enhancement > Business Add-Ins (BADI) > Business Add-Ins (BADI) Examples > ZBADI_HU_AUTOPACK >

METHOD_PREPARE

method IF_EX_BADI_HU_AUTOPACK~METHOD_PREPARE .
data: ch_hu         type c,
       tbl_PACKGOODs type packgood.
loop at ct_packgoods into tbl_packgoods.
  clear ch_hu.
  select single AFR into ch_HU
          from qmat
          where matnr  = tbl_PACKGOODs-MATNR
            and werks  = tbl_PACKGOODs-WERKS
            and AKTIV ne space.
 
  if ch_HU is initial.
    delete ct_packgoods index sy-tabix.
  endif.
endloop.
 
endmethod.