Skip to Content
author's profile photo
Former Member

BEx Query : Sales Last Year display on the current year

Dear All,

We want to have on the display on the report the sales last year display on the column current year.

Ex :

Actual Report

2003.01 ... 2004.01

Sales Actual 3000

Sales Last Year 1000

Expected Report

2003.01 ... 2004.01

Sales Actual 3000

Sales Last Year 1000

We have a solution which is to develop a specific code source on the start routine of the cube. The issue of this solution is that it increase of 60% the cube data volume.

Is there anybody have already implement a better solution ?

Start Routine Source Code

IF L_DATA_PACKAGE-/BIC/ZAPO_ACTS <> 0.

L_YEAR = L_DATA_PACKAGE-CALMONTH+0(4).

L_YEAR = L_YEAR + 1.

concatenate L_YEAR L_DATA_PACKAGE-CALMONTH+4(2) into L_CALMONTH_NEW.

concatenate L_YEAR L_DATA_PACKAGE-CALWEEK+4(2) into L_CALWEEK_NEW.

L_DATA_PACKAGE_ADD = L_DATA_PACKAGE.

L_DATA_PACKAGE_ADD-/BIC/ZAPO_PRVS = L_DATA_PACKAGE-/BIC/ZAPO_ACTS.

L_DATA_PACKAGE_ADD-/BIC/ZAPO_ACTS = 0.

L_DATA_PACKAGE_ADD-/BIC/ZAPO_BUDG = 0.

L_DATA_PACKAGE_ADD-/BIC/ZAPO_RFCT = 0.

L_DATA_PACKAGE_ADD-/BIC/ZAPO_UDP = 0.

L_DATA_PACKAGE_ADD-/BIC/ZSQTYEXP = 0.

L_DATA_PACKAGE_ADD-CALMONTH = L_CALMONTH_NEW.

L_DATA_PACKAGE_ADD-CALWEEK = L_CALWEEK_NEW.

append L_DATA_PACKAGE_ADD to DATA_PACKAGE.

ENDIF.

CLEAR : L_DATA_PACKAGE, SY-TABIX, L_TABIX.

ENDLOOP.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on Mar 02, 2005 at 10:50 AM

    Example of my requirement

    Actual report______2003_01__2004_01

    actual sales_________________10000

    sales last year_____20000___________

    Expected report_____2003_01___2004_01

    actual sales__________________10000

    sales last year_______________20000_

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Mar 02, 2005 at 08:16 PM

    Maybe you could create 2 structures in the query . The use Cell editor to alter selection for the cells

    Add comment
    10|10000 characters needed characters exceeded