Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

customize values for a dropdown list

Former Member
0 Kudos
73

SELECT-OPTIONS: s_doctyp FOR vbak-auart.

The possible entries for s_doctyp are determined at runtime by selection from the database. (table VBAK)

--> I don't want to display all the document types from VBAK. I only need to display 5 constant values in the dropdown list. How do I do this?

Thank you.

3 REPLIES 3

Former Member
0 Kudos
48

hi,

Check out in this way by using FM F4IF_INT_TABLE_VALUE_REQUEST ..


AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_doctyp-low.
SELECT s_doctyp
FROM Vbrk
INTO TABLE ITAB
UP TO 10 ROWS.
if sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3. 
endif.

Former Member
0 Kudos
48

Hi Cherryl,

There is an alternate solution ....

You can create a domain with 5 constant values in se11 and in select options define the parameter or select options for that domain....if you need to add more constants you can do it in that domain

in domain(se11) tab "value range"

Give fixed value"Fix.Val" as the value you want the user to see and in the "short.Desc" give a text for identifying the fixed values...

Reward if helpful

Regards

Byju

Former Member
0 Kudos
48

Thank you so much to you both!