cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic script calculation on St Date and En Date

BalaValluru
Participant
0 Likes
687

Dear Experts,

We have a scenario, were logic based on start date and end date of PO. Calculate the logic (total area* rate per sf= Base Rent) and post respective time periods dynamically.

Total area and rate per sq ft and Base rent are Account dimension members

Start date and End date maintained properties in PO dimension.

can some one help to post results dynamically to time period based on st date and ed date.

Thanks

Kishore V

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

It's possible to create a script logic that will perform required calculations for SINGLE PO!

//PO - dimension purchase order
//%PO_SET%=PO1 - single value
*SELECT(%START%,START_DATE,PO,ID=%PO_SET%)
*SELECT(%END%,END_DATE,PO,ID=%PO_SET%)
*SELECT(%STARTTID%,TIMEID,TIME,ID=%START%)
*SELECT(%ENDTID%,TIMEID,TIME,ID=%END%)
*SELECT(%PERIODS%,ID,TIME,TIMEID>=%STARTTID% AND TIMEID<=%ENDTID%)
//%PERIODS% - target periods between dates
...

But to process multiple PO you will have to execute this script using RUNLOGIC_PH badi with CHANGED parameter - PO (so the script will be executed for each PO member separately). For sure the performance will be awful!!!!

For this requirements the right solution is to develop CUSTOM LOGIC Badi!

BalaValluru
Participant
0 Likes

vadim.kalinin

Thanks Vadim for providing code for dynamic Time calculation . Can I extend below to your code for results Total Area* Rate Sqft = Base_Rent. I will this scenario for single PO and let me check the performance.

*XDIM_MEMBERSET CATEGORY=FORECAST
*XDIM_MEMBERSET PURCHASEORDER=P1234567
*XDIM_MEMBERSET AUDITTRAIL=Input

*WHEN ACCOUNT
*IS Total_Area
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[Total_Area],ACCOUNT=Base_Rent,AUDITTRAIL=Input_BR)
*ENDWHEN

*WHEN ACCOUNT
*IS Rate_Sqft
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[Rate_Sqft],ACCOUNT=Base_Rent,AUDITTRAIL=Input_BR)
*ENDWHEN


former_member186338
Active Contributor

valluru

Looks like you don't want to read my answer to the end!

Script logic will not work for multiple PO members processing!

Script logic will not work for multiple PO members processing!

Script logic will not work for multiple PO members processing!

Use custom logic badi!

BalaValluru
Participant
0 Likes

vadim.kalinin

yes, I understood that your suggesting Custom_BADI. We have only less then 10 PO 's at present.

Trying to achieve in Script:)

Thanks

Kishore V

former_member186338
Active Contributor
0 Likes

valluru

Only very bad consultants assume that the number of PO will not increase! Sorry!

BalaValluru
Participant
0 Likes

vadim.kalinin

These are related to Rent on property business will not increase every time. Not regular one PO

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

If you have only 10 PO, then instead of script logic create EPM input form and perform calculations using Excel formulas 🙂