Skip to Content
0
Jun 29, 2008 at 09:30 PM

BAPI_GOODSMVT_CREATE

62 Views

I am having an issue with BAPI_GOODSMVT_CREATE. I am using it to create a GR against a PO. It creates the material document without an issue but it does not show up on the history for the PO. It acts as though I am not tying it to the PO. However, if you go to MIGO and view the material document, in the details, it is tied to the PO and PO line item. Do you have any idea what the issue is? Below are the fields that I am filling:

* Fill Header Structures.
  gmhead-pstng_date = d_pstng_date.
  gmhead-doc_date = d_doc_date.
  gmhead-header_txt = d_header_txt.

  gmcode-gm_code = '01'.

* Fill Line Item Info.
  itab-material = d_material.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input  = itab-material
  importing
    output = itab-material.
  itab-move_type = d_move_type.
  itab-po_number = d_po_number.
  itab-po_item = d_po_item.
  itab-item_text = d_item_text.
  itab-unload_pt = d_unload_pt.
  itab-gr_rcpt = d_gr_rcpt.
  itab-mvt_ind = 'B'.
  itab-entry_qnt = d_entry_qnt.
  itab-entry_uom = d_entry_uom.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input  = itab-po_number
  importing
    output = itab-po_number.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input  = itab-po_item
  importing
    output = itab-po_item.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input  = itab-unload_pt
  importing
    output = itab-unload_pt.
  append itab.

Regards,

Davis