Hi all,
I'm trying to restrict the user to save without entering some values in crm webui by using 'RAISE do_not_save' , but i'm getting dump ,
help me..!
I found that when i give the condition as " if ls_orderadm_h_wrk-OBJECT_ID is NOT INITIAL" it will give dump without this condition it will work fine.
my code is ...!
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
EXPORTING
iv_orderadm_h_guid = iv_guid
IMPORTING
es_orderadm_h_wrk = ls_orderadm_h_wrk
EXCEPTIONS
OTHERS = 1.
if ls_orderadm_h_wrk-object_type = 'BUS2000108'.
if ls_orderadm_h_wrk-OBJECT_ID is NOT INITIAL.
wa_header_guid = iv_guid.
APPEND wa_header_guid TO lt_header_guid.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
it_requested_objects = lt_requested_objects
IMPORTING
et_orderadm_h = lt_orderadm_h
et_opport_h = it_opportunity
et_partner = lt_partner
et_status = it_status
et_status_h = lt_status_h
et_lead_h = lt_lead_h
* et_text = lt_text
* et_doc_flow = lt_doc
* et_survey = lt_survey
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
.
DESCRIBE TABLE lt_partner LINES LV_COUNT .
if LV_COUNT <= 1.
* lr_core = cl_crm_bol_core=>get_instance( ).
* lr_core->start_up( 'ALL' ).
* lr_mess_cont = lr_core->get_global_message_cont( ).
CV_OWN_MESSAGE = 'X'.
* lr_mess_cont->add_message(
* EXPORTING
* iv_msg_type = 'E'
* iv_msg_id = 'ZRAS_LEAD'
* iv_msg_number = '000'
* iv_msg_v1 = 'Information message'
* iv_show_only_once = 'X').
MESSAGE E000(ZRAS_LEAD) WITH 'error in save ' RAISING DO_NOT_SAVE.
* Please enter the required values...!
*do_not_save = 1.
* RAISE do_not_save.
Endif.
ENDIF.
ENDIF.