10-15-2008 7:58 AM
hello gurus,
i hav to make drop-down list without using FM VRM_SET_VALUES
.So suggest me the approach and send me the appropiate code for that.
thanks and regard.
Ruchi.
10-15-2008 8:02 AM
Hi,
You can do one thing.
In your SE11 you can create a data domain ZDOM and enter the possible values you want in that domain.
After Creatng the domain you can create a data elemet ZELEM using that domain.
Now you can declare your variable like this.
PARAMETER: p_list TYPE ZELEM AS LISTBOX VISIBLE LENGTH N.
In this case you dont need to use FM at all.
Hope it helps.. Please revert if any doubts.
Regards,
Pramod
10-15-2008 8:00 AM
Is it a screen or a selection screen?
you already asked this question....why are you reposting?
10-15-2008 8:02 AM
Hi,
You can do one thing.
In your SE11 you can create a data domain ZDOM and enter the possible values you want in that domain.
After Creatng the domain you can create a data elemet ZELEM using that domain.
Now you can declare your variable like this.
PARAMETER: p_list TYPE ZELEM AS LISTBOX VISIBLE LENGTH N.
In this case you dont need to use FM at all.
Hope it helps.. Please revert if any doubts.
Regards,
Pramod
10-15-2008 8:15 AM
hi Pramod,
first i hav to create the list like
male
female
others
and then this list is attached to the i/o field in selection screen.
10-15-2008 8:21 AM
Hi,
First thing you need to do is go to SE11.
Create a domain ZDOM :
In the domain screen you have a tab where you can maintain single values, value ranges and value tables.
There in the single value fields enter Male, Female, Others
Save and activate this domain.
Again go to SE11. Select data type give a name ZELEM
press create. From that select the option 'Data element'
Once inside give the domain name as ZDOM save and activate it. Once all these are done go to your program and declare your variable like this.
PARAMETER: p_var TYPE ZELEM AS LISTBOX VISIBLE LENGTH 10.
Then you will automatically get a dropdown.
Hope this was of some help.
Regards,
Pramod
10-15-2008 8:25 AM
Hi,
This code may help u...
PARAMETERS : P_SOBKZ TYPE sobkz AS LISTBOX VISIBLE LENGTH 11 OBLIGATORY.
AT SELECTION-SCREEN OUTPUT.
IF values[] IS INITIAL.
param = 'P_SOBKZ'.
SELECT sobkz
sotxt
INTO (value-key, value-text)
FROM t148t
WHERE spras = 'EN'.
APPEND value TO values.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES' "#EC *
EXPORTING
id = param
values = values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
ENDIF.