Former Member

# Calculation of Formula in % based on Month in SAP BW

Hi Expets,

I have one requirement need to calculate EDI % and will be updated to target Cube.

Data flow is from DSO to Cube .

My source_package having data like this.

Calmonth Frieght Orders Event_Code Total Duartion 01/2014 A2341N1 PICKUP 2 01/2014 S345G33 LOAD_END 21 01/2014 C253GD6 DELV_APPT 3 02/2015 C3G44G5 DEPARTURE 8 02/2015 D4353G2 UNLOAD_END 12 03/2015 D3453G4 ARRIV_DEST 9 02/2015 FG345G3 ARRIV_SOURCE 5 02/2015 C34SF42 PICKUP 6 01/2014 C34SF34 DEPARTURE 4

My output should be as shown below:

Calmonth Frieght Orders Event_Code Total Duartion EDI in % 01/2014 A2341N1 PICKUP 2 98% 01/2014 S345G33 LOAD_END 21 99% 01/2014 C253GD6 DELV_APPT 3 98% 02/2015 C3G44G5 DEPARTURE 8 94% 02/2015 D4353G2 UNLOAD_END 12 93% 03/2015 D3453G4 ARRIV_DEST 9 88% 02/2015 FG345G3 ARRIV_SOURCE 5 87% 02/2015 C34SF42 PICKUP 6 90% 01/2014 C34SF34 DEPARTURE 4 92%

####CASE-1####

then

Fright order = EDI compliant

Calculate:

EDI compliance in % =(Total No. of EDI Complaints in a month * 100)/ Total No. of Freight Orders in a month

####CASE-2#####

In this Case, Event_code not contains 'DEPARTURE'.

then

then go to TOT_DURATION:

If TOT_DURATION > 10 Hours

Fright order = NO EDI Compliant.

Else

Frieght Order = EDI Compliant.

Calculate:

EDI compliance in % =(Total No. of EDI Complaints in a month * 100)/ Total No. of Freight Orders in a month

And final EDI in % will be updated to target Cube.

Thanks,

Rahul

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Oct 11, 2015 at 07:35 PM

Hi Rahul, You can use logic in end routine. Thanks, Shakthi Raj Natarajan.

10|10000 characters needed characters exceeded
• Former Member
Posted on Oct 12, 2015 at 01:14 PM

Yes use end routine. Entire Logic is very clear.