Пример #1
0
        public IRfcTable Rfc_Em_Dal(RFC_EM_Model EmModel, out RFC_IN_Message rfcMessage)
        {
            rfcMessage = new RFC_IN_Message();
            try
            {
                _configurationId = new RFC_SetUp();
                RfcDestinationManager.RegisterDestinationConfiguration(_configurationId);
                _dest       = RfcDestinationManager.GetDestination("SAPMS");
                _repository = _dest.Repository;
                IRfcFunction rfc   = _repository.CreateFunction(EmModel.FunctionModule); //调用函数名
                IRfcTable    table = rfc.GetTable(EmModel.L_MM_EM);                      //RFC表数据
                rfc.SetValue("I_FLAG", "L");
                rfc.Invoke(_dest);

                rfcMessage.E_RETURN_CODE    = rfc.GetString("E_SUBRC").ToString();
                rfcMessage.E_RETURN_MESSAGE = rfc.GetString("E_MESSAGE").ToString();
                return(table);
            }
            catch (Exception exception)
            {
                rfcMessage.E_RETURN_MESSAGE = "接口MOVE错误:" + exception.ToString();
                return(null);
            }
            finally
            {
                RfcDestinationManager.UnregisterDestinationConfiguration(_configurationId);
            }
        }
Пример #2
0
 /// <summary>
 /// EM
 /// </summary>
 /// <param name="fgsModel"></param>
 /// <param name="rfcMessage"></param>
 /// <returns></returns>
 public DataTable Rfc_Em_DataTable(RFC_EM_Model EmModel, out RFC_IN_Message rfcMessage)
 {
     return(convertDataSap.ConversionDataTableRFCTable(rfcEM.Rfc_Em_Dal(EmModel, out rfcMessage)));
 }