6

逻辑增强实现物料主数据信息带入采购申请行项目

 1 year ago
source link: https://blogs.sap.com/2022/03/03/%e9%80%bb%e8%be%91%e5%a2%9e%e5%bc%ba%e5%ae%9e%e7%8e%b0%e7%89%a9%e6%96%99%e4%b8%bb%e6%95%b0%e6%8d%ae%e4%bf%a1%e6%81%af%e5%b8%a6%e5%85%a5%e9%87%87%e8%b4%ad%e7%94%b3%e8%af%b7%e8%a1%8c%e9%a1%b9%e7%9b%ae/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
March 3, 2022 Less than a 1 minute read

逻辑增强实现物料主数据信息带入采购申请行项目

0 0 227

需求:

有些物料号有图纸版本号信息,有些物料号没有。采购员想在采购申请单据(请购单)上直接看到图纸版本号信息,而不是双击物料号进入到物料主数据界面上查看长文本等字段。这样工作量太大。

方案:

首先,物料主数据上可以维护文本信息的几个长文本字段,都无法带到请购单上,只有40位的物料描述可以带过来。然而物料描述上维护图纸信息不标准。

所以可选的方案就是从采购订单的增强逻辑中读取到图纸信息,然后写入某个标准字段, 例如requirement tracking number (10位)字段, 或者Manufacturer Part number)(40位)。 前提是供应商物料编号 和 需求跟踪编号 这两个字段闲置。

步骤:

1. 创建自定义表,维护物料号和图纸版本号数据 (根据根据Note https://userapps.support.sap.com/sap/support/knowledge/en/2796654 没有CDS view能够获取物料主数据的标准长文本字段,所以只能通过创建自定义表来解决)

2-1.png

2.增强点中写取值逻辑

3-1.png

4-1.png

样本代码供参考:

data: lv_picture type c length 100.

select single blueprint_number from YY1_blueprint into @lv_picture
where material_number = @purchaserequisitionitem-material.

purchaserequisitionitemchange-requirementtrack = lv_picture.

效果:

每次创建新请购单行项目或者编辑已有行项目,根据输入的物料号就能读取到图纸版本号,写入需求跟踪编号这个字段

2022-03-03_14-11-475.png

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK