Doubt about expression "Position" on DATE RULE XML

Hi guys,
Does anybody know what expression "POSITION" exactly do in a DATE RULE?
Below a fragment of DATE RULE XML
<VarTimeExp displayType="VarTime"
                                  name="PERIOD_DATE"
                                  *position="E"*>
               <!-- Variable: Time -->
               </VarTimeExp>
Other question,
Does anybody knows where I could find information regarding building new XML to DATE RULE?
Very thanks for any help.
Lalas

Hi,
This is the date rule where the logic is written to add the duration CSDURATION to the date type CSCREATDATE.
You will find the date type and duration in the date profile.
Regards,
PP

Similar Messages

  • Date rule : XML input clarifiction

    Hi all
    Could you pls help me understanding the following XML query in the date rule in my SAP system.Iam more focused on the part which starts from VarTimeExp till VarDuraExp....Could you guys xplain me where to  get those attributes from  .Are they data elements from some table??
    <?xml version="1.0"?>
    <TimeRule>
    <TimeRuleSource>
      <ruleline>
       <AssignTimeExp>
         <VarTimeExp name="RESULT" position='F'/>
         <MoveTimeExp direction="+">
           <VarTimeExp name="CSCREATDATE" position='F'/>
           <VarDuraExp name="CSDURATION"/>
         </MoveTimeExp>
       </AssignTimeExp>
      </ruleline>
    </TimeRuleSource>
    </TimeRule>
    Thanks

    Hi,
    This is the date rule where the logic is written to add the duration CSDURATION to the date type CSCREATDATE.
    You will find the date type and duration in the date profile.
    Regards,
    PP

  • Document on XML date rules and date management

    Hi,
    Could you Please send a document on XML date rules and date management. I really in need of it. You may send it to [email protected]

    Hello
    Could you please email this to me:  [email protected]
    Thanks in advance
    Kevin

  • Date management: XML-editor for Date Rules

    Hello,
    I'm looking for any documentation on the XML-editor for date rules (tags, attributes and so on).
    Please send to [email protected]
    Regards,
    Roman

    Hello,
    I'm still looking it...
    Any help will be appreciated.
    Regards,
    Roman

  • XML Date Rules

    Helooo
    Does anybody know if there is any documentation available
    on the XML date rules, meanings of tags and
    attributes and general functionality?
    If so please send that to [email protected]
    Thanks,
    Bhargava

    Hello Manuel,
    I am right now working out some in-house date rules and I would be greatful if you could send me the documentation you have on XML Date rules? Email address is
    [email protected]
    Thanks,
    Yves

  • Doubt about Substitution Rules

    Hello gurus!
    We have a doubt about Management Substitution Rules. We fully understand all the benefits of this feature and tried to communicate to all our personnel to make it work properly, but as we have a big staff and not everybody have the same "skills" understanding technology, we eant to have a different approach to this: we want to develop a "user friendly" interface, as a single acreen where we can emulate all the features of Substitution Rules, but we want to know if there is a control program or a Function that controls this, and the understand it fully to achieve this. Anybody knows if this is possible?
    Regards IA

    Hi,
    If you use UWL only with one backend system, you can easily build your own application for example with web dynpro ABAP. Just use the function modules SAP_WAPI_SUBSTITUTE* to do the different operations (creating, deleting substitutions, etc.).
    If you have multiple backend systems, it is a bit more complicated. You could build your own (Java WD) application by using the Substitution API. Check the docs at: http://help.sap.com/javadocs/NW04S/SPS09/uw/com/sap/netweaver/bc/uwl/IUWLSubstitutionManager.html
    Both approaches work.
    Regards,
    Karri

  • DOUBT ABOUT MASTER DATA

    Hey guys!!!
    I have a doubt about master data, i need to add an atribute to a master data characteristic, do i have to erase the data to do this or can i add the atribute without erase the data?
    Thanks and Regards!!

    >
    Koundinya Karanam wrote:
    > Hi,
    > You should delete the Master data with SID's first before adding the attribute to that characteristic.
    >
    > Regards,
    > KK.
    KK,
    Thats not true.
    You neednot delete master data to add attributes to a characteristic.
    Additionally, you cannot delete (there are methods to delete which are not suggested) master data in normal way, if there is transactional data for that characteristic.
    Luis,
    You should be able to add attribute to a characteristic without deleting master data, but make sure you load data for the same for values to reflect.

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • How to add two duration in a date rule

    Hello Experts
                        I need to add two duration's in a date rule . previously i have only added a single duration to a date type.The code i am using is
    <?xml version="1.0"?>
    <TimeRule>
    <TimeRuleSource>
      <ruleline>
       <AssignTimeExp>
         <VarTimeExp name="RESULT" position='F'/>
         <MoveTimeExp direction="+">
           <VarTimeExp name="SRV_CUST_BEG" position='F'/>
           <VarDuraExp name="ZDURATION1"/>
         </MoveTimeExp>
           </AssignTimeExp>
      </ruleline>
    </TimeRuleSource>
    </TimeRule>
    I need to add ZDURATION1+ZDURATION2 to SRV_CUST_BEG . I am new to XML Please help
    I will reward points as soon as i get the reply.
    Thanks in Advance

    Hi Rashmi,
    Please check http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=326600223.
    Regards,
    Bhushan

  • Dynamically call function module in the date rule

    Hi Experts
    I am currently working on service request.I am facing a problem in the date management there.In my service request i have 5 statuses .One of my status is "Pending with consumer".I am using duration settings of service request.By duration settings , i am calculating the duration for which its pending with consumer.I am having 2 response profile one is 24*7 and other is having 9 working hours.In the service request from the SLA configuration i am calculating the escalation date & Time .I need to add the pending with consumer duration with the escalation date and time.I am facing a problem , i am explaining whole problem ..
    Let say if the pending with consumer duration is  1440 minutes(that is 24 hours) .I am adding the minutes to the escalation date through the date rule.
    I am facing problem that if the service profile is 24*7 then there is no problem but if it is having the 9 hours working service profile then after adding the minutes to it the escalation date is changing to 4 days ahead which is wrong.
    I need to add only those minutes for which it is pending with consumer in working hours for the 9 hours service profile
    I need to dynamically determine the working hours from the duration then add it to escalation dates when the status is changed from pending with consumer.
    Please suggest a badi will work or how to do it.
    Is there any way so that while adding duration's in the date rule i can determine if the service profile is 24*7 then i will directly add the durations or else if service profile is 9 hours then i will determine the working hours from the duration" pending with consumer" then i will add.
    Is there any way so that i can call any custom function module then write my logic there
    Its urgent as i need to give demo.I will appreciate a quick reply.Please reply
    I will assign points as soon as i will get reply.

    Hi sridhar,
    the explanation already given is correct and good. Small add-on:
    All functions called during one LUW with addition IN UPDATE TASK are stored together with their actual parameters in a temporary memory area. The moment a COMMIT WORK is issued, the functions are released to be executed by a so-called update task which is running in the background. This explains why functions called in update task never return anything, no SY-SUBRC and no export or table parameters If a function called in update task raises an exception or runs into an error the calling user will get an express message informing about this. Also, all database updates done by this update process are rolled back to keep consistency.
    This proceeding helps to keep database tables consistent and allows the user to keep on doing his work before all database updates are complete. You may have seen messages like "material will be changed" after saving. If you open the same material immediately, you'll get a message "object locked by...<yourself>". This means the update task is still running.
    Regards,
    Clemens

  • How to Define new Date rules

    Hi ,
       I have a requirement in my project, where in i have to create some new date rules. I've searched the whole web to find any document which explains the XML for Date rules but couldn't find any. Does any one know what that XML means, and how to create new Date rules ?
    Please reply
    Krishna-

    Hi
    it just calculates new dates base on reference dates or abap function modules.
    In IMG in Date management node you can create your own date rules.
    Best would be to copy existing one and than modify it.
    Please read this thread about this: Date rules editor - file format documentation availability
    Regards
    Radek

  • Date Rules failing in billing value

    Hi All,
    I have created a date rule with the help of an existing date std rule.
    I need the rule as monthly (considering month as 30 days).
    <?xml version="1.0"?>
    <SAPTimeRule>
       <TimeRuleTree>
       <!-- Begin of Rule Tree -->
          <ruleline>
          <!-- Begin of new LINE -->
             <AssignTimeExp displaytype="AssignTime">
             <!-- Assign time -->
                <VarTimeExp displayType="VarTime"
                                   name="RESULT"
                               position="B">
                <!-- Variable: Time -->
                </VarTimeExp>
                <MoveTimeExp displaytype="MoveTime" direction="+">
                <!-- Move -->
                   <VarTimeExp displayType="VarTime"
                                      name="PERIOD_DATE"
                                      position="B">
                   <!-- Variable: Time -->
                   </VarTimeExp>
                   <ConstDuraExp displaytype="ConstDura"
                                    duration="1" timeunit="MONTH">
                   <!-- Constant Duration -->
                      <VarObjectExp displaytype="VarObject"
                                    name="SYSTEM"/>
                      <!-- Variable: Timeobject -->
                   </ConstDuraExp>
                </MoveTimeExp>
             </AssignTimeExp>
          </ruleline>
       </TimeRuleTree>
    </SAPTimeRule>
    When I specified it as
                  <ConstDuraExp displaytype="ConstDura"
                                    duration="1" timeunit="MONTH">
    Its working fine and gives the billing value properly.
    When I specify it as
                  <ConstDuraExp displaytype="ConstDura"
                                    duration="30" timeunit="DAY">
    Its not showing consistant billing value for all the period.
    Do I need to do anything with date profile or duration.
    Can anybody help me to proceed?
    Thanks & Regards,
    bhuvana

    Hi Martin,
    I will explain my problem again.
    I have created a date rule with the help of an existing date std rule.
    I need the rule as monthly (considering month as 30 days).
    <?xml version="1.0"?>
    <SAPTimeRule>
    <TimeRuleTree>
    <!-- Begin of Rule Tree -->
    <ruleline>
    <!-- Begin of new LINE -->
    <AssignTimeExp displaytype="AssignTime">
    <!-- Assign time -->
    <VarTimeExp displayType="VarTime"
    name="RESULT"
    position="B">
    <!-- Variable: Time -->
    </VarTimeExp>
    <MoveTimeExp displaytype="MoveTime" direction="+">
    <!-- Move -->
    <VarTimeExp displayType="VarTime"
    name="PERIOD_DATE"
    position="B">
    <!-- Variable: Time -->
    </VarTimeExp>
    <ConstDuraExp displaytype="ConstDura"
    duration="1" timeunit="MONTH">
    <!-- Constant Duration -->
    <VarObjectExp displaytype="VarObject"
    name="SYSTEM"/>
    <!-- Variable: Timeobject -->
    </ConstDuraExp>
    </MoveTimeExp>
    </AssignTimeExp>
    </ruleline>
    </TimeRuleTree>
    </SAPTimeRule>
    When I specified it as
    <ConstDuraExp displaytype="ConstDura"
    duration="1" timeunit="MONTH">
    Its working fine and gives the billing value properly as below.
    from                              to                           bill date                  <b>bill value</b>
    05.11.2007     04.12.2007     01.11.2007     0.83
    05.12.2007     04.01.2008     01.12.2007     0.83
    05.01.2008     04.02.2008     01.01.2008     0.83
    05.02.2008     04.03.2008     01.02.2008     0.83
    05.03.2008     04.04.2008     01.03.2008     0.83
    05.04.2008     04.05.2008     01.04.2008     0.83
    05.05.2008     04.06.2008     01.05.2008     0.83
    05.06.2008     04.07.2008     01.06.2008     0.83
    05.07.2008     04.08.2008     01.07.2008     0.83
    05.08.2008     04.09.2008     01.08.2008     0.83
    05.09.2008     04.10.2008     01.09.2008     0.83
    05.10.2008     04.11.2008     01.10.2008     0.00
    When I specify it as
    <ConstDuraExp displaytype="ConstDura"
    duration="30" timeunit="DAY">
    Its not showing consistant billing value for all the period.
    from                               to                         bill date                    bill value
    05.11.2007     04.12.2007     01.11.2007     100.83
    05.12.2007     03.01.2008     01.12.2007     0.69
    04.01.2008     02.02.2008     01.01.2008     0.69
    03.02.2008     03.03.2008     01.02.2008     0.83
    04.03.2008     02.04.2008     01.03.2008     0.69
    03.04.2008     02.05.2008     01.04.2008     100.83
    03.05.2008     01.06.2008     01.05.2008     0.69
    02.06.2008     01.07.2008     01.06.2008     100.83
    02.07.2008     31.07.2008     01.07.2008     0.69
    01.08.2008     30.08.2008     01.08.2008     100.83
    31.08.2008     29.09.2008     01.08.2008     0.69
    30.09.2008     29.10.2008     01.09.2008     100.83
    30.10.2008     04.11.2008     01.10.2008     0.00
    But te period is getting splitted correctly for 30 days.
    What could be the problem?
    Can you guid to correct this problem?
    Thanks & Regards,
    Bhuvana

  • Date rules editor - file format documentation availability

    Hi,
    In CRM date management there is a feature that allows definition of automatic date determination, e.g. contract end date = contract start date + 90 days.
    To access date editor you may call SM30 with view V_TIMERUNA, 2x click on date rule and an editor is launched with XML file that looks like that:
    <?xml version="1.0"?>
    <SAPTimeRule>
       <TimeRuleTree>
       <!-- Begin of Rule Tree -->
          <ruleline>
          <!-- Begin of new LINE -->
             <AssignTimeExp displaytype="AssignTime">
             <!-- Assign time -->
                <VarTimeExp displayType="VarTime"
                                   name="RESULT"
                               position='B'>
                <!-- Variable: Time -->
                </VarTimeExp>
                  <MoveTimeExp displaytype="MoveTime" direction="+">
                  <!-- Move -->
                <ConstLocTimeExp displaytype="ConstLocTime"
                              date="now"
                              time="000000"
                              timeunit="DAY">
                   <VarObjectExp displaytype="VarObject" name="SYSTEM"/>
                </ConstLocTimeExp>
                     <ConstDuraExp displaytype="ConstDura"
                                      duration="6" timeunit="MONTH">
                     <!-- Constant Duration -->
                        <VarObjectExp displaytype="VarObject"
                                      name="SYSTEM"/>
                        <!-- Variable: Timeobject -->
                     </ConstDuraExp>
               </MoveTimeExp>
             </AssignTimeExp>
          </ruleline>
       </TimeRuleTree>
    </SAPTimeRule>
    This feature is mentioned in SAP CRM online help, but it does not include any details of XML syntax to be used, meaning of tags, etc.
    I was unable to find any documentation of this file format in help.sap.com or service.sap.com.
    Has anyone come across a specification of the file format to define Date Rules in SAP CRM?

    Hello experts,
    Could you also send me a copy of the documentation? My email address is [email protected]
    Thanks in advance!
    Or paste the link please
    Message was edited by: Javier Merino Vivar

  • How to insert the data from XML to a table

    Hi,
    I'm using Oracle 10g Express Edition
    I need help in How to insert the data from XML file into the table.
    Below is the example i'm working on..
    I have create ridb user with below mentioned privileges:
    Account Status Locked Unlocked
    Default Tablespace: USERS
    Temporary Tablespace: TEMP
    User Privileges :
    Roles:
    CONNECT
    RESOURCE
    Direct Grant System Privileges:
    CREATE DATABASE LINK
    CREATE MATERIALIZED VIEW
    CREATE PROCEDURE
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE SEQUENCE
    CREATE SYNONYM
    CREATE TABLE
    CREATE TRIGGER
    CREATE TYPE
    CREATE VIEW
    & table is created TRIALZIPCODES below mentioned is the DDL:
    CREATE TABLE TRIALZIPCODES
    STATE_ABBR VARCHAR2(20) NOT NULL
    , ZIP_CODE NUMBER(10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2(20)
    Below is the XML FILE: which is stored in C:\OracleProject Folder
    File name: trial.xml
    <?xml version="1.0" ?>
    <metadata>
    - <Zipcodes>
    - <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    - <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    </mappings>
    </Zipcodes>
    </metadata>
    PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
    create or replace
    PROCEDURE TRIAL AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    begin
    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
    insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    DBMS_XMLStore.closeContext(insCtx);
    END;
    END TRIAL;
    For the first time when i complied i got the errors as :
    Procedure RIDB.PROCEDURE1@RIDB
    Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
    Error(16,14): PL/SQL: Item ignored
    Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(29,1): PL/SQL: Statement ignored
    Error(33,1): PL/SQL: Statement ignored
    Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(36,1): PL/SQL: Statement ignored
    Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
    SQL Statement:
    grant execute on utl_file to ridb
    So, it got compiled successfully but when i execute it gives me error as:
    Source does not have a runnable target.
    What does this mean?
    So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
    So can i edit the init.ora with notepad.When i tried to do that it says permission denied
    In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
    but there is also other file initXETemp in the same path do i need to do the changes in it.
    I have tried even editing the SPFILE as mentioned below:
    C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
    So i had reinstall the software again.
    Could you please let me know how to proceed..

    hi,
    I have created the directory from sys database
    CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
    & grant read,write access to the user
    grant read,write on directory XML_DIR2 to RIDB;
    & i had change the tag name in the xml file as shown below:
    <?xml version = '1.0'?>
    <metadata>
    <Zipcodes>
    <mappings Record="4">
    <STABBRE>CA</STABBRE>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    <mappings Record="5">
    <STABBRE>CO</STABBRE>
    <ZIPCODE>80323</ZIPCODE>
    <ZIPCODEEXT>9277</ZIPCODEEXT>
    </mappings>
    </Zipcodes>
    </metadata>
    TRIALZIPCODE table as shown below:
    CREATE TABLE "RIDB"."TRIALZIPCODE"
    (     "STABBRE" VARCHAR2(20 BYTE),
         "ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
         "ZIPCODEEXT" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    I have tried two methods as shown below:
    Procedure 1:
    create or replace
    PROCEDURE TRIAL_V2 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
    DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
    DBMS_XMLStore.setRowTag(insCtx, 'mappings');
    cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
    DBMS_XMLStore.closeContext(insCtx);
    END;
    Procedure 1 was compiled with out errors but when i execute i got the error as :
    Source does not have a runnable target.
    Procedure 2_
    CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
    SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
    extractvalue(x.column_value, 'mappings/ZIPCODE'),
    extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
    FROM TABLE(
    XMLSequence(
    EXTRACT(
    xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
    'metadata/Zipcodes/mappings'
    ) x
    END;
    END TRIAL_V3;
    Procedure 2 was complied without errors but when i execute i got the error as:
    Connecting to the database RIDB.
    ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the file specified.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at "RIDB.TRIAL_V3", line 12
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database RIDB.
    Could you please let me know how to proceed...

  • Error While viewing data on XML model- java.sql.SQLException: constante num

    I am trying to read an XML file and I keep getting an error. At first it worked, and the it stopped working. I re-did everthing exactly as first time and I cannot get it work
    Here is what I do :
    1)     Create Physical Architecture under the XML Technology.
    a) we create a Data Server with these data:
              Name: XML_SERIVA_TM_DES
              Technology: XML
              JDBC Driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
              JDBC Url: jdbc:snps:xml?file=c:\Temp\hoy\CRM_CR_CURRENCY.xml&dtd=c:\Temp\hoy\ServiciosSerivaConsultasTypes0.xsd
         b) We place the files xml and xsd files according to the JDBC provided in previous point.
         We click on "Test Connection" and Connection is correct
         c) We create a physical schema under the Data Server created in point a) , with these data:
              Name: XML_SERIVA_TM_DES (After created the name is replaced by XML_SERIVA_TM_DES.Esquema)
              Schema (Schema) : <No Definido> ( not sure of english value, it should be <Undefined>)
              Schema (Work Schema) : <No Definido> ( not sure of english value, it should be <Undefined>)
              Default :It is a checkbox , and it is ticked.
              Under the "Context" tab, we add a logical schema named XML_SERIVA_TM for the "Desarrollo" Context
    2) Create a Model On the Designer Navigator, we expand the "Models" panel
         a) For Organization, We create a "Folder" Model. It is named "XML"
         b) Under the Folder created in a), we create a new Model , with these data:
              Name: XML_SERIVA_TM
              Code: XML_SERIVA_TM
              Technology: XML
              Logical Schema: XML_SERIVA_TM
         c) Do reverse-engineering.
              In the Reverse tab of the model,
                   + "Standard" is selected
                   + Context: "Desarrollo"
                   + The types of objects to reverse-engineer are: Table
              In the Selective reverse tab, we select : New Datastores, Existing Datastores, Objects to reverse.
              All the datastores that appear are checked
              We click on Reverse Engineer in the toolbar menu
              And the reverse engineer is done successfully and the datastores appear in the model panel
         d) We try to test the reverse engineering by clicking on the datastores and select "View Data",
              after click we get the folloging exception (running with Local agent) :
              See com.borland.dx.dataset.DataSetException error code: BASE+66
              com.borland.dx.dataset.DataSetException: constante numérica mal escrita
              Chained exception:
              java.sql.SQLException: constante numérica mal escrita
                   at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
                   at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
                   at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
                   at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.prepareStatement(SnpsXmlConnection.java:1192)
                   at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter$OnDisconnectCommandExecutionHandler.invoke(OnConnectOnDisconnectDataSourceAdapter.java:200)
                   at $Proxy2.prepareStatement(Unknown Source)
                   at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
                   at com.borland.dx.sql.dataset.o.a(Unknown Source)
                   at com.borland.dx.sql.dataset.o.d(Unknown Source)
                   at com.borland.dx.sql.dataset.o.f(Unknown Source)
                   at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)
                   at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
                   at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
                   at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
                   at com.sunopsis.graphical.frame.edit.AbstractEditFrameGridBorland.initialize(AbstractEditFrameGridBorland.java:624)
                   at com.sunopsis.graphical.frame.edit.AbstractEditFrameGridBorland.<init>(AbstractEditFrameGridBorland.java:864)
                   at com.sunopsis.graphical.frame.edit.EditFrameTableData.<init>(EditFrameTableData.java:50)
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                   at oracle.odi.ui.editor.AbstractOdiEditor$1.run(AbstractOdiEditor.java:153)
                   at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
                   at java.lang.Thread.run(Thread.java:662)
              Caused by: org.hsqldb.HsqlException: constante numérica mal escrita
                   at org.hsqldb.error.Error.error(Unknown Source)
                   at org.hsqldb.error.Error.error(Unknown Source)
                   at org.hsqldb.ParserBase.read(Unknown Source)
                   at org.hsqldb.ParserBase.readThis(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)
                   at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)
                   at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
                   at org.hsqldb.ParserCommand.compilePart(Unknown Source)
                   at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
                   at org.hsqldb.Session.compileStatement(Unknown Source)
                   at org.hsqldb.StatementManager.compile(Unknown Source)
                   at org.hsqldb.Session.execute(Unknown Source)
                   ... 26 more
    We also try to create an interface with the datastore of the model as source of the interface, and
    get the same exact exception as above, when interfaces in executed either with no-agent(local) or with an agent.
    Bellow I pasted the xsd schema and XML data:
    CRM_CR_CURRENCY.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <m:indicadoresResponse xmlns:m="http://co/com/bancodecredito/eai/serviciosLinea/seriva">
    <ns0:WS_ResultadoConsultaIndicadores xmlns:ns0="http://co/com/bancodecredito/eai/serviciosLinea/seriva/impl">
    <ns0:Error>0</ns0:Error>
    <ns0:Descripcion>Transacción exitosa</ns0:Descripcion>
    <ns0:indicadores>
    <ns0:fecha>2011-08-10 00:00:00.0</ns0:fecha>
    <ns0:descripcion>VALORACION (TRM VIGENTE) UVR/UVR</ns0:descripcion>
    <ns0:tipoIndicador>3</ns0:tipoIndicador>
    <ns0:codigoIndicador>312</ns0:codigoIndicador>
    <ns0:codigoVertice>0</ns0:codigoVertice>
    <ns0:plazo>0</ns0:plazo>
    <ns0:valor>196.9975</ns0:valor>
    <ns0:comportamiento>1</ns0:comportamiento>
    <ns0:formato>3</ns0:formato>
    </ns0:indicadores>
    </ns0:WS_ResultadoConsultaIndicadores>
    </m:indicadoresResponse>          
    ServiciosSerivaConsultasTypes0.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://co/com/bancodecredito/eai/serviciosLinea/seriva" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://co/com/bancodecredito/eai/serviciosLinea/seriva" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s3="http://www.openuri.org/2006/12/wsdl/upgradedJWS" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:import namespace="http://co/com/bancodecredito/eai/serviciosLinea/seriva/impl" schemaLocation="resultado.xsd" />
         <xs:element name="indicadoresResponse">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="impl:WS_ResultadoConsultaIndicadores" xmlns:impl="http://co/com/bancodecredito/eai/serviciosLinea/seriva/impl" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    resultado.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://co/com/bancodecredito/eai/serviciosLinea/seriva/impl" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://co/com/bancodecredito/eai/serviciosLinea/seriva" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s3="http://www.openuri.org/2006/12/wsdl/upgradedJWS" xmlns:tns="http://co/com/bancodecredito/eai/serviciosLinea/seriva/impl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="WS_ResultadoConsultaIndicadores">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Error" type="xs:string" />
                        <xs:element name="Descripcion" type="xs:string" />
                        <xs:sequence maxOccurs="unbounded" minOccurs="0">
                             <xs:element name="indicadores">
                                  <xs:complexType>
                                       <xs:sequence>
                                       <xs:element name="fecha" type="xs:string" />
                                       <xs:element name="descripcion" type="xs:string" />
                                       <xs:element name="tipoIndicador" type="xs:int" />
                                       <xs:element name="codigoIndicador" type="xs:int" />
                                       <xs:element name="codigoVertice" type="xs:int" />
                                       <xs:element name="plazo" type="xs:int" />
                                       <xs:element name="valor" type="xs:double" />
                                       <xs:element name="comportamiento" type="xs:int" />
                                       <xs:element name="formato" type="xs:int" />
                                       </xs:sequence>
                                  </xs:complexType>
                             </xs:element>
                        </xs:sequence>
                   </xs:sequence>
              </xs:complexType>
    </xs:element>
    </xs:schema>
    I really don't have any clue about what is happening. I have made sure files are in UTF-8 encoding. I don't know if any jar might be corrupted.

    You may sure have found the answer but it can help futur visitors:
    Did you specified a Schema name for your physical schema ?
    I had the same problem and no schema was set in my physical schema, when setting it, it must be OK.

Maybe you are looking for

  • IPhoto opens even when the iPod Touch is not connected

    I came across discussions on the iPod Touch and issues with iPhoto and am hoping that a solution can be found for my problem. My 13 year old step-son visited over the Christmas/New Year and was plugging his iPod Touch into and out of our Mac laptop.

  • [Solved] Can't make locale right.

    This is my /etc/locale.conf: LANG="nb_NO.UTF-8" L_MESSAGES="en_GB.UTF-8" This is the output when I write locale LANG=nb_NO.UTF-8 LC_CTYPE="nb_NO.UTF-8" LC_NUMERIC="nb_NO.UTF-8" LC_TIME="nb_NO.UTF-8" LC_COLLATE="nb_NO.UTF-8" LC_MONETARY="nb_NO.UTF-8"

  • HT4623 If I do not have wi-fi avaibility but have my iphone 4s plugged into my computer can I do a software update?

    My IPHONE 4S has been telling me to do a software update for some time but I never have WI-FI availiability but I do have it plugged into my computer, can I do a software update by having it plugged into my computer?

  • New iPad & iPhone app approved :)

    Hi, I submitted my first iPad & iPhone game made in Flash to the AppStore a couple of days ago and it just got approved :-) You can check it out here: http://www.tictacfive.com Looking forward to new versions of the packager, missing a feature to loa

  • Pdf generation by itext

    Hi, I am using DC and want to export Table data to PDF. Please give me sol step by step. regards Anumit