public DataTable GetModuleList(string PartNumber) { SapRFCHelper saph = new SapRFCHelper(); string rfcName = "ZJTESTCS15"; List <string> parameters = new List <string>(); parameters.Add(CreateParam("ZMATNR", PartNumber)); parameters.Add("ZWERKS|7000"); //parameters.Add("BUKRS|SDT"); DataTable dt = saph.GetRfcOutTable("", parameters.ToArray(), rfcName, "ZSTPO"); return(dt); }
public static DataTable RFC() { string rfcName = "Z_RFC_PPL_REAL"; #if DEBUG SapRFCHelper saph = new SapRFCHelper(); //string[] param = { "ZTEST|Y" }; //SAP.Middleware.Connector.IRfcStructure itab = saph.GetRfcStructure("", rfcName, "WERKS"); List <string> e = new List <string>(); e.Add(CreateParam("MATNR", "4706-T18250-0320")); e.Add(CreateParam("BUKRS", "SDT")); //e.Add("WERKS|7000"); //e.Add("MATNR|4706-T18250-0320"); //e.Add("BUKRS|SDT"); String[] arry = { "MATNR|4706-T18250-0320", "BUKRS|SDT" }; DataTable dt = saph.GetRfcOutTable("", e.ToArray(), rfcName, "IPPLFIX"); string returncode = saph.GetRfcString("", e.ToArray(), rfcName, "RETCODE"); string RETURNstr = saph.GetRfcString("", e.ToArray(), rfcName, "RETURN"); RETURNstr = saph.GetRfcString("", arry, rfcName, "RETURN"); #else Dictionary <String, String> Dict = new Dictionary <string, string>(); Dict.Add("MATNR", "4706-T18250-0320"); Dict.Add("BUKRS", "SDT"); dt = SapRFCHelper.GetRfcOutDt(Dict, rfcName, "IPPLFIX"); returncode = SapRFCHelper.GetRFCString(Dict, rfcName, "RETCODE"); RETURNstr = SapRFCHelper.GetRFCString(Dict, rfcName, "RETURN"); #endif return(dt); }