Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic drop-down box in table control

Former Member
0 Kudos

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.

10 REPLIES 10

ipravir
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

Thanks for your reply.

Am not able to understand how to use F4IF_INT_TABLE_VALUE_REQUEST to populate values in listbox in PBO.  Am able to fill listbox using 'VRM_SET_VALUES'. But, as I said the problem is it holds same set of values in listbox of all rows of table control.

Could you please tell me whether you tried populating different values in different rows(in listbox) of table control? Because I could not understand how to get it.

In one of the forum, I have read that

  • Dropdown listboxes cannot be used in table controls



0 Kudos

Hello Experts,

Can someone please let me know if it is possible to achieve my requirement to have different values in same listbox of different rows in table control.

Any help on this is highly appreciated.

Thanks.....

0 Kudos

Hi

you need to use F4IF_INT_TABLE_VALUE_REQUEST fm in POV(proces on value req) not in PBO.

On which base you will decide that 1st row having these values(say 1 2 3) and 2nd row having these values(say 4 5 6) and so on.... in list box.?


regards

laxman

0 Kudos

Hi,

As I explained earlier, it can be very much simple through F4IF_INT_TABLE_VALUE_REQUEST.

Please find the attached code below.

I have tried the same scenario with MAKT table.

and it's working fine.

Regards.

Praveer.

0 Kudos

Thank you for your reply.

I had already tried this.

Problem is POV is not getting triggered for Listbox in table control. Not sure what is the reason.

I have written below code in POV

FIELD workareaname-fieldname

     MODULE fl_help_for_listbox.

This is not getting triggered when F4 is pressed or drop-down box is clicked in table control.

Have I written anything wrong or missed something?

0 Kudos

Hi,

Remove the List Box properties and give a simple Test Box for the particular field . F4 Will not work with List Box.

then try , it should work.

Regards.

Praveer

0 Kudos

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..