cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of external services - function module - how to

Former Member
0 Kudos

Hi guys,

I am developing an application to support all the operations regarding a work order management and at this moment I am facing a problem related to creation of an operation with external services (PM03 control key). I know that BAPI_ALM_ORDER_MAINTAIN cannot process services lines, in fact if we try to do this via this BAPI the system gives us IWO_BAPI 206 error message.

I am wonder if some of you already has this kind of requirement and if so which should be the right way to achieve what I need, please share with me. Also for those who already have worked with Mobile Asset Management, how they manage this?

Happy new year for all.

Regards,

Rogério

View Entire Topic
0 Kudos

Hi Rogério,

This reply might be little late but just posting it for others benefit. It is quite possible to add service lines via  'BAPI_ALM_ORDER_MAINTAIN' BAPI. Recently, I have developed a program and along with the external operation (PM03), we can create the external service lines using this BAPI.


wa_methods-objecttype = 'SERVICELINE'.

wa_methods-method = 'CREATE'.

You need to map the operation number to the 'activity' field of service lines.

Thanks,

Prashant

Former Member
0 Kudos

Hi Prashant.

Could you help me?

I've tried test 'BAPI_ALM_ORDER_MAINTAIN' with this 'SERVICELINE' method, but it didn't work!!

I've filled as below:

Table: IT_METHODS

REFNUM     | OBJECTTYPE   | METHOD |  OBJECTKEY

000001      |  HEADER           | CREATE  |  %00000000001

000001      | OPERATION      | CREATE  |  %000000000010001

000001      | SERVICELINE   |  CREATE  |  %000000000010001

000000      |                            |  SAVE       |

Table: IT_OPERATION

ACTIVITY = 0001

SUB_ACTIVITY = blank

CONTROL_KEY = PM03

---

---

---

(and other fields)


(and other tables - IT_OPERATION_UP, IT_HEADER, IT_HEADER_UP, as usual)

When I execute, I receive as a Return this message

E | IWO_BAPI2 | Object name SERVICELINE in method table is invalid

Thanks in advance!

Sbrug

0 Kudos

Hi Sbrug,

Error message "Object name SERVICELINE in method table is invalid" looks like  it is not supported or BAPI is in old version state. How ever below is the method pattern, which I am using. For serviceine, object key should be order number then operation number (0030 in my case).

below is the service line data where activity is an operation number and SRV_LINE is running number.

Let me know, if this is useful for you.

Thanks,

Prashant

Former Member
0 Kudos

Hi, Prashant.

Maybe our BAPI is in old version. We are talking about BAPI_ALM_ORDER_MAINTAIN, ok?

I've checked Active version, is from Release 701, date 16.03.2010.

In this version, I couldn't find "IT_SERVICES" Table:

Could you say which version is yours?

In case of newer version, which steps may I follow to obtainit?

Thanks in advance

Sbrug

0 Kudos

Hi Sbrug,

Yes. BAPI 'BAPI_ALM_ORDER_MAINTAIN' is in old version in your system. You need to upgrade it . Contact your basis for upgrade.  We are at version 740.  Or you can search a note for this BAPI if this alone can be upgraded.

Thanks,

Prashant

Former Member
0 Kudos

Hi, Prashant.

Thank you very much for your replies.

Unfortunately I didn't find any Note that can upgrade 'BAPI_ALM_ORDER_MAINTAIN'.

I'll ask SAP Support Portal for this possibility.

Thanks a lot!

Sbrug

manukapur
Active Participant
0 Kudos

   

Hi Prashant,

I am facing the same problem but I am on 740. I am not able to create an internal and external service with service lines. I am getting an error which says 'Control Key Change not possible for service package'.

I get the same error when I try to create Entry with even one external service.

Looks like the program expects the internal control key.

Please advise. Stuck from quite long on this.

Regards,

Manu