当前位置: 首页 > news >正文

PyRFC 适用于 Python 的异步、非阻塞 SAP NetWeaver RFC SDK 绑定

Asynchronous, non-blocking SAP NetWeaver RFC SDK bindings for Python.
适用于 Python 的异步、非阻塞 SAP NetWeaver RFC SDK 绑定

PyRFC 适用于 Python 的异步、非阻塞 SAP NetWeaver RFC SDK 绑定

Call for Maintainers

This project is currently looking for new maintainers. Please see this issue for details.

Features

  • Client and Server bindings
  • Automatic conversion between Python and ABAP datatypes
  • Stateless and stateful connections (multiple function calls in the same ABAP session / same context)
  • Sequential and parallel calls, using one or more clients
  • Throughput monitoring

Supported platforms

  • All platforms supported by SAP NWRFC SDK are supported by build from source installation (build instructions)

  • In addition, pre-built wheels are provided for Windows, Darwin and Ubuntu Linux, attached to PyRFC GitHub release

  • Docker containers: SAP fundamental-tools/docker

  • Linux wheels supported by build from source installation only

  • Pre-built portable Linux wheels

    • are not supported, neither issues related to portable Linux wheels

    • must not be distributed with embedded SAP NWRFC SDK binaries, only private use permitted

  • Ansible Module for use of SAP PyRFC

  • Microsoft IIS, see #359

Requirements

SAP NW RFC SDK 7.50 Patch Level 12

  • see SAP Note 3337381: SAP NetWeaver RFC SDK 7.50 -- Patch Level 12 for a list of bug fixes and enhancements made with this patch release.
  • Only the latest patch level is supported by SAP
  • The latest version is fully backwards compatible, from today S4, down to R/3 release 4.6C.
  • Can be downloaded from SAP Software Download Center of the SAP Support Portal, like described at SAP NetWeaver Remote Function Call (RFC) Software Development Kit (SDK).
  • If you are lacking the required authorization for downloading software from the SAP Service Marketplace, please follow the instructions of SAP Note 1037575 for requesting this authorization.

Linux

PyRFC is using source distribution (sdist) installation on Linux systems and Cython is required on Linux system to build the PyRFC package from source. See Installing Cython

Windows

  • Visual C++ Redistributable Package for Visual Studio 2013 is required for run-time, see SAP Note 2573790 - Installation, Support and Availability of the SAP NetWeaver RFC Library 7.50

  • Build toolchain for Python requires Microsoft C++ Build Tools, the latest version recommended

  • Due to a change introduced with Python 3.8 for Windows, PATH directories are no longer searched for DLL. The SAP NWRFC SDK lib path is no longer required on PATH, for Python >= 3.8.

macOS

  • Remote paths must be set in SAP NWRFC SDK for macOS: documentation

  • When the PyRFC is started for the first time, the popups may come-up for each NWRFC SDK library, to confirm the usage. If SAP NW RFC SDK is installed in admin folder, the app shall be first time started with admin privileges, eg. sudo -E

Docker

  • Docker container examples for Linux, Intel and ARM based Darwin: SAP/fundamental-tools/docker. SAP NWRFC SDK libraries are not included.

Getting started

Note: The package must be installed before use.

Call ABAP Function Module from Python

In order to call remote enabled ABAP function module (ABAP RFM), first a connection must be opened.

from pyrfc import Connection
conn = Connection(ashost='10.0.0.1', sysnr='00', client='100', user='me', passwd='secret')
# ABAP variables are mapped to Python variables
result = conn.call('STFC_CONNECTION', REQUTEXT=u'Hello SAP!')
print (result)
{u'ECHOTEXT': u'Hello SAP!',u'RESPTEXT': u'SAP R/3 Rel. 702   Sysid: ABC   Date: 20121001   Time: 134524   Logon_Data: 100/ME/E'}# ABAP structures are mapped to Python dictionaries
IMPORTSTRUCT = { "RFCFLOAT": 1.23456789, "RFCCHAR1": "A" }# ABAP tables are mapped to Python lists, of dictionaries representing ABAP tables' rows
IMPORTTABLE = []result = conn.call("STFC_STRUCTURE", IMPORTSTRUCT=IMPORTSTRUCT, RFCTABLE=IMPORTTABLE)print result["ECHOSTRUCT"]
{ "RFCFLOAT": 1.23456789, "RFCCHAR1": "A" ...}print result["RFCTABLE"]
[{ "RFCFLOAT": 1.23456789, "RFCCHAR1": "A" ...}]
http://www.lryc.cn/news/441702.html

相关文章:

  • 解决matplotlib画中文时缺乏中文字体问题。
  • 小琳AI课堂 掌握强化学习:探索OpenAI Gym的魅力与Python实战
  • 1.3 等价类划分法
  • 概率论原理精解【15】
  • 【新手上路】衡石分析平台系统管理手册-安全管理
  • 【Matlab】matlab 结构体使用方法
  • Mamba YOLO World
  • JVM 内存模型:堆、栈、方法区讲解
  • 24年蓝桥杯及攻防世界赛题-MISC-2
  • openssl-AES-128-CTR加解密char型数组分析
  • 自动化生成与更新 Changelog 文件
  • (六)WebAPI方法的调用
  • 运维工程师面试整理-故障排查常见故障的排查步骤及方法
  • OpenAI o1解决了「Quiet-STaR」的挑战吗?
  • PDF产品册营销推广利器FLBOOK
  • 华为OD机试 - 字符串划分(Python/JS/C/C++ 2024 E卷 100分)
  • nginx和php-fpm连接超时的相关配置以及Nginx中的try_files以及root、alias的使用
  • 在MAC中Ollama开放其他电脑访问
  • NE555芯片制作的节拍器
  • 如何使用 Next.js 进行服务端渲染(Server-Side Rendering, SSR)
  • 【machine learning-八-可视化loss funciton】
  • Android 将EasyPermissions进一步封装,使得动态权限申请更加简明
  • 我的AI工具箱Tauri版-VideoReapeat视频解说复述克隆
  • MySQL5.7.42高可用MHA搭建及故障切换演示
  • 快速搭建最简单的前端项目vue+View UI Plus
  • 倍增练习(1)
  • MATLAB 在数学建模中的深入应用:从基础到高级实践
  • Unity 设计模式 之 【什么是设计模式】/ 【为什么要使用设计模式】/ 【架构和设计模式的区别】
  • [数据集][目标检测]智慧交通铁路异物入侵检测数据集VOC+YOLO格式802张7类别
  • 飞驰云联FTP替代方案:安全高效文件传输的新选择