Skip to Content
avatar image
Former Member

Back button bypass the Badi ME_PROCESS_PO_CUST-Check

Hi

I have write one code to stop PO creation without PR, and for the same i have write the code in IF_EX_ME_PROCESS_PO_CUST~CHECK. This is working fine if i have tried to save the PO without PR but i was shocked when i have checked that user is bypassing this error by pressing BACK button at the time error and save the PO without PR.

Please give me some solution.

Regards

Ajay Goel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 08, 2015 at 06:21 AM

    Hi,

    Method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM

    if  SY-UNAME NE  'BC01'.  "AND SY-UNAME NE  'MM12'.

         IF ls_mepoitem-banfn IS INITIAL.

           mmpur_metafield mmmfd_preq_no.

           mmpur_message_forced 'E' 'ME' '083' text-005 '' '' ''.

         ENDIF.

    Hope it helpful.

    Regards,

    Ramesh.V

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 08, 2015 at 06:32 AM

    Hello Ajay,

    As Venkat Suggested, Make use of Metafields, Metafields Error message and call the invalidate Method.

    If ls_mepoitem-banfn is initial

        mmpur_metafield mmmfd_preq_no.

        mmpur_message_forced 'E' 'ME' '083' '' '' '' ''.

    * invalidate the object

        CALL METHOD im_item->invalidate( ).

    endif.

    Add comment
    10|10000 characters needed characters exceeded