AT LINE SELECTION EXAMPLES
*&---------------------------------------------------------------------*
*& Report ZSAPLINE_SEL
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSAPLINE_SEL.
TABLES:MARA, MAKT.
DATA: WA_MARA TYPE MARA.
DATA: WA_MAKT TYPE MAKT.
SELECT-OPTIONS: S_MATNR FOR WA_MARA-MATNR.
START-OF-SELECTION.
SELECT MATNR MTART MBRSH MEINS FROM MARA
INTO CORRESPONDING FIELDS OF WA_MARA.
WRITE: / WA_MARA-MATNR,
WA_MARA-MTART,
WA_MARA-MBRSH,
WA_MARA-MEINS.
HIDE:WA_MARA-MATNR.
ENDSELECT.
AT LINE-SELECTION.
IF SY-LSIND = 1.
WRITE: TEXT-001,
WA_MARA-MATNR.
SELECT SPRAS MAKTX MAKTG FROM MAKT
INTO CORRESPONDING FIELDS OF WA_MAKT
WHERE MATNR = WA_MARA-MATNR.
WRITE: / WA_MAKT-SPRAS,
WA_MAKT-MAKTX,
WA_MAKT-MAKTG.
ENDSELECT.
ENDIF.
SAVE AND ACTIVE
EXECUTE :
Comments
Post a Comment