on 01-28-2011 6:51 PM
Hi,
Our requirement is to copy a date (not all date types ONLY one date type) from Service Contract Quotation to Service Contract i.e. in a follow-up transaction. Any ideas how to achieve this?
Regards,
Deepak
hi, you can try to keep the data type ID sames between the two document. Maybe the Standard copy control rule will support copy same ID date type to following.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check if you have registered event for triggering dates copy rutine after follow up. To do that go to transaction CRMV_EVENT and select transaction category for Service contract and check if there is registered event with following parameters:
Execution time 1 Immediately
Priority 50
Object name ORDERADM_H Administration header
Event AFTER_CREATE_WITH_REFERENCE
Attribute <*>
Function CRM_DATES_COPY_EC
Execute function for document header
Call callback Call for header/item, with object, event, attribute, old/new
Copy date on item level
If event is there then you will have to add coding also in coy control tor method DATES. Just use the following coding and it should be ok...
METHOD if_ex_crm_copy_badi~dates.
constants
INCLUDE crm_appointment_types_con.
INCLUDE crm_object_kinds_con.
INCLUDE crm_object_names_con.
*data
DATA: ls_input_field_names TYPE crmt_input_field_names,
ls_item_type TYPE crmc_item_type,
ls_profile TYPE crmt_dates_prf_dyn,
ls_timeruna TYPE timeruna,
lv_rule_id TYPE timeruleid,
lv_copy_rule TYPE crmt_boolean.
FIELD-SYMBOLS: <lf_input_fields> TYPE crmt_input_field.
LOOP AT ct_input_fields ASSIGNING <lf_input_fields>.
ls_input_field_names-fieldname = 'TIMESTAMP_FROM'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ls_input_field_names-fieldname = 'TIMESTAMP_TO'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ls_input_field_names-fieldname = 'TIMEZONE_FROM'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ls_input_field_names-fieldname = 'TIMEZONE_TO'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ls_input_field_names-fieldname = 'DURATION'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ls_input_field_names-fieldname = 'TIME_UNIT'.
INSERT ls_input_field_names
INTO TABLE <lf_input_fields>-field_names.
ENDLOOP.
ENDMETHOD.
Implement copy rutine under spro>crm>transactions>basic settings>copy control for business transaction. To implement logic for dates, use the segment DATES in your copy control.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
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.