on 06-01-2011 5:24 AM
Hi everyone!
I'm trying to configure the system to automatically calculate delivery date in sales order based on the other date and duration.
I'm working with standalone CRM 7.0 and I've configured date profile for sales order that uses REQ_DLV_DATE date type, my own date type to enter a payment fact date there and duration DLVTIME. I've created a rule that calculates REQ_DLV_DATE=YPAYMFACT+DLVTIME. But when I enter Payment Fact date and delivery time, delivery date is calculated in Dates assignment block but it's not getting updated on the header ([screenshot|http://www.picdrop.net/images/requesteddeliverydat.png]). How can I achieve this?
Please, help.
Regards,
Alex.
The reason is the deliver date at the top belongs to the Sales segment and the other belongs to the Appointment segment of the One Order.
Implement the following code in the Badi CRM_SALES_BADI, method CRM_SALES_MERGE and sync them up.
DATA: ls_date_key TYPE DATE_LOGICAL_DATE_KEY.
DATA: ls_date_wrk TYPE CRMT_DATE_WRK
ls_date_key-appt_type = 'REQ_DLV_DATE'.
CALL FUNCTION 'CRM_DATES_READ_SINGLE_OW'
EXPORTING
iv_ref_guid = iu_sales_wrk-guid
iv_ref_kind = 'A'
is_logical_date_key = ls_date_key
IMPORTING
es_date_wrk = ls_date_wrk
EXCEPTIONS
OTHERS = 1.
CS_SALES_BADI-REQ_DLV_DATE = ls_date_wrk-TIMESTAMP_FROM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Robert, could you please provide an example of a function that will change requested delivery date on the header level?
Should we work with some specific structure to set that field?
Thanks in advance!
P.S. By the way, I've tried to debug the other function on that event that performs checks, but still it doesn't break. I've put the breakpoint in the beginning. Maybe it's because of the Attribute name that has a space in the beginning like " REQ_DLV_DATE"?
Regards,
Alex
Still no luck with this one. Developer made FM that updates the value, it does not getting updated though.
Also strange behavior began with that req_dlv_date field on the header. When I'm trying to enter a date there manually it instantly vanishes and the field becomes empty again. I changed a date profile to a standard and try to delete our FM from event still the same. Why is that happening?
Help, please. It's very important.
Regards, Alex
Thanks Robert for your help. It's working.
Regards, Alex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the same problem and solved it by developing event which fills also that field, when date is filled.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer Robert.
In crmv_event I've found
Trans. Category - BUS2000115
Execution Time - 1 Immediately
Priority - 1
Object Name - APPOINTMENT
Event - AFTER_CHANGE
Attribute - REQ_DLV_DATE
Function - CRM_LATEST_DELIVERY_DATE_CH_EC
Header - Checked
Item - Checked
I've tried to debug CRM_LATEST_DELIVERY_DATE_CH_EC func. module but it doesn't break in that module. Does it mean that the event is not getting handled?
User | Count |
---|---|
8 | |
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.