Skip to Content
Former Member
Feb 09, 2017 at 12:29 PM

Connecting to SAP BCM url from .NET Application

515 Views Last edit Feb 09, 2017 at 12:47 PM 2 rev

Our client has provided with one SAP url. They have also given function name and table name and sample data.

We want to consume that url from our .net application and import data from their table to our application.Here is our sample code

public static SAP.Middleware.Connector.RfcDestination connect()
RfcDestination testconnect = RfcDestinationManager.GetDestination("QA");
return testconnect;
public DataSet GetData(string companycode,string empid)
RfcDestination test = connect(); DataSet contacts = new DataSet(); try
//RfcRepository rfcrepos = test.Repository;
IRfcFunction rfcfunction = test.Repository.CreateFunction("***-***-***");//
rfcfunction.SetValue("I_BUKRS", companycode);
rfcfunction.SetValue("I_PERNR", empid);

catch (Exception ex)
throw new Exception(ex.InnerException.ToString());
return contacts;

config file:

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="SAP.Middleware.Connector">
<sectionGroup name="ClientSettings">
<section name="DestinationConfiguration" type="SAP.Middleware.Connector.RfcDestinationConfiguration, sapnco"/>
<add NAME="QA" USER="***" PASSWD="****" CLIENT="001" LANG="EN" SYSID="000"
ASHOST="*************************" SYSNR="50001" MAX_POOL_SIZE="200" IDLE_TIMEOUT="100"/>

Their URL is something like


Here we are getting in repository.Createfunction() as below:

No RFC authorization for function module RFC_METADATA_GET.

NOTE: They have given only username and password to connect to url