on 08-14-2007 9:42 PM
We are like add a validation during the acceptance of an Offer in SRM.
We put a validation in the badi xxxxx .. xxxxxx and already we activate her.
The validation is realized perfectly and in case certain condition is fulfilled the system should throw a mistake and block the operation (not to accept the offer.)
The disadvantage is that SRM accepts the offer and throws the message of mistake.Already we try in spite of adding a mistake of the type "A" and of the type "E". Can someone do like to block ( cancel ) the operation?
Thank you.
extract code
LOOP AT t_item INTO x_item WHERE deduct_ind EQ space.
w_value_1 = x_item-value.
CALL FUNCTION 'BBP_PD_BID_ITEM_GETDETAIL'
EXPORTING
iv_guid = x_item-src_guid
iv_attach_with_doc = ' '
IMPORTING
es_item = w_es_item.
IF x_item-src_object_type = 'BUS2208001'
OR x_item-src_object_type = 'BUS2200001'.
CALL FUNCTION 'BBP_PD_SC_ITEM_GETDETAIL'
EXPORTING
i_guid = w_es_item-src_guid
i_attach_with_doc = ' '
IMPORTING
e_item = w_e_item.
w_value_2 = w_e_item-value.
ENDIF.
CLEAR sy-ucomm.
IF w_value_2 < w_value_1.
CLEAR e_message.
e_message-msgty = 'A'.
e_message-msgid = 'ZSRM_ERRORES'.
e_message-msgno = '029'.
e_message-msgv1 = w_es_item-number_int.
e_message-msgv2 = w_es_item-value.
e_message-msgv3 =
APPEND e_message TO et_messages.
ENDIF.
ENDLOOP.
ENDIF.
Hi
Which SRM version are you using ? Seems like problem in ur code..
The message type 'E' should work fine.. For which Filter type, u have created this BADI implementation.. Pls give more details..
use e_message-msgty = 'E'. " Instead of 'A'.. 'A' is not recommended
Do let me know.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.