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

dropdowns

Hi all,

I've used drop down list in my module pool scree, i've give three values for the drop down list, but when i'm executing the code i'm getting repetitions in the drop down list and some times the values are even changed to lower case and if lower to upper case. Can anyone help me with this.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2013 at 08:01 AM

    hello,

    after calling VRM_SET_VALUES you have to use :

    clear internal table.

    Refresh internal table.

    if you use this then no repetiotion in drop down list.....

    Thanks

    Sabyasachi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2013 at 08:55 AM

    Hi Enoch,

    Check this piece of code ..

    DATA: NAME TYPE VRM_ID,

    LIST TYPE VRM_VALUES,

    VALUE LIKE LINE OF LIST.

    MODULE INIT_LISTBOX OUTPUT.

    name = 'DROP'. " List Control Name

    clear list.


    value-key = '1'. APPEND value TO list.

    value-key = '2'. APPEND value TO list.

    value-key = '3'. APPEND value TO list.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    id = name

    values = list.

    ENDMODULE. " INIT_LISTBOX OUTPUT

    Regard's

    Smruti

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2013 at 09:40 AM

    Hello,

    go to thread: http://scn.sap.com/thread/3320379

    follow my code in this thread......

    Thanks

    Sabyasachi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2013 at 10:05 AM

    Hi Vamsi,

    To avoid the Repetetation use below code.

    First free the Internal table which one u have passed into Fm and than Populate the Internal Table.

    So First Free the table.

    FREE I_TAB.

    w_tab-text = 'abcd'.
    w_tab-key = '1'.
    APPEND w_tab to i_tab.

    CLEAR W_TAB.

    w_tab-text = 'EFGH'.
    w_tab-key = '2'.
    APPEND w_tab to i_tab.

    CLEAR W_TAB.


    NOW CALL THE FM.

    To Avoid the Upper/ lower case transfer use below Check in attributes of thats Dropdown field.

    Thanks

    Tarak


    s2.png (17.0 kB)
    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.