on 06-24-2016 10:55 AM
Hi,
As per my requirement i need to gray out a list of fields in my fpm application but the coding for gray is working only for fields of display type 'TEXT VIEW'.
but not of type 'Input fields'.
here in my scenario there are list of input fields type so i write the above code in get definition method to convert input field to text view but it is not working.
Please check and let me know how to achieve it???
get_definition :
------------------------
if sy-uname = 'TSTIC_DSPEC'..
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'IDENTIFICATIONTYPE'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'.
ENDIF.
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'IDENTIFICATIONNUMBER'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'.
ENDIF.
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'IDINSTITUTE'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'..
ENDIF.
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'IDENTRYDATE'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'.
ENDIF.
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'COUNTRY'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'.
ENDIF.
READ TABLE et_field_description ASSIGNING <ls_field_description>
WITH KEY name = 'REGION'.
IF sy-subrc = 0.
<ls_field_description>-DEFAULT_DISPLAY_TYPE = 'TV'.
ENDIF.
ENDIF.
please help me out soon.....
Hi,
As per my understanding, If you want to gray-out the field you can set the "read_only" property, which is of BOOLE type.You can set this property for Input fields.
Suppose if your requirement is display the field as 'Input field' you can set the property Default_display_type as ="IN".
Refer the below screen shot for the same.
Hope it will clear your doubts...
Regards, Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't get your point.
If the field type is 'TextView', what is the need of grey out?? In the UIBB configuration it self you can set the display type property as TextView(it can't be editable).
You can make input field as grey out( i mean you can make it read only).
Try to loop the fields and set the read_only property for required fields.
Note: In UIBB Configuration, the 'display type' property should be input field.
Sample code:
data: ls_field_desc type fpmgb_s_formfield_descr.
loop et_field_description into ls_field_desc.
if ls_field_desc-name eq 'IDENTIFICATIONTYPE' or
ls_field_desc-name eq 'IDENTIFICATIONNUMBER' or
ls_field_desc-name eq 'IDINSTITUTE'.
ls_field_desc-read_only = abap_true. " set the read_only property for above fields
endif.
append ls_field_desc to et_field_description.
endloop.
Regards, Naga
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.