Welcome to the SAP BPC and HANA blog

Welcome to the SAP BPC and HANA blog On this site, I will publish the contents of my book on Implementing SAP BPC and HANA. It is a compr...

Lecture 10 Planning Functions and Sequences Pt1


In this lecture we will start creating the planning functions and sequences.







Filters for Scenario ‘Planning Functions and Sequences

Planning Sequence: Copy Prices with reference

The purposes of this sequence is to copy a single period and fill all the periods as specified in the variable for the target fiscal year/period.

Create Filter ZPRM01_02_F02 

Set the following restrictions:
0FISCVARNT: K4
0INFOPROV: ZPRC01
0KAPPL: V
0KSCHL: Excl. #.
CRECTYP: X
0FISCPER: Variable, Interval, Mandatory
0CURTYPE: Variable, single value, mandatory
0VERSION: Variable, single value, mandatory
0VTYPE: Variable, single value, mandatory
The filter should appear as follows:






FOX: ZPRM01_02_F02

data src_curtype type 0curtype.
data trg_curtype type 0curtype.
data trg_fiscper type 0fiscper.
data src_fiscper type 0fiscper.
data src_version type 0version.
data trg_version type 0version.
data src_vtype type 0vtype.
data trg_vtype type 0vtype.

data kennz type keyfigure_name.

data n_val type i.
data x type i.

*get the variable prompt values and populate the relevant FOX variables.
src_curtype = varv( zssrc_fiscper ).
src_version = varv( zsrv_verson ).
trg_version = varv( ztrg_version ).
src_vtype = varv ( zsrc_vtype ).
trg_vtype = varv ( ztrg_vtype ).
src_curtype = varv ( zsrc_curtype ).
trg_curtype = varv (ztrg_curtype ).

n_val = varc( ztrg_fiscper ).

x =  1.

do n_val times.
   trg_fiscper = vari( ztrg_fiscper, x ).
   foreach kennz.
       { kennz, trg_curtype, trg_fiscper, trg_version, trg_vtype } = { kennz, src_curtype, src_fiscper, src_version, src_vtype }.
   endfor.
   x = x + 1.
enddo.



Next: Lecture 11 >>

No comments:

Post a Comment