cancel
Showing results for 
Search instead for 
Did you mean: 

FM/BAPI to deactivate/delete EQUI and M-plan

former_member206377
Active Contributor
0 Kudos

Is there any FM/BAPI to delete and deactivate EQUIPMENT or M-Plan?

Or any FM/BAPI to update the JEST table?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

why you want to use only Bapi& FM

use t code SE38 & run following Programmes RIARCEQV,RIARCEQA,RIARCEQD then your equipment will be deleted or use SARA transaction

The archieving object what should be archieved & how

Following archeving objects are available pm_equi,PM_Mplan

Regards

chand

former_member206377
Active Contributor
0 Kudos

Hi Chandrashekar,

I have to set these flags in the code, not manually. can this be done using the Programs mentioned by you?

Thanks

peter_atkin
Active Contributor
0 Kudos

Maybe it would help if you explain the business process...

PeteA

former_member206377
Active Contributor
0 Kudos

Hi Pete,

All equipments from Inspection lot are tested if they are funstioning well.. There are 3 Follow up actions triggered, In one of the Follow up action, if the Equipment is found to be faulty, it is scrapped/Dismantled. In such a case, the M-Plan and the Equip has to be deleted and deactivated, the status shoudl be set accordingly.

Thanks,

Vasuki

peter_atkin
Active Contributor
0 Kudos

I would suggest you deactivate the equipment without deleting them. THis way you retain the history od the equipment.

PeteA

Former Member
0 Kudos

Hi all,

I have the same problem too. Anybody can provide the solution on abap to deactivate the equipment? Perhaps using BAPI BAPI_EQUI_CHANGE, but i couldn't find the deactivate field on it. Please help.

Thanks

former_member206377
Active Contributor
0 Kudos

Hi Eva,

You can use the FM 'I_CHANGE_STATUS' to change teh status of equipment/Maintenance plan . Below is the code that you can use .

data: lv_objnr type equi-objnr,
         current_stat type TJ30-ESTAT . "(get the current staus by using FM (READ_STATUS)
       

CALL FUNCTION 'I_CHANGE_STATUS'
  EXPORTING
    objnr                   = lv_objnr
    estat_inactive      = current_stat 
    estat_active        = 'I0320'  "(Status for deactivation = 'I0320' , status for deletion = 'I0076')
*   STSMA               =
 EXCEPTIONS
   CANNOT_UPDATE        = 1
   OTHERS               = 2
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Edited by: Vasuki S Patki on Sep 17, 2009 9:39 AM