on 08-06-2009 9:54 AM
Hi all,
Can anyone send me the step by step procudre or tutorial for developing application using dropdown in Webdynpro ABAP?.
Regards,
Shanthi
Hi Shanti,
there are 2 kinds of dropdowns in WDA. (Dropdown by index & key) they differ in the nature of binding properties. Just have a look at the info below:
Index Binding:
1) Selecting a value leads to a round trip only if the corresponding event property is bound to an action.
2) Selecting a value will change the lead selection.
3) The data stored in the context will not be changed by selecting any value.
Key Binding:
1) Selecting a value leads to a round trip only if the corresponding event property is bound to an action.
2) Selecting a value will not change the lead selection.
3) The data stored in the context element at lead selection will be overwritten by the key value related to the selected data.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a reference you can try go through this [free sample version|http://www.sap-press.de/download/dateien/1079/sappress_web_dynpro_for_abap.pdf] of Ulli Hoffman's textbook Web Dynpro For ABAP. Go through section 3.3.1 "Using Dropdown Lists". Hope that this helps resolve your problem.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for drop down by key , proceed like above ;
except mantain the cardinlaity as 0..1 . Here is a code for your refernce :
-> TYPES: BEGIN OF str_roles,
-> role TYPE z0cz_roles-role_id,
-> END OF str_roles.
->DATA: it_role TYPE TABLE OF str_roles,
-> wa_role TYPE str_roles.
->DATA: value1 TYPE wdy_key_value,
-> set TYPE wdy_key_value_table.
-> SELECT role_id FROM z0cz_roles INTO TABLE it_role.
->SORT IT_ROLE DESCENDING BY ROLE.
-> LOOP AT it_role INTO wa_role.
-> value1-key = sy-tabix.
-> value1-value = wa_role-role.
-> APPEND value1 TO set.
-> ENDLOOP.
-> DATA : node_info TYPE REF TO if_wd_context_node_info.
-> node_info = wd_context->get_node_info( ).
-> node_info = node_info->get_child_node('CN_DROPDOWN').
->node_info->set_attribute_value_set( name = 'CA_ROLE' value_set = set ).
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
this sample code wud help u
suppose I have created a node CN_SYSTEM with att SYS_DESC ( this is field name in my table z2ts_systems )
proceed like this :
->DATA : it_sys TYPE STANDARD TABLE OF z2ts_systems .
-> SELECT *
-> FROM z2ts_systems
-> APPENDING TABLE it_sys.
->DATA lo_nd_cn_system TYPE REF TO if_wd_context_node.
->* navigate from <CONTEXT> to <CN_SYSTEM> via lead selection
-> lo_nd_cn_system = wd_context->get_child_node(
-> name = wd_this->wdctx_cn_system ).
-> lo_nd_cn_system->bind_table( it_sys ).
I hope it wud help
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
if u r using drop down by index , than proceed like this :
1 declare a context node of cardinality 0..n
2 declare attribute of type string under it . The attribute name should be exactly the same as that in database table '
eg if u want to poulate values for a field ' SYS' from table , than giv the attribute name as 'SYS' in context attribute
3 declare internal table of type standard table
4 populate internal table with values
5 take the refernce of the node , u have created
6 bind it with the internal table
the dropdown by index wud nw contain app values
regards
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check standard component WDR_TEST_EVENTS Regards, Radhika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.