Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ME21N - Error Messages

0 Kudos

Hi,

I'm using the function Exit EXIT_SAPMM06E_012 in User Exit MM06E005 to validate my PO before saving.

I'm using macro MMPUR_MESSAGE to issue messages.

In ME21N, I'm able to save the PO even if there are error messages. It just gives a message saying the PO is faulty and asking if i still want to Save. It gives an option to put the PO on Hold / Edit.

Why don't the error messages prevent saving as in ME22N.

Pls clarify.

Thanks,

Arthi.

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Arthi!

That is a feature, not a bug. When you enter hundreds of articles in a purchase order, you are glad you can save the PO at all.

Then you can make some changes to correct errors, maybe you have to wait for a colleague to get some answers...

So saving the work (time) before loosing all changes has higher priority (for most users / customers).

Regards,

Christian

12 REPLIES 12

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Arthi!

That is a feature, not a bug. When you enter hundreds of articles in a purchase order, you are glad you can save the PO at all.

Then you can make some changes to correct errors, maybe you have to wait for a colleague to get some answers...

So saving the work (time) before loosing all changes has higher priority (for most users / customers).

Regards,

Christian

0 Kudos

Hi,

But the problem is now, it's not even holding the PO, it's allowing to save it!

Faulty POs should only be allowed to be Held not Saved!!

Can anyone throw some light on this?

Thanks,

Arthi.

0 Kudos

I think you meant 'Blocked' when you say 'Held'. No matter what, the PO has to be saved. You should not prevent that if you want to retrieve it later and correct it.

What you can do probably is to set the release indicator on the PO to "blocked". That will prevent the PO from being released to the vendor. You can talk to your purchasing configuration folks to see how that can be accomplished.

Srinivas

0 Kudos

EKKO-FRGKE field should be set to 'X'.

0 Kudos

Thanks for the Reply.

What I meant was only 'Held', not 'Blocked'.

While creating the PO, if there are any errors, it allows the PO to be in the 'Held' status i.e, not yet complete.

I'm OK with the PO being on Hold with errors. I just don't want it to be completely created.

The EKKO field cannot be set in the User Exit as it allows changing only the customer fields not the standard.

Thanks,

Arthi.

0 Kudos

There is nothing in purchasing like hold document status. In SD you have incompletion log, but in purchasing there is no equivalent. typically you block a PO so that it doesn't go through the rest of the processes unless you do something on it. Why is it that you don't want this status?

You want the PO to be saved in the tables yet not saved???? When you say held, held where? In the PO tables? Then you are saving it, but how will you intimate the system not to allow any further processing on it? There is no partial saving of a PO, at least not that I am aware of.

Are these POs created online through ME21N or via a custom interface program? Do you want this feature in both ways of creating a PO? If it is just an interface, then you can do the validations in your interface program and store the invalid records in a Z table.

If you want to persue setting the block status, then you can find another exit where you can set it.

Srinivas

0 Kudos

Hi,

There is definetly an option to 'Hold' a PO. The data is stored in the tables but EKKO-MEMORY (Purchase order not yet complete)is set to 'X'. When you create a PO in ME21N, there is a button 'Hold' on the Application Tool Bar. Pls verify.

I'm using only ME12N to create/change POs. No interface program.

Thanks,

Arthi.

0 Kudos

I am sorry, I should have checked before responding. Yes, I do see the option, even though I am not sure how you can use it.

Srinvas

0 Kudos

Here is how it is coded for this button.


* park document
      when 'MESAVEPR'.
        l_result = post_document( mmpur_yes ).
        clear im_fcode.

This is in "method if_command_mm~execute." of include LMEGUICIO.

Can you check if you can use any other exit to change the ucomm? The idea is you will set some memory flag to 'X' to indicate error occured and then in another user exit, you will reset the ucomm to the above.

Srinivas.

0 Kudos

Thanks. I will check it up.

-Arthi.

0 Kudos

Hi,

Why not use ME_PROCESS_PO_CUST badi and use the method check to put error message.

Hope this helps.

former_member335233
Discoverer
0 Kudos

set changing parameter

ch_failed = abap_true.