cancel
Showing results for 
Search instead for 
Did you mean: 

Defining a Field as a Required Entry Field for Web Dynpro Create/Change Maintenance Work Order

cpz
Explorer
0 Kudos
1,393

In relation to SAP KBA 2708958 (Changes made in SPRO are not reflected in EAM Web Dynpro Apps), as we want to make some screen fields mandatory for input, for Web Dynpro Create/Change Maintenance Work Order Application.

The KBA 2708958 refers to the EAM Web UI Implementation Guide Version: 2.8 – 2018-01-25, and on page 34 of this guide is section 3.6-Defining a Field as a Required Entry Field.
This section specifies two BADI implementations which are required to change the properties of the fields to make them required for entry.
The BADIs are: /PLMB/EX_SPI_PROPERTIES_ACCESS and /PLMB/EX_SPI_APPL_ACCESS, but during the execution of the Create or Change Maintenance Work Order Applications, these BADI Implementations are not invoked?

Accepted Solutions (0)

Answers (2)

Answers (2)

vivek_seth
Explorer
0 Kudos

Check BADI: EAM_ORDER_FIELD_CONTROL and Implement Method: SET_FIELD_PROPERTIES.

Check Sample Code for Reference:

IF maintenanceorder-techobjisequiporfuncnlloc = 'EAMS_EQUI'.

INSERT VALUE #( fieldname = 'PLANGROUP' option = if_eams_ext_base=>fieldcontrol-mandatory ) INTO TABLE fieldproperties..

ENDIF.

ashish_karan
Newcomer
0 Kudos

BADI: EAM_ORDER_FIELD_CONTROL and Implement Method: SET_FIELD_PROPERTIES has been used.
INSERT VALUE #( fieldname = 'LOC_WBS_ELEM' option = if_eams_ext_base=>fieldcontrol-mandatory ) INTO TABLE fieldproperties.

I am trying to implement the similar approach to make 'WBS Element' field as mandatory under Organizational Data tab.
But the challenge is when I try to test the functionality using Create maintenance Order App , I am not able to navigate from General tab to any other tab.

I am facing below error.
Enter a value for "Work Breakdown Structure Element (WBS Element)"
No work center specified

Please update if anyone has any idea on this issue.

amy_king
Active Contributor
0 Kudos

Hi ashish_karan ,

I had the same problem with BAdI EAM_ORDER_FIELD_CONTROL and reached out to SAP. They replied this BAdI is only for S/4 HANA Cloud and is the wrong BAdI for our installation. They pointed me to KBA 2708958 which includes a link to the EAM Web UI Implementation Guide.

Section 3.6 (Defining a Field as a Required Entry Field) of the guide indicates two BAdIs from enhancement spot /PLMB/ES_SPI are needed. I just implemented the BAdIs yesterday but have not yet gotten it working. BAdI /PLMB/EX_SPI_PROPERTIES_ACCESS for example doesn't appear to be called by "Create Maintenance Order".

I'm still troubleshooting but hopefully this helps you.

vivek_seth
Explorer
0 Kudos

Hi ashish_karan,

I also faced the same issue and had to do it with an Enhancement in CL_EAM_CFD_HANDLER->HAS_ENTITY_CHANGED by setting the value for mr_buffer_line->fieldproperties and variable rv_changed.

cpz
Explorer
0 Kudos

Hi Sanket,

Yes, I was able to make the fields mandatory, by implementing an Implicit Enhancement at the end of Method BUILD_ORD_HEADER_PROPERTIES of Class CL_EAMS_SP_ORD, where I added code to make fields mandatory.

I also implemented an Implicit Enhancement at the end of Method /PLMB/IF_SPI_APPL_ACCESS~CHECK_BEFORE_SAVE of Class CL_EAMS_SP_ORD, where I added code to validate specific user input fields and generate errors messages if required.

Reading your requirement above, it is different to mine, as you are having an issue with saving custom field data. If the EAM Web UI Implementation Guide Version: 2.8 – 2018-01-25, provides instructions to do your requirement and you have followed them and is not working, then SAP Support should assist you?? The only other thing I can suggest, is look at the Methods of Classes CL_EAMS_SP_ORD and CL_EAMS_BO_ORDER, where you might be able to implement an Implicit Enhancement in a Method that saves the Order details.

amy_king
Active Contributor
0 Kudos

Hi cpz ,

Was this your final solution? I too am not seeing BAdI /PLMB/EX_SPI_PROPERTIES_ACCES triggered by Create or Change Maintenance Order. We appear to have all prerequisites installed per the EAM Web UI Implementation Guide. I'm stumped and may need to go with your solution of implicit enhancements.

Cheers,
Amy