public async Task <GetJobOutputParameter> GetJobsAsync() { var inputParameter = new GetJobInputParameter { StartDate = $"{DateTime.Today:yyyyMMdd}", EndDate = $"{DateTime.Today:yyyyMMdd}", Status = "A", ProgramName = "Z*", ClientCode = "200" }; using IRfcClient sapClient = _serviceProvider.GetRequiredService <IRfcClient>(); return(await sapClient.ExecuteRfcAsync <GetJobInputParameter, GetJobOutputParameter>("ZBC_GET_JOBS", inputParameter)); }
public GetJobOutputParameter GetJobs() { using IRfcConnection connection = _serviceProvider.GetService <IRfcConnection>(); connection.Connect(); var inputParameter = new GetJobInputParameter { StartDate = $"{DateTime.Today:yyyyMMdd}", EndDate = $"{DateTime.Today:yyyyMMdd}", Status = "A", ProgramName = "Z*", ClientCode = "200" }; using IReadRfc rfcFunction = _serviceProvider.GetService <IReadRfc>(); GetJobOutputParameter result = rfcFunction.GetRfc <GetJobOutputParameter, GetJobInputParameter>(connection, "ZBC_GET_JOBS", inputParameter); return(result); }