on 2009 Jan 06 3:33 PM
Hi Experts,
On Lead screen, I have REASON picklist. If i select the REASON as "Extended for 3 Months"
then an custom error message is displayed asking to set the "End Date" to 90 days.
"Reson" Component details as follows
BT108H_LEA/Detail
BTSUBJECT/STRUCT.CONC_KEY
"End Date" Component details as follows.
BT108H_LEA/Detail
BTLEADEND/BTLEADEND
I used the following code to display that message.
if typed_context->BTSUBJECT->GET_REASON( attribute_path = '' ) = 1."For 3 Month
* Create Message
DATA: lr_msg_service TYPE REF TO cl_bsp_wd_message_service.
lr_msg_service = cl_bsp_wd_message_service=>get_instance( ).
CALL METHOD lr_msg_service->add_message
EXPORTING
iv_msg_type = 'E'
iv_msg_id = 'ZERR_MSG'
iv_msg_number = '000'.
endif.
Now the problem is once i change the 'End Date' to 90 days, the error message which is dispalyed to
"set the date to 90 days" should disappear. What should i do to take out the displayed error message
once the 'End Date' is set.
Thanks in advance.
Cheers
Mythili
Resolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mythili,
Sorry for replying late.
According to me while displaying error message you are filling some table, make that table global and read that table where u want to delete message i.e in method or anywhere and use following method.
CALL METHOD cl_crm_isu_order_check=>delete_messages
EXPORTING
x_guid = pass here item guid
x_msgid = 'ECRM_ISU' your message class name
x_msgno_from = '102' your message number
x_msgno_to = '102'. your message number
I think these should work and if doesnt then let me know your screen, view, component of yours.
Let me know.
Cheers,
Parth Parikh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mythili,
I had used same class which u r using but with different method.
DATA:
lw_return TYPE bapiret2.
DATA:
lt_message_return TYPE TABLE OF bapiret2_t.
lw_return-type = 'E'
lw_return-message = text-000 "Your message text.
APPEND lw_return TO lt_message_return.
CALL METHOD lo_msg_ser->add_bapi_messages
EXPORTING
it_bapi_messages = lt_message_return.
Use this aand let me know this works according to your requirements
Cheers,
Parth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mythili,
Write if...else...endif for the solution.
if typed_context->BTSUBJECT->GET_REASON( attribute_path = '' ) = 1."For 3 Month
Create Message
DATA: lr_msg_service TYPE REF TO cl_bsp_wd_message_service.
lr_msg_service = cl_bsp_wd_message_service=>get_instance( ).
IF (your condition)
CALL METHOD lr_msg_service->add_message
EXPORTING
iv_msg_type = 'E'
iv_msg_id = 'ZERR_MSG'
iv_msg_number = '000'.
else.
CALL METHOD lr_msg_service->delete_message
EXPORTING
iv_msg_type = 'E'
iv_msg_id = 'ZERR_MSG'
iv_msg_number = '000'.
endif.
i think this should work let me know after u implement this that this solution works or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
23 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.