on 03-24-2008 9:59 AM
Hi Gurus,
I want to put a drop down list options say A, B, and C in a field in accounting tab at header level in contract. That means, user will get a drop down list in that field with these 3 options only. Is it possible in the system?
How do I get it?
Please guide.
hi,
Try this sample code, it will solve your problem
see the below programs to fill the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from internal table'ivrm_values' . Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.
report ztest_0001.
type-pools: vrm.
data: p_field(20) type c.
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
start-of-selection.
Set default value, before calling the screen
p_field = 'DEF'.
call screen 100.
&----
*& Module STATUS_0100 OUTPUT
&----
text
-
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
name = 'P_FIELD'.
xvrm_values-key = 'ABC'.
xvrm_values-text = 'ABC'.
append xvrm_values to ivrm_values.
xvrm_values-key = 'DEF'.
xvrm_values-text = 'DEF'.
append xvrm_values to ivrm_values.
xvrm_values-key = 'GHI'.
xvrm_values-text = 'GHI'.
append xvrm_values to ivrm_values.
call function 'VRM_SET_VALUES'
exporting
id = name
values = ivrm_values.
endmodule. " STATUS_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
-
module user_command_0100 input.
endmodule. " USER_COMMAND_0100 INPUT
regards,
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.