on 08-20-2014 3:30 AM
I want to resue one form for both display and edit page of one object. In the display page, all fields are set to read only, and in edit page, fields are set to changable. But i go through the training document and cannot find how to set the field attribute dynamically.
Best regards,
Robin
Hi Robin,
The parameter ct_field_usage is used to set the attributes to read only/ editable. Below is a sample code used to do the same, in get_data method. After the fields are set, cv_fied_usage_changed must be set to true, so that the changes are reflected.
field-SYMBOLS: <fs_field> like line of CT_FIELD_USAGE.
loop at CT_FIELD_USAGE ASSIGNING <FS_FIELD>.
case <FS_FIELD>-NAME.
when 'VEBLN'. " 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.
I found one parameter CT_FIELD_USAGE in method IF_FPM_GUIBB_FORM~GET_DATA, not sure whether it's the correct way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.