‎2009 Jan 28 5:14 PM
Hi,
i have a select-options like "select-options p_mstae for mara-mstae." and, on the selection screen, it displays this list :
MMSTA | MTSTB
01 | Art. fab -creation
02 | ...
03 | ...
04 | ...
05 | ...
06 | ...
07 | ...
... | ...
But i want only the lines with the values 01, 02, 04 on the display list of the select-options.
Is there a way to do that plz ? a way to filter the list ?
Thanks,
Gabriel
‎2009 Jan 28 5:34 PM
use liek dis...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_mstae-low.
SELECT MMSTA MTSTB
FROM t141
INTO TABLE it_t141.
WHERE ur conditions. "or filter out later
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MMSTA'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_MSTAE-LOW'
value_org = 'S'
TABLES
value_tab = it_t141
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Repeat the same for 'P_MSTAE-HIGH'
‎2009 Jan 28 5:20 PM
If this is a custom program, you need to change the code which pre-populates the selection list, within
AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field name>for the respective field.
‎2009 Jan 28 5:34 PM
use liek dis...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_mstae-low.
SELECT MMSTA MTSTB
FROM t141
INTO TABLE it_t141.
WHERE ur conditions. "or filter out later
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MMSTA'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_MSTAE-LOW'
value_org = 'S'
TABLES
value_tab = it_t141
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Repeat the same for 'P_MSTAE-HIGH'
‎2009 Jan 29 9:29 AM