cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module/BAPI to Close Orders (CLSD)

peter_atkin
Active Contributor
0 Likes
5,099

Hi all,

Does anyone know of a single function module that will close a PM/CS order (system-status CLSD) and also update the AFIH-IPHAS field at the same time.

We have tried various scenarios (including BAPI_ALM_ORDER_MAINTAIN, IMAS_CHANGE_STATUS_SINGLE, STATUS_CHANGE_INTERN, etc) without luck..

Note 1: if both aren't updated, then it messes up order processing and reporting...

Note 2: we have used the same method as IW38, but it uses BDC and we don't want to use that..

PeteA

Accepted Solutions (1)

Accepted Solutions (1)

paul_meehan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

I don't know of any single function module, there possibly is none that does the close and updates IPHAS.

Have you considered transaction CO99 (program RKKBABS0 for batch/background).

- Can be run for specific order types based on retention time

- Order must have status TECO.

There are limited selection options but could be expanded as part of a custom development.

-Paul

peter_atkin
Active Contributor
0 Likes

Hi Paul,

Yeah - tried that and a few others too.

The problem is that the orders are in REL mode (not TECO)...

We are now opting for a different strategy whereby we use

- IMAS_CHANGE_STATUS_SINGLE (sets CLSD)

then

- CO_VB_KO99_ORDER_UPDATE (updates AFIH-IPHAS)

PeteA

0 Likes

Hello Pete,

maybe you know...

How to revoke CLSD and TECO...

We have tried to use BAPI_ALM_ORDER_MAINTAIN for revoke TECO, but It works sometimes and sometimes doesn't... We don't know when and why... (((

Similar thead was discussed here, but was not resolved...

0 Likes

Hi all,

I hope I found out the solution... But I have not used it yet...

See this SAP Note

1991913 - Status enhancements for BAPI BAPI_ALM_ORDER_MAINTAIN (25.02.2015)

Symptom

You use the BAPI BAPI_ALM_ORDER_MAINTAIN.

It is impossible to perform the following status actions:

  • set the status "Do Not Execute"
  • set the status "Lock"
  • reset the status "Lock"
  • reset the status "Technically complete"
  • set the status "Complete (business)"
  • reset the status "Complete (business)"
  • set the deletion flag
  • reset the deletion flag

And these

2027616 - EAM: Additional BAPI Functionality - Preparation Note (06.06.2014)

2001050 - EAM: Preparation for additional function - BAPI BAPI_ALM_NOTIF_CREATE (29.09.2014)

2003154 - EAM: Creation of notification with template - BAPI BAPI_ALM_NOTIF_CREATE (23.09.2014)

1991946 - Preparation for additional status changes - BAPI BAPI_ALM_NOTIF_CREATE (19.12.2014)

Best regards,

Anton

0 Likes

One more...

2032068 - Status enhancements for BAPI BAPI_ALM_ORDER_MAINTAIN 2 (25.02.2015)

With this SAP Note, you can select additional methods.

  • Set the status "Do Not Execute Order" and complete notifications
  • Set the status "Do Not Execute Order" and remove assigned notifications from the order
  • Set the status "Technical Completion" and complete notifications
  • Reset the status "Technical Completion" and process assigned notifications again
  • Set the status "Complete (business)" and complete notifications
  • Set the deletion indicator for assigned notifications as well
  • Reset the deletion indicator and process assigned notifications again
0 Likes

))) 2 days later...

2107881 - Preparatory note for SAP Note 2032068 (new status changes possible using the BAPI BAPI_ALM_ORDER_MAINTAIN 2) (27.02.2015)

0 Likes

I am so sorry... But it is SAP ))))

2027834 - EAM: Preparation of Order/Notification EA-APPL (UDO) (06.06.2014)

You would like to implement one of the following notes?

  * Note 1991913

  * Note 2003154

This note is mandatory for the implementation.

Answers (2)

Answers (2)

smeeta_r
Explorer
0 Likes

This message was moderated.

Former Member
0 Likes

Hi Pete!!

If your desire to close your work order technically, the field PHASE is filled up as '3', which means 'Technically completed', by using IW32 T-CODE, in SAP.

Have you tried to use the method value "TECHNICALCOMPLETE" in the BAPI_ALM_ORDER_MAINTAIN? I guess it works!

Regards,

Evandro Costa Neves.

peter_atkin
Active Contributor
0 Likes

Evandro Costa Neves.

We know how to do TECO via BAPI_ALM_ORDER_MAINTAIN.

However, we want to set CLSD ensuring the AFIH-IPHAS field is also updated.

Anyone else got any ideas?

PeteA