Client wanted to mass correct the maintenance plan category. But it was not editable even in change mode in T-code. So, they called for their trusted companion, the ABAPer.. 🙂
We can achieve this using the standard FM ‘MAINTENANCE_PLAN_POST’.
But if you change only the header field MPTYP, then the change would reflect at database level, but not at screen level. So, the trick here is to change the category both at header(MPTYP) and item level (MITYP). Please call the FM as shown below and pass the new category to impla and impos table.
CALL FUNCTION ‘MAINTENANCE_PLAN_POST’
x_xaktyp = ‘V’
imhis = lit_imhis
immpt = lit_immpt
impla = lit_impla
impos = lit_impos.
Image source : www.completeimaging.co.uk