Hi,
when we are creating Activity appointment here i need to check conditions.
if category = meeting
then i need to add 15 min to the end time to based on start time. but system it's taking default 10 min how can i change.
ex : if category = 'meeting'.
endtime = start time + 000015min.
elseif.
category = call.
end time and start time should be non editable.
here i implemented badi CRM_APPOINTMENT_BADI. here i am not able find category field in cs_appointment_badi structue.
how can i achive this please guide me.
method IF_EX_CRM_APPOINTMENT_BADI~CRM_APPOINTMENT_MERGE.
DATA: lv_guid TYPE crmt_header_guid, "Variable that will store the guid.
process_type TYPE crmt_process_type, " For telesales the Process type is - Appointment
mode type CRMT_MODE.
*Function Module to Retrive the Header GUID.
CALL FUNCTION 'CRM_INTLAY_GET_HEADER_GUID'
IMPORTING
ev_header_guid = lv_guid.
function module to retrive the Process type.
Processing Type :For telesales the Process type is - TA
CALL FUNCTION 'CRM_INTLAY_GET_PROCESS_TYPE'
EXPORTING
iv_orderadm_h_guid = lv_guid
IMPORTING
ev_process_type = process_type
EXCEPTIONS
proc_type_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*This function module is used ton get the GUID from the buffer while ctreating SALES ORDER.
*Tcode to create the sales order - crmd_order
Processing Modes are :create = A,change = B,display = C,delete = D
CALL FUNCTION 'CRM_INTLAY_GET_PROCESS_MODE'
IMPORTING
EV_PROCESS_MODE = mode
.
check process_type = 'Z001' and mode = 'A' and mode = 'B'.
*ex : if category = 'meeting'.
*endtime = start time + 000015min.
*elseif.
*category = call.
*end time and start time should be non editable.
CS_APPOINTMENT_BADI-TIME_UNIT = '000005'.
ENDMETHOD.
rose.