BADI for Maintenance Plan Due Date updating
Hello everyone!! In this blog, I am going to explain how the next due date of Maintenance plan can be updated with the implementation of BADI “BADI_EAM_EXIT_IPRM002“.
What is Usage Decision:
When we perform the calibration activity using Inspection lot once after performing Usage decision(UD) for the inspection lot the next due date against the Maintenance plan is not updating the table MHIO “Bas. start date (GSTRP)” field instantly.
The due date will be updated only on the next day when background job runs or when the user manually go to t-code IP10 and save the Maintenance plan.
Business need was to automate this process without changing the frequency of background job which executes the API “MPLAN_UPDATE_SCHEDULING” and also by avoiding the manual execution in IP10 transaction.
In our custom program logic which performs the Usage Decision of Maintenance Plan, we have made a call to the API “MPLAN_UPDATE_SCHEDULING” to update the MHIO table.
After above code changes the MHIO table got updated correctly
- MHIS table was not updated with the new date and also wrong dates were visible in IP03 t-code because the FM “MPLAN_UPDATE_SCHEDULING” updates date only after order is set in TECO status.
To avoid this, found and implemented the below BADI “EXIT_SAPLIPM5_002”
2. As we change only MMDD in the above BADI, we faced another problem when different Calibration cycles used i.e., MON, DAY, YR.
Updated Custom logic for UD, to avoid problem for different Calibration cycles used.
After implementing the BADI and code changes in our custom program, we were able to achieve the requirement which updates the Due date correctly.
Please share your valuable feedback and thoughts in the comments section.
For related topics please follow the below link and read other posts on the topic:
Please follow my profile for related information. Thanks Everyone 🙂