Monday, 30 May 2016

Select-Options

Select-Options

  • Select-Options keyword provides users to  input range of values.
  • It has components of standard structure RSDSSELOPT.
  • Components of Select-Options.
  1. Sign      :- 'I' ->Include , 'E' ->Exclude. 
  2. Option:- LE-> less than and equal to, BT->Between, GE-> Greater than and Equal, etc, 
  3. Low:- Lower Limit
  4. High:- Higher Limit

  • Select-Option : <select_variable > for <work_area-fieldname>.
  • select_variable acts like an internal table with a header line.
Ex :

Steps :



  1. Go to transaction code SE38.
  2. Enter the program name Z or Y<program name>.
  3. Select attribute type as Executable program.
  4. Click on Save.

Source Code


DATA IT_MAKT TYPE TABLE OF MAKT,
       WA_MAKT TYPE MAKT.


SELECT-OPTIONS S_MATNR FOR WA_MAKT-MATNR.


SELECT FROM MAKT INTO TABLE IT_MAKT WHERE MATNR IN S_MATNR.


  LOOP AT IT_MAKT INTO WA_MAKT.
  WRITE / WA_MAKT-MATNR WA_MAKT-SPRAS WA_MAKT-MAKTX.
  ENDLOOP.



Save -> check ->activate.



Input




Output





No comments:

Post a Comment