DataSet ods_settle = new DataSet(); DateTime sdate = Convert.ToDateTime(txtFromDate.Text); DateTime Enddate = Convert.ToDateTime(txtEndDate.Text); oSAPPGCCSet.StartDate = Convert.ToDateTime(sdate); oSAPPGCCSet.EndDate = Convert.ToDateTime(Enddate.Year + "-" + Enddate.Month + "-" + Enddate.Day); string str_Proc = StoredProcNames.Settlement_usp_fd_GetBillingSettlement; oSAPPGCCSet.ViewSettlement(out ods_settle, str_Proc); grdSettlement.AllowPaging = false; grdSettlement.DataSource = ods_settle; ods_settle.WriteXml("c:\\BillingDate.xml");