It is possible or other ways to enhance the MIRO to exclude the matching of Invoice Date( in MIRO) to document date( in FB03 bkpf table) ?
I saw in a function module that the table field RBKPV(bukrs,lifnr,waers,xblnr,bldat,rmwwr,blart) has a function module that checks for duplicates if the FF fields are same in bkpf.
I also tried to find the implicit enhancement spot but i can't see any available spot
I also tried posting data with same of the following fields except the invoice date and it works.
the requirement is to allow the MIRO to post even if the document is already exist
Stack#7
PERFORM duplicate_invoice_check.<br>
Stack#8
IF bkpf-glvor = 'RMRP'.<br><br>* determine document type: X = invoice, space credit memo<br>* via business case (buscs: space & R = invoice, G = credit memo)<br> lc_xrech = buscs.<br> TRANSLATE lc_xrech USING ' XRXG '.<br><br> CALL FUNCTION 'MRM_DUPLICATE_INVOICE_CHECK'<br> EXPORTING<br> i_bukrs = bseg-bukrs<br> i_lifnr = invfo-lifre<br> i_waers = invfo-waers<br> i_xblnr = invfo-xblnr<br> i_bldat = invfo-bldat<br> i_rmwwr = invfo-wrbtr<br> i_belnr = invfo-belnr "Note 369546<br> i_blart = invfo-blart "Note 414417<br> i_xrech = lc_xrech<br> i_prepay_awkey = invfo-prepay_awkey. "Prepayment<br>
Stack#9
CALL FUNCTION 'MRM_FI_DOCUMENT_CHECK'<br> EXPORTING<br> i_bukrs = i_bukrs<br> i_lifnr = i_lifnr<br> i_waers = i_waers<br> i_xblnr = i_xblnr<br> i_bldat = i_bldat<br> i_wrbtr = i_rmwwr<br> i_blart = i_blart<br> i_prepay_awkey = i_prepay_awkey<br> EXCEPTIONS<br> invoice_already_exists = 1<br> OTHERS = 2.<br>
Stack#10
ELSE.<br>* Invoice posted with MR01 and not cancelled.<br> IF f_old_belnr NE bkpf-belnr<br> OR f_old_gjahr NE bkpf-gjahr.<br>* Meldung für diesen Beleg noch nicht ausgegeben aus den<br>* Kopf-Subscreens Grunddaten oder Detail<br> CALL FUNCTION 'CUSTOMIZED_MESSAGE'<br> EXPORTING<br> i_arbgb = 'M8'<br> i_dtype = 'W'<br> i_msgnr = '108'<br> i_var01 = bkpf-belnr<br> i_var02 = bkpf-gjahr.<br> f_old_belnr = bkpf-belnr.<br> f_old_gjahr = bkpf-gjahr.<br> RAISE invoice_already_exists.<br> ENDIF.<br>Stack #11
DATA l_msgts LIKE t100c-msgts.<br><br> CALL FUNCTION 'READ_CUSTOMIZED_MESSAGE'<br> EXPORTING<br> i_arbgb = i_arbgb "M8<br> i_dtype = i_dtype "W<br> i_msgnr = i_msgnr "108<br> IMPORTING<br> e_msgty = l_msgts "E.<br><br> IF l_msgts NE '-'.<br> MESSAGE ID i_arbgb TYPE l_msgts NUMBER i_msgnr<br> WITH i_var01 i_var02 i_var03 i_var04.<br>In OBA
