Application Development 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: 

BAPI or FM to create Service Order type SM01 in Plant Maintanence

0 Kudos
303

Hi All,

Can anyone help me in searching for a BAPI or a function Module to create a Service Order of type SM01(Service Order). This is usually done through transaction IW31. I have written a BDC as of now but it is acting cranky as a lot of things depend on User Settings I wanted to have a generalised way of doing this rather than a BDC.

Regards,

Sudhi

1 ACCEPTED SOLUTION

ramki_maley
Active Contributor
0 Kudos
79

Hi Sudhi,

There does not seem to be a BAPI available for Service Order Creation (at least in 6.20). One option you can consider is create the order with minimum required fields using BDC and then immediately change it using the Order Maintain BAPI.

Is your BDC executed as part of a dialog transaction or in background job? If it is always executed in background you should not worry about user settings as you can schedule the job to always run with the same id. The same applies if your data comes in as an idoc.

Gareth is correct. I did not see the BAPI docu.

Cheers,

Ramki Maley.

Message was edited by: Ramki Maley

4 REPLIES 4

Former Member
0 Kudos
79

BAPI_ALM_ORDER_MAINTAIN

I've used this in the past to do what you are trying I think.

I found it by going to transaction BAPI and expanding the relevant tree node.

ramki_maley
Active Contributor
0 Kudos
80

Hi Sudhi,

There does not seem to be a BAPI available for Service Order Creation (at least in 6.20). One option you can consider is create the order with minimum required fields using BDC and then immediately change it using the Order Maintain BAPI.

Is your BDC executed as part of a dialog transaction or in background job? If it is always executed in background you should not worry about user settings as you can schedule the job to always run with the same id. The same applies if your data comes in as an idoc.

Gareth is correct. I did not see the BAPI docu.

Cheers,

Ramki Maley.

Message was edited by: Ramki Maley

0 Kudos
79

Hi Ramkey, Gareth

Thanks for your leads. Ramki for your question I am executing the BDC as a methos of a Business Object and that is scheduled as a background task in the workflow. Well it had to be background task but for some reasons it would not execute and since we did not have time I made it as a foreground task and the workitem will come to the inbox and the user has to double click for the BDC to run as call transaction mode 'N'. This is the first time I had problems in having a background task to do a BDC.(Have done lots before without any problems). Will try to use the BAPI now.

Former Member
0 Kudos
79

Use "BAPI_ISUSMORDER_CREATEMULTIPLE"