cancel
Showing results for 
Search instead for 
Did you mean: 

F4 help in dropdownlistbox and values in input fields

Former Member
0 Kudos

I need a F4 help in dropdown list box. Actually i have 2 more input fields alongwith one dropwdown list box. As per my problem

if i select one value from F4 help then corresponding other values should bepopulated into input fields. For example in F4 help

of dropdown box i am getting single selection containg three values "15 LIMAPLANT 45802" after selecting it the "15" should

be only input entry to dropdownlist box, values "LIMA PLANT" and "45802" should be input entry to other two input fields.

Accepted Solutions (0)

Answers (2)

Answers (2)

raja_thangamani
Active Contributor
0 Kudos

Welcome to SDn...

check out this blog..

/people/durairaj.athavanraja/blog/2004/12/20/bsphow-to-chained-dropdownlistbox

<i>* Reward each useful answer</i>

Raja T

Former Member
0 Kudos

Hi Raja,

I have gone thru the code but it is not actually one that i needed. what i need is single dropdownlist box alongwith two inputfields. The DDLB show the concatenate string valued from itab, but on selection it gives single key value from the string and other two values is automatically selected in the input fields based on that key id field in DDLB.

For example. in DDLB, if the string on clicking drop down box is "15 LIMA PLANT 45802" then on selection only "15" should be selected value in DDLB and

"LIMA PLANT" and "45802" should selected based on this key in other two input fields. I think now it makes sense for this requirement

raja_thangamani
Active Contributor
0 Kudos

Look at the below code:

<b>Oncreate:</b>

        entry-name = '15'.   entry-value = '15'.   APPEND entry TO itab.
        entry-name = 'LIMAPLANT'. entry-value = 'LIMAPLANT'. APPEND entry TO itab.
        entry-name = '45802'.  entry-value = '45802'.  APPEND entry TO itab.

<b>Layout:</b>


     <htmlb:dropdownListBox id                = "myid"
                              nameOfKeyColumn   = "NAME"
                              nameOfValueColumn = "VALUE"
                              onSelect          = "myclick"
                              selection = "<%= v_selected %>"
                              table             = "<%= itab %>" />

    <htmlb:inputField id      = "myinp1"
                            value   = "<%= v_field1 %>"  />

    <htmlb:inputField id      = "myinp2"
                            value   = "<%= v_field2 %>"  />

<b>Page attribute:</b>

entry	TYPE	IHTTPNVP
itab	TYPE	TIHTTPNVP

<b>To capture the event:

OnInputprocessing:</b>

DATA: event TYPE REF TO CL_HTMLB_EVENT.
  event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
 
  IF event->id = 'myclick'.

 CALL METHOD request->get_form_field
      EXPORTING
        name  = 'myid'
      RECEIVING
        value = v_selected.

clear: v_field1, v_field2.

Loop at itab into entry where name NE v_selected.
if v_field1 is initial.
 v_field1 = entry-value.
  else.
  v_field2 = entry-value.
  endif.

endloop.
 endif.

This will solve your problem..

<b>* Reward each useful answer</b>

Raja T

eddy_declercq
Active Contributor
0 Kudos

Hi,

Did you check blogs like

/people/koen.labie2/blog/2006/11/17/showhelp-functionality-with-pop-up--part2

Eddy

-


PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!