Skip to Content
author's profile photo Former Member
Former Member

Error: Material numbers provided in equivalent fields differ in BAPI_MATPHYSINV_POSTDIFF


I am trying to post physical inventory document using BAPI_MATPHYSINV_POSTDIFF and in alternative call for the bapi i am getting Error : "Material numbers provided in equivalent fields differ".

If i go and post same documents separately through my code it got posted. but in loop the same BAPI gives above error in alternative call.



* Now do all the assigns of the primary table
IF NOT <lsf_fnames>-seg_fields-long IS INITIAL.
ASSIGN COMPONENT <lsf_fnames>-seg_fields-long OF STRUCTURE <lsf_line> TO <lvf_long>.

In above code <lvf_long> populated by previous BAPI Call material and due to diff in current BAPI material call it gives me that error.

We are using SAP S/4HANA

I have also cleared buffer data using


Please suggest how to overcome with this error.

Thanks in Advance


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2017 at 05:17 PM

    Hi Pratik,

    I think you have debugged the scenario and know the root cause. Just to add, you can try using <lvf_long> as a workarea, rather than a field symbol. Then, you can clear that up after every iteration.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Pratik,

      Ok... You are trying something like this,


      CL_MATNR_CHK_MAPPER->TABLES_CONV_TAB_INTERNAL // and you are getting the error from this Method right?






      If the above flow is right, then , you may try using the FM - BAPI_TRANSACTION_COMMIT. This FM also works to refresh the buffer.

  • Posted on Feb 09, 2018 at 11:07 AM

    Dear Pratik Patel,

    Got any solution for this?

    We are facing the same issue for Sales order creation BAPI BAPI_SALESORDER_CREATEFROMDAT2 (HANA 1511).

    Please share the solution for this error.

    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.