cancel
Showing results for 
Search instead for 
Did you mean: 

drop down not holding

Former Member
0 Kudos

Hye All,

I am new to BSP MVC. I have a requirement which is

chained drop down, implemented by going through the

SDN, but i am struck up at this point.

My requirement is i have 3 drop down

1. customer drop down 2. parent circle drop down 3. Sub

circle drop down.

I have to populate parent drop down data based on

customer drop down, and sub circle drop down data using

parent drop down.

i have got the values of customers in first drop down.. ie.. customer. now based on customer i have to populate the data in second drop down.

for this i am writing DO_HANDLE_EVENT


DATA: event_id TYPE REF TO if_htmlb_data,
       ddlb_event TYPE REF TO cl_htmlb_event_selection.

  event_id = cl_htmlb_manager=>get_event( request ).
  IF event_id IS NOT INITIAL.
    ddlb_event ?= event_id.
    CASE ddlb_event->id.

      WHEN 'SEL_CUST'.

        DATA: ddlbcust TYPE REF TO cl_htmlb_dropdownlistbox.
        ddlbcust ?= cl_htmlb_manager=>get_data(
                                           request = runtime->server->request
                                           name    = 'dropdownListBox'
                                           id      = 'ddcust'
                                               ).
        IF ddlbcust IS NOT INITIAL.
          MOVE ddlbcust->selection  TO gv_cust.
        ENDIF.
    ENDCASE.

  ENDIF.

but the value is not stored in gv_cust. As the selected value is not held in the drop down list box. Please help.

Also, my second concern is when i am putting a breakpoint on one of the statements and executing the controller class, it is not stopping at the break points. Please help me in debugging also. Is the debugging here different from that of BSP with Page flow logic.

Awaiting replys.

Regards,

Imran.

Edited by: IMRAN PASHA on Apr 28, 2009 8:13 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Imran,

I do not see any difference when it comes to capturing the values in Do_handle_event or in OnInputProcessing, If you go through the link which Raja has provided and check its OnInputProcessing code and compare your code with it to get the right values of your selection.

You have declared

ddlb_event TYPE REF TO cl_htmlb_event_selection

but where exactly is:

DATA: data TYPE REF TO cl_htmlb_dropdownlistbox.

you do need this.

You have to do the same thing as mentioned in the code.

Hope this helps to resolve your issue.

Regards,

Abhinav

Former Member
0 Kudos

hye Abhinav,

thanks for the reply.

I have addressed the drop down reference in my first when of the case statement.

DATA: ddlbcust TYPE REF TO cl_htmlb_dropdownlistbox.

ddlbcust ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'dropdownListBox'

id = 'ddcust'

).

but still it is not holding values.

Please let me know how the debuggin happens so that i can check the flow.

Regards,

Imran.

raja_thangamani
Active Contributor
0 Kudos

Search this forum to know how to debug..there are plenty of thread on that..

Raja

Answers (2)

Answers (2)

raja_thangamani
Active Contributor
0 Kudos

Look at this blog by Durairaj..

[Chained dropdownListBox|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1102] [original link is broken] [original link is broken] [original link is broken];

Raja

Former Member
0 Kudos

Hye Raja,

The blog uses only page with flow logic , have problems using MVC.

Regards,

Imran.

Former Member
0 Kudos

i am not able to copy paste the html content used in my view, hence i am writing the attributes of the view.

1st drop down

id - dd_cust

nameOfKeyColumn - KEY

nameOfValueColumn - VALUE

width -250

selection - GV_CUST

onSelect-SEL_CUST

2nd drop down

id - dd_par

nameOfKeyColumn KEY

nameOfValueColumn VALUE

width 250

selection - GV_PAR

onSelect - SEL_PAR

Please help me fix the bug and also help me debugging the same.

Regards,

Imran.