TABLES customers.
* Selection criteria
PARAMETERS pcode LIKE customers-postcode.
SELECT-OPTIONS s_name FOR customers-name.
* Variables
DATA: parameter_length TYPE i,
number_of_selections TYPE i.
* Checking user input in Parameter pcode
AT SELECTION-SCREEN ON pcode.
parameter_length = STRLEN( pcode ).
IF parameter_length < 5.
MESSAGE e000 WITH 'ZIP code invalid'.
ENDIF.
* Checking user input in Select-Option s_name
AT SELECTION-SCREEN ON s_name.
DESCRIBE TABLE s_name LINES number_of_selections.
IF number_of_selections = 0.
MESSAGE e000 WITH 'Please specify name of customer'.
ENDIF.
* Processing data
START-OF-SELECTION.
SELECT * FROM customers
WHERE name IN s_name.
WRITE / customers-name.
ENDSELECT.
* Selection criteria
PARAMETERS pcode LIKE customers-postcode.
SELECT-OPTIONS s_name FOR customers-name.
* Variables
DATA: parameter_length TYPE i,
number_of_selections TYPE i.
* Checking user input in Parameter pcode
AT SELECTION-SCREEN ON pcode.
parameter_length = STRLEN( pcode ).
IF parameter_length < 5.
MESSAGE e000 WITH 'ZIP code invalid'.
ENDIF.
* Checking user input in Select-Option s_name
AT SELECTION-SCREEN ON s_name.
DESCRIBE TABLE s_name LINES number_of_selections.
IF number_of_selections = 0.
MESSAGE e000 WITH 'Please specify name of customer'.
ENDIF.
* Processing data
START-OF-SELECTION.
SELECT * FROM customers
WHERE name IN s_name.
WRITE / customers-name.
ENDSELECT.
No comments:
Post a Comment