Show TOC

Programming Example of Working Without Local sideinfo FileLocate this document in the navigation structure

Use
            

            RFC_OPTIONS     rfc_opt;        /*      Parameter for RFC connection    */
            RFC_CONNOPT_CPIC        rfc_connopt_cpic;
                /*      Specific param. for RFC to R/2  */
            RfcEnvironment(...);    /*      Install error handling function */
            

            rfc_connopt_cpic.gateway_host = "iw1009"
                            /*      host name of the Gateway    */
            rfc_connopt_cpic.gateway_service = "sapgw00"
                            /*      service no. of the Gateway  */
            rfc_opt.mode = RFC_MODE_CPIC;   /*      RFC to SAP R/2  */
            rfc_opt.destination = "K50"     /*      Entry with this destination     */
                            /*      be in  the sideinfofile for     */
                            /*      the Gateway */
            rfc_opt.connopt = rfc_connopt_cpic;
                /*      includes connect parameters     */
            rfc_opt.client = "000"; /*      Client in SAP R/2       */
            rfc_opt.user = "RFCTEST";       /*      CPIC user       */
            rfc_opt.password = "SECRET";    /*      Password        */
            rfc_opt.language = "E"; /*      Language        */
            rfc_opt.trace = 0;      /*      No RFC trace    */
            rfc_handle = RfcOpen(); /*      Open RFC connection     */
            ...
            

            

         

You can also issue RfcConnArgv or RfcConnArgv3 before RfcOpen to pass on the information about the Gateway to the RFC library. The RfcOpenExt and RfcOpenExtV3 are for non-C programs, such as Visual Basic programs. For more details, see the delivered 'sapinfo.c' and 'srfctest.c'.