cancel
Showing results for 
Search instead for 
Did you mean: 

How to create age range according to customer's requirement

Former Member
0 Kudos
350

SAP delivered standard age range(0age_range) as below:

1 <20

2 20 - 29

3 30 - 39

4 40 - 49

5 50 - 59

6 60 - 69

7 >= 70

Cusomter's requirement:

1 <=25

2 26 - 30

3 31 -35

4 36 - 40

5 41 - 45

6 46 - 50

7 51 - 55

8 >= 56

How to handle this case if we use 0age instend of fixed age range(0age_range). should we maintain this from external flatfile, if yes, please provider the format. Thank!

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

could anyone give some advice how to calculate the number of employees according to age range? Thanks!

Former Member
0 Kudos

Drag that field(1) into right pane in the New Selection Window.

-> How can we get field(1)? Actually , when we see infoobject 0age, it only has hierarchy master data. We know how to create new structure in BEx query, but we don't know the logic, how can system get this results for each column? As above mentioned we can write ABAP code in update rule, but how can map the result, e.g. return code with 1, mapping with one of 8 category.

Edited by: hi ni on Apr 20, 2008 12:50 PM

Former Member
0 Kudos

should we create age range interval in hierarchy of infoobject 0age? How can we get results in each 8 column?

Edited by: hi ni on Apr 20, 2008 11:31 AM

Former Member
0 Kudos

Thank you, but how to make it sense in Query, as above mentioned we want to have 8 column, each age range occupy one column, to calculate the number of employees according to 0AGE. Please guide step by step.

Former Member
0 Kudos

Hi,

You can have 8 columns as mentioned below:

You can achieve this with the help of Structure in the query designer.

Create a Structure>New Selection>0AGE (field)-->1.

Drag that field (1) into right pane in the New Selection Window. Now give the name as "0AGE - 1" or according to your requirement.

Repeat the same for all the 8 categories.

Hope this helps u...

Regards,

KK.

Former Member
0 Kudos

Hi,

You can write a routine in the update rules for the range as you mentioned.

Plz find the below code which may help u...

DATA: AGE TYPE 0AGE.

IF AGE <= 25.

RESULT = '1'.

ELSEIF AGE > 26 AND AGE <= 30.

RESULT = '2'.

ELSEIF AGE > 31 AND AGE <= 35.

RESULT = '3'.

ELSEIF AGE > 36 AND AGE <= 40.

RESULT = '4'.

ELSEIF AGE > 41 AND AGE <= 45.

RESULT = '5'.

ELSEIF AGE > 46 AND AGE <= 50.

RESULT = '6'.

ELSEIF AGE > 51 AND AGE <= 55.

RESULT = '7'.

ELSEIF AGE >= 56.

RESULT = '8'.

ENDIF.

Hope this helps u...

Regards,

KK.

Former Member
0 Kudos

should we only maintain hierarchy interval in 0age accorading to customer's requirement by manually? If yes, how to calculate the number of employees within one specific age range inteval, e.g. how to calculate the number of employees within 26-30? How to map this hierarchy interval(e.g.26-30) to the number of employees?