[ABAP] Infos zu Batchmappen holen

* Transaktion: SM35
* Tabelle APQI (Queue INFO DEFINITION)
* Tabelle APQD (Queue DATA DEFINITION)
* Tabelle APQL (Batch Input Protokoll Verzeichnis)

* Group Name
DATA(lv_groupid) = VALUE apqi-groupid( ).
* Programm
DATA(lv_progid) = VALUE apqi-progid( ).
* Userid
DATA(lv_userid) = VALUE apqi-userid( ).
* Ersteller
DATA(lv_creator) = VALUE apqi-creator( ).
* Erstellung
DATA(lv_credate) = VALUE apqi-credate( ).

SELECT-OPTIONS: so_grpid FOR lv_groupid.
SELECT-OPTIONS: so_prgid FOR lv_progid.
SELECT-OPTIONS: so_user FOR lv_userid.
SELECT-OPTIONS: so_creat FOR lv_creator.
SELECT-OPTIONS: so_cdate FOR lv_credate.

START-OF-SELECTION.
  SELECT
        a~groupid,
        a~progid,
        a~qid,
        a~qstate,  " ' ' - neu, C - in Erstellung, E - fehlerhaft, R - in Bearbeitung, F = verarbeitet, S - im Hintergrund
        a~qerase,
        a~userid,
        a~creator,
        a~credate,
        a~cretime,
        a~startmode,
        d~trans,
        d~block,
        d~segmt,
        d~msgcount,
        d~varlen,
        d~vardata,
        l~temseid,
        l~credate AS cdate,
        l~cretime AS ctime,
        l~creator AS cuser,
        l~destsys,
        l~status
    INTO TABLE @DATA(it_bdc)
    FROM apqi AS a
    INNER JOIN apqd AS d ON a~qid = d~qid
    RIGHT OUTER JOIN apql AS l ON a~qid = l~qid AND a~groupid = l~groupid
    WHERE a~groupid IN @so_grpid
      AND a~progid IN @so_prgid
      AND a~userid IN @so_user
      AND a~creator IN @so_creat
      AND a~credate IN @so_cdate.

* Hier Objekte für die Ausgabe hinzufügen
  cl_demo_output=>write_data( it_bdc ).

* HTML-Code vom Demo-Output holen
  DATA(lv_html) = cl_demo_output=>get( ).

* Daten im Inline-Browser im SAP-Fenster anzeigen
  cl_abap_browser=>show_html( EXPORTING
                                title        = 'Daten'
                                html_string  = lv_html
                                container    = cl_gui_container=>default_screen ).

* cl_gui_container=>default_screen erzwingen
  WRITE: space.

Kommentare sind geschlossen.