How to use RFC in 7.10?

Hi,
I'm a little bit confused by the help on NW 7.10 SP7. I normally use RFC connections from web Dynpro but this time I have to use RFC from an EJB. As before I tried "SAP Enterprise Connector" which seems to be depricated.
I followed the example how to use Destination Service. It imports "cam.sap.mw.jco.JCO". After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?
Is the destination service itself also depricated?
So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?
What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?
Maybe someone can bring some light in all this
Thx,
Frank

Hi Frank
>After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?
Not exactly. The deprecation means that the JCo API version is 2.X while JCo 3.0 is already available. However, this does not mean that you cannot use the "com.sap.mw.jco.JCO". I know lots of projects running even on 7.11 and 7.20 that still use the JCo 2.X.
>Is the destination service itself also depricated?
No, no, no.
>So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?
Java Resource Adapter is just a new JEE container for JCo API. Still it's also has some problems. So I'd not recommend you to use it.
>What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?
Use JCo 2.X + Destination Service. Ignore the API deprecation.
BR, Siarhei

Similar Messages

  • How to use RFC Function?

    hey,experts
    I found a RFC function in server A, I want to use this RFC function in server B.
    how to use it in server B?
    thanks,
    kim-heum

    Hi,
    In system B ,
    1)GOTO SM59 tcode.
    Then  select ABAP CONNECTIONS  or R/3 Connections and click on New Connection.
    2) Now give the RFC connection name and description. Then  in target system give the IP address or hostname and system number and save.
    3)Click on logon& security tab  and give the language, client , username and password  and save.
    4) Now click on CONNECTIN TEST button
    5) Now it will show the bytes transferred  after establishing the connection.
    6) go back and click on REMOTE LOGON button.
    7) then it will take to other system sap easy access screen if credentials are satisfied.
    8) Now go to se38 and create a program
    while remote Function module you have to specify the RFC destination name.
    eg
                   call function 'ZRFC_ADDITION'
                   destination  'ZRFC_CONNECTION'
    here ZFRC_ADDITION is Remote Function Module and ZRFC_CONNECTION is RFC to system A.
    then it works.
    Reward points if helpful.
    Thanks and regards.

  • How to use RFC in OO programming?

    experts,
        As far as i know, we can call a function using RFC, such as:
         CALL FUNCTION 'HRRCF_MDL_CAND_OVIEW_RETRIEVE'
       DESTINATION lv_dest
       EXPORTING
         cand_hrobject         = stru_hrobject
         https                 = lv_https
       IMPORTING
         cand_overview         = ls_dataoverview
         messages              = lt_messages
       EXCEPTIONS
         system_failure        = 1  "MESSAGE lv_message
         communication_failure = 2.  "MESSAGE lv_message.
      Is there any way to call a OO(Object Oriented) method using RFC? I have studied the grammar of CALL METHOD, but i can't find some parameters to assign the destination.
      Pls guide me. Thanks.
      qiuguo

    No, you have to use a function module as RFC. But you can create a custom RFC in the target system with the same input parameters as your method and call the method inside the RFC.
    That should do it.
    Regards,
    Michael

  • How to use RFC to get data from BW?

    Hi all, we need to get data from BW using RFC, I am not  familiar with BW and RFC, would you please give me some advice? Many thanks in advance!

    would you please bring your solution  to light here?
    thank you
    God's blessing
    Andreas

  • How to enable RFC and how to use it in Report..please tell its very urgent

    Dear Techie's,
    Please tell its very urgent..
    How to enable RFC and how to use it in Report. ??
    Virendra

    hi,
    pls chk any of these links.
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    rgds
    Anver

  • How to Call RFC from PortalService using a ServiceUser

    Hi,
    I have some code that calls an RFC using JCO.
    (I have other code I wrote using JCA to connect from a portlet, but that requires a Session and uses an IProfile)
    Our security team wants me to use a Serviceuser instead. But I can't seem to figure out how to use a ServiceUser to call an RFC.
    If I can just get an IConnection, i can use the rest of my JCA code to call the RFC. But I'm stuck getting the connection
    The closes I've gotten is this:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("myserviceuser");
    IConnectorGatewayService cgs=PortalRuntime.getRuntimeResources().getService (IConnectorGatewayService.KEY);
    ConnectionProperties cp=new ConnectionProperties(new Locale(),user);
    IConnection conn=cgs.getConnection("mySAPsystemalias",cp);
    There are two problems with this (or maybe more)
    The connectionproperties takes an IProfile not an IUser
    I also thought I needed a com.sap.security.api.IUser, not the one above.
    Can someone point out what is wrong or a different way?
    thanks
    Chris Buchholz

    Chris,
    You could always use a JCO JNDI connection, in which case you dont need anything other than a HashMap of the the following properties
    client
    messageserverHost
    systemLangauge
    group
    type
    systemType
    systemId
    serverPort
    username
    password
    The username and password you supply can be a service user or a normal logon user as far as I know.
    Cheers,
    Steve

  • How to use IDOC and RFC adapter in 1 scenario?

    We have AAA field and BBB field and we want to send AAA field to receiver sap system using IDOC adapter and BBB field to receiver sap system using RFC adapter. But how to use IDOC and RFC adapter in 1 scenario and how to map and  what are the design and configuration objects we require to create?

    To achieve this you have to use
    Two Interface Determinations
    Two Communication Channels (IDOC & RFC)
    & Two Receiver Aggrements.
    Use the Enhanced Interface determination and give your conditions there. Based on you condition your interface mapping will be triggered and data will be sent to IDOC & RFC respectively.

  • How to use the exceptions in a RFC ?

    I can use XI (through BPM) to call a RFC and get response from the "Export" of a RFC. But could I get the exception from the "exception" of a RFC ?
    I tried to write a RFC which will generate a exception and I found it in the XI monitor, but how to use it ? i.e. sometimes I need to get the "export", but sometimes I need to get "exception". Is there any documents or examples for it ? thanks.

    Hi,
    <i>But for fault message, I don't know how to send it to a receiver.</i>
    There is no other configurations that you need to do with respect to fault messages.
    If the rfc returns an exception, this message, is passed on to the receiver instead of the response message.
    The receiver of the fault message will be the system that sent the request.
    <i>(If I can use a transformation to mapping it to other message, I think it's ok too.)</i>
    You need not use a BPM, for this, in case you are using it only for fault message handling.
    All you need to do is, create a message mapping, with source and target message types as RFC exceptions and carry out a one to one mapping.This would display the exception coming from the RFC as the fault response st the sender.
    In case, the exception returned from the RFC is not self-explanatory, you could map constants to the target message type(in message mapping) which would explain the reason for the fault.
    Regards,
    Smitha.

  • How to Add two numbers using RFC in WD abap

    Dear Experts,
    I have to add the two numbers using RFC.
    I have created the RFC and by using create -> service call i have include that RFC in my WD abap Program.. After that i don't know how to link the input view and to display the result in another view...
    Please help me..
    Thank you.

    This is the third thread that you have posted on this same question.  This is also your second warning that such activity is not allowed in the SCN forums.  Please return to your original thread if you wish to post a follow up question. 
    Beacause this is a duplicate thread it will be locked.

  • How to open workbook using rfc?

    I want to open workbook using RFC,how can i do it ?

    Hi,
    Do you mean directly opening from ABAP  backend without going to BEx Analyzer?
    Rgds,
    Murali

  • How to use loop in VBAK table using BDC RFC connection through excel vba ?

    Hello,
    I am trying to extract data from VBAK table using rfc connection with Excel VBA. where i can able to pull data first time, when i tried to use the same set of code using loops, it throws an error like BAD INDEX.
    Any help appreciated.

    Hello,
    I am trying to extract data from VBAK table using rfc connection with Excel VBA. where i can able to pull data first time, when i tried to use the same set of code using loops, it throws an error like BAD INDEX.
    Any help appreciated.

  • How to use RfcCallReceive() in RFC by C++ ??

    Dear:
    I want make one program to connect SAP SERVER,
    and read out a user-tel-table.
    but i'm not understand how to use  RfcCallReceive().
    //--my code--
    //--connect SAP server--
         static RFC_OPTIONS        options;
         static RFC_CONNOPT_R3ONLY rfc_connopt_r3only;
         RFC_HANDLE                rfc_handle;
         options.destination = "TEST";
         options.mode        = RFC_MODE_R3ONLY;
         options.client      = "301";
         options.user        = "AD1";
         options.language    = "E";
         options.password    = "OT512";
         options.trace       = 0;                    // turn trace off
         options.connopt     = &rfc_connopt_r3only;
         rfc_connopt_r3only.hostname = "190.75.48.88";          // some host name
         rfc_connopt_r3only.sysnr    = 0;            // system 00
         rfc_handle = RfcOpen( &options );
         if (rfc_handle == RFC_HANDLE_NULL )
              {MessageBox("connect error !");}
         else {MessageBox("connect is OK!");}
    //--call function--
         char queue[20] = "TESTQUEUE";
         char openmode = 'W';
         char qtype = 'A';
         int rc;
         char *exception ;
         RFC_PARAMETER exporting[5],importing[5];
         RFC_TABLE tables[1];
         exporting[0].name = "NAME";
         exporting[0].nlen = 4;
         exporting[0].type = TYPC;
         exporting[0].addr = queue;
         exporting[0].leng = 20;
         exporting[1].name = "OPENMODE";
         exporting[1].nlen = 8;
         exporting[1].type = TYPC;
         exporting[1].addr = &openmode;
         exporting[1].leng = 1;
         exporting[2].name = "TYPE";
         exporting[2].nlen = 4;
         exporting[2].type = TYPC;
         exporting[2].addr = &qtype;
         exporting[2].leng = 1;
         exporting[3].name = (char )0; / no more export parameters */
         importing[0].name = NULL; /* no import parameter(s) */
         tables[0].name = NULL; /* no internal table(s) */
         exception = NULL; /* default exception handling*/
         rc = RfcCallReceive( rfc_handle,"QUEUE_OPEN",exporting,     importing,tables,&exception);
    whether can give a example to me ????
    thanks
    Message was edited by: james

    I'm not sure what the situation is like for you since I don't live in Australia, but I know that Siri is still in beta and I believe will gain support for more countries and languages as Apple updates it. That's only my best guess, but I might have seen it somewhere. I know Apple is working on support for the iPhone in many more countries by the end of the year.

  • How to validate the input field data in VC using RFC FM

    HI,
    Could any body please give me the solution for the following issue?
    When ever I enter a value in the input field of an iView, this value has to be validated from the backend BW system.  Is this validation is possible using RFC function module?
    If yes, please explain me.

    Hi Deepak,
    U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
    http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
    There are two ways to achieve ur task.
    1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
    http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
    http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
    2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
    http://aspzone.com/blogs/john/articles/173.aspx
    Regards,
    Naren

  • How to use Logical database in function module?

    I will create a function module in HR.
    but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

    You cannot attach the LDB to the main program of the function group.
    - So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
    - Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
    - Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
    Regards

  • How to use Webservice in Visual composer

    Hi,
    We have developed a RFC in R3 and converted it into Webservice. We want to use this in the Visual composer. Can anyone suggest some steps how to use this RFC in Visual composer?
    I tried the option in Tools--> Define webservice System and gave the following parameters:
    new system name = WDP (system name which we use)
    new system alias = WDP_VC (system alias which we created)
    webservice url = URL of the webservice which we have created and got in WSDL
    when we create it gives an error the URL is incorrect.
    Kindly let me know if these values are correct and suggest the steps to be followed. Also, if there are any prerequiste steps to be done before using this webservice.
    Thanks and Kind regards,
    Rajbarath.

    Hi,
    The option you described refers to defining a new web service system in the portal system landscape. So if you already have it defined - you don't have to define it again.
    As for the actual error you're getting, check that:
    1. The url is indeed accessible, and points to a wsdl. You can do this by simply inserting it in the browser's address bar and making sure you get a wsdl file in the response.
    2. Make sure that you don't need to authenticate, i.e. provide a user and password. Maybe you just forgot to provide these arguments.
    Lastly, keep in mind that this 'Define Web Service System' option is just a shortcut. Generally, you would define a web service system in the portal, like any other system, using the web service connector.
    Hope this helps,
       Lior

Maybe you are looking for

  • W540 Internal / External Display Issues

    Hello, I have a  Laptop:Docking Station: 40A20170US

  • IPhoto crashes on exit and when using iPhoto Library Manager

    Hi all, When attempting to split up my 70,000 iPhoto library using iPhoto Library Manager, the application crashes when attempting to import the photos to a new iPhoto library. This is when it is trying to make iPhoto quit during the import process.

  • 9.0.3 and Log4J problem

    Hi - running 9.0.3 with WebCache and HttpServer on Windows2000. If I add the Log4J-1.2.8.jar file to my /lib directory to use log4j, I cannot get the Enterprise Manager Console running. This is the error: 500 Internal Server Error java.lang.NoClassDe

  • Missing class file from tools.jar file!

    I have been playing around with the code: import com.sun.tools.javac.v8.JavaCompiler; import com.sun.tools.javac.v8.util.Context; import com.sun.tools.javac.v8.util.List; public class Compiler { public static void main(String[] args) { JavaCompiler c

  • Uninstall option for LabVIEW build applicatio​n

    Hello All, I want to create a Uninstaller for and LabVIEW application created in 8.5. Please give your suggestion for how to create.... Regards, Bharathi T