cancel
Showing results for 
Search instead for 
Did you mean: 

Actoin conditions using opportunity close date

Former Member
0 Kudos

Hi,

In opportunities we want to trigger a reminder workflow via actions 2 business days prior to opportunity close date.

I understand that we have to create a reference object that takes factory calendar, time zone of user, etc. into consideration.

The problem I have is how I can determine the opportunity close date and make it available in my date profile for further calculations?

Any help is highly appreciated.

Thanks,

Juergen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Juergen

There is a date profile assigned in the config to the Opp transaction type.

In the definition of the action profile that you will use for the Opp trasaction the same date profile must be used.

Once this is done the date is available in the conditions for you to use.

If you need further help please let me know.

Thanks

Former Member
0 Kudos

Hi Richards,

Thanks for your quick reply.

I have already checked the standard date profile OPP_HEADER.

There are only the following date types available:

OPP_DECISION Customer Decision

OPP_DEMO Demonstration

OPP_GONOGO Go/No-Go Decision

OPP_QUOTATIO Quotation

OPP_REQUIREM Initial Needs Analysis

OPP_SOLUTION Develop Solution Proposal

There is also no general date rule that I can use to get opportunity end date.

Thanks,

Juergen

Former Member
0 Kudos

Hi Juergen

Here is what that needs to be done.

Go to Config where Date management is perfomred.

Add a New date type Expiration date to the std date profile OPP_HEADER or create a new one and then add the new date type. Next Assign it in the screen area so that you can maintain the same when creating an Opportunity.

In the Durations enter Validity_date and enter the validity period say 6 months.

Please let me know if this works.

Thanks

Former Member
0 Kudos

Richard,

I understand what you are saying. The problem is that Opportunity Closing Date is a regular field of an opportunity, it's not a date as part of date management.

In order to do the calculations that I mentionend in the beginning, taking time zone, factory calendar, personal calendar of an opportunity partner into consideration, the opportunity closing date must be in sync with closing date in date management all the time.

How can this be accomplished?

Thanks,

Juergen

Former Member
0 Kudos

Juergen,

You dont have to calculations with dates, just use the boolean chars,, Let me know if this works

Please refere above for more info

Former Member
0 Kudos

Hi Juergen

Here is what I had done with the Opp reminder.

1. Create a New Date rule say Opp_Reminder. In the code I calculated system date + 7 days( In your case it will be 2 days)

2. In the date Profile add the new date rule.

In the coditions for Starting equate the new daterule value to the end date in the opportunity.

In the conditions for Scheduling enter the validation that the opp must have a particular status.

PLease let me know if this helps. This might be the same as your firend mentioned.

Thanks

Former Member
0 Kudos

Richards,

I have done a "forward scheduling" already and it works. The issue is that I can not start with today's date.

I need to get the opportunity closing date from the detail screen into date management.

I agree that XML is the way to go, but I don't know how.

Thanks for all your help.

Juergen

Former Member
0 Kudos

Hi Juergen

I understood your problem after a long time. All the while I was under the impression that the field was available in the action when you are creating the condition.

PLease check the note number 816456.Although this is for customer enhancement it should work for your requirement also.

Basically you have to create a new SW01 and copy the Business Obj BUS2000111 and create a new sub type.

In the sub type create a New attribute and then write code to populate the value.

the new attribute is then available in the action to set the condition.

I had implemented this note so please let me know if you need further help.

Thanks

Former Member
0 Kudos

Hi Richards,

I was thinking to add the field using EEWB and use a BADI to update that field at time of opportunity save.

Your solution seems to be a more elegant one.

I still prefer to have the field copied into Milestones by any kind of magic XML as our married friend suggested

Thank you very much for all your help.

I will keep you posted how I solved when I am back from vacation.

Take care,

Juergen

Former Member
0 Kudos

Juergen,

I think the following solution should work

Have your Opportunity closing date defaulted to something like Start date + 1 year (or 1 month etc.)this is standard and Please refer to IDES copy for making it default it to whatever

Apply the same rule and create a date rule and assign to a date type. so that it will appear in Milestones,

You know what to do once it is in Milestones

There is one drawback to this, users should not manually enter the closing date in Opportunity, if it has to be manually entered then there is no control even you implement a Badi or EEWB

Please give me 10 points if this works

Thanks

Former Member
0 Kudos

Hi Richards,

I was on vacation and after I returned I had a lot on my plate, so I was not able to look into that until Monday. I have found the following solution.

- I added an opportunity closing date to my date profile

- I prototyped a new reference object in date management that determines factory calendar from employee responsible (still need to finalize the logic)

- I added an opportunity closing date - x days to my date profile which subtracts days from closing date using the new reference object.

- I created a Z-function module that copies the opportunity date to date management. The function module is called as call-back as soon as an opportunity segment field is changed. ( the call back is registered via transaction CRMV_EVENT).

Your solution would have worked as well, but I preferred the above as I didn't have to extend the business object while still be able to do calculation in date management.

Thank you very much for all your help and thoughts.

Juergen

Former Member
0 Kudos

Hi Raj,

Thanks for your help. See my solution in the response to Richard.

Your solution wouldn't have fulfilled the business requirements as the opportunity reminder date needs to be recalculated once the opportunity closing date changes. It's not a forward calculation from start date or today, it's calculated backwards.

Hope everything is well, take care.

Juergen

PS: I'll give you 6 points

Former Member
0 Kudos

Hi Richard

i was just browsing SDN towards my requirement, and i found your post.

i am not able to assign a Date profile to a custom Start condition, so that i can write a rule around the dates in my date profile. In the start condition screen, i can't assign any date profile because it turned out grey. i followed your process of assigning date profiles right from the txn types to action profile. still no luck.

please help.

Answers (2)

Answers (2)

OliverF
Participant
0 Kudos

Hi Juergen

it's quite a while since your post.

I am facing the same requirement to calculate in a date Profile with the opportunity closing date. Where you able to find a solution to copy the Opp closing date as a Milestone into the date Profile?

Or did you code an own function module?

Thanks a lot for a Feedback.

Regards

Oliver

Former Member
0 Kudos

Juergen,

Man you forgot me, you should have called me but anyways, here is the solution. You dont need any date profile to use in actions, In the actions when you are picking the constants please pick the field closing date and write your logic using the Boolean characters.

or the other way of creating this is to create a new date type called "Oppt_Val" and build a rule behind it the way you do for contracts.. once you configure a new date type..it will appear in "Milestones tab" not in any conditions tab. then you can go a head create your date logic behind this

this is just like your renewal machine man comeon

thanks

Raj venkata

Former Member
0 Kudos

Hi Man,

Married life must have confused you Just kidding...

How are you? Hope everything is going well.

Back to the issue:

I have already looked into both options:

- Please tell me how you can calculate the workflow trigger date/time (2 business days prior to closing date) with boolean characters taking factory calendar, personal calendar and time zone of an opportunity partner into consideration.

- In contracts, the contract start date you maintain is already a date in date management. In opportunity it is not. It is "only" an opportunity field. If SAP had designed it to be a date as date type everything would be easy going. As it is not, I need a date type that is in sync with opportunity closing date - all the time.

I might have to implement a function module to do that...

That is your prize for a workable solution: Free tennis lesson!

Hey Man, nice to see you again! We should have implemented a contact renewal machine instead of a contract renewal machine

Take care and talk to you soon,

Juergen

Former Member
0 Kudos

Hi Juergen,

I have looked into my system, as I said earlier you have an option to use Factory Calendar, System Date, User Local date and the date profile date in the action profile. Now coming to the solution

Create a new Date type lets call it as "Valid to" write XML behind the same to calculate the date as "Exp_end" - 2 days, (you can use the field name doesnt have to be a part of date profile) you already have some XML coded dates, please refer to those.

once the date is created and the value is coming over to the milestones, Then use this date "Validto" from Date profile as a constant and the closing date "Exp_End" from CRM Objects and the "=" and trigger the workflow once they are equal

Please let me know if this works

Former Member
0 Kudos

Raj,

I have already looked into some of the existing XML codes, but non of them seems to be suitable.

As soon as I have the Opportunity Closing date copied to Milestones I am fine.

That is the missing piece I am looking for from the beginning.

Thanks,

Juergen