on 11-30-2011 12:25 PM
Hello Community,
currently I am customizing WDA ESS Scenarios on EhP5. I added some new fields in the method IF_FPM_GUIBB_FORM~GET_DEFINITION of the feeder class for the scenario.
The method has also an EXPORTING Parameter for the field descriptions (ET_FIELD_DESCRIPTION).
The table line is structure of FPMGB_T_FORMFIELD_DESCR and I did the following to mark some fields as 'mandatory':
READ TABLE et_field_description WITH KEY name = 'STRAS' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE et_field_description WITH KEY name = 'PSTLZ' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE et_field_description WITH KEY name = 'ORT01' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE et_field_description WITH KEY name = 'ZZ_CITY_CODE' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE et_field_description WITH KEY name = 'MELDEZETTEL' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.Now I expect, that the fields on the ESS scenario would have a red asterisk. But I am also able to save the data with not entering all neccessary data.
What I have to do, to mark the fields as mandatory?
Thank you and best regards, Christian
Hello community,
I've found the problem.
So in method IF_FPM_GUIBB_FORM~GET_DATA the table CT_FIELD_USAGE was overwritten. At the top of the method this table had the information about all mandatory field. But during the processing the table was overwritten and the information which fields are mandatory, as well.
So if you define the mandatoy fields at the bottom of the method you will get the red asterisk.
Here the code snippet:
FIELD-SYMBOLS <fs_wa_mand_field> TYPE FPMGB_S_FIELDUSAGE.
*** Define maddatory fields
READ TABLE CT_FIELD_USAGE WITH KEY name = 'STRAS' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE CT_FIELD_USAGE WITH KEY name = 'PSTLZ' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE CT_FIELD_USAGE WITH KEY name = 'ORT01' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE CT_FIELD_USAGE WITH KEY name = 'ZZ_CITY_CODE' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.
READ TABLE CT_FIELD_USAGE WITH KEY name = 'MELDEZETTEL' ASSIGNING <fs_wa_mand_field>.
<fs_wa_mand_field>-MANDATORY = abap_true.Thank you and best regards, Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Making a UI element mandatory is not going to execute validations, it just makes the red star indication after the label to visualize that it is mandatory.
This has been widely discussed in WebDynpro threads, see note 948753 for detailed solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.