测试SAP BRF+ ruleset
Created by Jerry Wang, last modified on Oct 01, 2014
使用wiki"使用代碼創(chuàng)建BRF ruleset"提到的report 創(chuàng)建ruleset,里面包含了兩個(gè)ruleset variable, 這兩個(gè)rule variable的初始化分別由calc. cust. discount和calc. pro. discount這兩個(gè)decision table來(lái)完成。
Decision table的rule 維護(hù)如下
如果customer是“sap”,item是“ballpen”,則customer discount值為0.15
如果customer是“sap”,item是“pencil”,則customer discount值為0.12
如果不滿(mǎn)足以上兩個(gè)條件,則無(wú)discount
這里的column customer, item和Customer Discount都是function的context里定義的變量。
點(diǎn)擊Simulation button:
選擇Interpretation Mode:
點(diǎn)Execute button.
因?yàn)閏ustomer=sap, item=pencil, 滿(mǎn)足decision table里的entry,因此customer_discount為0.12
promotion=sun, item = pencil, 不滿(mǎn)足decision table里的任何一條entry,因此promotion_discount為0.
所以rule里的if 條件不滿(mǎn)足,因此price將按照customer discount進(jìn)行計(jì)算: final price = 10 / ( 1 + 0.12 ) = 8.93
如果使用"Execute and Display Processing Steps", 能夠看到BRF+ 每一步具體的執(zhí)行步驟:
總結(jié)
以上是生活随笔為你收集整理的测试SAP BRF+ ruleset的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 用户现可在 Linux 设备上制作谷歌
- 下一篇: 解决function id unknow