Select.....EndSelect.
- Select and endselect is acts like loop.
Ex :
Steps :
- Go to transaction code SE38.
- Enter the program name Z or Y<program name>
- Select attribute type as Executable program.
- Click on Save.
Source Code
TABLES : MAKT.
SELECT-OPTIONS : S_MATNR FOR MAKT-MATNR.
SELECT * FROM MAKT INTO MAKT WHERE MATNR IN S_MATNR.
WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX.
ENDSELECT.
SELECT-OPTIONS : S_MATNR FOR MAKT-MATNR.
SELECT * FROM MAKT INTO MAKT WHERE MATNR IN S_MATNR.
WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX.
ENDSELECT.
Input
Output
- In Select and EndSelect every time control passes to database and write statement .So Select and EndSelect reduces the performance .
No comments:
Post a Comment