Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: BPC 10.0 NetWeaver Logic Script (IF statement)

$
0
0

Hi Vadim,

 

thank you for your replay and help provided. How do I then compare values that arise from different members?

 

1. We have BPC 10.0 NW, CPM BPC, Release 800, SP-Level 0011, SAPK-80011INCPMBPC

 

2. Below you can see the results from UJKT:

________________________________________________________________

LGX:

 

*WHEN Z_KONTO

*IS (%IU126%-%IU127%)

*REC(EXPRESSION=((%VALUE%)>0)*1, Z_KONTO=IU151)

*ELSE

*REC(EXPRESSION=((%VALUE%)<0)*1, Z_KONTO=IU152)

*ENDWHEN

*COMMIT

*WHEN Z_KONTO

*IS (%IU151%-%IU152%+%IU153%-%IU166%+%IU178%-%IU181%)

*REC(EXPRESSION=((%VALUE%)>0)*1, Z_KONTO=IU182)

*ELSE

*REC(EXPRESSION=((%VALUE%)<0)*1, Z_KONTO=IU183)

*ENDWHEN

*COMMIT

 

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

 

LOG BEGIN TIME:2014-05-05 09:53:43

FILE:\ROOT\WEBFOLDERS\DEMOE_PLAN \ADMINAPP\DM_PLAN\TEST.LGF

USER:AVUCRTANEC

APPSET:DEMOE_PLAN

APPLICATION:DM_PLAN

[INFO] GET_DIM_LIST(): I_APPL_ID="DM_PLAN", #dimensions=7

CATEGORY,FLOW,MEASURES,RPTCURRENCY,TIME,Z_CC,Z_KONTO

 

#dim_memberset=6

*WHENZ_KONTO:0 in total.

*IS(%IU126%-%IU127%):0 in total.

*REC(EXPRESSION:((%VALUE%)>0)*1,Z_KONTO="IU151"),2 in total.

*ELSE:0 in total.

*ENDWHEN:0 in total.

*COMMIT:0 in total.

 

#dim_memberset=6

*WHENZ_KONTO:0 in total.

*IS(%IU126%-%IU127%):0 in total.

*REC(EXPRESSION:((%VALUE%)>0)*1,Z_KONTO="IU151"),2 in total.

*ELSE:0 in total.

*ENDWHEN:0 in total.

*COMMIT:0 in total.

[INFO] GET_DIM_LIST(): I_APPL_ID="DM_PLAN", #dimensions=7

CATEGORY,FLOW,MEASURES,RPTCURRENCY,TIME,Z_CC,Z_KONTO

 

#dim_memberset=6

*WHENZ_KONTO:0 in total.

*IS(%IU126%-%IU127%):0 in total.

*REC(EXPRESSION:((%VALUE%)>0)*1,Z_KONTO="IU151"),2 in total.

*ELSE:0 in total.

*ENDWHEN:0 in total.

*COMMIT:0 in total.

 

#dim_memberset=6

*WHENZ_KONTO:0 in total.

*IS(%IU126%-%IU127%):0 in total.

*REC(EXPRESSION:((%VALUE%)>0)*1,Z_KONTO="IU151"),2 in total.

*ELSE:0 in total.

*ENDWHEN:0 in total.

*COMMIT:0 in total.

 

SCRIPT RUNNING TIME IN TOTAL:0.47 s.

LOG END TIME:2014-05-05 09:53:44

 

_____________________________________________________________________

 

3. Script logic is used in DM_PLAN model which consist from Category, Flow, RPTCurrency, Time, Z_CC (Cost center) and Z_KONTO (account).

 

Z_KONTO have type ACCOUNT-A and marked to allow member formulas. In Z_KONTO dimension we have account members which further forms balance sheet and profit and loss members. So every single account is then included in PL account ob BS account.

______________________________________________________________________

*XDIM_MEMBERSET CATEGORY= <ALL>

//*XDIM_MEMBERSET TIME= <ALL>

//*XDIM_MEMBERSET Z_KONTO= <ALL>

 

 

*WHEN Z_KONTO

*IS (%IU126%-%IU127%)

*REC(EXPRESSION=((%VALUE%)>0)*1, Z_KONTO="IU151")

*ELSE

*REC(EXPRESSION=((%VALUE%)<0)*1, Z_KONTO="IU152")

*ENDWHEN

*COMMIT

 

*WHEN Z_KONTO

*IS (%IU151%-%IU152%+%IU153%-%IU166%+%IU178%-%IU181%)

*REC(EXPRESSION=((%VALUE%)>0)*1, Z_KONTO="IU182")

*ELSE

*REC(EXPRESSION=((%VALUE%)<0)*1, Z_KONTO="IU183")

*ENDWHEN

*COMMIT

 

With this script logic I am trying to calculate profit or loss, and based on the outcome (+ or -) record the result on appropriate account. If I explain the structure of the first logic script is consist of:

 

1. IU126 (Grossprofit from operations)

1.1. IU110 Total Revenue

1.1.1. IU111 Revenues from salesin the domestic market

1.1.1.1. 760 Revenuesfrom sales of productsand services (single account)

1.2. IU121

1.3. IU122


and further on. So every sum account of BS or PL consists ofa hierarchy ofindividualaccounts. And what I am trying to calculate is that if IU126 (gross profit from operations) - IU127 (operating expenses) = greater the zero ; then write value to IU151 (Operating profit) otherwise if value is smaller then zero ; then write value to IU152 (Lossfrom operations).


The second set of logic script then include item value from IU151 and IU152, where we add or subtract Financialand otherincome and expenses. This value is the. written to IU182 Net Profit or IU183 Net Loss, based on above criteria.


So my problem there is that when I enter date for members of IU126 or IU127 those items are calculated because of hierarchy. But further on IU151 or IU152 are not in hierarchy and so I have write scrip logic, but it doesn't working, as no value is written to this place.

 

Thank you!

 

Regards,

Uros


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>