Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Once I get error,system leave transaction


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.

Not what you were looking for? View more on this topic or Ask a question