Skip to Content
0
May 28, 2015 at 10:26 AM

Once I get error,system leave transaction

17 Views


Hi,

I have put below code IN Badi:ME_PROCESS_PO_CUST AND and method in PROCESS_ITEM for checking PO without PR.In this coding once I reach error code,I should leave me21n screen. Can some body guide me ,please?

Note:My error message "There is NO PR for this PO"----(Message E025(ZQ))

CALL FUNCTION 'MEPO_DOC_HEADER_GET'

IMPORTING

EX_EKKO = LS_MEPOHEADER.


IF ( LS_MEPOHEADER-BSART = 'NBPJ' OR LS_MEPOHEADER-BSART = 'PJCR' ) AND ( LS_MEPOHEADER-BUKRS = 'XXXX' OR LS_MEPOHEADER-BUKRS = '4115' ).


CALL METHOD IM_ITEM->GET_DATA


RECEIVING


RE_DATA = LS_MEPOITEM.


IF LS_MEPOITEM-BANFN IS INITIAL.


MESSAGE E025(ZQ).


ENDIF.


ENDIF.