Giter Club home page Giter Club logo

requerasapconnector's Introduction

RequeraSapConnector

This is DotNet SAP Sap connector for Requera BI

SAP Connecting Example

#Configure your SAP connecting on Web.config file

<configuration>
  <configSections>
    <sectionGroup name="SAP.Middleware.Connector">
      <section name="GeneralSettings" type="SAP.Middleware.Connector.RfcGeneralConfiguration,sapnco" />
      <sectionGroup name="ClientSettings">
        <section name="DestinationConfiguration" type="SAP.Middleware.Connector.RfcDestinationConfiguration, sapnco"/>
      </sectionGroup>
    </sectionGroup>
  </configSections>
  
  <SAP.Middleware.Connector>
    <ClientSettings>
      <DestinationConfiguration>
        <destinations >
          <add NAME="FED" USER="RFCKullanıcıAdiniz" PASSWD="RFC_Şifresi" CLIENT="001"
             LANG="EN" ASHOST="SAP_Sunucusu" SYSNR="00" />
        </destinations>
      </DestinationConfiguration>
    </ClientSettings>
  </SAP.Middleware.Connector>
</configuration>

Get Data from RFC..

using (SapConnection baglanti = new NativeSapRfcConnection("FEP"))
            {
                var result = baglanti.ExecuteFunction("ZBDT_SD_GRUP_TESLIMAT_BILGI", new
                {
                    I_VBELN_S = "8500016389",
                    I_VBELN_E = "8500016389"
                });
                List<ZTeslimat> teslimat = new List<ZTeslimat>();

                teslimat = result.GetTable<ZTeslimat>("T_LISTE").ToList();               
                //DataTable dt = new DataTable();
                //dt = result.GetTableRFC("T_LISTE"); //Get Data without Model(Model kullanmadan direk DataTable içerisine alır)
            }
public class ZTeslimat
    {
        public string WERKS { get; set; }
        public string VBELN { get; set; }
        public string POSNR { get; set; }
        public DateTime WADAT_IST { get; set; }
        public string UEPOS { get; set; }
        public decimal LFIMG { get; set; }
        public string MATNR { get; set; }
        public string DDTEXT { get; set; }
        public string BSTKD { get; set; }
        public string BSTKD_E { get; set; }
        public string SERNR { get; set; }
        public string MAKTX { get; set; }

    }

Modelleme için yukarıdaki gibi RFC alan isimleri verilebileceği gibi, Class içerisinde kendi isimlerinize map edebilirsiniz.

You can map SAP structure field with database column on model class.

Example / Örnek:

    public class Muhataplar
    {
        [RfcStructureField("MANDT")]
        public int Client { get; set; }
        [RfcStructureField("SPRAS")]
        public string Dil { get; set; }
        [RfcStructureField("PARVW")]
        public string MuhatapRolu { get; set; }
        [RfcStructureField("VTEXT")]
        public string Tanim { get; set; }
    }

Direk Tablo'yu almak için aşağıdaki örneği kullanınız.

There's also a shortcut to the RFC_READ_TABLE function. You can use it like this:

using (SapConnection baglanti = new NativeSapRfcConnection("FEP"))
            {
                ASPxGridView2.DataSource= conn.ReadTable<Muhataplar>("TPART",null,null,0,500);
                ASPxGridView2.DataBind();               
            }

https://youtu.be/04F53SUiGw0

requerasapconnector's People

Contributors

ferhatdemirci avatar

Watchers

Ahmet Mehmetbeyoglu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.