Code: Alles auswählen.
Select matnr aland taxm1
FROM mlan
INTO CORRESPONDING FIELDS OF wa_mlan
WHERE matnr IN so_matnr
AND aland IN so_aland
AND taxm1 = 0.
APPEND wa_mlan TO it_mlan.
ENDSELECT.
Code: Alles auswählen.
SELECT matnr aland taxm1
FROM mlan
INTO CORRESPONDING FIELDS OF wa_mlan
WHERE matnr IN so_matnr
AND aland IN so_aland
AND taxm1 = 0 OR taxm1 IS INITIAL.
Code: Alles auswählen.
SELECT mlan~matnr mlan~aland mlan~taxm1
INTO CORRESPONDING FIELDS OF TABLE it_mlan
FROM mlan
INNER JOIN MVKE
ON mlan~matnr EQ mvke~matnr
WHERE mlan~matnr IN so_matnr
AND mlan~aland IN so_aland
AND mlan~taxm1 EQ 0 OR taxm1 EQ ' '
AND mvke~vkorg EQ '1000'.
Code: Alles auswählen.
TABLES: mlancheck.
DATA: it_mlan TYPE TABLE OF mlancheck,
wa_mlan LIKE LINE OF it_mlan.
DATA: d_variant TYPE disvariant.
* Selektionsbildschirm
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK selektion WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_matnr FOR wa_mlan-matnr,
so_aland FOR wa_mlan-aland.
* so_taxm1 FOR mlan-taxm1.
SELECTION-SCREEN END OF BLOCK selektion.
END-OF-SELECTION.
IF so_matnr IS INITIAL.
MESSAGE 'Bitte Selektion einschränken!'(002) TYPE 'I' DISPLAY LIKE 'E'.
EXIT.
ENDIF.
SELECT mlan~matnr mlan~aland mlan~taxm1
INTO CORRESPONDING FIELDS OF TABLE it_mlan
FROM mlan
INNER JOIN MVKE
ON mlan~matnr EQ mvke~matnr
WHERE mlan~matnr IN so_matnr
AND mlan~aland IN so_aland
AND mlan~taxm1 EQ 0 OR taxm1 EQ ' '
AND mvke~vkorg EQ 'UML'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_structure_name = 'mlancheck'
i_grid_title = 'Materialnummern'(002)
i_default = 'X'
i_save = 'X'
is_variant = d_variant
TABLES
t_outtab = it_mlan
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Code: Alles auswählen.
TABLES: mlan, mlancheck.
DATA: it_mlan TYPE TABLE OF mlan,
wa_mlan LIKE LINE OF it_mlan.
DATA: d_variant TYPE disvariant.
* Selektionsbildschirm
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK selektion WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_matnr FOR mlan-matnr,
so_aland FOR mlan-aland.
* so_taxm1 FOR mlan-taxm1.
SELECTION-SCREEN END OF BLOCK selektion.
END-OF-SELECTION.
IF so_matnr IS INITIAL.
MESSAGE 'Bitte Selektion einschränken!'(002) TYPE 'I' DISPLAY LIKE 'E'.
EXIT.
ENDIF.
SELECT mlan~matnr mlan~aland mlan~taxm1
INTO CORRESPONDING FIELDS OF TABLE it_mlan
FROM mlan
INNER JOIN MVKE
ON mlan~matnr EQ mvke~matnr
WHERE mlan~matnr IN so_matnr
AND mlan~aland IN so_aland
AND mlan~taxm1 EQ 0 OR taxm1 EQ ' '
AND mvke~vkorg EQ 'UML'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_structure_name = 'MLANCHECK'
i_grid_title = 'Materialnummern'(002)
i_default = 'X'
i_save = 'X'
is_variant = d_variant
TABLES
t_outtab = it_mlan
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.