I have C# Code where I am invoking SAP BAPI, but sometime it takes too long to get a response back.
I can only wait for 3 seconds to get a response back. If it's does not return in 3 seconds, then I would like to terminate the call and continue with the next line.
funcArtike2.SetValue("CLI", CLI);
funcArtike2.Invoke(rfcDest);
string CA = funcArtike2["CONTRACT_ACCOUNT"].GetValue().ToString().Trim() != "".ToString() ? funcArtike2["CONTRACT_ACCOUNT"].GetValue().ToString().Trim() : "X";
//IRfcStructure RETURN = funcArtike2["RETURN"].GetStructure();
string BP = funcArtike2["BUSINESS_PARTNER"].ToString().Substring(funcArtike2["BUSINESS_PARTNER"].ToString().IndexOf("=")+1);
funcArtike2.Invoke(rfcDest);
is the statement I want to skip after waiting for 3 seconds.