Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report ZTW_ZPTR_V2_REPORTLISTE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ztw_zptr_v2_reportliste LINE-SIZE 400.
TYPE-POOLS: icon.
*-- Datendeklaration
DATA: var(30).
FIELD-SYMBOLS: <rep>, <skip>.
*** MAKRO FÜR DRUCKKNOPF ***
DEFINE _buttona_.
*-- Druckknopf zum Start des Reports
selection-screen pushbutton 1(51) pb&1 user-command pb&1.
*-- Druckknopf für Doku
selection-screen pushbutton 54(4) in&1 user-command in&1.
*-- Variablendeklaration
data rp&1 type syrepid.
data im&1 type c.
END-OF-DEFINITION.
DEFINE _buttonb_.
*-- Druckknopf für Doku
selection-screen pushbutton 60(4) in&1 user-command in&1.
*-- Druckknopf zum Start des Reports
selection-screen pushbutton 64(50) pb&1 user-command pb&1.
*-- Variablendeklaration
data rp&1 type syrepid.
data im&1 type c.
END-OF-DEFINITION.
*** MAKRO ZUR TEXTZUWEISUNG ***
DEFINE _text_.
*-- Variablenzuweisung
concatenate &2 &3 into pb&1.
rp&1 = &4.
in&1 = '@0S@Info'.
im&1 = &5.
END-OF-DEFINITION.
*-- Reiter-Seite 1
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
* Beginn Block 1
* -----------------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE box1_1.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a1.
_buttonb_: a2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a3.
_buttonb_: a4.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a5.
_buttonb_: a6.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a7.
_buttonb_: a8.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a9.
_buttonb_: a10.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 1.
* -----------------------------------------------------------------------------
* Ende Block 1
* Beginn Block 2
* -----------------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE box1_2.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a11.
_buttonb_: a12.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a13.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK 2.
* -----------------------------------------------------------------------------
* Ende Block 2
* Beginn Block 3
* -----------------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE box1_3.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a14.
_buttonb_: a15.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a16.
_buttonb_: a17.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a18.
_buttonb_: a19.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a20.
_buttonb_: a21.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a22.
_buttonb_: a23.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: a24.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 3.
* -----------------------------------------------------------------------------
* Ende Block 3
SELECTION-SCREEN SKIP 1.
*SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(5) lv_icon1.
*SELECTION-SCREEN COMMENT 6(77) lv_text1.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(5) lv_icon2.
*SELECTION-SCREEN COMMENT 6(77) lv_text2.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(5) lv_icon3.
*SELECTION-SCREEN COMMENT 6(77) lv_text3.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK 4.
SELECTION-SCREEN END OF SCREEN 101.
***************************************************************************
*-- Reiter-Seite 2
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK 9 WITH FRAME TITLE box2_1.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
_buttona_: b1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 9.
SELECTION-SCREEN END OF SCREEN 102.
****************************************************************************
*-- Tab Block
SELECTION-SCREEN BEGIN OF TABBED BLOCK uno FOR 35 LINES.
SELECTION-SCREEN TAB (20) reiter1 USER-COMMAND ucomm1
DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (20) reiter2 USER-COMMAND ucomm2
DEFAULT SCREEN 102.
SELECTION-SCREEN END OF BLOCK uno.
****************************************************************************
INITIALIZATION.
reiter1 = 'Fehlersuchreports'.
reiter2 = 'Auswertungsreports'.
box1_1 = 'Diverse'.
box1_2 = 'Dienstreisen'.
box1_3 = 'Kurzarbeit'.
box2_1 = 'Allgemein'.
****************************************************************************
* lv_icon1 = icon_businav_objects.
* lv_icon2 = icon_businav_objects_outdate.
* lv_icon3 = icon_businav_objects_orphan.
*lv_icon4 = ICON_LED_YELLOW.
*lv_icon5 = ICON_LED_RED.
*
* lv_text1 = 'Auswertung mit geringem Einfluss auf die Abrechnung'.
* lv_text2 = 'Abrechnungskritische Auswertung zum Grundlohn'.
* lv_text3 = 'Abrechnungskritische Auswertung zur Restabrechnung'.
****************************************************************************
*-- Reiter-Seite 1
_text_ a1 icon_businav_objects_outdate
'Fehlender Pausenabzug'
'ZPTR_V2_XYZA' space.
_text_ a2 icon_businav_objects
'Stempelzeit ausreisser'
'ZPTR_V2_XYZB' space.
ALLE BUTTONS werden (Code gekürzt)
****************************************************************************
*-- Reiter-Seite 2
_text_ b1 icon_display
'gelöschte Mehrarbeitsanträge'
'ZPS_GELOESCHTE_MEHRARBEIT' space.
****************************************************************************
AT SELECTION-SCREEN.
*-- Drucktasten auswerten
CASE sy-ucomm(2).
*-- Report aufrufen
WHEN 'PB'.
*-- Reportnamen ermitteln
CONCATENATE 'RP' sy-ucomm+2(4) INTO var.
ASSIGN (var) TO <rep>.
*-- Soll der Report sofort ausgeführt werden?
CONCATENATE 'IM' sy-ucomm+2(4) INTO var.
ASSIGN (var) TO <skip>.
IF <skip> = space.
*-- Aufruf über Selektionsbild
* SUBMIT (<rep>) VIA SELECTION-SCREEN AND RETURN.
SUBMIT (<rep>) VIA SELECTION-SCREEN AND RETURN.
ELSE.
*-- Sofortige Ausführung
SUBMIT (<rep>) AND RETURN.
ENDIF.
WHEN 'IN'.
*-- Dokumentation zum Report aufrufen
CONCATENATE 'RP' sy-ucomm+2(4) INTO var.
ASSIGN (var) TO <rep>.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'DOCS'
object_name = <rep>
object_type = 'PROG'
EXCEPTIONS
invalid_object_type = 1
OTHERS = 2.
ENDCASE.
Code: Alles auswählen.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN BEGIN OF TABBED BLOCK uno FOR 35 LINES.
SELECTION-SCREEN TAB (20) reiter1 USER-COMMAND ucomm1
DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (20) reiter2 USER-COMMAND ucomm2
DEFAULT SCREEN 102.
SELECTION-SCREEN END OF BLOCK uno.
SELECTION-SCREEN END OF SCREEN 100.
Code: Alles auswählen.
SUBMIT ('ZTW_ZPTR_V2_REPORTLISTE') VIA SELECTION-SCREEN.
Code: Alles auswählen.
CALL SELECTION-SCREEN 100.
Mein GOTT!!!Unit605 hat geschrieben:Nur so als Tip/Hinweis:
Wenn Du mit Tabreiter/Subscreen arbeitest, wird das Ereignis "At Selection-Screen" zweimal ( oder auch mindestens zweimal) durchlaufen. Im Report für den Subscreen und den Standardscreen 1000.
Evtl. musst Du also auch die Dynpro-Nr. (SY-DYNNR) abfragen.