Ejemplo n.º 1
0
        public async Task <VendorBapiOutputParameter> GetVendorsByCompanyCodeAsync(string companyCode)
        {
            var inputParameter = new VendorBapiInputParameter
            {
                CompanyCode = companyCode
            };

            using IRfcClient sapClient = _serviceProvider.GetRequiredService <IRfcClient>();
            return(await sapClient.ExecuteBapiAsync <VendorBapiInputParameter, VendorBapiOutputParameter>("BBP_VENDOR_GETLIST", inputParameter));
        }
Ejemplo n.º 2
0
        public VendorBapiOutputParameter GetVerdorsByCompanyCode(string companyCode)
        {
            using IRfcConnection connection = _serviceProvider.GetService <IRfcConnection>();
            connection?.Connect();

            var inputParameter = new VendorBapiInputParameter
            {
                CompanyCode = companyCode
            };

            using IReadBapi <VendorBapiOutputParameter> rfcFunction = _serviceProvider.GetService <IReadBapi <VendorBapiOutputParameter> >();
            VendorBapiOutputParameter result = rfcFunction?.GetBapi(connection, "BBP_VENDOR_GETLIST", inputParameter);

            return(result);
        }