Skip to Content
0
Former Member
May 09, 2010 at 12:01 PM

After Giving Error Message how to make Field Ready For Input Again in MIRO

160 Views

Hey Friends,

Iam using BADI MRM_HEADER_CHECK.

I need to Provide an error message if Posting Date of Vendor Incoice Verification (MIRO) is Greater then Goods Reciept Date(GRN).

This is wht i have Coded in The Implementation.

METHOD if_ex_mrm_header_check~headerdata_check.

TYPES: BEGIN OF sty_grn,

ebeln TYPE ekbe-ebeln,

ebelp TYPE ekbe-ebelp,

vgabe TYPE ekbe-vgabe,

belnr TYPE ekbe-belnr,

budat TYPE ekbe-budat,

END OF sty_grn.

DATA: wa_grn TYPE sty_grn,

i_grn TYPE STANDARD TABLE OF sty_grn,

wa_drseg LIKE LINE OF ti_drseg,

v_budat_grn TYPE ekbe-budat.

  • BREAK-POINT.

IF NOT ti_drseg IS INITIAL.

SELECT ebeln ebelp vgabe belnr budat

FROM ekbe

INTO TABLE i_grn

FOR ALL ENTRIES IN ti_drseg

WHERE belnr = ti_drseg-mblnr AND

gjahr = ti_drseg-mjahr AND

vgabe = '1'.

LOOP AT ti_drseg INTO wa_drseg.

READ TABLE i_grn INTO wa_grn WITH KEY belnr = wa_drseg-mblnr.

IF sy-subrc EQ 0.

IF wa_grn-budat GT i_rbkpv-budat.

MESSAGE W001(zatg) WITH 'Posting date less than Grn Posting date'.

ENDIF.

ENDIF.

Now the Problem is that it always Gives Error message with 'Posting date less than Grn Posting date'.

Its Not letting me to Change the Posting Date in Miro.

i have to cancel the Miro and Create a new Doc.

How Do i Make the Posting Date Field 'INVFO-BUDAT' Ready For Input Again.

Please Guide.

Regards,

Essam

ENDLOOP.

ENDIF.

ENDMETHOD.