cancel
Showing results for 
Search instead for 
Did you mean: 

Get values through customer exit in BEx

Former Member
0 Kudos

Hi Frnds ,

i have a requirement to read values dynamically based on user entry ,

For Example if a user selects Order = from 3000000201 to 3000000401 while executing a query , i need to get the maximum , mininmum and average days ,

The datatarget will have data like this

Order No Of Days

3000000201 2 days

3000000203 5 days

3000000300 4 days

3000000401 5 days

here the max days is 5 the min days is 2 and the average is 4 days

Hance the query output should have the result like this ,

Order No Of Days Max MIn Avg

3000000201 2 days 5 2 4

3000000203 5 days 5 2 4

3000000300 4 days 5 2 4

3000000401 5 days 5 2 4

Is it possible to achieve this in Bex , Thanks for your valuable sugesstions

If this can be achieved through customer exit please show some draft code sample to achieve this logic

Thanks ,

sathy

Accepted Solutions (1)

Accepted Solutions (1)

former_member189638
Active Contributor
0 Kudos

Hi Satya,

For the three calculated Key Fig that you have created keep the calculate result as and calculate Single value As option as Nothing Defined.

And do an Exception Aggregation on all three Calculated Key Fig with Maximum, Minimum and Average of all values with refernce to the Characteristic Order NO.

Try this out

Former Member
0 Kudos

HI Rakesh ,

The field number of days is already a calculated KF and hence i cannot use exception aggregation for it ,

When it shows up the maximum value in the result , i cannot understand why it does not shows the value in the formula SUMGT function ,

(Note : i am using a infoset to develop this query and also its not actually zero its displaying some decimal values wen decimal places are increased .)

I am still working on the same , please share if you have any other sugesstions aswell ,

Thanks for your help ..

Sathy

Former Member
0 Kudos

Dear friends ,

Any other possible solution to achieve this ?

Does any one have used SUMGT function in a BEx query developed from a infoset ? Does it works in infoset /

Thanks for any sugesstions

Sathy

former_member189638
Active Contributor
0 Kudos

I hope in the formula Key Figures you are not having any Decimal Settings

Former Member
0 Kudos

HI Rakesh ,

Thanks for your response again ,

i tried by displaying with decimal settings aswell before ,

but i got some decimal values irrelevant to the value in the overall result ,

for example in overall result when i have 15 its shows 0.089

when 100 it shows 4.000 ,

i will try to check for some OSS or try some alternative to get this and will let u know

thanks

sathy

Former Member
0 Kudos

Hi Rakesh ,

Sorry for a very late reply ,

i am not able to fix this but able to convince the business to check for maximum and minimum values only in the result column ,

Thanks a lot for your support ,

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sathya.

You can achieve this if you add the key figure to the structure four times and then go to the calculations tab -> change calculate single values to minimum, maximum and avarage of all values.

Hope it helps.

BR

Stefan

Former Member
0 Kudos

Hi Stefan ,

Thanks ,

But it Shows up the correct values in the result only and not in the columns ,

in the columns it shows the same number of days from the actual key figure ,

Do you think it is possible to show the right values in columns as well ,

thanks for your input ,

thanks ,

sathy

former_member189638
Active Contributor
0 Kudos

Hi Satya,

Try the following.

Create three Calculated Key Figure Max_count, Min_Count and Avg_Count which calculates the value as explained by Stefan.

Hide these Columns in your Query.

Then create three formulas and use SUMGT'Max_count', SUMGT'Min_Count', SUMGT'Avg_Count'.

This should give you the desired result.

Regards,

Rakesh

Former Member
0 Kudos

HI Rajesh ,

Thanks for your sugesstion ,

I tried in the same as you have explained , but it shows always ' 0 ' even the result in having values , i have no idea why it happens ,

i have verified the SUMGT function in help,sap as well , its explaining the same as you have told but its does not work for me ,

http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/frameset.htm

im in 3.5 version , Do you have any idea

Thanks for your help