cancel
Showing results for 
Search instead for 
Did you mean: 

Grayout input field based on condition in FPM GUIBB

former_member231368
Participant
0 Kudos

Hi All,

Presently I working on Floorplan Manager for SAP EHSM module. I am new to this & having some technical challenges.

Requirements:

1. I have added a custom field to the screen and the same needs to be gray out/diplay mode based on some condition. I am able to see the filed on the screen updating the value into corresponding tables without writing any code since added this into BO structures.

Now challenge is I am unable to gray our the field. I wrote the code in FEEDER CLASS OF

     GET_DEFINITION   - Actions

     PROCESS_EVENT - Errors to be displayed if field value is not correct

     GET_DATA              - Making field in gray our or display. But it is not working as expected. Kindly do let me know whether the code is in right place or not.

2.  I am populating error message if the entered value is worng. But it is allowing to save and value is also updating.

Kindly help on this.

Thanks,

Yerukala Setty

Accepted Solutions (0)

Answers (1)

Answers (1)

vaibhav_singh12
Participant
0 Kudos

Can you share the custom code you have written.

former_member231368
Participant
0 Kudos

FYI...

field-symbols: <fs_FPMGB_S_FIELDUSAGE> type FPMGB_S_FIELDUSAGE,
<lv_field>  
TYPE any.


LOOP AT ct_field_usage assigning <fs_FPMGB_S_FIELDUSAGE> WHERE name EQ  'ZZEHSM_LEVELS'.

ASSIGN COMPONENT 'ZZEHSM_NEW_NR' OF STRUCTURE cs_data TO <ls_nr_id>.
ASSIGN COMPONENT 'ZZEHSM_LEVELS' OF STRUCTURE cs_data TO <lv_field>.
SELECT SINGLE *
FROM ehhssd_inc_binfa
INTO wa_ehhssd_inc_binfa
WHERE zzehsm_new_nr = <ls_nr_id>.


IF NOT wa_ehhssd_inc_binfa-zzehsm_levels IS INITIAL.
<fs_FPMGB_S_FIELDUSAGE>-read_only = abap_true.

ev_field_usage_changed = abap_true.

ENDIF.


endloop.