zl程序教程

您现在的位置是:首页 >  其他

当前栏目

通过IDoc DESADV来实现公司间STO场景中外向交货单过账后自动触发内向交货单的功能

2023-03-15 23:29:00 时间

通过IDoc DESADV来实现公司间STO场景中外向交货单过账后自动触发内向交货单的功能

公司间采购(公司间库存转储)流程里,常见的解决方案是发货方完成发货过账后,自动触发收货方的内向交货单。除了使用SAP标准的输出类型SPED来实现之外,还可以通过IDoc(DESADV)的方式来实现。

本文就是阐述如何通过IDoc来实现这个功能。

主要由如下几个步骤:

1, 创建一个外向交货单的输出类型。

T.Code – V/34,或者如下配置路径,

在Partner functions里输入条目:6/SH, 如上图。

2,将该输出类型分配给output determination procedure V10000.

Requirement 维护成1,意味着当交货单的PGI完成之后,才会触发这个ZZIB的output。

3,创建output的条件记录。

事务代码VV21/VV22。

这里的Partner需要在WE20里设置。

4,定义confirmation control key .

5, 出站IDoc的配置。

5.1), IDoc type – DELVRY03

Tools > ALE > ALE Development > IDoc > IDoc Type Development > IDoc Types

T.Code – WE30

5.2), Message Type – DESADV

Tools > ALE > ALE Development > IDoc > IDoc Type Development >Logical Messages

T.Code – WE81.

5.3), Process Code – DELV

Tools > ALE > ALE Development > IDoc > Outbound Processing > Define Process Code

T.Code – WE41.

Function Module – IDOC_OUTPUT_DELVRY.

5.4), 为出站参数维护partner profile.

SPRO > Materials Management > Purchasing > Messages > EDI > Set Up Partner Profile

T.Code – WE20.

Partner Type – KU (Customer)

Partner Role – SH

Receiver Port: A000000002

RFC Destination:

6, 入站IDOC的设置

IDoc type – DELVRY01

Message Type – DESADV

Process Code – DELS

Tools > ALE > ALE Development > IDoc > Inbound Processing > Define Process Code

T.Code – WE42

Function Module – IDOC_INPUT_DESADV1,

维护入站参数的partner profile.

事务代码WE20.

Partner Type – LS (Logical system)

7, Logical system的定义(SALE),或者直接BD54,

Logical system和SAP客户端的分配关系,

Note: 当前我所在的SAP系统就是Client 100.

8, 创建单据,看效果。

STO#4500000768,

VL10B创建了交货单#80000784,

完成了发货过账,

看该交货单的output, 触发IDoc成功了,

The Inbound delivery was triggered successfully.

-完-

写于2021-11-22。