[ABAP] KPRO: Prüfen, ob Verbindung zum Content-Repository eingerichtet ist

CONSTANTS: c_none TYPE string VALUE '0 '.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE title.
* CR
  SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (17) lbl1 FOR FIELD p_crep.
    PARAMETERS: p_crep TYPE scms_crep MATCHCODE OBJECT h_crep_http.
  SELECTION-SCREEN END OF LINE.
* 'N'
  SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (17) lbl2 FOR FIELD p_rbs1.
    PARAMETERS: p_rbs1 RADIOBUTTON GROUP rbg DEFAULT 'X'.
  SELECTION-SCREEN END OF LINE.
* 'S'
  SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (17) lbl3 FOR FIELD p_rbs2.
    PARAMETERS: p_rbs2 RADIOBUTTON GROUP rbg.
  SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.

  title = 'Auswahl'.
  lbl1 = 'Content Repository:'.
  lbl2 = 'Security (N):'.
  lbl3 = 'Security (S):'.

START-OF-SELECTION.
* CREP_HTTP (KPRO CMS: Content-Repositories (HTTP))
  SELECT SINGLE
    FROM crep_http
    FIELDS crep_id,
           http_serv,
           http_port,
           http_sport,
           http_scrpt,
           version
    WHERE crep_id = @p_crep
    INTO @DATA(lv_crep).

  IF sy-subrc EQ 0.
    IF NOT lv_crep-http_port CO c_none OR lv_crep-http_sport CO c_none.

      DATA(lv_sec) = 'N'.

* Security-Typ unterscheiden
      CASE abap_true.
        WHEN p_rbs1.
          lv_sec = 'N'.
        WHEN p_rbs2.
          lv_sec = 'S'.
      ENDCASE.

* CMS: HTTP Verbindungstest
      CALL FUNCTION 'SCMS_HTTP_PING'
        EXPORTING
          crep_id    = lv_crep-crep_id
          http_serv  = lv_crep-http_serv
          http_port  = lv_crep-http_port
          http_sport = lv_crep-http_sport
          http_scrpt = lv_crep-http_scrpt
          version    = lv_crep-version
          security   = lv_sec
        EXCEPTIONS
          error_http = 1
          OTHERS     = 2.

      IF sy-subrc = 0.
        WRITE: / |{ lv_crep-crep_id } ok.|.
      else.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO DATA(lv_msg).
        WRITE: / lv_msg.
      ENDIF.
    ELSE.
      WRITE: / 'No port.'.
    ENDIF.
  ELSE.
    WRITE: / 'No CS.'.
  ENDIF.

[SAP] Archiv / Barcodes

Transaktionen

OANR (Nummernkreispflege: ARCHIVELNK)
OAM1 (ArchiveLink: Monitoring)
OABO (Anzeige offener Barcodes)
OAQI (SAP ArchiveLink: Queues anlegen)
OAC0 (CMS Customizing Content Repositories)

  • Zeile markieren
  • Button „Detail“

OAC2 (SAP ArchiveLink Dokumentarten global)

  • Dokumentart (AR_OBJECT)
  • Langbezeichung (OBJECTTEXT)
  • Dokumenttyp (DOC_TYPE)

OAC3 (SAP ArchiveLink Verknüpfungen)

  • Objekttyp (SAP_OBJECT)
  • Dokumentart (AR_OBJECT)
  • Contend Repository ID (ARCHIV_ID)
  • Verknüpfung (CONNECTION, TOA0x)

OAC5 (SAP ArchiveLink Barcodeerfassung)

QAER (Anzeige Archivobjekte)
OAAD (ArchiveLink Administration Dokumente)

SBDS1 (Anzeige offener Barcodes)
SBDS2 (Offene interne Barcodes)
SBDS3 (Offene externe Barcodes)
SBDS7 (Abgleich offener Barcodes)

Tabellen

CREP (KPRO CMS: Content-Repositories)
CREPDESCR (KPRO CMS: Beschreibungen der Content-Repositories)
CREP_HTTP (KPRO CMS: Content-Repositories (HTTP))
CREP_R3DB (KPRO CMS: Content-Repositories (R3DB))
SDOKSTCA (SDOK: Speicherkategorien physischer Informationsobjekte)
TOAOM (SAP ArchiveLink: Metatabelle für Verknüpfungen)
TOADV (SAP ArchiveLink: Globale Dokumentarten SAP ArchiveLink)
TOASP (SAP ArchiveLink language tab for archivobjects)
TOACM (Barcode-Erfassung von eingehenden Dokumenten)
TOABA (Barcodetypen-Tabelle SAP ArchiveLink)
TOASB (Sprachtabelle für TOABA)

Links

[ABAP] Content-Repositorys auslesen

Variante 1 (CREP)

SELECT c~crep_id,
       c~crep_type,
       c~crep_stype,
       c~crea_user,
       c~crea_time,
       c~chng_user,
       c~chng_time,
       t~descript,
       h~archivpath,
       r~r3db_tab
INTO TABLE @DATA(it_crep)
FROM crep AS c                                              " CREP: KPRO CMS: Content-Repositories"
INNER JOIN crepdescr AS t ON ( c~crep_id = t~crep_id )      " CREPDESCR: KPRO CMS: Beschreibungen der Content-Repositories"
LEFT OUTER JOIN crep_http AS h ON ( c~crep_id = h~crep_id ) " CREP_HTTP: KPRO CMS: Content-Repositories (HTTP)"
LEFT OUTER JOIN crep_r3db AS r ON ( c~crep_id = r~crep_id ) " CREP_R3DB: KPRO CMS: Content-Repositories (R3DB)"
WHERE t~langu = @sy-langu.

cl_demo_output=>display( it_crep ).

Variante 2 (SCMS_SDOKSTRE_LIST)

DATA: it_sdokstre TYPE STANDARD TABLE OF sdokstre WITH DEFAULT KEY.

CALL FUNCTION 'SCMS_SDOKSTRE_LIST'
  TABLES
    i_sdokstre = it_sdokstre
  EXCEPTIONS
    not_found  = 1
    OTHERS     = 2.

cl_demo_output=>display( it_sdokstre ).