on 12-28-2009 5:53 PM
When you are done with the dynmiac Table UI element generation, you might have used Binding method for that table right..
You need to get the column references of this TABLE and loop through the columns and using the create the Input field objetcs and using the set cell editor method passthis input field to this cell editor.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Have a look at sample Web Dynpro Component - DEMODYNAMIC in package SWDP_DEMO
it shows how to create context at runtime, create table at runtime and binding it to the newly generated context.
All the coding is done inside Assistance Class methods - you can simply copy paste the required methods and tweak it to ur purpose.
Assistance Class Used is - CL_WD_DEMO_DYN_MODEL and method used to create table dynamically is CREATE_TABLE_FROM_NODE.
In this method they are creating textviews for each column but using the same type of coding you can create Input fields instead of text views. Only the type of UI element will change.
Required code will be something like this-
DATA inputi type REF TO cl_wd_input_field.
data: coli type ref to cl_wd_table_column.
* create column
coli =
cl_wd_table_column=>new_table_column(
view = view
id = col_id
visible = visible_mode ).
CALL METHOD CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD
EXPORTING
BIND_VALUE = attr_path
* TOOLTIP =
VIEW = view
VISIBLE = visible_mode
* WIDTH =
RECEIVING
CONTROL = inputi.
coli->set_table_cell_editor( inputi ).
Hope you get a clue, from this code snippet..
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
go thru this article :
Conditionally Assigning Colors and Input Enable to ALV Columns in Web Dynpro ABAP
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.