cancel
Showing results for 
Search instead for 
Did you mean: 

Date Rules failing in billing value

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

Perhaps you can try this rule that uses the actual date and adds 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 -->

<ConstLocTimeExp displaytype="ConstLocTime"

date="now"

time="000000"

timeunit="DAY">

<VarObjectExp displaytype="VarObject"

name="SYSTEM"/>

</ConstLocTimeExp>

<ConstDuraExp displaytype="ConstDura"

duration="30" timeunit="DAY">

<!-- Constant Duration -->

<VarObjectExp displaytype="VarObject"

name="SYSTEM"/>

<!-- Variable: Timeobject -->

</ConstDuraExp>

</MoveTimeExp>

</AssignTimeExp>

</ruleline>

</TimeRuleTree>

</SAPTimeRule>

Best regards,

Ivan Martin

Former Member
0 Kudos

Hi Martin,

Thank you so much for you help.

But its showing the output as only one period as below

05.11.2007 04.11.2008 01.11.2007 10.00 GBP

I need the output in to cover from contract start date to end date .

Like the below output.

05.11.2007 04.12.2007 01.11.2007 0.83 GBP

05.12.2007 04.01.2008 01.12.2007 0.83 GBP

05.01.2008 04.02.2008 01.01.2008 0.83 GBP

05.02.2008 04.03.2008 01.02.2008 0.83 GBP

05.03.2008 04.04.2008 01.03.2008 0.83 GBP

05.04.2008 04.05.2008 01.04.2008 0.83 GBP

05.05.2008 04.06.2008 01.05.2008 0.83 GBP

05.06.2008 04.07.2008 01.06.2008 0.83 GBP

05.07.2008 04.08.2008 01.07.2008 0.83 GBP

05.08.2008 04.09.2008 01.08.2008 0.83 GBP

05.09.2008 04.10.2008 01.09.2008 0.83 GBP

05.10.2008 04.11.2008 01.10.2008 0.00 GBP

Can you please give the code for this requirement?

Regards,

bhuvana

Former Member
0 Kudos

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