GitHub Guide Site

V_VTTK_SHT.md

Shipment type auth

SELECT DISTINCT shtyp FROM tvtk INTO TABLE @DATA(lt_shtyp).
  LOOP AT lt_shtyp ASSIGNING FIELD-SYMBOL(<fs_shtyp>).
    AUTHORITY-CHECK OBJECT 'V_VTTK_SHT'
    ID 'ACTVT' FIELD '02'
    ID 'SHTYP' FIELD <fs_shtyp>-shtyp.
    
    IF SY-subrc NE 0.
      DELETE lt_shtyp.
      CONTINUE.
    ENDIF.
  ENDLOOP.