Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Select Options Sentencias
Select Options Sentencias
SELECT-OPTIONS is a complex selection. If user want to input value of field more than one value, it is possible by using SELECT-OPTIONS. Syntax
SELECT-OPTIONS <name> FOR <field>.
Example
SELECT-OPTIONS s_belnr FOR bkpf-belnr.
SIGN Possoble value are I(Include) and E(Exclude). OPTION Possilble value are EQ(Equal), NE(Not Equal), GT(Greater Than),GE(Greater Tahn or Equal), LT(Less Than), LE(Less Than or Equal), CP(Contains Pattern), NP(Not Contains Pattern), BT(Between), NB(Not Between) LOW keep low value HIGH keep high value
Options
MEMORY ID
Example: SELECT-OPTIONS s1 FOR bkpf-belnr MEMORY ID pid.
MATCHCODE OBJECT
Example: SELECT-OPTIONS s1 FOR bkpf-belnr MATCHCODE OBJECT zsh_f4_belnr.
MODIF ID
Example: SELECT-OPTIONS s1 FOR bkpf-belnr MODIF ID gid.
NO-DISPLAY
Example: SELECT-OPTIONS s1 FOR bkpf-belnr NO-DISPLAY.
LOWER CASE
Example: SELECT-OPTIONS s1 FOR bkpf-belnr LOWER CASE.
OBLIGATORY
Example: SELECT-OPTIONS s1 FOR bkpf-belnr OBLIGATORY.
NO-EXTENSION
Example: SELECT-OPTIONS s1 FOR bkpf-belnr NO-EXTENSION.
NO INTERVALS
Example: SELECT-OPTIONS s1 FOR bkpf-belnr NO INTERVALS.
NO DATABASE SELECTION
Example: SELECT-OPTIONS s1 FOR bkpf-belnr NO DATABASE SELECTION.
VISIBLE LENGTH
Example: SELECT-OPTIONS s1 FOR bkpf-belnr VISIBLE LENGTH 5.
Importante: el CALL SUBSCREEN: a_sub0101 debe ir antes del MODULE user_command_0100 de lo contrario comenzar a realizarse el proceso sin que se puedan obtener los datos del select-option. Luego vamos a modificar el Layout de la dynpro. Alli elegimos el objeto Area Subscreen y dibujamos tantos de estos elementos como select-options necesitemos. Le ponemos el mismo nombre que usamos para hacer la llamada a las subscreen en el paso anterior.
Luego en el include ZXXX_TOP se define un select-option de la misma manera que se hace en un programa tipo Report. SELECTION-SCREEN BEGIN OF SCREEN 0101 AS SUBSCREEN
SELECT-OPTIONS: nro_doc FOR bkpf-belnr, SELECTION-SCREEN END OF SCREEN 0101. Luego de ejecutar el programa podemos ver el resultado.