Verrouillé SAP .Net connector though SAP Netweaver Gateway server 2.0

  • Tuesday, March 06, 2012 8:57 AM
     
     

    While connecting to SAP Netweaver Gateway server 2.0

    we are able to conect to SAP  Netweaver Gateway server 2.0 but we are not able to call ECC function from .Net connector though Gateway server

    we are using following code

    1.Create Connection

    if ("SGW_600".Equals(destinationName))

    {
    RfcConfigParameters parms = new RfcConfigParameters();
    parms.Add(RfcConfigParameters.GatewayHost, "ipaddress");
    parms.Add(RfcConfigParameters.GatewayService, "sapgw03");
    parms.Add(RfcConfigParameters.Client, "600");
    parms.Add(RfcConfigParameters.User, "user");
    parms.Add(RfcConfigParameters.Password, "pwd");

    return parms;
    }

    2.Call Function

    RfcDestination rfcDest = clsSapConn.getSAPDest();
    RfcRepository repo = rfcDest.Repository;
    IRfcFunction ZVIPF0007 = repo.CreateFunction("ZVIPF0007");



    ZVIPF0007.SetValue("I_EBELN", RFQ_No);
    ZVIPF0007.SetValue("I_RANDOM", Rendom_No);
    ZVIPF0007.SetValue("I_USER_FLAG", "V");


    ZVIPF0007.Invoke(rfcDest);