Click here to Skip to main content
13,293,369 members (35,781 online)
Click here to Skip to main content
Add your own
alternative version


34 bookmarked
Posted 24 Apr 2008

Integration of .Net Application With SAP

, 24 Apr 2008
Rate this:
Please Sign up or sign in to vote.
Connecting .Net & SAP


Integration of .Net Application With SAP Using ERPConnect. You can use following ways to connect SAP system

  1. RFC (Function Call)
  2. BAPI
  3. Idoc
  4. SAP Queries
  5. Special Classes etc many more

What is SAP .Net Connector

  • SAP product. Based on Microsoft .NET Technology
  • Interact with SAP via RFC/SOAP
  • Fully integrated with Visual Studio.NET
  • Managed Code
  • Generates C# Proxy Classes for any .NET application integrations
  • Supports RFC and SOAP
  • Supports qRFC, tRFC
  • Supports asynchronous SOAP calls
  • RFC client or RFC server

Brief About ERPConnect

ð is a lean .NET assembly that lets you develop robust SAP interfaces without a great degree of effort and most of all, without an elaborate infrastructure or any additional middleware.

ð Supports RFC and SOAP, therefore integrates itself in any modern SAP NetWeaver architecture

ð Also suitable for use on mobile devices

ð also offers a range of special classes to efficiently, securely and stably handle even the most exotic requirements of SAP interface programming

ð Read SAP tables directly through RFC

Resources Required

  • SAP .Net Connector: ERPConnect
  • SAP Server Details
    • name/IP of the SAP server
    • System Number
    • User name
    • Password
    • Language
    • Client

Using the code

First install ERPConnect in the dev environment. After installing ERPConnect, goto Add References block in the application, locate the ERPConnect.dll and hit add.Once the ERPConnect.dll is added to the reference folder. you can add following to the xyz.cs file Now its all upto you. You can implement as you wish.In the code belo I am using the concept of Special Classes.

Block of code :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.Odbc;
using ERPConnect;
using ERPConnect.Utils;
using ERPConnect.Queries;
namespace SAP1
public partial class Form1 : Form
public Form1()
private void button1_Click(object sender, EventArgs e)
   ERPConnect.LIC.SetLic(); //Not Required in case of trial version but is must in case of licenced version

//creating the connection object
R3Connection con = new R3Connection("SAP Server IP/Name", System Number, "UserName", "PWDl", "Language", "Client");

//open the connection

DataTable dt = new DataTable();
ReadTable rt = new ReadTable(con);

rt.TableName = "SAP Table Name";

dt = rt.Result;
dataGridView1.DataSource = dt; // displays the result in gridview
catch (Exception ex)
 textBox1.Text = ex.Message;


Points of Interest


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Technical Lead Persistent Systems
India India
Working as Project Lead in Persistent Systems, CMMI level 5 company.

You may also be interested in...


Comments and Discussions

QuestionERPConnect Pin
Anuradha Wijesinghe5-Jun-13 0:38
memberAnuradha Wijesinghe5-Jun-13 0:38 
GeneralAn alternative for Visual Studio 2005 / 2008 Pin
peterklausen17-Oct-09 16:16
memberpeterklausen17-Oct-09 16:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171207.1 | Last Updated 24 Apr 2008
Article Copyright 2008 by Jayawant
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid