cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ALM_ORDER_MAINTAIN not changing Maintenance order system status to TECO

former_member1240896
Participant
0 Kudos

hi,

We have recently upgraded our system from 4.6c to ECC EHP6.0.

We have have  custom program to issue permits and TECO the maintenance order (IW32, IW33) , similar to IPM2 in 4.6c system .

The change to order is done using BAPI  - BAPI_ALM_ORDER_MAINTAIN .

The functionality to change the order from REL to TECO works fine in 4.6c but not in ECC.

the BAPI call BAPI_ALM_ORDER_MAINTAIN does not change the status to TECO.

Can you please help me out on this , as this paused entire PM functionality -

   * Change the status Work Order to TECO.
       CLEAR: it_methods, it_header, it_return.
       REFRESH: it_methods, it_header, it_return.

       it_methods-refnumber  = 1.
       it_methods-method     = 'TECHNICALCOMPLETE'.
       it_methods-objecttype = 'HEADER'.
       it_methods-objectkey  = t_permit_logs-objnr+2(12).
       APPEND it_methods.

       clear it_methods.
       it_methods-refnumber  = 1.
       it_methods-method     = 'SAVE'.
       it_methods-objectkey  = t_permit_logs-objnr+2(12).
       APPEND it_methods.

       it_header-orderid = t_permit_logs-objnr+2(12).
       APPEND it_header.

       CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
        TABLES
          it_methods             = it_methods
          IT_HEADER              = it_header
          RETURN                 = it_return.

       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'X'.

Regards,

Chandan.

Accepted Solutions (0)

Answers (1)

Answers (1)

raymond_giuseppi
Active Contributor
0 Kudos

Did you

  • Apply Note 1377678 - COOIS: REL and CLSD system status is not unique  in your system to remove ambiguity on 'REL' status.
  • Analyze RETURN parameter
  • Check Customizing from BS23 on I0002 "Released" and I0045 "Technically completed" and BS33 on business transaction BTAB "Technically complete"(double-click and where-used to analyze constraints) - look at your documentation, are you the first customer who never changed those tables in 46c

Regards,

Raymond

former_member1240896
Participant
0 Kudos

hi Raymond,

thanks for the reply, i implemented the note but still same.

i checked BS23 and BS33, it is the same in 4.6c and ECC -

the retrun meesage of BAPI says

Iw 654  - Order completion refused as the permits are still missing.


System statuses influencing the process:

I0001 CRTD Created                        permits
I0002 REL  Released                       permits
I0009 CNF  Confirmed                      permits
I0012 DLV  Delivered                      permits
I0013 DLT  Deletion indicator             permits
I0015 NCMP Not completed                  prohibited
I0042 PREL Partially released             permits
I0043 LKD  Locked                         prohibited
I0045 TECO Technically completed          prohibited
I0046 CLSD Closed                         permits
I0065 MDLK Master data locked             prohibited
I0076 DLFL Deletion flag                  prohibited
I0181 CRAB Control recipe discarded       permits
I0235 NoMP No make-to-order prod.         prohibited
I0241 CRCR Control recipe created         prohibited
I0267 CRFI Control recipe finished        permits
I0320 INAK Object deactivated             prohibited
I0391 NOCH Changes forbidden              prohibited
I0393 MADJ Manual adjustment necessary    prohibited
I0430 BLTC Block technical completion     prohibited

raymond_giuseppi
Active Contributor
0 Kudos

Strange, that looks like an old bug as of R3 46c Note 379182 - Permit: Unwanted message when order is released

The system displays an unwanted message when the order is released or the order is completed.

...

If an order is released in the background, an unwanted message with regard to the permit determination can occur.

Check for the  correction instructions in this note and its prerequisite (Note 375710 - Update of the PM/CS permits), and cross those with actions executed during SPAU. Were the notes manually implemented in 46c, and wrongly applied in SPAU during upgrade ?

Regards,

Raymond

former_member1240896
Participant
0 Kudos

thanks Raymond,

the note note 379182 is implemented in 4.6c and ECC.

should i not implement this note ?

raymond_giuseppi
Active Contributor
0 Kudos

No keep it, If there has been no inadvertence during the SPAU, the cause of the error is still to find...

  • Do you get similar error during IW32 ?
  • In database for this order, is CAUFVD-MATSV missing (Not yes access to a system, so don't remember if AUFK or AFKO)
  • Perform a check of settings in the characteristic for permit class
  • If active on your system, check integration between Plant Maintenance (PM)  and Funds Management (PSM-FM) and derivation rule in FMDERIVE
  • And interpreting the message literally, try to issue the outstanding permits.


Regards,

Raymond

former_member1240896
Participant
0 Kudos

both the notes are implemented in 4.6c, in SPAU, the notes are not available .

the corrected code in 4.6c is available in ECC .

former_member1240896
Participant
0 Kudos

through IW32 , the order can be TECO ed.

what do you mean by outstanding permits ?, how can i find them.

mean while i shall ask func consultant to check the config.

can you please be specific on what should i check in the dataabse?

raymond_giuseppi
Active Contributor
0 Kudos

Not before tomorow at office (UTC+1)

former_member1240896
Participant
0 Kudos

hi Raymand,

let me know when your are available, the issue still exists..

raymond_giuseppi
Active Contributor
0 Kudos

Not able to replicate the problem, you could raise an OSS http://service.sap.com/message if not already done.

(They should be allowed to connect to your system)

Regards,

Raymond