Skip to Content

IW21 Check At SAVE

Hi Guru's ,

In transaction IW21 I have to check before saving if a cost object is enterred.

I spent a lot of hour to find if there is an user-exit to do this but nothing.

On of those fields in the printscreen should be filled in if not I should display an error.

I tried to play with the PAI and STATUS SAVE (BUCH) but the structure VIQMEL is filled in in PAI.

I assume that an user-exist do this.

Anyone have an idea please?

Capture.JPG (11.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 24, 2014 at 12:52 AM

    Hello rahhaoui mohamed,

    On of those fields in the printscreen should be filled in if not I should display an error.

    Solution (Tested)


    User Exit : QQMA0014 Function Exit: EXIT_SAPMIWO0_020 Include : ZXQQMU20

    Code to be used


    IF I_VIQMEL-QMART = 'M4'.


    IF I_VIQMEL-GSBER IS INITIAL AND I_VIQMEL-PROID IS INITIAL AND I_VIQMEL-KOSTL IS INITIAL.
    MESSAGE 'One of the fields of BusArea, CostCtr or WBS Element in the Location tab is mandatory' TYPE 'I'.
    RAISE EXIT_FROM_SAVE.
    ENDIF.


    ENDIF.


    You'll get this pop-up, when you try to save with all these fields empty.

    The first and last lines of the code makes this code confined to Notification type M4 only. (You may change as per your need)



    Jogeswara Rao K


    Capture.JPG (19.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2014 at 09:02 PM

    Hello rahhaoui,

    Use the following enhancement: QQMA0014 for checks before saving in Tx CMOD

    You can check any field, display message and failure to save notification.

    This is the code example.

    I hope you help.


    check.png (18.4 kB)
    check2.png (12.7 kB)
    check3.png (35.7 kB)
    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.