Skip to Content
author's profile photo Former Member
Former Member

How to put a drop down list options in a field?

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 10:06 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.