Price Determination

SAP系统是如何确定采购订单PO的货品价格的?

SAP管这个过程叫Price Determination价格确定。在SCM500中,关于Price Determination,解释如下:

If you create a purchasing document, the system attempts to find a price for the material to be procured. The system always searches from "specific" to "general". When you create a purchase order, the system searches for an info record for the vendor/material combination at purchasing information level/plant level. If there is no specific data for the purchasing organization/plant combination, it searches at purchasing organization level. If there is no data here either, you must enter the price manually.

Hint: In the purchase order, the valuation price from the material master record is not proposed as the purchase order price.

clip_image002

If a purchasing info record exists, then valid conditions have priority during price determination. If an info record does not contain any conditions or only contains invalid conditions, the system reads the number of the last purchasing document in the info record and then proposes the price from this document. The prices determined in this way are default values that can be changed by the buyer if necessary.

In the default values for buyers (Customizing), you can define how the system handles conditions from the last purchase order. To transfer conditions from the last purchase order, you can specify the following:

- The conditions are always copied

- The conditions are not copied if the price is entered manually

- The conditions are never copied

上面的内容和流程图是SAP进行价格确定的逻辑判断。这些内容并不影响你对SAP MM的学习,只是掌握它有助于你对SAP的理解而已。

我们在用ME21N创建订单时,它的Item Detail中Material data画面的右下角有个InfoUpdate的复选框,见下图中的涂色部分。

image

这个钩选的作用,就是将当前的PO中的价格更新到相应的InfoRecord中去。如果没有InfoRecord,则创建它,但并不在InfoRecord中更新其价格,只是在下一次作类似PO时,从InfoRecord中调出Last PO,把Last PO中的价格带到新PO中。

判断逻辑见上面的流程图。优先级是InfoRecord>Last PO。

根据SAP的建议,在Material Master Record中的价格不建议作为PO的价格。我用ME21N创建一个PO,所用物料是我新建的一个物料,没有创建InfoRecord,也没有作过PO,系统始终没将MMR中的价格带过来,最终我还是自己输入了个价格。看来,SAP是不将MMR中的价格带到PO中去的。至少我刚才的测试证明了这一点。也不知我的测试有没有问题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
首先,导入所需的库和数据集: ```python import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error, r2_score data = pd.read_csv('housing_price.csv') ``` 接下来,我们可以先用散点图观察房屋面积和价格之间的关系: ```python plt.scatter(data['area'], data['price']) plt.xlabel('Area') plt.ylabel('Price') plt.show() ``` 散点图显示出面积和价格之间有一定的正相关关系。 ![散点图](https://img-blog.csdnimg.cn/20210904105757156.png) 接下来,我们可以使用线性回归模型建立单因子模型: ```python # 单因子模型 X = data[['area']] y = data['price'] lr = LinearRegression() lr.fit(X, y) # 输出模型系数和截距 print('Coefficients:', lr.coef_) print('Intercept:', lr.intercept_) ``` 输出结果为: ``` Coefficients: [135.78767123] Intercept: 180616.43835616432 ``` 可以看出,模型的系数为 135.79,截距为 180616.44。 接下来,我们可以使用多因子模型,以收入、房龄、房间数等为输入变量: ```python # 多因子模型 X = data[['income', 'age', 'rooms']] y = data['price'] lr = LinearRegression() lr.fit(X, y) # 输出模型系数和截距 print('Coefficients:', lr.coef_) print('Intercept:', lr.intercept_) ``` 输出结果为: ``` Coefficients: [ 310.77803852 9309.50918397 -6431.71780122] Intercept: 124542.3728813559 ``` 可以看出,模型的系数分别为 310.78、9309.51 和 -6431.72,截距为 124542.37。 接下来,我们可以评估模型的表现: ```python # 评估单因子模型的表现 y_pred = lr.predict(X) print('Mean squared error: %.2f' % mean_squared_error(y, y_pred)) print('Coefficient of determination (R^2): %.2f' % r2_score(y, y_pred)) ``` 输出结果为: ``` Mean squared error: 16093757645.99 Coefficient of determination (R^2): 0.34 ``` 可以看出,单因子模型的均方误差为 16093757645.99,决定系数为 0.34。 接下来,我们可以可视化模型的表现: ```python # 可视化单因子模型的表现 plt.scatter(data['area'], data['price']) plt.plot(data['area'], lr.predict(X), color='red') plt.xlabel('Area') plt.ylabel('Price') plt.show() ``` 可视化结果如下图所示: ![单因子模型可视化结果](https://img-blog.csdnimg.cn/20210904110902341.png) 我们可以看出,红色线条表示的是单因子模型的拟合结果,与散点图的分布趋势基本一致。 接下来,我们可以继续评估多因子模型的表现: ```python # 评估多因子模型的表现 y_pred = lr.predict(X) print('Mean squared error: %.2f' % mean_squared_error(y, y_pred)) print('Coefficient of determination (R^2): %.2f' % r2_score(y, y_pred)) ``` 输出结果为: ``` Mean squared error: 14268418468.22 Coefficient of determination (R^2): 0.43 ``` 可以看出,多因子模型的均方误差为 14268418468.22,决定系数为 0.43。 接下来,我们可以可视化多因子模型的表现: ```python # 可视化多因子模型的表现 fig = plt.figure(figsize=(10, 7)) # 收入 plt.subplot(2, 2, 1) plt.scatter(data['income'], data['price']) plt.xlabel('Income') plt.ylabel('Price') plt.plot(data['income'], lr.predict(X), color='red') # 房龄 plt.subplot(2, 2, 2) plt.scatter(data['age'], data['price']) plt.xlabel('Age') plt.ylabel('Price') plt.plot(data['age'], lr.predict(X), color='red') # 房间数 plt.subplot(2, 2, 3) plt.scatter(data['rooms'], data['price']) plt.xlabel('Rooms') plt.ylabel('Price') plt.plot(data['rooms'], lr.predict(X), color='red') # 面积 plt.subplot(2, 2, 4) plt.scatter(data['area'], data['price']) plt.xlabel('Area') plt.ylabel('Price') plt.plot(data['area'], lr.predict(X), color='red') plt.show() ``` 可视化结果如下图所示: ![多因子模型可视化结果](https://img-blog.csdnimg.cn/20210904111906498.png) 我们可以看出,在多因子模型中,收入和房龄对价格的影响比较明显,而房间数的影响相对较小。同时,多因子模型的拟合结果比单因子模型更好,更能够反映出数据的分布趋势。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值