Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    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 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.

  • 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 comment
    10|10000 characters needed characters exceeded