如何根据 tcode查询对应 bapi mrp yangqing rfc error 2295840

47 篇文章 3 订阅

有时会查不到,此时需要 google 一下

对应程序,或tcode + bapi

tcode MD04 MD_STOCK_REQUIREMENTS_LIST_API

2024年3月11日 星期一 更新

BAPI_MATERIAL_STOCK_REQ_LIST 这个 bapi 可以替代 MD_STOCK_REQUIREMENTS_LIST_API,为什么要替代,因为用 rfc 调用的时候,MD 开头的报错,因为调用的 rfc 有module 在 blacklist

Blacklisted RFC calls
When calling a blacklisted RFC from an external application you can get similar dump with reference to OSS note 2295840 – Outbound / Inbound calls from external to RFC FM are blocked when the FM is blacklisted and the UCON-Check is active. This note itself is old and refers to newer OSS note 2416705 – Outbound / Inbound calls from external to RFC FM are blocked when the FM is blacklisted using Blacklist Object. You can run program RS_RFC_BLACKLIST_COMPLETE to see which function modules are blacklisted:

What to do when you hit a blacklisted item?

The best approach is to avoid doing what you did and look for the functional alternative provided by SAP. Search for the correct simplification item OSS note. In almost all cases SAP provides a solution.

https://www.saptechnicalguru.com/s4hana-blacklist/
在这里插入图片描述

Normally there is a need to get stock requirements information for certain selected materials and plants. After scouting through various answers in sap forums and blogs we knew we had to use the FM MD_STOCK_REQUIREMENTS_LIST_API or BAPI_MATERIAL_STOCK_REQ_LIST to get results similar to MD04 transaction.
https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/alternative-to-md-stock-requirements-list-api-to-get-item-in-mrp-document/ba-p/13446829

更详细的解决方案

With SAP S/4HANA® version 1511 SP02 and higher, SAP uses the UCON Blacklist functionality to block certain RFC function modules. The reason for this is that many API calls (BAPIs) have been changed, and may not be backwards compatible. So the result could be that inconsistent or wrong data is being committed to the database. In order to avoid such an issue without even being recognized by the client caller (e.g. TCRA4S), this blacklist was introduced to block all APIs which have been changed in an incompatible way.

TCRA4S Version 18.1 and higher is fully compatible with the above mentioned API changes done by SAP. However the UCON Blacklist prevents external applications such as TCRA4S to work properly with SAP S/4HANA®.

When a blocked remote enabled function module (RFC FM) is called from an external client on a SAP S/4HANA® system, an error is raised and shown to the caller with the following error text:

“UCON RFC Rejected; Called Function :; Caller SID :; Caller Program :”.

Example from TCRA4S:

Error Message: RFC code = 4 (RFC_ABAP_MESSAGE) :: Incompatible Call Rejected, see note 2295840; Called Incompatible Function :RFC_GET_SAP_SYSTEM_PARAMETERS; Caller Program :nwpipe; Caller Dest. :demchdc81!

There are multiple options to avoid this error:

Call a non-blacklisted function from SAP in case SAP provides one with the same or similar functionality

Create an ABAP wrapper function for the blacklisted call

Deactivate the UCON blacklist in SAP

Remove the function call from the SAP UCON blacklist

More information and a list of BAPIs being blocked by this blacklist can be downloaded via the following OSS note:

#2259818 - RFC enabled Function Modules with incompatible signature change compared to its version in ERP are blocked from external access

https://docs.plm.automation.siemens.com/content/pl4x/18.1/T4S4/en_US/preparation_of_sap_s4hana_1/sap_function_calls_used_and_permissions_required/ucon_blacklist.html

查询 BOM 替代料
进入 MAST(Material to BOM Link)表,批量查询料号对应的 BOM STLNR
MATNR material

在这里插入图片描述
进入 STPO (BOM item) 表
根据查询到的 STLNR(BOM) + IDNRK(BOM component) + 当天日期 查出 POSNR (BOM item number)

再根据查出的 POSNR + STLNR + 当天日期 查出对应的 BOM 替代料,批量查询时注意去重
在这里插入图片描述

参考
https://blog.csdn.net/weixin_45499651/article/details/104050517

SAP ABAP 各模块的BAPI函数汇总
https://blog.csdn.net/yishangbing/article/details/133735340

http://www.baidusap.com/abap/bapi/749

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值