点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
在跨系统的IDOC接口INVOIC中遇到一个报错:
Function module not allowed: IDOC_INPUT_INVOIC_MRM
Message no. B1252
Diagnosis
The function module
IDOC_INPUT_INVOIC_MRM
and the application object
type BUS2081 which were determined are not valid for this IDoc.
Procedure
Please check that the process code in the
inbound partner profile is correct.If this is the case, you should check the ALE inbound methods
ALE inbound methods for the process codeIf this is also the case, then the function module and the
application object type are not permitted for the logical message type,
message variant, message function and basis type that are contained in
the IDoc control record. You should check whether the correct values
have been assigned to these fields in the control record. If they do have the correct values, then the
assignment to the function module and the application object type needs to be maintained.
and see whether the specified function module and application object type are correct.
然后就用BD87 DEBUG ,然后在 IDOC 处理的程序里搜到了一个 sy-msgno 为 252 的地方,但是只有消息的常量,但是用这个常量在程序里搜索
确搜不到任何处理的程序,只能搜到一个定义的语句。
怎么搜都搜不到处理程序,后来发现 EDIFCT 看着应该是个DB table , 一查确实是, 这是配置 IDOC TYPE , IDOC MESSAGE TYPE , 对应的function module的。
然后用这个 DB table 在程序里搜,找到了相关代码
最后发现是这个配置表 EDIFCT 中 IDOC type 版本的问题(即是用 INVOIC01 还是 INVOIC02 )