cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation the actual duration of service product in service confirmation

Former Member
0 Kudos

Hi,

I have the following requirement.

I am creating a service confirmation from a cash service thru crmd_order. In services tab i have item, product, description, actual duration, timeunit, start of work, end of work, quantity, etc.

Here my requirement is to calucate the diff of start of work and end of work and place the value in actual duration.

I am not able to find any badi in this area.

can anybody suggest me proper way to achieve this funcationality.

useful answers will be awarded points.

Thanks,

Mallik

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear friends,

we achieved this using the badi CRM_SERVICE_I_BADI.

thanks and regards,

Mallik

Former Member
0 Kudos

Hi Pankaj,

I tried with this code.

my fields are

ZACT_DUR (Actual Duration)

SRVC_ACTUAL (Start of Work)

SRVC_ACT_TO (Date Work Ends)

my code is

<?xml version="1.0"?>

<TimeRule>

<TimeRuleTree>

<ruleline>

<AssignTimeExp displaytype="AssignTime">

<VarTimeExp displayType="VarTime"

name="ZACT_DUR"

position='B'>

</VarTimeExp>

<MoveTimeExp displaytype="MoveTime" direction="-">

<VarTimeExp displayType="VarTime"

name="SRVC_ACT_TO"

position="B">

</VarTimeExp>

<VarDuraExp displayType="VarDura"

name="SRVC_ACTUAL">

</VarDuraExp>

</MoveTimeExp>

</AssignTimeExp>

</ruleline>

</TimeRuleTree>

</TimeRule>

but i did not get the desired output.

Can u please suggest me my wrong.

Thanks,

Mallik

Former Member
0 Kudos

hi,

On possible way to achieve the same is through date profile. In service confirmation you have both date. You can create new date profile and in the xml code of your date profile you can write that value of your new date profile equals first date profile minus second date profile.

hope it helps

Best regards

Pankaj Kumar

Former Member
0 Kudos

This area is intended to give you the Duration which is written in the SERVICE RELATED Set type in Product Master Data. If you don't fill it, don't use it.

You can also take this duration from the master data and write a start date, thus the end date + time will be calculated automatically.

BR,

Cenk SEZGIN