cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated Key Figures for calculate the accumulated value of year

Former Member
0 Kudos

Hi experts,

I want to make a report with the acumulated value of Net Value (0NETVAL_INV) of Invoicing.

In the report, I am restricting for one month and I am reporting the Net Value, but I want to see the acumulated value from January to the selected month too.

I know I have to use a Calculated Key Figure and Variables but I don`t know which are the step for this issue. I have read a lot of documentation but there are not clear steps to follow.

Could someone give me some tips for this issue?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello ,

You can acheive this by writing a customer exit code, first go to 0CALMONTH and create a customer exit variable which i have named it as TEST1.similarly create a user input variable TEST2. Then go to se38 and go the include ZXRSRU01 and write the following code and finally restrict the 0CALMONTH with this newly created variable and have the (0NETVAL_INV) value , so now with the user entering the calendar month , this code will display from starting month of the year till current month the invoice net value.

DATA: aktyear(4) TYPE n,

aktmon(2) TYPE n,

z_01akt(6) TYPE n,

z_vmakt(6) TYPE n.

WHEN 'TEST1'.

IF i_step = 2. "after the popup

LOOP AT i_t_var_range INTO loc_var_range

WHERE vnam = 'TEST2'.

aktyear = loc_var_range-low+0(4).

aktmon = loc_var_range-low+4(2).

IF aktmon = '00'.

aktyear = aktyear - 1.

aktmon = '12'.

ENDIF.

CONCATENATE aktyear '01' INTO z_01akt.

CONCATENATE aktyear aktmon INTO z_vmakt.

CLEAR l_s_range.

l_s_range-low = z_01akt.

l_s_range-high = z_vmakt.

l_s_range-sign = 'I'.

l_s_range-opt = 'BT'.

APPEND l_s_range TO e_t_range.

EXIT.

ENDLOOP.

ENDIF.

hope it is clear

assign points if useful

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You need to create a restricted key figure with a input disabled customer exit variable on month characterstics and 0NETVAL_INV.

if you need code for customer exit. please let me know.

hope this helps

regards

rajesh