04-20-2018 1:02 PM
Hi,
I have done enhancement to re trigger release strategy for PO whenever Quantity is decreased.
Our system have recently got upgraded to EHP7.
Before upgrade every this was working fine, but after upgrade it is giving dump - "COMMIT_IN_OS_EVENT".
I have created Z of BAPI_PO_RESET_RELEASE. In this BAPI, on FM is called -
ME_PURCHASE_DOCUMENT_DATA_SAVE.
In this FM, one perform is there - PERFORM buchen(sapmm06e).
In this Perform, COMMIT WORK is giving dump.
Can you please help me on this.
You can refer screenshot for reference.
Thanks,
Nikesh commit.jpgdump.jpgfm.jpg
04-20-2018 1:31 PM
" I have created Z of BAPI_PO_RESET_RELEASE. In this BAPI, on FM is called
Your Z-FM is not a BAPI. Does it wraps a transaction, analyze your z-code.
Hints: You could try to either use the I_NO_COMMIT parameter of the called FM, call it in another LUW, call the standard BAPI. (or check current status of application to set this parameter: already in process of commit don't set it, already in update task raise dump solution no longer valid, etc..)
04-20-2018 3:17 PM
Hi Raymond.
Thank you for the quick reply.
Yes that Z fm is not an BAPI but the whole code inside this Z FM is copied from BAPI except that authority check block.
I didn't get your hint.
Can you please elaborate it.
Thanks,
Nikesh
04-23-2018 7:52 AM
Did you apply changes provided by SAP in the original BAPI during the upgrade, else could you consider using some enhancement spots to add your own authority-checks or to add those in simple wrapper of the BAPI?
04-23-2018 10:39 AM
Dear Raymond,
This time I m using standard BAPI instead of Z.
But still same dump is coming.
But if I m running the BAPI separately in SE37, then it it not giving dump and PO release strategy got reset successfully.
04-23-2018 10:40 AM
04-23-2018 12:09 PM
Hi Raymond,
I have done enhancement in class - CL_OS_CA_COMMON &
method - IF_OS_CA_SERVICE~PREPARE_FOR_TOP_TRANSACTION
04-23-2018 12:40 PM
Could you execute the BAPI and the BAPI_TRANSACTION_COMMIT in DESTINATION 'NONE' followed by an explicit call of RFC_CONNECTION CLOSE?
04-23-2018 1:35 PM
04-23-2018 1:40 PM
Did you get some messages in RETURN (not always 'E' type, but can be a 'S' or 'W' message such as 'not released because xxx')
04-23-2018 2:33 PM
Copying SAP standard to a Z object is very bad practice and can cause a lot of problems, especially during upgrades. Please reconsider whether you can achieve your requirements differently. E.g. by performing an auth check before calling the BAPI. Or wrapping the BAPI in a Z fn module. Or enhancing the BAPI at an explicit or implicit enhancement point. Or changing the standard. All of these are preferable to copying the standard Z object.
Matt Billingham
SAP Community Moderator
04-23-2018 3:47 PM
04-23-2018 3:49 PM
Thank you Matthew.
I have call standard BAPI now , but it is giving same dump at same place.
04-24-2018 8:04 AM
Then try to wrap call of BAPI and its commit in a RFC FM executed IN BACKGROUND UNIT.