Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
k_sood
Active Participant
0 Kudos

Business Scenario


Error Message must be generated in the Standard Error List Container in case the PR Item is not created through the Catalog.

Implementation


Badi ME_PROCESS_REQ_CUST

Method PROCESS_ITEM

Error Message to be given is maintained in the message class.

Coding


INCLUDE mm_messages_mac. "Necessary in order to raise the error message
DATA : l_item TYPE mereq_item.
DATA: lf_check_flag TYPE xfeld.
DATA: lf_bnfpo_char TYPE char5.

*Read Item details
CALL METHOD im_item->get_data
RECEIVING
re_data = l_item.


*Perform your Checks

*Show Error in case the checks are not successful.
IF lf_check_flag = abap_true.
*Macros are used in order to generate the error.
lf_bnfpo_char = l_item-bnfpo.
mmpur_metafield mmmfd_preq_item.
mmpur_business_obj im_item.
mmpur_message_forced 'E' 'ZMM' '050' lf_bnfpo_char '' '' ''.
ENDIF.


 

Output



 

Thanks

Ketan