Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.