Code: Alles auswählen.
**&---------------------------------------------------------------------*
**& Report Z_ZZ1_KONTROLLE
**&
**&---------------------------------------------------------------------*
**& Es fehlt noch: 1. eine Zählung, 2. eine Ausgabe wenn verglichen wird, 3. und eine Ausgebe was gelöscht wurde
**&
**&---------------------------------------------------------------------*
*
REPORT z_zz1_kontrolle.
**&---------------------------------------------------------------------*
* Sämtliche relevanten Felder aus der Tabelle DRAW lesen
**&---------------------------------------------------------------------*
TYPES: BEGIN OF t_draw,
dokar LIKE draw-dokar,
doknr LIKE draw-doknr,
dokvr LIKE draw-dokvr,
doktl LIKE draw-doktl,
dokst LIKE draw-dokst,
loedk LIKE draw-loedk,
filep LIKE draw-filep1, "BW 29.05.2012 +
END OF t_draw.
DATA: gt_draw TYPE SORTED TABLE OF t_draw
WITH UNIQUE KEY dokar doknr dokvr doktl dokst loedk ,
wa_draw LIKE LINE OF gt_draw.
**&---------------------------------------------------------------------*
* sämtliche Felder der Tabelle DMS_DOC2LOIO
**&---------------------------------------------------------------------*
TYPES: BEGIN OF t_doc2loio,
dokar LIKE dms_doc2loio-dokar,
doknr LIKE dms_doc2loio-doknr,
dokvr LIKE dms_doc2loio-dokvr,
doktl LIKE dms_doc2loio-doktl,
lo_index like dms_doc2loio-lo_index,
lo_type LIKE dms_doc2loio-lo_type,
lo_objid LIKE dms_doc2loio-lo_objid,
END OF t_doc2loio.
DATA: gt_doc2loio TYPE SORTED TABLE OF t_doc2loio
WITH UNIQUE KEY lo_objid,"dokar doknr dokvr doktl lo_type lo_objid ,
wa_doc2loio LIKE LINE OF gt_doc2loio.
**&---------------------------------------------------------------------*
* Parameters Abfrage zur Reduktion der Datenmenge
**&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK auswahl WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_dokar FOR wa_draw-dokar,
so_dokvr FOR wa_draw-dokvr,
so_dokst FOR wa_draw-dokst,
so_doktl FOR wa_draw-doktl,
so_loedk FOR wa_draw-loedk.
"so_filep for wa_draw-filep. "BW 29.05.2012 +
SELECTION-SCREEN END OF BLOCK auswahl.
**&---------------------------------------------------------------------*
* Selektion auf das was ausgeführt werden soll löschen, vergleichen oder kopieren
**&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK auswahl2 WITH FRAME TITLE text-002.
PARAMETERS: r1 RADIOBUTTON GROUP rad1 ,
r4 RADIOBUTTON GROUP rad1 DEFAULT 'X' .
SELECTION-SCREEN END OF BLOCK auswahl2.
**&---------------------------------------------------------------------*
* Selektieren auf die relevanten abfragen
**&---------------------------------------------------------------------*
PERFORM lesen_daten.
*&---------------------------------------------------------------------*
*& Form lesen_daten
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM lesen_daten .
SELECT dokar doknr dokvr doktl dokst loedk filep1 "um filep1 regänzt 29.05.2012+
FROM draw APPENDING TABLE gt_draw
WHERE dokar IN so_dokar
AND dokvr IN so_dokvr
AND dokst IN so_dokst
AND doktl IN so_doktl
AND loedk IN so_loedk.
IF r1 = 'X'.
LOOP AT gt_draw INTO wa_draw.
""""""""""""""""""""""""""""""""""""""""""""""""""""BW 30.05.12 ANFANG +
SELECT lo_index lo_type lo_objid "dokar doknr dokvr doktl lo_index lo_type lo_objid BW 31.05.2012 -
FROM dms_doc2loio APPENDING TABLE gt_doc2loio
"from dms_doc2loio into wa_doc2loio
WHERE dokar IN so_dokar.
* AND dokvr IN so_dokvr
* AND doktl IN so_doktl.
LOOP AT gt_doc2loio INTO wa_doc2loio.
""""""""""""""""""""""""""""""""""""""""""""""""""""BW 30.05.12 ENDE +
WRITE: / wa_draw-dokar,
wa_draw-doknr,
wa_draw-dokvr,
wa_draw-doktl,
wa_draw-dokst,
wa_draw-loedk,
" wa_draw-filep. "BW 30.05.2012 -
wa_draw-filep,
wa_doc2loio-lo_objid.
clear wa_doc2loio.
ENDLOOP.
ENDLOOP.
IF sy-dbcnt = 0.
ULINE.
WRITE: 'Es wurde nichts gefunden! Bitte die Eingabeparameter prüfen.'.
ULINE.
ELSE.
ULINE.
WRITE: sy-dbcnt , 'Dokumente gefunden'.
ULINE.
ENDIF.
ENDIF.
IF r4 = 'X'.
LOOP AT gt_draw INTO wa_draw.
ENDLOOP.
IF sy-dbcnt = 0.
ULINE.
WRITE: 'Es wurde nichts gefunden! Bitte die Eingabeparameter prüfen.'.
ULINE.
ELSE.
ULINE.
WRITE: sy-dbcnt ,
'Dokumente gefunden'.
ULINE.
ENDIF.
ENDIF.
**&---------------------------------------------------------------------*
* Zählen der Ergebnisse und Ausgabe der Daten in Abhängigkeit der gefunden Einträge
**&---------------------------------------------------------------------*
ENDFORM. "lesen_daten