on 09-01-2014 11:40 AM
Hi Experts,
I am making read only for a field based on condition in get_data method of class CL_EHHSS_INC_BINFA_UI_FRM.
But it is not working. Pls find the code for the same.
LOOP AT CT_FIELD_USAGE INTO lw_field WHERE NAME = 'OC_INC_TYPE'.
lw_field-read_only = ABAP_TRUE.
MODIFY ct_field_usage FROM lw_field TRANSPORTING read_only.
ev_field_usage_changed = 'X'.
ENDLOOP.
Pls help me what is wrong in this coding.
Regards,
Reny Richard
Hi Reny,
Within your feeder class, update the reference fields in CS_DATA or CT_DATA within the
GET_DATA() method. You can find the names of the fields by looking at table
CT_FIELD_DESCRIPTION which gets returned from GET_DEFINITION().
Thanks and Regards,
Gangesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
Please check if this loop is executing for the correct desired event(say on click or from the start ). & the field name specified is correct or not through debugging. And check by placing the parameter ev_field_usage_changed = 'X'. after the loop statement.
Below is a sample code for making the field read only.
field-SYMBOLS: <fs_field> like line of CT_FIELD_USAGE.
loop at CT_FIELD_USAGE ASSIGNING <FS_FIELD>.
case <FS_FIELD>-NAME.
when 'OC_INC_TYPE'. " name of the field
<FS_FIELD>-READ_ONLY = 'X'. " ' ' for editable
ENDCASE.
CV_FIELD_USAGE_CHANGED = abap_true.
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.