‎2012 Aug 10 8:20 AM
Hi,
I want to develop a program to cancel item assignment from maintenance plan but I don't find anything.
I've been trying to use the function modules grouped by MPLAN_API group function, for exemple MPLAN_ITEM_CHANGE and others but no success.
Does anyone know how to do it? At standard transaction IP02 there is a button which does that functionality, I've been debugging the standard program involved with that button but no success.
Thanks for your help.
‎2014 Apr 15 2:08 PM
I had the same requirement and using the FM 'MAINTENANCE_PLAN_POST'
example:
CALL FUNCTION 'MAINTENANCE_PLAN_POST' IN UPDATE TASK
EXPORTING
x_xaktyp = 'V'
TABLES
impla = impla
impos = impos
imhis = imhis
immpt = immpt.
But here need to prepare the internal tables impla,impos,imhis,immpt
for the selected item to be cancelled, we need to do some more steps
CLEAR impos_t-warpl.
CLEAR impos-wppos.
impos-status = 'F'.
impos-ind_wpgrp_input = 'X'.
impos-ind_gewrk_input = 'X'.
impos-ind_iwerk_input = 'X'.
and for all items impos-dbknz = 'X'.
and impla-mpla_upd = 'X'