Skip to Content

BAPI_GOODSMVT_CREATE Error M7 036

BAPI_GOODSMV M7 T_CREATE Error M7 036

Hi, I didn´t found any solution with this problem, even with search function and in google ;).

I am using BAPI BAPI_GOODSMVT_CREATE for posting GR on PO and I always get the error: can´t post GR for purchasing order 5012134.

If I execute the BAPI with transaction SE37 it works. And if I GR with MB01 it also works but in program it doesn't.

Here is the code:

data:

L_HEAD LIKE BAPI2017_GM_HEAD_01,

L_CODE LIKE BAPI2017_GM_CODE,

L_TESTRUN LIKE BAPI2017_GM_GEN-TESTRUN,

L_MBLNR TYPE BAPI2017_GM_HEAD_RET-MAT_DOC,

L_MJAHR TYPE BAPI2017_GM_HEAD_RET-DOC_YEAR,

LT_ITEM TYPE TABLE OF BAPI2017_GM_ITEM_CREATE,

wa_item like line of LT_ITEM,

LT_RETURN TYPE TABLE OF BAPIRET2.

L_HEAD-PSTNG_DATE = sy-datum.

L_HEAD-DOC_DATE = sy-datum.

L_CODE-GM_CODE = '01'.

loop at itab.

wa_item-material = itab-matnr.

wa_item-plant = itab-werks.

wa_item-stge_loc = itab-lgort.

wa_item-move_type = '101'.

wa_item-po_number = itab-ebeln.

wa_item-po_item = itab-posnr.

wa_ITEM-MVT_IND = 'B'.

wa_ITEM-ENTRY_QNT = itab-MENGE.

append wa_item to lt_item.

endloop.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

GOODSMVT_HEADER = L_HEAD

GOODSMVT_CODE = L_CODE

TABLES

GOODSMVT_ITEM = LT_ITEM

RETURN = LT_RETURN.

.

Add a comment
10|10000 characters needed characters exceeded

  • If it works with SE37, but not in your program, provided that you run them in the exact same context, don't you think you can find the issue by yourself by carefully comparing the parameters received by BAPI_GOODSMVT_CREATE via the debugger in both cases?

  • Hello Sandra,

    I am passing exactly same content in both the cases. and i have debugged, there one structure is not filling (i.e xebefu). I will try one more time from my side.

    i just want to add one more information, program and function module both are working fine in development system, and TR successfully moved to quality. So, in quality system i am facing this issue. do you think, this is something relate to configuration ?

    Thanks,

    Rohit

  • So, in fact, I understand that in the quality system, if you test via SE37 with the same parameters as those in your program, you'd also get the M7036 error. It would also happen with transaction code MB01, so ask the functional guys to investigate why there is this error.

Assigned Tags

Related questions

3 Answers

  • Posted on Feb 18, 2019 at 09:04 AM

    From where come the input data, usually when the process is correct with SE37 and not in a program, you got a wrong formatting of data (SE37 test screen will convert input data from external format to correct internal format, when your program will execute a simple move, not always converting data) could you check in debug mode?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 18, 2019 at 09:58 AM

    Have a look at OSS note 2736630

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 21, 2019 at 06:25 PM

    Hello,

    Thanks for all your help and sorry for the wrong information. Initially, I might have made some mistake, that is why FM and report were behaving differently.

    Now, The FM and report both are giving the same error message( M7-036). This error message is coming because "GR-Bsd IV"(indicator of GR based invoice verification) checked box is checked.

    Thanks,

    Rohit

    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.