I am working with SapNwRfc (https://github.com/huysentruitw/SapNwRfc) I was able to use the .net framework and to connect with my sap production server.
However I have some issues on get everything working with calling bapi that return result in table format.
I would like to test the calling if BAPI_COMPANY_LIST
that takes no input and return a structure with the company list here's the code:
sapFunction = sapConnection.CreateFunction("BAPI_COMPANYCODE_GETLIST");
var result = sapFunction.Invoke<SAPbapi_company_get_list_results>();
where I defined the class this way
public class SAPbapi_company_get_list_results
{
public CompanyDetails[] Details { get; set; }
public class CompanyDetails
{
[SapName("COMP_CODE")]
public string COMP_CODE { get; set; }
[SapName("COMP_NAME")]
public string COMP_NAME { get; set; }
}
}
When I call the invoke method I got an error like (seems that I do not have mapped the result to .NET but in the documentation, I did not find any advice.
Any help will be appreciated