‎2012 Apr 04 11:13 AM
Need:
To create Service order when Service Notification is entered and Saved.
I found the enhancement and user exit. BAPI_ALM_ORDER_MAINTAIN is used to create service order. I cannot use COMMIT WORK or BAPI_TRANSACTION_COMMIT, as it is not right to use them in the user-exit.
1.Should i create a Z.. FM which is Update module enabled (in Attributes) ?
or Z.. FM IN UPDATE TASK??
or Z.. FM IN BACKGROUND TASK??
2.Where can I call the Commit statement?
‎2012 Apr 04 11:55 AM
Ok. This exit gets triggered prior to notification save. Now create a Remote enabled Z FM , wrap the bapi in it. Call it in this exit with background task http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm.
Forget about the commit
‎2012 Apr 04 11:22 AM
It depends upon the Enhancement you have chosen to include this BAPI call.
‎2012 Apr 04 11:22 AM
Hi
If your user exit get triggered befor saving the notification, then no need to write commit work other wise create a ZFM with and call it in user-exit as call zfm in background task.
‎2012 Apr 04 11:31 AM
Hi,
You have asked 3 similar question's related to your scenario. Please read the sap help documentation & understand the differences of update functions & tasks ,RFC & normal functions etc, before proceeding.
Until you provide the clear picture of your question. You will not reach the solution.
Okay !!! What enhancement or customer exit your are using, which is the transaction ?
‎2012 Apr 04 11:43 AM
am trying to get this thing sorted out too...
Enhancement: QQMA0014
User-exit: EXIT_SAPMIWO0_020
‎2012 Apr 04 11:28 AM
Hi Sneha,
As per the FM Documentation you need to use the Table parameters 'IT_METHODS' and call the SAVE method. The parameter documentation also describes how to call the SAVE method.
Specifically about your problem about COMMIT, I believe if you call the SAVE method and try without any COMMIT, then the system COMMIT after the end of the LUW should happen and a manual COMMIT need not be required. But, since I've not used it in an enhancement, I can only recommend you to try with the SAVE Method.
Regards,Pranav.
‎2012 Apr 04 11:45 AM
Hey,
thanks Pranav. But I am not sure about that too. i have check lot of sample codes they all use COMMIT even though they pass SAVE in the it_methods.
‎2012 Apr 04 11:55 AM
Ok. This exit gets triggered prior to notification save. Now create a Remote enabled Z FM , wrap the bapi in it. Call it in this exit with background task http://help.sap.com/saphelp_nw04/helpdata/en/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm.
Forget about the commit
‎2012 Apr 04 11:58 AM