In this lecture we complete the planning functions and sequences.
Resources
FOX: Aggregated Prices
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.
FOX: Apply Price Increase
*{ Key Figure Name,0VERSION,0VTYPE }
DATA SRC_VERSION TYPE 0VERSION.
DATA TRG_VERSION TYPE 0VERSION.
DATA SRC_VTYPE TYPE 0VTYPE.
DATA TRG_VTYPE TYPE 0VTYPE.
DATA PRICE TYPE F.
DATA INC TYPE F.
SRC_VERSION = VARV( ZSRC_VERSION ).
TRG_VERSION = VARV( ZTRG_VERSION ).
SRC_VTYPE = VARV( ZSRC_VTYPE ).
TRG_VTYPE = VARV( ZTRG_VTYPE ).
PRICE = { 0AMOUNT, SRC_VERSION, SRC_VTYPE }.
INC = { ZPRINC2, TRG_VERSION, TRG_VTYPE | 0CURTYPE = #, 0CUST_GROUP = #, 0DISTR_CHAN = #, 0DIVISION = #, 0INCOTERMS = #,
0KAPPL = #, 0MATERIAL = #, 0PROD_HIER = #, 0SOLD_TO = #, 0SALES_OFF = #, ZKRECH = #, 0CURRENCY = #, 0UNIT = # }.
*Apply increase to the current source price.
{ 0AMOUNT, TRG_VERSION, TRG_VTYPE } = PRICE + PRICE * ( ( INC / 100 )) .
*Copy the lotsize unadjusted.
{ 0LOTSIZE, TRG_VERSION, TRG_VTYPE } = { 0LOTSIZE, SRC_VERSION, SRC_VTYPE }.
Next: Lecture 12 >>
Next: Lecture 12 >>
No comments:
Post a Comment