*&---------------------------------------------------------------------*
*& Report ZTR_DEMO_REPORT6 *
*& *
*&Report : Selection-Screen
*&
*& *
*&---------------------------------------------------------------------*
REPORT ZTR_DEMO_REPORT8 .
TABLES : VBAK , VBAP .
*Type Declaration
TYPES : BEGIN OF ST_VBAK ,
VBELN LIKE VBAK-VBELN,
END OF ST_VBAK,
BEGIN OF ST_VBAP ,
VBELN LIKE VBAP-VBELN,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
MEINS LIKE VBAP-MEINS,
END OF ST_VBAP ,
BEGIN OF ST_JOIN ,
VBELN LIKE VBAP-VBELN,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
MEINS LIKE VBAP-MEINS,
END OF ST_JOIN.
*Data Declaration
***Work Area Declaration
DATA : WA_VBAK TYPE ST_VBAK,
WA_VBAP TYPE ST_VBAP,
WA_JOIN TYPE ST_JOIN.
***Internal Table Declaration
DATA : IT_VBAP LIKE STANDARD TABLE OF WA_VBAP.
**Selection-screen :
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN .
SELECTION-SCREEN : END OF BLOCK B1 .
*Select field from table VBAP
SELECT VBELN
MATNR
ARKTX
MEINS
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
LOOP AT IT_VBAP INTO WA_VBAP .
WRITE :/5 WA_VBAP-VBELN ,
30 WA_VBAP-MATNR,
50 WA_VBAP-ARKTX,
100 WA_VBAP-MEINS.
ENDLOOP.
No comments:
Post a Comment