Application Development and Automation 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: 
Read only

List Box Values

Former Member
0 Likes
712

Hi All,

I have searched already in SDN.

I have 2 list boxes on my selection screen. second list box values will appear based on selection of fiest list box.

Ex: First list box contains all STATE VALUEs.& Second list box contails all district valus .

Secon list box shoul fill on selction of state. How to do this....can any one please help me?

How to connect these two list boxes?

6 REPLIES 6
Read only

Former Member
0 Likes
680

HI.

I guess you are referring to interactive report,if its interactive

Refer the below program,

Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code

Edited by: manjunath4sap on Dec 27, 2010 1:08 PM

Edited by: Rob Burbank on Dec 27, 2010 1:07 PM

Read only

0 Likes
680

Hi,

Can any one please help me.

Read only

Former Member
0 Likes
680

HI,

Write the logic for second field in the event

AT SELECTION-SCREEN ON p_list1.

Regards,

Madhukar Shetty

Read only

0 Likes
680

Hi,

I tried with

AT SELECTION-SCREEN ON P_list1.

PERFORM FILL_list2.

But it is not working. i am getting balnks in second list.

Read only

0 Likes
680

Hi

U need to read the input of the first field in order to fill the list box of second i/o field:

U need to use the event AT SELECTION-SCREEN ON VALUE REQUEST, if you mean a LIST BOX for search help

Max

Read only

Former Member
0 Likes
680

Hi,

try this way.



parameters: p_field1 type <field1>,
                     p_field2 type <field2> listbox visible length 30
                                                         modif id r1.


at selection-screen on value-request for p_field2.
  perform drilldown_field2.

form drilldown_field2.

  t_dynpfields-fieldname  = 'P_FIELD1'.
  append t_dynpfields.
  w_repid = sy-repid.
* reading Screen variables and Values
  call function 'DYNP_VALUES_READ'
       exporting
            dyname     = w_repid
            dynumb     = sy-dynnr
       tables
            dynpfields = t_dynpfields
       exceptions
            others.
  read table t_dynpfields index 1.
  value = t_dynpfields-fieldvalue.

*by the value fetch the entries from another table and push into  t_table

  w_dynprofld = 'P_FIELD2'.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield    = 'TABNAME'
      dynpprog    = sy-repid
      dynpnr      = '1000'
      dynprofield = w_dynprofld
      value_org   = 'S'
    tables
      value_tab   = t_table.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

Endform.

Prabhudas