on 07-16-2015 7:28 PM
Hi all, I am using BAPI_ALM_ORDER_MAINTAIN within a workflow to release a PM order which is created by the workflow in a step before with ALM_ME_ORDER_CREATE, followed by ALM_ME_ORD_BAPI_ORDER_POST and BAPI_TRANSACTION_COMMIT. That works fine and the result is a PM order that is not yet released. After the BAPI_TRANSACTION_COMMIT I have tried SET UPDATE TASK LOCAL, as well as WAIT UP TO 180 SECONDS. I also stopped the workflow to control whether all data is written to the database and I found all data of the PM order properly. BUT BAPI_ALM_ORDER_MAINTAIN always issued an error message saying that the data for the procedure (Vorgang) are not maintained for the PM order. If I run the BAPI_ALM_ORDER_MAINTAIN alone it works, same with the function I created as well as the method of the business object as well as the task for the workflow. As soon as the workflow runs it - error message, no release. Even if you release the PM order manually with IW32 the PM order is fine and released. No error message at all. My conclusion is that WF_BATCH cannot run the BAPI caused by lag of user rights also it has SAP_ALL. This makes no sence but might be the solution of the problem. Does anybody have an idea what's wrong?
Hi all,
Meanwhile we have changed the customizing of the PM order. It is going to be released automatically when it is created, so the first status is RELEASED.
All OSS notes refered to various problems but not to that a WF_BATCH user with SAP_ALL and SAP_NEW does not excecute a BAPI which runs by a dialog user with not half of the user rights WF_BATCH has.
Anyway, we found a workaround, thanks for the support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
I dont think this issue has to do something with user authorisation. It might be due to LUW and tRFC You are using commit work in the same and then release of order in same background method. Refer to link below. Try to create a separate background step to release the Order and check results
Regards
Sandy
Hi Holger,
I am facing a similar issue. I have to release the order from IW33 after all the approvals from workflow are completed.
The order will be created from IW31. after which the workflow will be triggered. there are few levels of approvals involved in this workflow. at the last level of approval, the order should be released. I doubt if the BAPI_ALM_ORDER_MAINTAIN can be used in my case ? I have to just change the user status to release (20).
Can you please suggest ?
Thanks
Meenakshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meenakshi, I made the experience that you have to run the program AS BACKGROUND TASK in the ABAP code. Than the tasks which is performing the ABAP program should run delayed and it works. But I had it in some cases that it didn't work. Please try, the delayed run should be at least a Chance. Regards, Holger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Refer to SAP note description below
Symptom
You use the BAPI BAPI_ALM_ORDER_MAINTAIN.
The BAPI supports new methods of changing the status of a PM order.
With SAP Note 1991913, the following methods were already implemented. SAP Note 1991913 is a prerequisite for this SAP Note.
With this SAP Note, you can select additional methods.
Other Terms
BAPI_ALM_ORDER_MAINTAIN, status, deletion indicator, deletion flag, reset deletion indicator, reset deletion flag, closed, completed, do not execute, enterprise asset management, EAM, enterprise asset management simplicity, EAMS, BAPI, notifications, with notifications
Solution
Implement this SAP Note in your system.
Run the report NOTE_2032068 in transaction SE38 with F8. The report automatically generates the relevant BAPI documentation.
Header Data
Released On | 25.02.2015 05:50:55 |
Release Status | Released for Customer |
Component | PM-WOC-MO Maintenance Orders |
Priority | Correction with low priority |
Category | Program error |
Validity
|
Correction Instructions
Correction Instructions | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Support Packages & Patches
Support Packages | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Causes - Side Effects
Notes / Patches corrected with this note | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The following SAP Notes correct this Note / Patch | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Regards
Sandy
Does WF-BATCH have SAP_NEW too? It should.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.