on 07-30-2014 1:25 PM
Hi gurus,
My requirement, is to change an appointment date of a order.
Right now, I am using the FM CRM_ORDER_MAINTAIN, but the thing is it doesn't work. I executed this FM once the order is created but is not being changed.
My requirement is change the date below ( in yellow )
I've also cheked FM CRM_APPT_MAINTAIN_MULTI_OW. But I couldn't make it work.
Thanks in advance.
Regards
In what moment of the process do you need change the appointment date?
Cheers!
Luis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My idea is first create the order, using FM: CRM_ORDER_MAINTAIN, CRM_ORDER_SAVE, CRM_ORDER_INITIALIZE and BAPI_TRANSACTION_COMMIT.
As soon as is created then I excecuted another process, in which I use, the same FMs and in the same order as well. But in this case, the CRM_ORDER_MAINTAIN I fill only the appointment table. But it is not being changed.
Maybe there is another FM in which allows me to change it.
Thanks in advance.
Regards
That's "easy" I would go for the API CRMXIF_ORDER_SAVE and inform the DATES table depending if you want to upload dates at header or item level.
I would suggest to put a break point inside CRM_ORDER_MAINTAIN, change the desired date in Web UI or GUI and see which values has the table IT_APPOINTMENT.
At the very end the API CRMXIF_ORDER_SAVE will call CRM_ORDER_MAINTAIN, but IMHO the XIF interface offers an easier interface (No CT_INPUT_FIELDS )
I use these fields:
ls_data-object_task = 'U'.
ls_data-object_guid = guid.
ls_data-object_id = id.
ls_appo-appt_type = 'SRV_RREADY'.
ls_appo-timestamp_from = new_date.
ls_appo-timestamp_to = new_date.
ls_appo-rule_name = 'SRV_0002'.
ls_appo-duration = 0.
ls_appo-input_fields-appt_type = abap_true.
ls_appo-input_fields-rule_name = abap_true.
ls_appo-input_fields-timestamp_from = abap_true.
ls_appo-input_fields-duration = abap_true.
APPEND ls_appo TO ls_data-dates-data.
ls_data-dates-datax = abap_true .
APPEND ls_data TO lt_data.
CALL FUNCTION 'CRMXIF_ORDER_SAVE'
EXPORTING
data = lt_data
IMPORTING
return = ls_return.
But doesn't work
Hi, finally Ive done it , thanks to this wiki..
http://wiki.scn.sap.com/wiki/pages/diffpages.action?pageId=142345757&originalId=347727575
Regards
I created another wiki page with a sample of the code, I know you already finished with the changes, but I thought maybe would be interesting to know a different approach
CRM - Change Document appointment date using XIF - Code Gallery - SCN Wiki
User | Count |
---|---|
6 | |
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.