Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Service Order-BAPI-COMMIT

Former Member
0 Likes
1,241

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?

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,113

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

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,113

It depends upon the Enhancement you have chosen to include this BAPI call.

Read only

former_member16553
Active Participant
0 Likes
1,113

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.

Read only

0 Likes
1,113

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 ?

Read only

0 Likes
1,113

am trying to get this thing sorted out too...

Enhancement: QQMA0014

User-exit: EXIT_SAPMIWO0_020


Read only

former_member222709
Contributor
0 Likes
1,113

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.

Read only

0 Likes
1,113

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.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,115

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

Read only

0 Likes
1,113

Thank you..