Skip to Content
avatar image
Former Member

Dynamic drop-down box in table control

Hello,

My requirement is to have drop-down box in table control.

Each row of a drop-down box should hold different values i.e. drop-down box of row1 has value 'ABC', 'XYZ' and row2 would have value 'DEF'.

Is it possible to achieve this in table control?

I have already tried using "VRM_SET_VALUES/ F4IF_INT_TABLE_VALUE_REQUEST" with ID/Fieldname as table control field name of drop-down box. But it has single set of values in all the rows.

Appreciate any help on this.

Please note that I have already search SCN for this requirement. I do not get any concrete answer on this. Hence, I have started this new thread.

Thanks a lot.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 06, 2015 at 11:52 AM

    Hi,

    You can use the F4IF_INT_TABLE_VALUE_REQUEST.

    steps

    1. Create a method with parameter id

         importing

         RETFIELD                type DFIES-FIEDLNAME

         DYNPROFIELD        type HELP_INFO-DYNPROFLD

         table                          type table.

        

          call function F4IF_INT_TABLE_VALUE_REQUEST

         Exporting

              RETFIELD                     = RETFIELD

              DYNPROFIELD             = DYNPROFIELD

         Table

              VALUE_TAB                  = TABLE

    2.    In EVENT FOR VALUE REQUEST

              TB_FIELD = your desire Field from table Control

             

              FIELD TB_FIELD MODULE mod_f4_help.

    3. Mod_f4_help (Point 2)

         data : l_line type I . [Table Control selected Line ).

         GET CURSOR LINE l_line.

        

            Write the Logic based on the l_line. and create a internal table.

              Pass the Internal table in method (Point 1).

        

         You will get the different -2 F4 Help based on your selected row of the table.

    Regards.

    Praveer.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Praveer,

      I don't think that this would get me different values in listbox of different rows.

      Since TB_FIELD and RETFIELD would always be the same, how would it identify the rowname-fieldname when it is actually filling up listbox? Listbox on all rows of the table control would have the latest value which is updated in it.

      In order to achieve this, system should recognise each listbox as a speperate/unique field in each row.

      Is it possible to do this?

      Thanks.

  • Jan 06, 2015 at 12:42 PM

    Before use of FM F4IF_INT_TABLE_VALUE_REQUEST, call FM DYNP_GET_STEPL, with this FM you will be able to correctly use FM as DYNP_VALUES_READ  to get values of other fields of the same line in the table and adapt the list of values to display.

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Praveer Sen

      Hi Praveer,

      Thank you so much for your reply.

      But this is the main problem...I don't need F4. I need drop-down box in table control.

      If I remove drop-down property, POV would be triggered. But I won't get values in listbox.

      And if drop-down property is there, POV is not getting triggered.

      Is there any way to resolve this?

      Thanks..