Skip to Content

error message in badi me_process_po_cust doesn't lock the screen

Hi all,

I have a problem: in badi me_process_po_cust, method process_header I check the purchasing group.

if it is not correct, I throw an error message, but after this the fields in me22n are editable yet.

How can I lock the whole screen until the user sets the right value in field purchasing group?

Thank you in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2015 at 08:23 PM

    Use method CHECK instead, worked for me. There's a reason why not header method, but I don't remember why.

    Code goes like

    METHOD if_ex_me_process_po_cust~check.

    .....

    data: ls_header TYPE mepoheader.

    CALL METHOD im_header->get_data

    RECEIVING

    re_data = ls_header.

    lt_items = im_header->get_items( ).

    IF ls_header-EKGRP = 'whatever'.

    MESSAGE ID 'Zxx' TYPE 'E' NUMBER 'nnn'.

    EXIT.

    ENDIF.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 31, 2015 at 04:48 AM

    Hi Rory,

    please read the documentation of BADI ME_PROCESS_PO_CUST:

    If you want to check fields in method PROCESS_HEADER and throw error messages, you have to use macros mmpur_metafield and mmpur_message_forced.

    Regards,

    Klaus

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 31, 2015 at 04:57 AM

    Hi,

    Please try this in your code.

    include mm_messages_mac.

    IF <CHECK CONDITION>

    mmpur_message 'E' 'ME' '015' '' '' '' ''.

    ENDIF.

    It is help for you.

    Regards,

    Nilesh

    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.