Skip to Content
author's profile photo Former Member
Former Member

BSP Dropdown list Not populated

Hi Experts,

I need to develop one dropdownlist box using MVC. I did all the things but its not populating the value. please check my steps.

In view attribute I defined,

IT_FORMKEY TYPE WDR_CONTEXT_ATTR_VALUE_LIST

NATION_SELECTED TYPE STRING

Then In class attribute i did the samething like page attribute.

Check my code in DO_Init.

data : begin of str_formkey,

value type string,

text type string,

end of str_formkey,

it_formkey like table of str_formkey.

select land1 natio from t005t into table it_formkey where spras eq 'EN'.

I checked in debugging and internal table has value at th runtime.

Check my code in Do_Request :

data : perdata_view type ref to if_bsp_page.

dispatch_input( ).

perdata_view ?= create_view( view_name = 'VIEW1.HTM').

perdata_view->set_attribute( name = 'IT_FORMKEY'

value = it_formkey ).

perdata_view->set_attribute( name = 'NATION_SELECTED'

value = nation_selected ).

call_view( perdata_view ).

Apart from that Need to do anything more? Now my view is displayed in the browser but the list box is empty.

Can any one help me in this?

Edited by: Nandini on Aug 7, 2009 1:50 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 07, 2009 at 03:27 PM

    I think your itab has the wrong key/value pair.

    Change the DO_INIT code as follow:

    data : str_formkey type WDR_CONTEXT_ATTR_VALUE,
    it_formkey type WDR_CONTEXT_ATTR_VALUE_LIST.
    
    data: i_t005t type table of t005t,
            wa_t005t type t005t
    
    select * from t005t into table it_t005t where spras eq 'EN'. 
    
    loop at it_t005t into wa_t005t.
    
    str_formkey-key = wa_t005t-LAND1.
    str_formkey-value = wa_t005t-NATIO.
    
    append str_fromkey to i_formkey.
    endloop.
    
    

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.