on 11-26-2013 3:44 PM
Hello,
Nowadays I have this:
[WebMethod]
public string ZPKG_IMPRIMEETIQUETA001(string P_PESO, string P_WERKS, string P_ROLLO, string P_PAPEL)
{
RfcDestination prd;
string P_RESULT;
ECCDestinationConfig onk1 = new ECCDestinationConfig();
onk1.compruebaconection();
prd = RfcDestinationManager.GetDestination("QAS");
try
{
RfcDestinationManager.RegisterDestinationConfiguration(new ECCDestinationConfig());
}
catch
{
}
try
{
RfcRepository repo = prd.Repository;
IRfcFunction companyBapi = repo.CreateFunction("ZPKG_IMPRIMEETIQUETA001");
companyBapi.SetValue("P_PESO", P_PESO);
companyBapi.SetValue("P_WERKS", P_WERKS);
companyBapi.SetValue("P_ROLLO", P_ROLLO);
companyBapi.SetValue("P_PAPEL", P_PAPEL);
companyBapi.Invoke(prd);
P_RESULT = companyBapi.GetValue("P_RESULT").ToString();
return P_RESULT.ToString();
}
catch (Exception exa)
{
P_RESULT = "Error en el Web Services";
return P_RESULT;
// return null;
}
}
In the line 12 I set the parameters for connection like this: prd = RfcDestinationManager.GetDestination("QAS"); But I want to set the parameters without a function from a class, I want Set parameters directly.
Do you know How Can I do this?
Thanks and Regards.
What do you mean by setting parameters directly?
Btw. you shall move line 12.
prd = RfcDestinationManager.GetDestination("QAS");
to line 28.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.