Skip to Content
avatar image
Former Member

How to use SAP URL in .NET APplication

Hi All,

Client has given one SAP URL. From that they have told to fetch data to our .net site.

Can someone help us how to use that url to fetch data.

url is something like


In that they have xml file with RFC name and table colum names

We have written following 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("ZHR_BCM_DATA");//error rfcfunction.SetValue("I_BUKRS", companycode);

rfcfunction.SetValue("I_PERNR", empid);

rfcfunction.Invoke(rfcdestination); contacts.Tables.Add(Converttodatatable(rfcfunction.GetTable("CONTACTS")));


catch (Exception ex)


throw new Exception(ex.InnerException.ToString());


return contacts;


we are getting error in

IRfcFunction rfcfunction = test.Repository.CreateFunction("ZHR_BCM_DATA");//error

like following attached screenshot

our 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"/> </sectionGroup> </sectionGroup>






<add NAME="QA" USER="***" PASSWD="*****" CLIENT="001" LANG="EN" SYSID="BCM" ASHOST="***.**.**.**l" SYSNR="50001" MAX_POOL_SIZE="200" IDLE_TIMEOUT="100"/>

</destinations> </DestinationConfiguration>



Please help us to connect to the given url.

Thanks in advance

no-auth-1.png (127.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers