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

No order items exist in order

Hi Experts

I am doing goods issue MB1B with reference to the Maintanenece ORDER.

By using BAPI_ALM_ORDER_GET_DETAIL, getting the order details data and using BAPI_GOODSMVT_CREATE to post the material document.

Using the below code, and getting the error 'No order items exist in order'. Please correct me where i am making error.

Thanks in advance.

wa_goodsmvt_header-pstng_date = sy-datum.

wa_goodsmvt_header-doc_date = sy-datum.

wa_goodsmvt_header-ref_doc_no = wa_aufnr.

wa_goodsmvt_code-gm_code = '03'. "Goods receipt for purchase Order
it_goodsmvt_item-stge_loc = wt_table-sloc1.
it_goodsmvt_item-plant = wa_header-plant.
it_goodsmvt_item-move_type = '261'.
it_goodsmvt_item-entry_qnt = wt_table-qty1.
it_goodsmvt_item-mvt_ind = 'F'.
it_goodsmvt_item-orderid = wa_aufnr.
it_goodsmvt_item-reserv_no = wa_item-reserv_no.
it_goodsmvt_item-res_item = wa_item-res_item.
* it_goodsmvt_item-order_itno = wa_item-order_item_number.
it_goodsmvt_item-material = wt_table-mat.
APPEND it_goodsmvt_item.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_header
goodsmvt_code = wa_goodsmvt_code
IMPORTING
materialdocument = wa_bapi2017_gm_head
TABLES
goodsmvt_item = it_goodsmvt_item
return = it_return.

Regards

Rajaram


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 04, 2012 at 12:29 PM

    Check following thread Rich Heilman expalin very well

    http://scn.sap.com/thread/123453

    Check the following WIKI document :

    http://wiki.sdn.sap.com/wiki/display/ABAP/Sample+code+BAPI_GOODSMVT_CREATE

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Can anyone abaper help me on this issue, i am fed up with this problem.

      Expecting your kind reply.

      *...Position/en lesen
      PERFORM position_read TABLES xpos_tab USING subrc xrfrsh.
      IF NOT subrc IS INITIAL.
      MESSAGE e006 WITH caufv-aufnr RAISING not_found_any.
      ENDIF.

      The above code returns sy-msgno = 006 and CHECK global_error = false becomes true

      and the corresponding document is not posted. PERFORM mb_post_goods_movement failed in the bapi BAPI_GOODSMVT_CREATE.

      Please advise me.

  • Posted on May 03, 2012 at 01:36 PM

    Make sure your material number has leading zeros.

    Also read the FM documentation:

    For 2 GM_Code 02: Goods receipt for production order

    It is very well explained.

    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.