Skip to Content
avatar image
Former Member

Regarding dropdown by index

Hai Experts,

I have a table with five columns in my application in which i have placed dropdown by index for two fields.If i select any value from first downdown then the second dropdown value has to be loaded based on the value of first dropdown.It s working fine no issues in this process.But my problem is, when i select the corresponding record in the table, for that record only dropdown values must be changed but the dropdown values for all the records are changing according the value selected in the selected record.

Actually i need to restrict it for only selected record.is there any possibility to do that?

With Regards,

R.Dhineshraj.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 10, 2009 at 06:35 AM

    Hi,

    Here are the steps for the same.

    1. Mark the layout propertiels attribute ENABLEB for two dropdowns sothat it triggers a roundtrip for every selection.

    2. Define ONSELECT event method for first dropdown.

    3. Write a code in such a way that for every value change for this dropdown, fetch the current selected value, find the new value set for second dropdown and bind the context node of second dropdown.

    Regards,

    Manne.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 06:40 AM

    Hi,

    In the first drodpwon column, you will get the index right, Modify the table for the 2nd dropdown column value basedon the first one only for this index.

    In the drodown event for that column -

    if it is ALV you will get the index using R_PARAM or if it for normal table also you will get the index using WDEVENT.

    lv_index1 = r_param->index or wdeevent(index).
    loop at lt_table into ls_table.
    lv_index = sy-tabix.
    if lv_index eq lv_index1.
     modify the 2nd column.
    endif.
    modify lt_table from ls_table index lv_index.
    clear ls_table.
    endloop.

    Regards,

    Lekha.

    Add comment
    10|10000 characters needed characters exceeded