cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare the same ratio in different periods

former_member254358
Participant
0 Kudos

Hi,

I would like to know whether it is possible to compare the same ratio but in different periods.

For example, I have the 0INV_QTY and I would like that in case I select 0FISCPER with this range, for example, [001.2015:002.2015], I had the same 0INV_QTY ratio showing the 0FISCPER [001.2014:001:2015].

Is it possible to achieve this from the Query Designer? or.... perhaps from BW?

Thanks a lot in advance.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

swati_gawade
Contributor
0 Kudos

Hi David,

Yes the report is possible.

you can restrict your query data in BEx designer to the variable which accepts values from customer and another variable (Customer Exit: Which will read User Input data and calculate previous year period)

Now you can create a CKF for Ratio. Put in your formula in the definition to calculate Ratio. (please share your definition of ratio)

Now in the columns, say KG, will be restricted with variable range that User had filled and othe column, say KG-1, will be restricted to Customer exit Varible as explained above.

try this and let me know if you face any issues.

Hope this helps.

-Swati.

former_member254358
Participant
0 Kudos

Thanks you all for your answers.

Please, let me check your solutions and I will answer you whether I was able to achieve this one. I'm not an expert in BW neither in Abap.

One more question. Does mdx or mdxTEST works in BW?

Thanks again.

Regards.

Loed
Active Contributor
0 Kudos
former_member254358
Participant
0 Kudos

Hi Swati,

I'm sorry but I can't open enhacements for the project (cmod) because there aren't any enhancement associated to the project.

Is it necessary a previous step?

Thanks.

former_member254358
Participant
0 Kudos

Thanks everybody,

I have learned how to create user exit in variables, thanks to your help.

Finally I achieved this using offset in variables.

Regards.

Loed
Active Contributor
0 Kudos

Hi David,

Good to hear that..

You may mark your answer as CORRECT ANSWER to close this thread..

Regards,

Loed

Answers (1)

Answers (1)

Loed
Active Contributor
0 Kudos

Hi David,

Can you post a sample data?

Regards,

Loed

former_member254358
Participant
0 Kudos

Hi Loed, thanks for your reply,

Imagine I have this one at this moment and

KG
Ejercicio/Período
001.201413
002.201433
001.201541
002.201535
Resultado total122

I would like to get this one:

KGKG-1
Ejercicio/Período
001.20154113
002.20153533
Resultado total7646

It means, to have a second ratio (KG-1) that in case I select the fiscperiod [001.2015-002-2015] then in KG-1 draw the KG values but for the fiscperiod [001.2014-002.2014].

In sql server it can done using MDX queries.

Help, please.

Regards.

sai_adapa
Participant
0 Kudos

Hi Loed,

The report is possible, if we show across posting periods ( Fiscal period Attr.), also it make sense.

.

KG ( 2015)KG ( 2014)
PostingPeriod
0014113
0023533
Resultado total7646

The first column will be selection you entered in the report and the second columns will be previous year period. The column names you can use text variable to show the year.

Sai

Loed
Active Contributor
0 Kudos

Hi David,

Yes your report is possible..

For example, you used ZPERIOD_RANGE as your variable prompt for your users..

Then create another variable having CUSTOMER EXIT as its processing by and it should be INTERVAL, let's call that variable as ZPERIOD_LY..

Then in tcode CMOD in your BW, write this code (just revise it based on the variables declared on your system):

DATA: from_date like sy-datum,

            to_date like sy-datum,

            year type c length 4.

WHEN 'ZPERIOD_LY'.                

     if i_step = 2.

       LOOP AT I_T_VAR_RANGE INTO FISC_VAR_RANGE
             WHERE VNAM = 'ZPERIOD_RANGE'.

         CLEAR L_S_RANGE.


year = FISC_VAR_RANGE-LOW(4) - 1.

concatenate year FISC_VAR_RANGE-LOW+4(4) into from_date.


year = FISC_VAR_RANGE-HIGH(4) - 1.

concatenate year FISC_VAR_RANGE-HIGH+4(4) into to_date.


         L_S_RANGE-LOW      = from_date.

         L_S_RANGE-HIGH      = to_date.
         L_S_RANGE-SIGN        = 'I'.
         L_S_RANGE-OPT         = 'BT'.
         APPEND L_S_RANGE TO E_T_RANGE.
         EXIT.
       ENDLOOP.
     endif.

You should filter your two (2) SELECTIONS (namely KG and KG -1 in your example) with Ejercicio/Período using ZPERIOD_RANGE (for KG) and ZPERIOD_LY (for KG -1)..

Regards,

Loed

former_member254358
Participant
0 Kudos

Hi Loed,

using cmod transaction I can create a project but in the enhancement I get the warning that there aren't any enhancement for the project...

I have read in some blogs that enhancements are obsolets..

Please help..

Thanks again.

Loed
Active Contributor
0 Kudos

Hi David,

Is your BW a new server? Because if not, your CMOD must have a project already..

You may follow this to find your CMOD project:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0b25093-b548-2e10-0cba-fcac78905...

OR

Go to SE37 and run the FM EXIT_SAPLRRS0_001..Then double click the ZXRSRU01..Afterwards,you may now write the routine I have provided..

Regards,

Loed