Skip to Content

Issue with Bapi_PO_Create

Dear SAP MM experts,

Below is the business process mapped in our system.

Shopping carts are created in SRM system and the same is creating PR in SAP.

PR gets converted to PO via ME59N.

Here during automatic conversion (as well as in ME21N) , we are using the below BADI for converting the company code in PO based on business requirement by validating some aspects which are maintained in Z table.

BADI: ME_PROCESS_PO_CUST

The conversion is working fine for all scenarios except for Service items and Limits.

When the PR item is service or Limits, the company code conversion is not happening.

While testing in ME21N, we have understood that system is identifying the company code that need to be changed, but while trying to input the code system give the below message and conversion fails.

ME664 : Company code change could not be effected.

While doing further analysis, we have identified that if the PR contains desired/fixed vendor, the conversion do not happen (in ME21N).

Same PR , if we remove the Desired vendor/fixed vendor and refer in ME21N and input the vendor during PO creation, the company code conversion happens.

Hence would like get the expert advise on following things.

1) Why is company code conversion failing for Service/Limits items alone when the same is working fine for other items via 'BADI ME_PROCESS_PO_CUST'

2) Is there any way to resolve this issue?

Thanks & Regards,

Hegal K Charles

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 04, 2014 at 05:01 PM

    Hi,

    If its service PO, you cant change the company code (& purchase organization) once the service details are entered. You may check in ME22N whether the system allows to change the same. The company code and purchase organization field will be greyed out in ME22N (or even ME21N once the service details are entered). Since the field is not ready for input, system will issue the message ME664.

    The field will be changeable if its not a service PO and hence its updated while using BAPI also.

    Refer the KBA: 1908567 - BAPI_PO_CREATE1/BAPI_PO_CHANGE : Information message "ME 664"

    which explain the reason for the message.

    Regards,

    AKPT

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.