[ABAP] Anlagen zu Business-Objekten zählen

PARAMETERS: p_instid TYPE sibfboriid DEFAULT '000000001234567890'.
PARAMETERS: p_typeid TYPE sibftypeid DEFAULT 'BUS1001006'.
PARAMETERS: p_catid TYPE sibfcatid DEFAULT 'BO'.

START-OF-SELECTION.

* Schlüssel des Business-Objekts
  DATA(lv_object) = VALUE sibflporb( instid  = p_instid
                                     typeid  = p_typeid
                                     catid   = p_catid ).

* Statistiken für Anlagen -> Anlagen zählen
  DATA(it_stst) = cl_gos_attachment_query=>count_for_object( is_object = lv_object
                                                             ip_arl    = '' ).

* Übersicht zu angehangenen Objekten, COUNTER enthält die Anzahl
  cl_demo_output=>write_data( it_stst ).
  cl_demo_output=>display( ).