cancel
Showing results for 
Search instead for 
Did you mean: 

Fiscal year /period? (Urgent - Help needed)

Former Member
0 Kudos

Hi Experts,

I wanted to display the Actual Sales value(from COPA Cube) based on the input selection - 'Fiscal Year /Period' with the below condition.

If the input fiscal year/period is 004.2006 then the Actual sales values should be displayed for 001.2006 to 004.2006 and if the selection is 001.2006 then the values are for the period- 001.2006...

It should always start from the begin of fiscal year/period.

Can any one help me...

Thanks in advance,

regs,

Mahantesh

Accepted Solutions (0)

Answers (3)

Answers (3)

Loed
Active Contributor
0 Kudos

Hi,

First, you should create a manual single entry variable for your fiscper, let's call it ZMANUAL_FPER.

Then, create another variable (customer exit) for your fiscper, let's call it ZEXIT_FPER.

In your CMOD, do this code (just replace the variables used in your CMOD):

WHEN 'ZEXIT_FPER'.
IF i_step = 2.
LOOP AT i_t_var_range INTO s_t_var_range WHERE vnam = 'ZMANUAL_FPER'.
CONCATENATE s_t_var_range-high(4) '01' INTO l_s_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDLOOP.
ENDIF.

Then, filter your fiscper with BETWEEN from ZEXIT_FPER to ZMANUAL_FPER.

Regards,

Loed

Former Member
0 Kudos

Hi,

there is a standard SAP variable (0FYTCFP) that gives you the interval from the first period up to the current fiscal year period - without any user entry. If that is sufficient for your requirements, you can use it without the need of ABAP coding.

Regards

Stephan

Former Member
0 Kudos

Hi dear,

you need to build an exit variable that, when I_STEP = 2, you can fill (CONCATENATE popupvariable(4) '001') with the first value of the year inserted by the user in the selection pop-up.

Try to search in these forums for some sample code...

Hope it helps!

Bye,

Roberto

Former Member
0 Kudos

Hi,

Thanks.

Can i use the below option.

1. i will take fiscal year/period(mandatory) and fiscal year(customer exit) in the column.

2. i will pass input fiscal year to the customer exit variable that is fiscal year...so this is fixed for any year.

3. then i will change the fiscal year/period with <=fiscal year/period.

Is this works for my requirement.

Thanks,

Mahantesh

Former Member
0 Kudos

Hi Stephan,

I think the std variable cannot be useful since it works only if the user choose the actual period, but, as for my understanding, the user can insert ANY period (and not only the actual), so the requirement is to have a restriction coming from the first period of the year of the fiscal period choosen byt hte user until this last one...

Mahantesh,

I think you have to do what I descibed (I cannot understand what you are imagining): year/period(mandatory) and year/period (customer exit) that you will use to restrict the kf (or to put it in the column) you want to restrict (with a range GE the exit variable and LE your popup variable)...

Hope it helps!

Bye,

Roberto

Former Member
0 Kudos

Hi Mahantesh,

As Mr Roberto suggested , try this:

1) In flter area make a restriction on Fiscal Year Variant 0FISCVARNT

2) Create a variable on Fiscal Year/period. with processing user entry and with single value.Say VAR1

3) Create another variable on Fiscal Year/period. with processing 'User exit' and with Interval.Say VAR2

4) Create a local restriction KF(any KF) with a variable VAR1.And hide it.This will be used to take the entry from user and will be used to feed the range for VAR2.

5) Create a local restriction KF(Actual Sales value) with variable VAR2.

Use the following code in exit:

WHEN 'ZVAR2'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZVAR1'.

CLEAR L_S_RANGE.

L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.

MOVE: '001' to L_S_RANGE-LOW(3) .

L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

Hi Roberto Negro ,

Is this gives correct result?

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Mahantesh,

Instead of the code mentioned in the last posting, use the following:

WHEN 'ZVAR2'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZVAR1'.

CLEAR L_S_RANGE.

L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.

L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.

MOVE: '001' to L_S_RANGE-LOW(3) .

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

Kindly , let me know whether it is solved your problem or not.

With rgds,

Anil Kumar Sharma .P

Kindly assign the points if it helps you.