All Projects → nunomaia → NwRfcNet

nunomaia / NwRfcNet

Licence: Apache-2.0 license
An easy way of making SAP RFC calls from .NET Core

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to NwRfcNet

jcoSon
Json api for SAP JCO ( SAP Java Connector 3.x)
Stars: ✭ 21 (-74.7%)
Mutual labels:  sap
abaK
ABAP constants done right
Stars: ✭ 26 (-68.67%)
Mutual labels:  sap
cpi-dashboard
The Dashboard for SAP CPI is an IFlow-based monitoring tool for SAP CPI.
Stars: ✭ 27 (-67.47%)
Mutual labels:  sap
PortaCapena.OdooJsonRpcClient
Odoo Client Json Rpc
Stars: ✭ 39 (-53.01%)
Mutual labels:  dotnet-standard
SAP-ABAP-Development
SAP ABAP development, customization and enhancement guides
Stars: ✭ 51 (-38.55%)
Mutual labels:  sap
Pluralize.NET
📘 Pluralize or singularize any English word.
Stars: ✭ 50 (-39.76%)
Mutual labels:  dotnet-standard
Simple-Data-Explorer
Simple Data Explorer
Stars: ✭ 37 (-55.42%)
Mutual labels:  sap
saslprep
SASLprep: Stringprep Profile for User Names and Passwords.
Stars: ✭ 17 (-79.52%)
Mutual labels:  rfc
ui5con-app-vue
The Smart Store app is a Vue.js sample application, demonstrating the usage of the UI5 Web Components. You can find a step by step tutorial below on how to build the app by yourself. You don't have to clone the repo, the app will be built from scratch.
Stars: ✭ 31 (-62.65%)
Mutual labels:  sap
Merkurius
Portable Deep Learning Library for .NET
Stars: ✭ 1 (-98.8%)
Mutual labels:  dotnet-standard
B2.NET
.NET library for Backblaze's B2 Cloud Storage
Stars: ✭ 63 (-24.1%)
Mutual labels:  dotnet-standard
SAPNetworkMonitor
Based on niping for sap network monitoring QQ群: 651878914
Stars: ✭ 48 (-42.17%)
Mutual labels:  sap
LiteNetwork
A simple and fast .NET networking library compatible with .NET Standard 2, .NET 5, 6 and 7.
Stars: ✭ 66 (-20.48%)
Mutual labels:  dotnet-standard
DNZ.SEOChecker
SEO Checker and Recommander Plugin (like wordpress Yoast) for ASP.NET Core.
Stars: ✭ 18 (-78.31%)
Mutual labels:  dotnet-standard
keylist-rfc
🔏 turning the system behind GPG Sync into an Internet standard
Stars: ✭ 15 (-81.93%)
Mutual labels:  rfc
ILject
Provides a way which you can load a .NET dll/exe from disk, modify/inject IL, and then run the assembly all in memory without modifying the file.
Stars: ✭ 25 (-69.88%)
Mutual labels:  dotnet-standard
ui5-schemas
🚀 UI5 Schemas allows you to develop SAPUI5/OpenUI5 XML at a maximum convenience. It downloads, upgrades and sets up SAPUI5/OpenUI5 XML schemas for a better development experience in your favorite IDE (if it is WebStorm ;).
Stars: ✭ 50 (-39.76%)
Mutual labels:  sap
check-sieve
Syntax checker for mail sieves.
Stars: ✭ 23 (-72.29%)
Mutual labels:  rfc
AsyncTcpClient
An asynchronous variant of TcpClient and TcpListener for .NET Standard.
Stars: ✭ 125 (+50.6%)
Mutual labels:  dotnet-standard
RESTCountries.NET
.NET Standard wrapper library around the API provided by REST Countries https://restcountries.com. The world in .NET 🔥.
Stars: ✭ 33 (-60.24%)
Mutual labels:  dotnet-standard

.NET client library for SAP NetWeaver RFC

An easy way of making SAP RFC calls from .NET. Libray is supported in Windows, Linux and macOS.

Supported Platforms & Prerequisites

  • Requires .NET Framework ( .NET Standard 2.0 or higher )

    • .NET Framework 4.6.1 or higher
    • .NET Core 2.0 or higher
  • OS versions

    • Windows x64.
    • Redhat Linux 7 or other Linux distribution that is supported simultaneously by .NET Core and SAP NetWeaver RFC.
    • macOS 10.12+.
  • SAP NetWeaver RFC Library 7.50 SDK C++ binaries must be installed locally. For download and installation instructions check SAP Note 2573790

Using this package

Add the package using the dotnet cli:

$ dotnet add package NwRfcNet

Create a class to match SAP RFC parameters

    public class BapiCompanyOutputParameters
    {
        public CompanyDetails[] Details { get; set; }
    }

    public class CompanyDetails
    {
        public string CompanyCode { get; set; }

        public string Name { get; set; }
    }

Map RFC mapameters to class

    RfcMapper mapper = new RfcMapper();

    mapper.Parameter<BapiCompanyOutputParameters>().Property(x => x.Details)
        .HasParameterName("COMPANYCODE_LIST")
        .HasParameterType(RfcFieldType.Table);

    mapper.Parameter<CompanyDetails>().Property(x => x.CompanyCode)
        .HasParameterName("COMP_CODE")
        .MaxLength(4)
        .HasParameterType(RfcFieldType.Char);

    mapper.Parameter<CompanyDetails>().Property(x => x.Name)
        .HasParameterName("COMP_NAME")
        .MaxLength(25)
        .HasParameterType(RfcFieldType.Char);

Open a connection to server and invoke a BAPI

    using (var conn = new RfcConnection(builder => builder
        .UseConnectionHost("hostname")
        .UseLogonUserName("user")
        .UseLogonPassword("password")
        .UseLogonClient("cln")))
    {
        conn.Open();
        using(var func = conn.CallRfcFunction("BAPI_COMPANYCODE_GETLIST"))
        {
            func.Invoke();
        }
    }

or

    using (var conn = new RfcConnection("Server=server_name;lang=en;user=testUser;pwd=secret"))
    {
        conn.Open();
        using(var func = _conn.CallRfcFunction("BAPI_COMPANYCODE_GETLIST"))
        {
            func.Invoke();
        }
    }

Get result and display to Console

    var returnValue =  func.GetOutputParameters<BapiCompanyOutputParameters>();
    Console.WriteLine(String.Format("|{0,-20}|{1,-10}", "Company Code", "Company Name"));
    foreach (var row in returnValue.Details)
    {
        Console.WriteLine(String.Format("|{0,-20}|{1,-10}", row.CompanyCode, row.Name));
    }

Output should be

Company Code Company Name
C001 company 1
C002 Company 2

Samples

Included samples in project

  • List FI Companies
  • List FI Customers
  • Get Details of a FI Customer
  • FI General Ledger Account
  • RFC Read Table

Connection String

Example : Server=server_name;lang=en;user=testUser;pwd=secret

Value Alias
User Name "userName", "userId", "uid", "user", "u"
password "password", "passwd", "pass", "pwd", "p"
Host "target_host", "targetHost", "host", "server", "h"
Logon Language "language", "lang", "l"
System Client "client", "cl", "c"
SystemNumber "system_number", "systemnumber", "sysnr"
SystemId "system_id", "systemid", "sysid"
Trace "trace", "tr", "RfcSdkTrace"
Snc Mode "snc_mode", "sncmode", "UseSnc", "snc"
Snc Qop "snc_partnername", "sncpartnername", "snc_partner", "sncpartner"
Snc Lib "snc_library", "snc_lib", "snclib"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].