Enterprise Resource Planning Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
k_sood
Active Participant
0 Likes
1,774

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
1 Comment