Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

1) User Exit for MIRO Tr.

code
Following requirements are checked with this user exit.
a)
b)
c)
d)

Checks business place & section code; if they are empty then give error
message
If GRN is reversed, Invoice verification is not allowed.
For quality activated material, Quality result & user decision is not recorded
& user is trying to book invoice verification through MIRO then error
message will be issued.
If Inspection lot is rejected in QM, then the system will issue error message
when user books the invoice verification against GRN.

*&---------------------------------------------------------------------*
*& Include
ZXM08U16
*&---------------------------------------------------------------------*
tableS : qave, mseg.
DATA: H_RBWT1 TYPE MRM_RBWT OCCURS 0 WITH HEADER LINE,
MBLNR LIKE MSEG-MBLNR,
PRUEFLOS LIKE QAMB-PRUEFLOS,
BWART LIKE MSEG-BWART,
ZEILE LIKE MSEG-ZEILE,
COUNT TYPE I VALUE 0,
LIN TYPE I,
BSART LIKE EKKO-BSART.
******** checking if business place is empty then give error message
if E_TRBKPV-BUPLA eq space.
MESSAGE E017(MD) .
endif.
****************************
if E_TRBKPV-SECCO eq space.
MESSAGE E018(MD) .
endif.
****************************
DESCRIBE TABLE e_tdrseg LINES lin.
LOOP AT e_tdrseg WHERE selkz EQ 'X' AND menge NE 0.
* SELECT SINGLE bsart FROM ekko INTO bsart WHERE
*ebeln EQ E_TDRSEG-EBELN.

IF bsart NE 'ZIMP'.
SELECT SINGLE bwart INTO bwart FROM mseg
WHERE mblnr EQ e_tdrseg-lfbnr AND insmk EQ 'X'.
IF sy-subrc EQ 0.
IF bwart Eq '102'.
MESSAGE E014(MD) WITH sy-tabix.
ENDIF.
IF bwart EQ '101'.
SELECT SINGLE zeile FROM mseg INTO zeile
WHERE mblnr EQ e_tdrseg-mblnr AND matnr EQ e_tdrseg-matnr
AND erfmg EQ e_tdrseg-menge AND insmk EQ 'X'.
IF zeile NE 0.
SELECT prueflos INTO prueflos FROM qamb
WHERE mblnr EQ e_tdrseg-mblnr AND zeile EQ zeile.
count = count + 1.
SELECT SINGLE * FROM qave WHERE prueflos EQ prueflos.
IF sy-subrc NE 0 AND count GT 0.
MESSAGE E015(MD) WITH sy-tabix.
ENDIF.
IF qave-vcode EQ 'R' OR qave-vcode EQ 'R11'
OR qave-vcode EQ 'R12' OR qave-vcode EQ 'R2'
OR qave-vcode EQ 'R3'.
MESSAGE E016(MD) WITH sy-tabix.

ENDIF.
ENDSELECT.
ENDIF.
*
ENDIF.
ENDIF.
ENDIF.
CLEAR: ZEILE,MBLNR,COUNT.
ENDLOOP.

Message Class : MD
014
015
016
017
018

GRN is reversed - Invoice Verification Not Allowed


Quality Inspection is not completed - Please Complete QC First
GRN is rejected - Invoice Verification Not Allowed
Business Place is Empty - Check Your Entry
Section Code is Empty - Check Your Entry

You might also like