06-20-2016 1:22 PM
Hi,
I have a requirement on ME21n or ME22n, I need to do validation on material type and it is not successful, I need to trough error message. I made that development according to requirement in EXIT ME_PROCESS_PO_CUST (PROCESS_ITEM).
But issue is after showing error message user fill the required field but error message is not deleting from message box.
Please let me a suggest where we need to check the validation.
06-21-2016 9:55 AM
Hi Suprit,
Use this exit MM06E005 -> EXIT_SAPMM06E_017 it will work.
Regards,
E.Ananthachari
06-20-2016 1:58 PM
Did you forget to reset your error/validate status of item in your BAdI implementation (not an exit...) like in following sample?
* Remove previous message
mmpur_context mmcnt_context_badi.
IF NOT ls_item-id IS INITIAL.
mmpur_remove_msg_by_context ls_item-id mmcnt_context_badi.
ENDIF.
* here some check set an error and invalidate item
IF ls_material_plant-mmsta EQ '30'.
im_item->invalidate( ).
mmpur_metafield mmmfd_matnr.
mmpur_message_forced 'E' 'ZXXX' '999' <itemdata>-matnr <itemdata>-werks space space.
ENDIF.
Regards,
Raymond
06-21-2016 6:35 AM
Hi Raymond,
Thank you for replying.
I'm explaining you my full requirement, When user create PO using ME21n with Document type NB and material type ROH that time system check RFQ number; When RFQ number is not available then system trough an error.
So according that I'm using badi ME_PROCESS_PO_CUST and method PROCESS_ITEM
Also check my below code and suggest me where we need to correct this.
06-21-2016 10:27 AM
Just
Also you should replace the sy-tcode check by using the transaction type, you received it in method OPEN and should save it an instance attribute of the implementing class.
Regards,
Raymond
06-21-2016 9:55 AM
Hi Suprit,
Use this exit MM06E005 -> EXIT_SAPMM06E_017 it will work.
Regards,
E.Ananthachari
06-21-2016 10:43 AM
Hi Suprit,
If I am not wrong, the method PROCESS_ITEM is triggered in case of user commands 'check' or 'save'.Hence,even after correcting the line item, the messages are not cleared.
Regards,
Priyanka.