/// <summary> /// 填充 DOCUMENTHEADER 表数据 /// </summary> /// <param name="docHeader">DOCUMENTHEADER 对象</param> protected void InsertDataHeaderData(DOCUMENTHEADER docHeader) { IRfcStructure rfcStructDocHeader = mCurrentRfcFunction.GetStructure("HEADERDATA"); rfcStructDocHeader.SetValue("INVOICE_IND", "X"); rfcStructDocHeader.SetValue("DOC_DATE", "2012-03-15"); rfcStructDocHeader.SetValue("PSTNG_DATE", "2012-03-15"); rfcStructDocHeader.SetValue("REF_DOC_NO", "IV100002"); rfcStructDocHeader.SetValue("COMP_CODE", "CA10"); rfcStructDocHeader.SetValue("CURRENCY", "RMB"); rfcStructDocHeader.SetValue("GROSS_AMOUNT", "100"); rfcStructDocHeader.SetValue("CALC_TAX_IND", "X"); rfcStructDocHeader.SetValue("HEADER_TXT", "IV1000010002"); rfcStructDocHeader.SetValue("ITEM_TEXT", "TEST"); rfcStructDocHeader.SetValue("BUS_AREA", "0001"); }
/// <summary> /// 插入头数据 /// </summary> protected void SetDocumentHeader() { DOCUMENTHEADER header = new DOCUMENTHEADER() { USERNAME = CurrentSapParameter.UserName, COMP_CODE = CurrentSapParameter.CompCode, DOC_TYPE = CurrentSapParameter.DocType, REF_DOC_NO = CurrentSapParameter.RefDocNo, HEADER_TXT = CurrentSapParameter.Header, BUS_ACT = CurrentSapParameter.BusAct, DOC_DATE = Convert.ToDateTime(CurrentSapParameter.DocDate), PSTNG_DATE = DateTime.Now }; InsertDataDocumentHeader(header); }
/// <summary> /// 填充 DOCUMENTHEADER 表数据 /// </summary> /// <param name="docHeader">DOCUMENTHEADER 对象</param> protected void InsertDataDocumentHeader(DOCUMENTHEADER docHeader) { IRfcStructure rfcStructDocHeader = mCurrentRfcFunction.GetStructure("DOCUMENTHEADER"); rfcStructDocHeader.SetValue("OBJ_TYPE", docHeader.OBJ_TYPE); rfcStructDocHeader.SetValue("OBJ_KEY", docHeader.OBJ_KEY); rfcStructDocHeader.SetValue("OBJ_SYS", docHeader.OBJ_SYS); rfcStructDocHeader.SetValue("BUS_ACT", docHeader.BUS_ACT); rfcStructDocHeader.SetValue("USERNAME", docHeader.USERNAME); rfcStructDocHeader.SetValue("HEADER_TXT", docHeader.HEADER_TXT); rfcStructDocHeader.SetValue("COMP_CODE", docHeader.COMP_CODE); rfcStructDocHeader.SetValue("DOC_DATE", docHeader.DOC_DATE); rfcStructDocHeader.SetValue("PSTNG_DATE", docHeader.PSTNG_DATE); rfcStructDocHeader.SetValue("TRANS_DATE", docHeader.TRANS_DATE); rfcStructDocHeader.SetValue("FISC_YEAR", docHeader.FISC_YEAR); rfcStructDocHeader.SetValue("FIS_PERIOD", docHeader.FIS_PERIOD); rfcStructDocHeader.SetValue("DOC_TYPE", docHeader.DOC_TYPE); rfcStructDocHeader.SetValue("REF_DOC_NO", docHeader.REF_DOC_NO); rfcStructDocHeader.SetValue("AC_DOC_NO", docHeader.AC_DOC_NO); rfcStructDocHeader.SetValue("OBJ_KEY_R", docHeader.OBJ_KEY_R); rfcStructDocHeader.SetValue("REASON_REV", docHeader.REASON_REV); rfcStructDocHeader.SetValue("COMPO_ACC", docHeader.COMPO_ACC); rfcStructDocHeader.SetValue("REF_DOC_NO_LONG", docHeader.REF_DOC_NO_LONG); rfcStructDocHeader.SetValue("ACC_PRINCIPLE", docHeader.ACC_PRINCIPLE); rfcStructDocHeader.SetValue("NEG_POSTNG", docHeader.NEG_POSTNG); rfcStructDocHeader.SetValue("OBJ_KEY_INV", docHeader.OBJ_KEY_INV); rfcStructDocHeader.SetValue("BILL_CATEGORY", docHeader.BILL_CATEGORY); rfcStructDocHeader.SetValue("VATDATE", docHeader.VATDATE); }