Skip to Content
0
Former Member
Nov 01, 2012 at 02:47 AM

Require a Function Module or FOX formula for YEAR+1

44 Views

Dear Experts,

This scenario is in SAP BPS but the requirement is universal.

We want a Function Module or FOX formula for the following Scenario

We have characteristics CR.YEAR referenced from 0CALYEAR

In BPS0 We have created a variable GGGG01 which fills the value (year) of CR.YEAR namely 2011, 2012, 2013. This variable is displayed

in the portal with the option of the filtering the (year) of CR.YEAR namely 2011, 2012, 2013.

As per the requirement, when the variable GGGG01 is selected with the CR. YEAR of 2013, it should copy the the values in

CR. YEAR 2012 and paste in the column of 2013.

The requirement of the variale selection keep changing mean to say, it could be 2012 or 2013 or even 2010, hence when creating

a COPY funtion, we could not give the fixed value (YEAR) say: overwrite the values from 2012 to 2013.

Hence, we felt the variable GGGG01 is used in the "values from" at copy function. We have also created one more variable

GGGG02. We want have the newly created variable to be filled with the YEAR+1 means (if in the portal, if the user selects

2012 in the variable GGGG01, we want the "values to" at copy function to be 2013 (GGGG01+1).

We tried this way

DATA ANO TYPE CRYEAR.

ANO = VARV('GGGG01').

{ANO} = {ANO}+1 .

VARV ("GGGG02") = ANO .

but it is throwing errors like

Formula error: Identifier expected instead of VARV

Please help us to have FM or FOX formula for the above requirement as this is bit urgent for the business.

Thanking you in advance.

Regards

Jerry