Code: Alles auswählen.
PARAMETERS: layer(30) AS LISTBOX VISIBLE LENGTH 30, "OBLIGATORY,
modul(30) AS LISTBOX VISIBLE LENGTH 30, "OBLIGATORY,
gruppe(30) AS LISTBOX VISIBLE LENGTH 30.
AT SELECTION-SCREEN OUTPUT.
param = 'layer'.
value-key = 'L01'.
value-text = 'Layer 1 Extraktion'.
APPEND value TO values.
value-key = 'L02'.
value-text = 'Layer 3 Harmonisierung'.
APPEND value TO values.
value-key = 'L03'.
value-text = 'Layer 5 Datamart'.
APPEND value TO values.
value-key = 'L04'.
value-text = 'Layer 7 Präsentation'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param
values = values.
Refresh values.
param = 'modul'.
value-key = 'M01'.
value-text = 'Modul CO'.
APPEND value TO values.
value-key = 'M02'.
value-text = 'Modul CP'.
APPEND value TO values.
value-key = 'M03'.
value-text = 'Modul CS'.
APPEND value TO values.
value-key = 'M04'.
value-text = 'Modul DP'.
APPEND value TO values.
value-key = 'M05'.
value-text = 'Modul FI'.
APPEND value TO values.
value-key = 'M06'.
value-text = 'Modul HR'.
APPEND value TO values.
value-key = 'M07'.
value-text = 'Modul LE'.
APPEND value TO values.
value-key = 'M07'.
value-text = 'Modul MD'.
APPEND value TO values.
value-key = 'M08'.
value-text = 'Modul MM'.
APPEND value TO values.
value-key = 'M09'.
value-text = 'Modul PM'.
APPEND value TO values.
value-key = 'M10'.
value-text = 'Modul PP'.
APPEND value TO values.
value-key = 'M11'.
value-text = 'Modul PS'.
APPEND value TO values.
value-key = 'M12'.
value-text = 'Modul QM'.
APPEND value TO values.
value-key = 'M13'.
value-text = 'Modul SD'.
APPEND value TO values.
value-key = 'M14'.
value-text = 'Modul SN'.
APPEND value TO values.
value-key = 'M15'.
value-text = 'Modul TD'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param
values = values.
Refresh values.
param = 'gruppe'.
value-key = 'G01'.
value-text = 'Gruppe SL'.
APPEND value TO values.
value-key = 'G02'.
value-text = 'Gruppe BI'.
APPEND value TO values.
value-key = 'G03'.
value-text = 'Gruppe SH'.
APPEND value TO values.
value-key = 'G04'.
value-text = 'Gruppe PU'.
APPEND value TO values.
value-key = 'G05'.
value-text = 'Gruppe IM'.
APPEND value TO values.
value-key = 'G06'.
value-text = 'Gruppe GL'.
APPEND value TO values.
value-key = 'G07'.
value-text = 'Gruppe AP'.
APPEND value TO values.
value-key = 'G08'.
value-text = 'Gruppe AR'.
APPEND value TO values.
value-key = 'G09'.
value-text = 'Gruppe OM'.
APPEND value TO values.
value-key = 'G09'.
value-text = 'Gruppe PC'.
APPEND value TO values.
value-key = 'G10'.
value-text = 'Gruppe 0G'.
APPEND value TO values.
value-key = 'G11'.
value-text = 'Gruppe PA'.
APPEND value TO values.
value-key = 'G12'.
value-text = 'Gruppe PT'.
APPEND value TO values.
value-key = 'G13'.
value-text = 'Gruppe PY'.
APPEND value TO values.
value-key = 'G14'.
value-text = 'Gruppe TA'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param
values = values.
START-OF-SELECTION.
PERFORM infos.
if layer = 'L01'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D1' .
ELSEIF layer = 'L02'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D3'.
ELSEIF layer = 'L03'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D5'.
ELSEIF layer = 'L04'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D7'.
Endif.
if modul = 'M01'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'CO'.
ELSEIF modul = 'M02'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'CP'.
ELSEIF modul = 'M03'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'CS'.
ELSEIF modul = 'M04'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'DP'.
ELSEIF modul = 'M05'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'FI'.
ELSEIF modul = 'M06'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'HR'.
ELSEIF modul = 'M07'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'LE'.
ELSEIF modul = 'M08'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'MD'.
ELSEIF modul = 'M09'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'MM'.
ELSEIF modul = 'M10'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'PM'.
ELSEIF modul = 'M11'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'PP'.
ELSEIF modul = 'M12'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'PS'.
ELSEIF modul = 'M13'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'QM'.
ELSEIF modul = 'M14'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'SD'.
ELSEIF modul = 'M15'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'SN'.
ELSEIF modul = 'M16'.
Delete l_t_rsdodso Where odsobject+2(2) <> 'TD'.
ENDIF.
if gruppe = 'G01'.
Delete l_t_rsdodso WHERE odsobject+4(2) <> 'SL'.
ELSEIF gruppe = 'G02'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'BI'.
ELSEIF gruppe = 'G03'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'SH'.
ELSEIF gruppe = 'G04'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PU'.
ELSEIF gruppe = 'G05'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'IM'.
ELSEIF gruppe = 'G06'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'GL'.
ELSEIF gruppe = 'G07'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'AP'.
ELSEIF gruppe = 'G08'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'AR'.
ELSEIF gruppe = 'G09'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'OM'.
ELSEIF gruppe = 'G10'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PC'.
ELSEIF gruppe = 'G11'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> '0G'.
ELSEIF gruppe = 'G12'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PA'.
ELSEIF gruppe = 'G13'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PT'.
ELSEIF gruppe = 'G14'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PY'.
ELSEIF gruppe = 'G15'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'TA'.
ENDIF.
PERFORM ausgabe.
*&---------------------------------------------------------------------*
*& Form infos
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM infos.
SELECT rsdodso~odsobject txtlg rsdodso~objvers
INTO CORRESPONDING FIELDS OF TABLE l_t_rsdodso
FROM rsdodso INNER JOIN rsdodsot ON rsdodsot~odsobject = rsdodso~odsobject
WHERE rsdodso~objvers = 'A' AND rsdodso~odsobject in so_odsob .
ENDFORM. "infos
*&---------------------------------------------------------------------*
*& Form ausgabe
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM ausgabe.
DELETE l_t_rsdodso WHERE odsobject(1) = '0'.
LOOP AT l_t_rsdodso ASSIGNING <rsdodso_fields>.
* WHERE odsobject(1) EQ '1' .
WRITE:/ <rsdodso_fields>-odsobject,
<rsdodso_fields>-txtlg,
<rsdodso_fields>-objvers.
ENDLOOP.
ENDFORM. "ausgabe
Code: Alles auswählen.
PARAMETERS : layer TYPE char30 AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND dummy ,
modul TYPE char30 AS LISTBOX VISIBLE LENGTH 30 MODIF ID ID1 USER-COMMAND dummy,
gruppe(30) AS LISTBOX VISIBLE LENGTH 30 MODIF ID ID2,
zaehler as checkbox.
Code: Alles auswählen.
if zaehler = 'X'.
SORT l_t_rsdodso BY odsobject+6(2) ASCENDING.
DELETE l_t_rsdodso WHERE odsobject+6(2) <> max??? .
ENDIF.
Code: Alles auswählen.
SORT l_t_rsdodso BY odsobject+6(2) DESCENDING.
DELETE TABLE l_t_rsdodso FROM 2. "Entweder alles ab index 2 löschen ...
".. oder ...
READ TABLE l_t_rsdodso ASSIGNING ... INDEX 1. "... den Index 1 auslesen.
Die Option muss ich wohl ueberlesen haben.patlau hat geschrieben:Habe mir die Sortierung so gedacht (wollte die Ausgabe des höcht existierenden Objektes als Checkbox anbieten)
jetzt möchte ich die Tabelle sortieren, und alle ausser dem höchsten rauslöschen... weiss nicht wie ich dies angebe.
Code: Alles auswählen.
PARAMETERS : layer TYPE char30 AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND dummy ,
modul TYPE char30 AS LISTBOX VISIBLE LENGTH 30 MODIF ID ID1 USER-COMMAND dummy ,
gruppe(30) AS LISTBOX VISIBLE LENGTH 30 MODIF ID ID2,
zaehler as checkbox.
Code: Alles auswählen.
LOOP AT SCREEN.
IF screen-group1 EQ 'ID1'.
IF NOT layer IS INITIAL.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ 'ID2'.
IF NOT layer IS INITIAL AND
NOT modul IS INITIAL.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
PERFORM infos.
if zaehler = 'X'.
SORT l_t_rsdodso BY odsobject+6(2) DESCENDING.
DELETE l_t_rsdodso INDEX 1 .
ENDIF.
CASE layer.
WHEN 'L01'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D1' .
WHEN 'L02'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D3'.
WHEN 'L03'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D5' .
WHEN 'L04'.
DELETE l_t_rsdodso WHERE odsobject(2) <> 'D7' .
ENDCASE.
CASE modul.
WHEN 'M01' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'CO'.
WHEN 'M02' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'CP'.
WHEN 'M03' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'CS'.
WHEN 'M04' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'DP'.
WHEN 'M05' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'FI'.
WHEN 'M06' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'HR'.
WHEN 'M07' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'LE'.
WHEN 'M08' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'MD'.
WHEN 'M09' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'MM'.
WHEN 'M10' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'PM'.
WHEN 'M11' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'PP'.
WHEN 'M12' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'PS'.
WHEN 'M13' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'QM'.
WHEN 'M14' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'SD'.
WHEN 'M15' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'SN'.
WHEN 'M16' .
DELETE l_t_rsdodso Where odsobject+2(2) <> 'TD'.
ENDCASE.
CASE gruppe .
WHEN 'G01'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'SL'.
WHEN 'G02'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'BI'.
WHEN 'G03'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'SH'.
WHEN 'G04'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PU'.
WHEN 'G05'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'IM'.
WHEN 'G06'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'GL'.
WHEN 'G07'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'AP'.
WHEN 'G08'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'AR'.
WHEN 'G09'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'OM'.
WHEN 'G10'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PC'.
WHEN 'G11'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> '0M'.
WHEN 'G12'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PA'.
WHEN 'G13'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PT'.
WHEN 'G14'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'PY'.
WHEN 'G15'.
DELETE l_t_rsdodso WHERE odsobject+4(2) <> 'TA'.
ENDCASE.
PERFORM ausgabe.
*&---------------------------------------------------------------------*
*& Form infos
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM infos.
SELECT odsobject objvers FROM rsdodso
INTO CORRESPONDING FIELDS OF TABLE l_t_rsdodso
WHERE odsobject in so_odsob and objvers = 'A'.
SELECT txtlg FROM rsdodsot
INTO CORRESPONDING FIELDS OF TABLE l_t_rsdodsot.
LOOP AT l_t_rsdodso ASSIGNING <rsdodso_fields>.
SELECT SINGLE txtlg FROM rsdodsot
INTO <rsdodso_fields>-txtlg
WHERE odsobject = <rsdodso_fields>-odsobject.
ENDLOOP.
ENDFORM. "infos
"infos
*&---------------------------------------------------------------------*
*& Form ausgabe
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM ausgabe.
DELETE l_t_rsdodso WHERE odsobject(1) = '0'.
LOOP AT l_t_rsdodso ASSIGNING <rsdodso_fields>
.
WRITE:/ <rsdodso_fields>-odsobject,
<rsdodso_fields>-txtlg,
<rsdodso_fields>-objvers.
ENDLOOP.
ENDFORM. "ausgabe
Code: Alles auswählen.
SORT l_t_rsdodso BY odsobject+6(2) DESCENDING.
DELETE l_t_rsdodso INDEX 1 .
Code: Alles auswählen.
FIELD-SYMBOLS <fs_structure> TYPE any.
SORT l_t_rsdodso BY odsobject+6(2) DESCENDING.
READ TABLE l_t_rsdodso ASSIGNING <fs_structure> INDEX 1.