Data rule - Is_date Rule

Hi
I m trying to create adata rule which can identify whether the incomeing data is date or not. I tried using is_date data rule. but the format in which my data comes, is not supported by the IS_DATE rule. My data comes in 'DD/MM/YYYY HH24:MI:SS'
So, I created my own custom rule. But when i deploy the mapping it says that it doesnt recognises HH24, MI, SS. how should this time variables be represented?
Please help me on this.
Regards
Vibhuti

Hi
The above mentioned problem waas solved. Thanks to the concept of Regular Expressions. I had to create a custom rule/data format rule and in the expression i gave the following RegExps and i applied this rule on my tables. It worked fine.
--DD/MM/YYYY HH24:MI:SS
^(((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))) ([0-1]?[0-9]|[2][0-3]):([0-5]?[0-9]):([0-5]?[0-9])$
For any further queries you can post here
Regards
Vibhuti

Similar Messages

  • Error in mapping generation when using a data rule

    I hope someone can point me in the right direction on this one. I've searched all over but can't find a similar problem anywhere.
    This is OWB Client 10.2.0.1.31 and repository 10.2.0.1.0 in a 10g SE database . I have a table on which I have defined a data rule, which is deployed in the database along with its corresponding error table. The rule I have used is the built-in IS_DATE and it is applied to a VARCHAR2 field that will store a date in a specific format. I have defined the table as an operator in a mapping, and set the IS_DATE data rule action to MOVE TO ERROR. When I try to deploy the mapping I get the follwoing errors in the log:
    Warning ORA-06550: line 244, column 4:
    PL/SQL: ORA-00907: missing right parenthesis
    Warning ORA-06550: line 221, column 3:
    PL/SQL: SQL Statement ignored
    Warning ORA-06550: line 3112, column 132:
    PLS-00103: Encountered the symbol "DD" when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in is mod remainder not
    range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
    and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
    SUBMULTISET_
    The symbol "." was substituted for "DD" to continue.
    When I look at the generated code, there are lines like this one:
    not (wb_to_date("table"."column", Month dd, RRRR, Mon dd, RRRR, MM-DD-RRRR, MM/DD/RRRR, YYYY-MM-DD, YYYY/MM/DD) is not null
    Why is OWB not putting single quotes around the data formats from the built-in data rule? Is there something fundamental I'm missing in my warehouse model?

    Hi
    This is bug 5195315, which looks to be fixed in a 10.2 patch. If you can pick up the latest 10.2 patch there is like 3 years of fixes worth picking up.
    Cheers
    David

  • 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

  • Issue in Date rule creation

    Hi,
    We are implementing TASK ZT00 (Copy of standard transaction type 1003) in intercation center.
    In the the standrdard date profile 000000000005, We have two date types ORDERPLANNED and ORDERACTUAL.
    In the task transaction, planned START DATE and planned DUE DATE are calculated (default CURRENT date) based on the date rule 000000000002(Panned Date (Activities).
    Now my requirement is calculate only planned START date (as default CURRENT date) and and not to calculate planned DUE date (as default CURRENT date) . What I need to do in the date rule to acheive this.
    Regards
    Iswari.

    Hi Iswari,
    Have you been able to solved this requirement?
    I am facing with the same requirement, so If you have a solution I would really appreciate it if you share it.
    Thanks,

  • Using variables in data rules

    Hi,
    I have set-up a data transfer mechanism between serveral Essbase cubes that uses on the source cube a report script to generate a file and on the target cube imports this text file using a data rule file.
    The current problem I'm encountering is that it does not seem to be possible to limit down the transfer to a single period. In the report script, there's no issue because that is recognizing the server variable easily.
    But on the import side I have not found a method to have a single column dynamically writing into current period only. Is there no other option than someone going into this rules file and change the hardcoded fieldname each month?
    Thanks for any input
    Erik
    Belgium

    You can use substitution variables in version 9 of Essbase but not in earlier versions. Before v9 we'd get around this by using aliases e.g. CurrMonth. Each new month we'd move the alias to the next month.
    "But on the import side I have not found a method to have a single column dynamically writing into current period only"
    I'm assuming that you've created a text column here and filled it with a month value? It would be better to not have a month column and just set the month in the Header of the Data Load Settings.
    Hope this helps.
    Gee

  • 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

  • Mapping error at deployment with foreign key data rule

    I have created data rules for enabling foreign key constraints. There are 4 foreign key constraints on the fact table.
    For the 1st foreign key ... its a single key match key1 on table 1
    For the others, its a composite key .. key1 and key2 on table 2
    key1 and key3 on table 3
    key1 and key4 on table 4
    When I implement with the single key foreign key constraint the mapping works fine. But when I apply the other foreign key data rules for composite keys, I get the following message while deploying ....
    M_CNT Create Warning ORA-06550: line 209, column 3:
    PL/SQL: ORA-00909: invalid number of arguments
    M_CNT Create Warning ORA-06550: line 520, column 65530:
    PL/SQL: SQL Statement ignored
    M_CNT Create Warning ORA-06550: line 56, column 65530:
    PL/SQL: SQL Statement ignored
    M_CNT Create Warning ORA-06550: line 673, column 3:
    PL/SQL: ORA-00909: invalid number of arguments
    The data rule setup done is type Referential
    Specify the number of attributes in row relationship - 2
    Specify the referencing cardinality of row relationship
    Minimum Count 1 Maximum Count n
    Specify the referenced cardinality of row relationship
    Minimum Count 1 Maximum Count n
    What is it that I am doing wrong ?
    Any suggestions. Help !!!!
    Regards,
    AW

    Hi AW,
    How can I overcome this situation ?The best solution as suggested by Jörg is use of surrogate keys.
    For every production key (composite or single) generate a corresponding surrogate key using sequence operator in staging area.
    This will not just solve your problem but it will be faster also (the joins will be faster with system-generated sequence numbers),
    In a data warehouse use of production keys as primary key for linking with (foreign key) is not recommended, keep the production keys as additional attributes.
    Regards,

  • 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

  • Using data rule on table level

    Hi
    We want to implement a data rule that compares the grand total in the target table with the grand total in the source table.
    In case of difference, we only want one record in the error table.
    That seems not possible out of the box. We could implement a procedure in the workflow, but want to use the buildt in features (if they exist).
    Have anyone solved this problem ?
    Best Regards
    Klaus

    Hi Klaus,
    as far as I know data rules only examine the incoming data. If you want to compare loaded data grand total with the source grand total I see two diefferent approaches:
    1. Use the post process operator in the mapping to call a customs procedure that calculates the totals, compares them and in case of a difference writes directly into the error table
    2. Create a mapping to do this checks and call it directly after the original mapping.
    Regards,
    Carsten.

  • Automatic payment: OBBA Define Value date rules

    hi experts,
    Have you ever tried OBBA to define Value date rules? I met a problem with it.
    In OBBA, my configuration is as follows:
    House banK Account ID Transaction R C1 S Dev C2  A
    CIT1               CNY                              3 CN -    1   CN  -
    CN is the Factory Calendar China.
    According to this configuration, I suppose the Value date will take Due date as reference date, minus one day, and if the Value date calculated is Weekend or Public holiday, it will use the last week day as the Value date.
    But I made two tests:
    In the first test, my OBBA configuration is exactly like above one I listed, in my payment proposal, the invoce Due date is 20-Jun, Value date is also 20-Jun, but I think according to the configuration, the Value date should be 20-Jun minus one day=19-Jun which is a weekend, so should be the last week day 18-Jun.
    My first test tell me the Deviation from reference date in days and the Calendar does not work.
    In my 2nd test, I changed the Reference date to 2 (Posting date), but in my payment run, the Posting date is 9-Jun, the invoice Due date is 20-Jun, the Value date is still 20-Jun.
    My 2nd test tell me the Reference date for determining the value date does not work.
    Have you met such problem, it seems the OBBA totally dose not work.
    many thanks!
    best regards
    Sophie

    Hi Sophie,
    I guess it is too late for you already but maybe this helps to other people with similar issues. You also need to assign the transaction created in OBBA to a specific payment method:
    But what is even more important is that you need to tick this box in the payment method company code settings - "payment per due date".
    Regards,
    Ondrej

  • 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

  • Date Rules relevant to shipment coast document

    Hi All,
    I am new to transportation. We have defined some date rules for shipment cost customization. I am not getting any date in shipment cost document even maintained the relation between shipment cost type and item category.
    My requirement is, where can I find the difened dates in rules. What is the significance to define the date rules.
    We have 5different sequence of dates for each date rule.
    Can anyone tell, where this date fields are displayed shipment cost nad purpose.
    will be appriciated for solution.
    Regards
    Kishore

    Dates for the shipment cost document can be found in config:
    Logistics Execution/ Transportation/ shipment costs/ Shipment cost document/ Shipment Costs Types and Item Categories
    The pricing and settement date are configured within Define item categories. A drop down offers a variety of dates.
    Bela

  • Different date profile and date rule in one transaction type

    Hi CRM Experts,
    We have requirement that quotation should have validity date based on the contry.We have only one quotation type which will be used in all county.
    Now i need to know how can we use different date profile and date rule in one quotation.
    Ex -
    When the quotation created for russia - expiry date = today + 10 days
    when quote created in china = expiry date = today + 25 days
    Can it be possible in standared configuration? if not then give me some insight how to achive this?
    Regards
    Rajesh

    Hi, Rajesh.
    You can create a Date Rule based on functional module.
    Look at example in SAP standard: Date Rule "WTY004 Purchase Date Object":
    <?xml version="1.0"?>
    <SAPTimeRule>
      <ABAPTimeRule function="CRM_WTY_IL_TIMERULE_03"/>
    </SAPTimeRule>
    Hope this helpful!

  • 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

Maybe you are looking for

  • No longer able to connect to Yamaha RX-V675 amp from Apple devices

    Sorry for the length of this post, but I wanted to get everything down in one hit and I REALLY need some help as it's driving me nuts! I have been happily connecting to my Yamaha RX-V675 amp from my Macbook Pro (2010) with no problems since I bought

  • UWL Tasks in Widgets

    Hi all, I just want to have all my UWL tasks and alerts of portal in my widgets. Please let me know if you people have any ideas. Regards, Purush.

  • My iPad 2 won't update to ios 5.0.1

    I have an iPad 2 and after about five minutes of it trying to download ios 5.0.1 it says an error occurred. I've tried rebooting it several times and it just won't work please help

  • Adobe id sur smartphone android (trop d'activation)

    Bonjour, J'ai le message suivant sur mon android : Erreur d'autorisation. Le compte auquel vous tentez d'accéder est activé sur un trop grand nombre d'appareils. Comment désactiver d'anciens téléphones ou smartphones android, pour pouvoir enregistrer

  • Didn't install and work bluetooth at Lenovo ThinkPad X300

    Hi! Plz help. Install Windows 8 at ThinkPad X300. Work is O.K. but... Didn't install driver and didn't work bluetooth at Lenovo ThinkPad X300. Vladislav