on 07-23-2008 10:26 AM
dropdownbyindex ... can some one tell me the steps to use it...
my application was working fine... but when i inserted a dropdownbyindex it is giving an error ..The assert condition was violated..
i tried to fill the drop down in wddoinit()
what can i do, if possible can someone give the exact procedure
thank you.
Hi sai,
Sorry yar that one is for dropdown by key . i was bit confused.
for drop down by index.
the node should be of cardinality : 0..n
My code :
**DROP DOWN BY INDEX CODING***
data lo_nd_so_desc type ref to if_wd_context_node.
data lo_el_so_desc type ref to if_wd_context_element.
data ls_so_desc type wd_this->element_so_desc.
data: ls_so type zsm_so,
lt_so type table of zsm_so,
lv_sodesc type zsodesc.
call function 'ZBAPI_PROJ_SOCODE'
tables
e_so = lt_so.
lo_nd_so_desc->bind_table( lt_so ).
-
data:
lt_context_attr1 TYPE wd_this->elements_dp,
ls_attr1 TYPE wd_this->element_dp ,
lv_index1 TYPE i.
data: lv_roledes TYPE zse_projgovern-roledes.
data : lt_roledes type table of ZBAPI_ROLEDES,
ls_roledes type ZBAPI_ROLEDES.
ZBAPI_ROLEDES = in bapi table associate type.
CALL FUNCTION 'ZBAPI_PEOPLE_ACODE'
TABLES
ZASSTYPE_PEOPLE =
ET_PROJ =
ET_PROG =
ET_ROLEDES = lt_roledes.
ET_ERRORNEW =
.
LOOP AT lt_roledes INTO ls_roledes.
ls_attr1-ROLEDES = ls_roledes-ROLEDES.
APPEND ls_attr1 TO lt_context_attr1.
ENDLOOP.
lo_nd_dp->bind_table( lt_context_attr1 ).
Regards,
Muneesh Gitta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sai ,
This is my dropdown coding , here iam using dropdown by index.In initialization i wrote d code.
node : cardinality 1:1
selection 0:1
data lo_nd_org_object type ref to if_wd_context_node.
data lo_nd_info_org_object type ref to if_wd_context_node_info.
data lo_el_org_object type ref to if_wd_context_element.
data ls_org_object type wd_this->element_org_object.
data value_set type wdr_context_attr_value_list.
data wa_value_set type wdr_context_attr_value.
data it_list type standard table of zstr_details.
data wa_list type zstr_details.
navigate from <CONTEXT> to <ORG_OBJECT> via lead selection
lo_nd_org_object = wd_context->get_child_node( name = wd_this->wdctx_org_object ).
lo_nd_info_org_object = lo_nd_org_object->get_node_info( ).
call function 'ZBAPI_ORG_LIST'
tables
et_list = it_list
ET_ERRORNEW =
.
loop at it_list into wa_list.
wa_value_set-value = wa_list-org_type.
wa_value_set-text = wa_list-org_desc.
append wa_value_set to value_set.
clear: wa_list,
wa_value_set.
endloop.
lo_nd_info_org_object->set_attribute_value_set( name = 'ORG_TYPE' value_set = value_set ).
read table value_set into wa_value_set index 1.
Reward if useful.
Regards,
Muneesh Gitta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Muneesh Gitta, I believe that you have given rather incorrect information. What Muneesh Gitta has given is a solution for populating a DropDownByKey, not a DropDownByIndex. There is a fairly important difference between the two types of DropDowns and you must be careful not to confuse them.
Here is a help link that describes the differences and how to bind each:
http://help.sap.com/saphelp_nw70/helpdata/EN/55/5f9041d3c72e7be10000000a1550b0/frameset.htm
The DropDownByIndex doesn't need the SET_ATTRIBUTE_VALUE_SET. Instead it should be directly bound to a Context Node (It is node based instead of DDBKey's attribute base).
Check node cardinality which is binded to dropdownlistboxbyindex ui element.
Node cardinality should be 0..n or 1..n.
Soo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.