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: 

BAPI for creating service contracts (purchasing documents)

Former Member
0 Kudos
4,267

Hello,

I have a problem with standard module BBP_ES_OA_UPDATE. It is the only one I found that can be used both for creating material and service contracts (these in EKKO table).

I am able to create material contract, however it is impossible to do the same for service contract as it has slightly different structure.

I'm afraid that FM has problem with binding document item with service line, despite the fact that it seems I enter it properly (fields EXTROW and PACKNO?).

Either the following error occurs:

SE 478 No reference services exist

or the contract is being created but with no service lines.

The numbers of package I was testing were correct and they always referred to several service lines in ESLL table.

Did you have any experience with BBP_ES_OA_UPDATE?

Or maybe you know other module that is capable of creating both material and service contracts?

Thank you for every answer!

Best regards,

Karol Urbańczyk

8 REPLIES 8

Former Member
0 Kudos
1,828

Maybe someone is able to provide a set of filled structures that would create service contract?

former_member210252
Contributor
0 Kudos
1,828

Hi,

Please fill the parameter SRV_LINE as well in BAPI as the error says  SE 478 No reference


services exist.


I worked on creation of SERVICE ENTRIES SHEETS for PO, so I filled even Service Lines


related data as well.




Regards,

Rafi

0 Kudos
1,828

To me it seems that SRV_LINE is a return structure, as the service lines that are in the given package always appear in this structure after launching of module. Then this is even more weird that I got "SE 478 No reference services exist.".

I want to create service contract (with reference do srv lines), not the srv lines themselves.

It seems that the only possibility to bind them is through package number.

Have you worked with BBP_ES_OA_UPDATE?

I'm just looking for anybody who did create service contract with it


0 Kudos
1,828

Hi Karol

Did you find a solution for this problem? I face the same issue. If you did, please share yout findings if posssible.

I also found SAP Note 1977343 - BAPI_CONTRACT_CREATE for service or limit items which is not very encouraging.

Regards, Johan

0 Kudos
1,828

Hi,

I managed to create service contract with this BAPI. Problem with my variant was that I did not put an 'X' in ITEMX - ITEM_NOX.

0 Kudos
1,828

Hi again Karol

I missed that one too. Quite uncommon way for a BAPI I must admit.

Still facing some other problem with the input data though.

Would you mind posting som exemple code that works for you here? That would be most helpful and would save me quite some time hopefully. Also could benefit others as well.

Again: Thans a ton for the answer so far and the hint!

Regards, Johan

0 Kudos
1,828

Hi again Karol

Still facing some other problem with the input data though.

Would you mind posting som exemple code that works for you here? That would be most helpful and would save me quite some time hopefully. Also could benefit others as well.

I am currently stuck with this one. My customer is not using E-Sourcing at all. Found the FM BBP_ES_OA_UPDATE and this thread from searching.

It would be very very helpful to see some working code. Maybe I missed something important?

I don't like to revert to Batch Input solution but that might be the wway to go if this FM BBP_ES_OA_UPDATE can't help.

To be precise I don't use the FM directly as it does some not for us relevant checking before calling the method cl_bbp_es_contract_update=>execute method which does all the heavy lifting.

Regards, Johan

tripurari_rai2
Participant
0 Kudos
1,828

Hello Experts,

I have been assigned to work on similar requirement to create service outline contract.

I have gone through blogs which are provided in SDN forum such as

1)Roadmap to transitioning from BDC on ME32K to using RFC for service outline agreements – Part 1

https://blogs.sap.com/2016/05/23/roadmap-to-transitioning-from-bdc-on-me32k-to-using-rfc/

2) Roadmap to transitioning from BDC on ME32K to using RFC for service outline agreements – Part 2.

https://blogs.sap.com/2016/05/24/roadmap-to-transitioning-from-bdc-on-me32k-to-using-rfc-for-service...

So far I am unable to understand if there is no field provided for outline level ( EXTGROUP) in input CHT_SRV_LINE for class method cl_bbp_es_contract_update=>EXECUTE, how can I can create Outline Agreement using this cl_bbp_es_contract_update or FM BBP_ES_OA_UPDATE.

Appreciate if anyone can provide some example for create/change of Service contract ( T-code ME31K, ME32K ).