Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

M8321 Document contains same order item more than once ON bapi_incominginvoice_park OR CREATE

divesh_suman
Member
0 Kudos

DEAR ABAPERS,

Cause

When using MIRO, the system would propose line items for each GR reference item using the following fields: EKBE-LFGJA, EKBE-LFBNR and EKBE-LFPOS.

Message type INVOIC and the corresponding function module IDOC_INPUT_INVOIC_MRM were designed to provide the possibility for vendors to sent the invoice to the customer. Generally, within this business scenario, the vendor does not know the reference/goods receipt document details (EKBE-LFGJA, EKBE-LFBNR and EKBE-LFPOS), so the process instead identifies the corresponding goods receipt item based on the delivery note number (EKBE-XBLNR) and, if available, the purchase order (EKBE-EBELN) and item number (EKBE-EBELP). This is standard logic implemented in form MRM_GR_ASSIGN (LMRMHF0Q).

If the IDOC is filled with an incorrect information in its segments based on the logic explained above, the system will raise the error M8321 as was not possible determine the correct order item. It is usually casued per example when segment E1EDP02-ZEILE is not filled correctly.

AND I WANT TO ENHANCE IS PROBLEM USING user-exit EXIT_SAPLMRMH_011 OR EXIT_SAPLMRMH_013

CAN YOU PLEASE SUGGEST ME SOME CODE FOR THIS.

THANKS IN ADVANCE.

0 REPLIES 0