Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Require a Function Module or FOX formula for YEAR+1

Former Member
0 Likes
351

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

1 REPLY 1
Read only

Former Member
0 Likes
307

Dear All,

No FOX or FM required. Offset concept can be used to solve this requirement.

http://help.sap.com/saphelp_sem320bw/helpdata/en/81/f3f0d86f6411d4b2f60050dadfb23f/content.htm

Thanking you all..

Regards

Jerry