on 04-17-2016 5:42 PM
Hi Frds,
How to update the date management duration value(number of month) in CRM_APPOINTMENT_BADI.
Example:
Duration = END date - Start Date.
When END Date manually change in Web UI--> BADI Trigger --> In Badi need to update Duration
Plese suggeste,
Thanks,
Rajan
Dear Rajan,
Let me provide you some further input.
1st, you need to create a z implementation in crm_appointment_badi in tcode se18.
2nd, write your own code in IF_EX_CRM_APPOINTMENT_BADI~CRM_APPOINTMENT_MERGE
30 | IF_EX_CRM_APPOINTMENT_BADI~CRM_APPOINTMENT_MERGE | ZCL_SPENCER_DATE_BADI=========CP |
29 | IF_EX_CRM_APPOINTMENT_BADI~CRM_APPOINTMENT_MERGE | CL_EX_CRM_APPOINTMENT_BADI====CP |
28 | APPOINTMENT_BADI_MERGE | SAPLCRM_ACTIVITY_FOREIGN_OW |
27 | CRM_APPOINTMENT_MERGE_OW | SAPLCRM_ACTIVITY_FOREIGN_OW |
26 | CRM_APPOINTMENT_FILL_OW | SAPLCRM_ACTIVITY_FOREIGN_OW |
25 | CRM_APPOINTMENT_CHANGE_OW | SAPLCRM_ACTIVITY_FOREIGN_OW |
24 | CRM_APPT_MAINTAIN_SINGLE_OW | SAPLCRM_ACTIVITY_FOREIGN_OW |
23 | CRM_APPT_MAINTAIN_MULTI_OW | SAPLCRM_ACTIVITY_FOREIGN_OW |
22 | CRM_DATES_DETERM_INITIAL_EC | SAPLCRM_DATES_EC |
This crm_appointment_merge is called every time after system determine or modify an existing date type and duration. and provide user a chance to change this date type or duration.
basically, you need to write something in this method like below.
* duration is DURATION. start time is CONTSTART and end time is CONTEND.
if CS_APPOINTMENT_BADI-appt_type = 'DURATION' .
* read teh contstart and contend
* you need to find the proper FM to calculate contstart - contend = ? months. I do not know it.
* assign ? months to CS_APPOINTMENT_BADI-DURATION.
ENDIF.
If you cannot find FM to calculate contstart - contend, you may read start and end time from buffer gt_date_wrkt directly and calculate it yourself.
Spencer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
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.