2011 Sep 21 9:49 AM
Hi,
I have one requirement like when user create PO with 'critical material',while saving PO,user should get message "critical material".
For this ,in the enhancement MM06E005,EXIT_SAPMM06E_012(functional module),
I have written piece of code
***************************************************
*critical Material by Jaheer,ABAP & MM specialist
***************************************************
LOOP AT TEKPO.
IF TEKPO-MATKL EQ '9068'.
MESSAGE ID 'ZMM' TYPE 'W' NUMBER '013' with TEKPO-MATNR.
ENDIF.
endloop.
Here whenever I put message type 'E',I am getting message "critical material".But I donot want error message ,I want only warning message,so when I changed message type as "W",I am not getting any message while checking My PO.
What is the reason?
please,Can somebody throw some light on this?
With Reg,
Jaheer
Hi,
it is not working with display like 'W'.
Any other solution????
Jaheer
2011 Sep 21 10:06 AM
Hi Hussain,
You can try below option
MESSAGE ID 'ZMM' TYPE 'E' NUMBER '013' with TEKPO-MATNR DISPLAY LIKE 'W'.
Thanks,
Pawan
2011 Sep 21 11:07 AM
Hi,
it is not working with display like 'W'.
Any other solution????
Jaheer
2011 Sep 21 11:31 AM
Hi Jaheer,
If you go with badi you can use macro then this issue will resolved.There also u can check with item level.
Regards,
Madhu.
Edited by: madhurao123 on Sep 21, 2011 4:03 PM
2011 Sep 21 2:05 PM
Hi
Use this BADI ME_PROCESS_PO_CUST.
then use method POST, and get the items using method GET_ITEMS. Once you get the Material check for the requirement and pass the message.
If you want to check whenver the item is entered then use method PROCESS_ITEM
Shiva
2011 Sep 22 8:16 AM
Hi
Use the badi ME_PROCESS_PO_CUST, method CHECK, with a coding as this
include mm_messages_mac.
data: header type mepoheader,
items type purchase_order_items,
po_line type mepoitem,
line_item type purchase_order_item.
header = im_header->get_data( ).
items = im_header->get_items( ).
LOOP AT items INTO line_item.
IF condition IS TRUE. "critical material (line_item-matnr)
mmpur_message 'W' 'ZMM' '013' line_item-matnr ' ' ' ' ' '.
ENDIF.
ENDLOOP.
I hope this helps you
Regards
Eduardo
2011 Sep 25 8:22 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |