Skip to Content
avatar image
Former Member

Read only/Grayout input field based on condition in FPM GUIBB

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 FPM screen and the same needs to be gray out/read only 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 grayout the field. I wrote the code in FEEDER CLASS OF

GET_DEFINITION - Actions

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.

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_binfaINTO wa_ehhssd_inc_binfaWHERE 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.

Kindly help on this.

Thanks,

Setty

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers