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

Dropdown Listbox issue again

Former Member
0 Likes
583

I have this dropdown TBBILLDATEFROM. it is binded to the date field of the table zvbap. I can see the list of items on the dropdown when I click it. I am just wondering why after clicking the item on the dropdown list, the dropdown will just be blank, as if I did not select anything. why is that happening? thanks for the help.

-


data: rb1(1), rb2(1), rb3(1), field1(10).

type-pools: vrm.
data: datevalues type vrm_values with header line,
      int_zvbap type table of zvbap with header line.


initialization.
select distinct erdat
       from zvbap
       into corresponding fields of table int_zvbap.

    loop at int_zvbap.
      datevalues-key = int_zvbap-erdat.
      append datevalues.
    endloop.


start-of-selection.
  set screen 0100.


module pbo output.
* DATEFROM DROPDOWN
  call function 'VRM_SET_VALUES'
    exporting
      id      = 'TBBILLDATEFROM'
      values  = datevalues[].
endmodule.

module pai input.
  case sy-ucomm.
    when 'BTNEXIT'.
      leave program.
    when 'RADIO'.
      if rb1 = 'X'.
         field1 = '5'.
      elseif rb2 = 'X'.
         field1 = '10'.
      elseif rb3 = 'X'.
         field1 = 'All'.
      endif.

  endcase.
endmodule.

5 REPLIES 5
Read only

Former Member
0 Likes
563

Hi,

Is the TBBILLDATEFROM the name of the variable in the Screen field. You will have to assign the Screen Name in the Interface of the FM VRM_SET_VALUES.

That is the only issue i can see in the code.

Also you will have to refresh the Internal table datevalues before you append records to it.

regards,

Mahesh

Read only

0 Likes
563

<b>Mahesh</b>, yes the name of my dropdown on the screen is TBBILLDATEFROM and my listbox is getting the expected record. the only problem is when I click an item on the listbob, it doesnt get selected because blank space overrides listbox (as if I did not click any item on the list).

You get to see always the items on the listbox though.

thanks for the reply <b>Mahesh</b>.

Read only

0 Likes
563

I cannot see any other issue at all Boy because there is no explicit logic that you will have to write for the assignment of the selected value in the List box to the screen field and this logic is internal to the FM only. the most i can do is to suggest you to refer the program RSDEMO_DROPDOWN_LISTBOX to check if you can get anything out of it.

regards,

Mahesh

Read only

0 Likes
563

actually im also wondering why it is happening because I have another program which has the same format and it works well. I just wonder why on this very simple program, it wont do.

thanks for your effort<b> Mahesh</b>.

Read only

Former Member
0 Likes
563

I have the answer now. I declared another variable (see below) for that listbox and it worked normal.

data: tbbilldatefrom(20).