on 01-26-2011 4:28 PM
Hi experts,
I am working on webdynpro abap, i am working with ALV TABLE,in this alv one column should be inputfield (ui). please give good reference.
waiting for reply.
Hi krishna ,
You can do it easily. The above mentioned referrence are enough to make you understand that in alv if you want to make any field editable than you have to make it as input field.
I am giving you some sample scenario :-
In your coding
1. Instantiate your alv component. (by using create component )
2. Use set data to display the requiered node in alv.
3.In your alv component use method get model
4. If you want to make one full column as a input field than you have to do it uising colulmn referrence like below:-
DATA: LR_COLUMN TYPE REF TO CL_SALV_WD_COLUMN.
DATA: LR_COLUMN_SETTINGS TYPE REF TO IF_SALV_WD_COLUMN_SETTINGS. " to do any change in alv column
DATA: LR_TABLE_SETTINGS TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
DATA LT_COLUMNS TYPE SALV_WD_T_COLUMN_REF.
DATA LS_COLUMN TYPE SALV_WD_S_COLUMN_REF.
DATA LR_INPUT_FIELD TYPE REF TO CL_SALV_WD_UIE_INPUT_FIELD.
configure columns
LR_COLUMN_SETTINGS ?= LV_VALUE.
LT_COLUMNS = LR_COLUMN_SETTINGS->GET_COLUMNS( ).
In your LT_COLUMN you will get instance of all the field of your context node.
now create a loop and use case statement to implement various thing according to your requierment like input field, check box etc.
->
LOOP AT LT_COLUMNS INTO LS_COLUMN . "
CASE LS_COLUMN-ID .
WHEN ' FIELD_NAME '. " this is my requiered field for input field
CREATE OBJECT LR_INPUT_FIELD EXPORTING VALUE_FIELDNAME = LS_COLUMN-ID .
LR_COLUMN = LV_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( ID = LS_COLUMN-ID ).
LR_COLUMN->SET_CELL_EDITOR( LR_INPUT_FIELD ).
ENDCASE.
ENDLOOP.
*set read only mode to false (and display edit toolbar)
LR_TABLE_SETTINGS ?= LV_VALUE.
LR_TABLE_SETTINGS->SET_READ_ONLY( ABAP_FALSE ).
Thanks & Regards,
Monishankar C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1) add table ui element in the layout.
2) right click on the table ui element and then add table column to it.
3) right click on the table column and add cell editor as input field.
so this particular column will have input field .
hope this may help you in solving your problem
thanks and regards,
sahai.s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
use the following link ..
[editing ALV |http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]
thanks
sarbjeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.