コード例 #1
0
        public BomOutputParameter GetBillOfMaterial(string materialCode, string plantCode)
        {
            using IRfcConnection connection = _serviceProvider.GetService <IRfcConnection>();
            connection.Connect();

            var inputParameter = new BomInputParameter
            {
                Aumgb = "0",
                Capid = "PP01",
                Datuv = DateTime.Now,
                Emeng = "1",
                Mktls = "x",
                Mehrs = "x",
                Stpst = "0",
                Svwvo = "x",
                Werks = plantCode,
                Vrsvo = "x",
                Stlal = "1",
                Stlan = "1",
                Mtnrv = materialCode
            };

            using IReadRfc rfcFunction = _serviceProvider.GetService <IReadRfc>();
            BomOutputParameter bomResult = rfcFunction.GetRfc <BomOutputParameter, BomInputParameter>(connection, "CS_BOM_EXPL_MAT_V2_RFC", inputParameter);

            return(bomResult);
        }
コード例 #2
0
        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);
        }