Skip to Content
Author's profile photo ANEESH BISWAS

Date profile- How to create one?

It is very important in any transaction in SAP CRM to have a date profile. Amongst other reason, it is what decides the validity of a transaction.In this document, I will try to explain step by step the necessary action that needs to be taken to set up a simple date profile. Lets take an example to understand this feature.Lets assume that a service request needs to be assigned to an employee within 1 hour of creation of the request.So, the “date/time of assignment=  start date +1hour”.

Note: A lot of standard date profile s are already present but in some situation one may need to create a new one.

We need to create the rule based on our requirement. Let us first split out requirement into two halves.

First half is start date, which is nothing but the current time (todays date and time) and the second half is “1 hour”. We get our result by adding these two variables.

Let us go to the following spro path

/wp-content/uploads/2012/10/a1_149394.jpg

Now create a new entry (say, ZTEST_RULE)  and enter some  description (say,  DEMO RULE)

/wp-content/uploads/2012/10/a2_149395.jpg

/wp-content/uploads/2012/10/a3_149408.jpg

Save the entry and double click on the newly created rule.The current version of the rule is displayed. Double click again on the version to open the xml editor.

/wp-content/uploads/2012/10/a4_149409.jpg

Here in this code if you look , we have defined our requirement in a simple formula

RESULT=SRV_CUST_BEG + ZCONSTANT , where SRV_CUST_BEG is nothing but a standard date type which denotes start time.To view this search for SRV_CUST_BEG in date types.

/wp-content/uploads/2012/10/a5_149410.jpg

ZCONSTANT is a custom defined duration. (Again click on new entry to create a new duration type with meaningful description)

/wp-content/uploads/2012/10/a6_149414.jpg

Now the since our rule is built, it needs to be associated with a date profile. To create a date profile again follow the spro path described below.

/wp-content/uploads/2012/10/a7a_149416.jpg

Click on new entry to create a date profile with meaningful description.

/wp-content/uploads/2012/10/a7a_149416.jpg

Enter the reference object as SYSTEM. Details about reference object can be found at

http://help.sap.com/saphelp_crm700_ehp02/helpdata/en/1f/ca0b8a74c9466abef68d8e353f16bd/frameset.htm

/wp-content/uploads/2012/10/a9_149420.jpg

Now, search for the newly created date rule. (ZTEST_RULE in this case)

/wp-content/uploads/2012/10/a10_149421.jpg

Now enter all the date types  used in our case by clicking on new entry button.

/wp-content/uploads/2012/10/a11_149422.jpg

Now enter the duration type as shown below.

/wp-content/uploads/2012/10/a12_149426.jpg

Our date rule is built now on lines of our requirement.All we need to do now is to insert this date profile to our desired transaction type.

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Maddy P
      Maddy P

      Thank you very much Mr. Aneesh Biswas for sharing your knowledg. It is very much useful information. However, please explain a little more clearly about Date rule creation.  After creating new date rule and double clicking on it, system  displayed XML editor but there is no default coding as you explained.  Please clarify my concern if possible.

      If possible, please mail me the clarification to madhavarao.sap@gmail.com

      Awaiting for your reply. 

      Author's profile photo ANEESH BISWAS
      ANEESH BISWAS
      Blog Post Author

      Hi Maddy,

      if you meant to say the xml part. The best thing would be to check some standard ones...there are many already ....standard rules /profiles provided by SAP.... you can copy one that suites your need and understand some basic xml...then forging it to ur requirememnt wont be so difficult....

      hope this helps!

      Cheers

      Aneesh

      Author's profile photo Atul Keshav
      Atul Keshav

      Hey Aneesh,

      The document is really helpful, one small observation for the service request transaction type if you need to add any customized  date type the date profile needs to be added to the item category

      I did try to assign the date profile to the customized service request which is the transaction type, however the z customized date type did not show up

      However when I did assign the date profile to the item category in case of service requests the z date types showed up in the date assignment block

      Hope this helps

      Kind Regards

      Atul

      Author's profile photo Former Member
      Former Member

      Hey Aneesh,

      This was real handful..I faced the same trouble..getting in the loop of configs for date profile...Now things are much clear...some bit of xml scripting is required though and in complex scenarios a tech consultant may be needed.

      Author's profile photo Maddy P
      Maddy P

      Hi Aneesh,

      Thank you for your prompt reply.  I think you created a new date rule without copying, didn't you?

      The reason why i got confused is, i was just thinking that which standard date rule you copied. But i think you did not copy any standard rule. You wrote the xml code, am i right?

      Please correct me if i am wrong in understanding you.

      Regards

      Maddy

      Author's profile photo Selvam Thandapani
      Selvam Thandapani

      Hi Mr. Aneesh Biswas,

        Thanks for sharing your knowledge. It is helpful for me but little bit of explanation on each screen shot or steps would be more useful for beginners.

      Thanks

      Selvam

      Author's profile photo Former Member
      Former Member

      Great. Quick and easy set up for Date profile. Thanks

      Author's profile photo Former Member
      Former Member

      Dear Aneesh,

      The document is really good, it has clarified my doubts. Thanks for sharing.

      One small clarification, while creating the date profile, in Date types you assigned the Date rule (TODAYTIME) created by the standard SAP and not the one you created (ZTEST_RULE). Could you please more details? If this is the case what is the reason for creating new Date Rule?

      Regards,
      Mahesh

      Author's profile photo Basis Team
      Basis Team

      Hi Aneesh,

      Is it possible to define date rule based on the status of Transaction type?

      For example we want to capture "Implementation Date" once its status is "Completed". Is that possible to achieve it?

      Regards,

      Piyush Jain

      Author's profile photo Spencer Liang
      Spencer Liang

      "Implementation date" as you name it, should be a specific date that is not changed once determined. Your request is to capture it rather than recalculating it with date rule. So your request has nothing to do with date rule.

      You need to use action. the action can be triggered once status is changed. How to do it? search status for crm-bf-aci notes. there are some about it like 1685838 Action determination not triggered when status is updated.

      You can develop your own method in badi exec_emthodcall_badi to assign it to your action. In your method, you may read the implementation date and put it somewhere else. How to do it? see Method call in action with BADI EXEC_METHODCALL_PPF - CRM - SCN Wiki

      Some more wiki about actions.

      Start condition - customizing and BADI - CRM - SCN Wiki

      Schedule Condition - customizing and BADI - CRM - SCN Wiki

      Schedule an action - customizing, tips, and debugging hints - CRM - SCN Wiki

      Execute an action - customizing, tips, and debugging hints - CRM - SCN Wiki

      Spencer