cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Date in the Follow-up Transaction

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

The date types in both the transactions is same but does not copy the date from previous transaction to follow-up transaction.

Regards,

Deepak

robert_kunstelj
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Robert,

Thank you so much for the code and the detailed steps. However, I was thinking whether it is possible to implement this without coding because if I have to implement this solution through code then there are several approvals I would need to take.

Regards,

Deepak

robert_kunstelj
Active Contributor
0 Kudos

No, I don't think this is possible without coding, but as you can see there is not much coding necessary and requires ectuality just the implementation of one badi for copy control.

former_member601051
Participant
0 Kudos

Dear Gurus,

I have requirement to on copy control routine  from lead to Opportunity

In This i have to move the customizing view data to  Opportunity..

Can any once send with a sample code , and in which method i need to write a code..

Waiting for valuable inputs,

Thanks in advance..

Regards,

Vinutha

former_member182315
Participant
0 Kudos

In service quotation

When the date field is changed to new date it is resetting back to the old date which was there earlier, do we need to remove the Date rules to deactivate this and the user can enter his own date.

Kindly advise quiet urgent.....

Regards

Vani

Answers (1)

Answers (1)

robert_kunstelj
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Is it possible to achieve this without writing any code or is it possible to implement this through Date Rule?

Regards,

Deepak