cancel
Showing results for 
Search instead for 
Did you mean: 

Conervting 0FISCPER to a keyfigure

Former Member
0 Kudos

Hi,

how to find out the max 0FISCPER of a Order in BEX by 
the right setting of a replacemant path variable ?

How to convert the charcteristic 0FISPER correctly to a keyfigure

( http://scn.sap.com/docs/DOC-27491 ) ?

For Example - in goes the ORDER TABLE with the follwong data:

ORDERNO        FISCPER     PRICE

----------------------------------------------------

M1                  001.2014     11,11

M1                  005.2014     22.22

M1                  012.2014     33.33

A1                  010.2015     11,11

A1                  005.2015     22.22

A1                  001.2015     33.33

Out should go the desired result of the BEX Query:

M1                  012.2014

A1                  010.2015

I need to convert the 0FISCPER ( 007.2014) to a keyfigure, than find the max of it.
Problem is -i guess - the formatting of the 0FISCPER which is in the mmm.yyyy notation.

What settings will fit for the necessary replacemant path variable ?

Pretty easy basically in SQL - but how in BEX :

SELECT ORDERNO, MAX( 0FSICPER) FROM ORDER_TABLE

GROUP BY ORDERNO.

ThanXs

Martin

Accepted Solutions (1)

Accepted Solutions (1)

anshu_lilhori
Active Contributor
0 Kudos

Martin,You are correct to achieve your requirement first we need to convert the fiscper into Keyfigure with the help of replacement path.

As fiscal year period is compounded with fiscal year variant so we need to take care of it while converting.

Another thing is we do not have separate dimension for fiscper in formula variable so we have to make use of number only.

In replacement path tab of Formula variable choose---replace variable with--infoobject--replace with key.

offset start 2 offset length 7.

In currency/unit tab--Choose number under dimensions.

Now you will get the value of fiscper in form of number.

You can follow my blog which discuss the same scenario but the time characteristic which i used was date.

Hope this helps.If any issues please let me know.

Regards,

AL

Answers (1)

Answers (1)

former_member182470
Active Contributor
0 Kudos

Why don't you simply create a condition in Bex by using TOP N = 1 with FISCPER in Char assignment tab? This doesn't require to convert.

Former Member
0 Kudos

Hi,

If you want to create key figure you can create  calculated key figure , then create formula variable using replacement path on 0fiscper and then try to sort it in descending order.

Hope this should resolve your issue.

Regards,

Akshay