Skip to Content
avatar image
Former Member

BADI or USEREXIT in ME21N where services are available to validate

Hello Experts,

While creating a Service Purchase Order using ME21N , I need to validate based on the service number entered. Can you help me to know the BADI or User exit , where service details are available.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 18, 2009 at 10:35 AM

    Check EXIT_SAPLMLSP_040

    Check enhancement SRVESLL

    Check Badi EXTENSION_US_TAXES

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 11, 2010 at 04:25 AM

    Thank you experts

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi, this is an option to validate services in purchase order:

      In badi: ME_PROCESS_PO_CUST

      method: PROCESS_ITEM

      METHOD if_ex_me_process_po_cust~process_item.

      DATA lr_po_item_handle TYPE REF TO cl_po_item_handle_mm.

      DATA: lt_esll TYPE TABLE OF esll,

      ls_esll TYPE esll,

      lt_imputaciones TYPE TABLE OF ueskn,

      ls_imputacion TYPE ueskn.

      DATA: ls_mepoitem TYPE mepoitem.

      lr_po_item_handle ?= im_item.

      CALL METHOD lr_po_item_handle->get_data

      IMPORTING

      ex_data = ls_mepoitem

      EXCEPTIONS

      failure = 1

      OTHERS = 2.

      ----


      CALL METHOD lr_po_item_handle->if_services_mm~get_srv_data

      EXPORTING

      im_packno = ls_mepoitem-packno

      IMPORTING

      ex_esll = lt_esll

      • ex_esuh =

      • ex_esuc =

      • ex_eskl =

      EXCEPTIONS

      failure = 1

      OTHERS = 2.

      ----


      CALL METHOD lr_po_item_handle->if_services_mm~get_data

      • EXPORTING

      • im_limit =

      IMPORTING

      • ex_comsrv =

      ex_acc_tab = lt_imputaciones

      EXCEPTIONS

      failure = 1

      illegal_data = 2

      OTHERS = 3.

      LOOP AT lt_esll INTO ls_esll WHERE mwskz IS NOT INITIAL.

      READ TABLE lt_imputaciones INTO ls_imputacion INDEX 1.

      CHECK sy-subrc = 0.

      u201Cvalidation

      IF ( ls_mepoitem-knttp = 'F' OR ls_mepoitem-knttp = 'K' ) AND

      ls_mepoitem-pstyp = '9'.

      CALL FUNCTION 'ZABC' u201C it has a E message if validation is false

      EXPORTING

      p_mwskz = ls_esll-mwskz

      p_kostl = ls_imputacion-kostl

      p_mod = 'TX'.

      ENDIF.

      ENDLOOP.

      ENDIF.

      ENDMETHOD.