on 02-08-2017 7:50 PM - last edited on 02-03-2024 6:03 PM by postmig_api_4
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
https://***.**.**.***:50001/dir/wsdl?p=**/f94ac0e18ab039****5703a9acf653a0
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;
RfcSessionManager.BeginContext(test);
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:
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, 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>
</configSections>
<SAP.Middleware.Connector>
<ClientSettings>
<DestinationConfiguration>
<destinations>
<add NAME="QA" USER="***" PASSWD="*****" CLIENT="001" LANG="EN" SYSID="BCM" ASHOST="***.**.**.**l" SYSNR="50001" MAX_POOL_SIZE="200" IDLE_TIMEOUT="100"/>
</destinations> </DestinationConfiguration>
</ClientSettings>
</SAP.Middleware.Connector>
Please help us to connect to the given url.
Thanks in advance
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.