Wht mean by adaptive rfc class?

hi
  i m new in ep development. some one ask me which class ur using in adaptive rfc?
plz any one tell me ,class that we use during adaptive rfc or webservices in webdynpro java.

Hi,
Didn't get your question.
When you use Adaptive RFC, and import bapi / web service then MODEL CLASS will be generated.
you can say you used input class (for input paramenters) or output class (for ouput parameters) of model class.
have a look at adaptive rfc http://help.sap.com/saphelp_nw04s/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm
regards,
Pradeep

Similar Messages

  • Adaptive RFC in webdynpro

    Hi, I developed a custom application in webdynpro and made it to work and in the mean time the sneak preview license expired. I have reinstalled the sneak preview but cannot get the application to work. I had saved the old application in my hard drive and the cannot reimport the model. Any help in this regard is highly appreciated.
    Best regards,
    Srini.

    I found one problem was missing object in the SAP system. Once I got that in place I was able to make the application work. I still have a problem with the Adaptive RFC import. This is the error I get.
    I get this exception in a pop up.
    "An internal error has occured. See error log for more details. "
    Plug in Name - Web Dynpro Model Editor Services
    Plugin Id    - com.sap.ide.webdynpro.service.modeleditor
    Class - com.sap.ide.webdynpro.modeleditor.wizards.model.
            creation.ModelDialog
    Method - nextPressed
    Message - Internal error - see detail information in
              exception trace.
    Exception - org.eclipse.swt.SWTException: Failed to 
                execute runnable 
                (Java.lang.NullPointerException)
    Where can I see more information? what is possiblit=y wrong.
    Also I cannot connect to SAP system from the IDE. So I am missing something. But I could run the old application that accesses SAP without problem.
    Any help in this regard is highly appreciated.
    Best Regards,
    Srini.

  • Adaptive RFC and Locking Objects from WD Java

    Hi,
    There are some pieces of information available on this subject but no coherent and easy to follow "manual". Also some questions remain.
    I'd rate this a very important, i.e. "business critical" problem. Therefore I would appreciate your help to get things sorted in this thread.
    So let's start with a summary of what I think I understood so far (corrections welcome!):
    - You can call RFCs from WebDynpro and locking will work (on the ABAP side).
    - Once you release your JCo connection the locks will be released, though.
    - Therefore, to keep a lock in between requests you have to keep the connection.
    - You can keep the connection by passing WDModelScopeType.APPLICATION_SCOPE or WDModelScopeType.COMPONENT_SCOPE to the constructor of the model class.
    - You can lookup the default scope for a model using
         WDModelScopeType defaultScope = WDModelFactory.lookupDefaultScopeForModel((Class) modelClazz);
    Now suppose you have many users, each holding some locks.
    Would you not easily run out of JCo connections? On the other hand by default WebDynpro RFC Models seem to keep a connection per application instance (= user session).
    Using WDModelScopeType: Do you really need to code this or can you just configure this during design time for the deployment?
    blog=/pub/wlg/1061 claims the default is APPLICATION_SCOPE.
    Will connections (and thus locks) be released automatically on an HttpSession timeout? I guess so because this means the end of the application and therefore end of scope WDModelScopeType.APPLICATION_SCOPE and WDModelScopeType.COMPONENT_SCOPE.
    I'm also not clear about this:
    /people/sap.user72/blog/2005/01/08/adaptive-rfc-models-in-web-dynprosome-pointers
    "But to ensure that the record remains locked it is necessary reserve the connection that was used for locking and be made unavailable for other models and also the connection should remain open as long as the lifetime of the screen. This becomes similar to locking records through SAP Gui . This can be easily achieved by having separate models for locking RFCs defined with APPLICATION_SCOPE and isolating its connection by not grouping with other model objects."
    What does "reserve the connection" mean?
    Suppose you lock some object and afterwards want to allow the user to request more information about this or other objects.
    Would you need to use a different connection for that?
    Suppose you want to lock two objects.
    Would you need to use two different connections for that?
    Suppose you want to edit both objects and save the changes inside one transaction (with atomicity). A transaction normally is associated with a single connection (unless XA protocol is used). So how would this work?
    What will cause the locks to be released?
    - Application expiration (timeout)
    - RFC that explicitely releases locks
    - Transaction commit/rollback (?)
    Reference:
    I found some of the information and further pointers in the blog mentioned above and here:
    Disconnect method
    Looking forward to your replies
    Markus
    Message was edited by: Markus Wissmann
    Another thread with the same topic and no final answers:
    Handling object locking in R/3 from WD through RFC
    Message was edited by: Markus Wissmann

    Hi,
    This for If you send destination params are different u sent it thru URL param only.
    For that u need generate URL by using the application .
    For that purpose u need to create two applications u can call the first application in second application u can create URL and send Destination params with URL only.
    Other wise u can create the par file that would be configured in portal and thru worksets u can pass the params like u mention the destinations.
    Or at the time generationg URLS only u can add the destination names.
    Thanks,
    Lohi.

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

  • Use of Adaptive RFC and locking

    Hello,
    I am using an adaptive RFC model inside a Web Dynpro Application to maintain data residing on a SAP Enterprise system.
    This RFC also sets a lock in order to make sure nobody else tries to change the same data.
    I use pessimistic locking which means:
    1. Web Dynpro calls a RFC
    2. The RFC first locks the data then reads the data and returns the result back to Web Dynpro
    3. The user changes the data and presses a save button
    4. Web Dynpro calls the RFC to write and unlock the data
    The problem i have is the fact that after locking and reading of the data the RFC is ended and the data is received by the Web Dynpro App. But at the same moment the lock is automatically unlocked because the RFC has ended succesfully.
    How can i achieve that the lock is still there at the moment i want to change the data or is this procedure of pessimistic locking not possible?
    Bertil

    Hi,
    Whether possible or not : Don't know. Probably not with RFCs.
    More importantly, shall you do it? If it is transactional data you are updating , you may wish to consider concurrency issues (what if you locked and came to web dynpro, and user is thinking whether he shall take a coffee break first before pressing the 'Save'. Would you like to keep this record(s) locked and unavailable for the entire duration?)
    Normally, you would read the data in the first call, let the user update it on the second screen, and then, when the user presses save, execute in sequence :-
    - try locking the record,
    - if locking is successful, Verify whether the record you read has changed in the meanwhile or not (verify what you have in your workarea(before changes done by user) is the same as in DB, by reading again from the DB)
    - If above check is successful, go ahead with the update else throw an error message to the user to redo the txn
    - unlock, exit
    hope this helps,
    cheers,
    Ajay

  • Web DynPro Adaptive RFC proxies configuration

    Hi,
    When using Adaptive RFC proxies to call BAPIs in my Web DynPro application I need to go to the content management web interface (localhost:50000/webdynpro/welcome) to set them up. How can I automate this configuration for, say, quick deployment on another server ?
    Thanks,
    Romain GUY
    Cap Gemini France

    From your problem description, I assume it's the JCO destinations that you want to create programatically in the SLD. This is possible. Check out the API documentation for the class WDSystemLandscape.
    Regards
    Shakeel

  • Adaptive RFC Model - disconnectIfAlive()

    Hi,
    In my Web Dynpro application, I am using Adaptive RFC model and executing the RFC as below
    ZRfc_Test_Input input = new ZRfc_Test_Input();
    // set input
    input.setParam1("xxx");
    input.setParam2("xxx");
    input.execute();
    My application works fine for couple of days and suddenly I get an error that
    "com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException:Could not create JCOClientConnection for logical System: WD_TEST_MODELDATA_DEST - Model: class com.test.TestModel. Please assure that you have configured the RFC connections and/or logical system name properly for this model!"
    Our basis guys are unable to figure out why the SLD is misbehaving suddenly. If we restart the SLD, everything will be fine for next couple of days.
    I just want to make sure that it is not happening due to my application or due to the way the RFCs are being executed.
    After I execute my model, do I have to explicity disconnect the connection using below statement?
    <b>input.modelInstance().disconnectIfAlive();</b>
    Do I have to do this even when I am using Adaptive RFC model?
    Default min and max number of connections are used while creating JCO destinations.
    Appreciate your input.
    Thanks
    Kumar

    Hi Siva,
    >>> It is always better to close the connection after executing the RFC<<<
    Thanks for the response. I am sorry for being adamant, I agree that it would be nice to disconnect but IS IT MANDATORY? If the pool size is increased appropriately, doesn't web dynpro runtime takecare and disconnect the connections after the execution.
    In SAP tutorials and help.sap.com (at least the ones I have gone through), it is never mentioned any where that one MUST close the connections EXPLICITLY after the execution. All these days I am under the impression that it is not needed for Adaptive RFC models. I may be wrong.
    Could you please confirm if we should close the connections explicity?
    Thanks
    Kumar

  • Dynamic JCo Connection with Adaptive RFC Model 2

    Hi gurus,
    I'm trying to dinamically change a model data connector inside my web dynpro. I'm using an Adaptive RFC Model 2 to communicate with the R/3 backend. I've found that is possible to change the connector modifiyng the code inside the web dynpro. In detail I've found this example:
    IWDDynamicRFCModel model1 = (IWDDynamicRFCModel) WDModelFactory.getModelInstance(Model1.class);
    I put this code into wdDoInit method but I get the following error:
    "<comp_name>.wdDoInit failed to create or init instance of model 'model_name' in scope NO_SCOPE with instanceId 'null'"
    Furthermore I've used the deprecated Adaptive RFC Model and when I instantiate a model, ModelName m=new ModelName(), I see that the methods m.setJcoClient(client) and m.setSystemName(systemName) are visible, while when I try to do the same with Adaptive RFC Model 2, with my model m, the methods before there aren't.
    So this is my question: is it possible to change data connector dinamically with Adaptive RFC Model 2?
    Thanks a lot

    Dear Lukinho,
    You may try this ;
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    I got this code from the thread   [Multiple Client Logon in JCO   |Re: Multiple Client Logon in JCO;
    Also have a look at this thread
    [JCo Destination   |Re: JCo Destination;
    Hope it helps!!
    Warm Regards
    Upendra Agrawal

  • Using an Adaptive RFC Model from JSP

    I'm trying to use an Adaptive RFC Model I created for use in our Web Dynpros from a Portal Application project. I've created 2 DCs:
    1. A Web Dynpro DC, only containing the imported Adaptive RFC Model. The model has been added to the public parts.
    2. A Portal Application DC, with the model DC added as a DC usage (along with the other required DCs)
    Now, everything appears to work from inside NWDS. The dot operator works while editing my JSPDynPage class, and everything builds fine, but when I deploy and test in the portal, I get "package not found" errors on the actual JSP. I assume this is because the JSP is compiled at run-time. How do I expose these classes to the JSP compiler?
    It's seems like using the same method to call BAPIs in Web Dynpros and Java iViews would be a good practice following SAP's "reusable code" policy, so there must be a way to do it...

    Jonathan,
    Adaptive RFC Model works correctly only when running inside WebDynpro container. JSP runs outside container (in regular J2EE WebApplication container).
    The error you receive is due to missing run-time references to container classes.
    Actually, what you are trying to do is dead end, sorry.
    Use SAP Enterprise Connector instead of Adaptive RFC model. Generated connector classes works from any environment. Also they are sooo similar to Adaptive RFC that you'll even not mention a difference.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • MAS_CUSTOMIZATION fails to generate backend adapter related classes

    Hello experts,
    During sdoe mobile sales software component generationg, I got an syntax error during MAS_CUSTOMIZATION backend adapter related classes generation, which reports syntax error. The error messages are
    -Class ZDOECL_013_001_0_BW, Method MAP_TO_MBO
    -Field "LS_" is unknown. It is neither in one of the specified tables nor defined by "DATA" statement.
    So, What may cause this issue?
    Thanks.

    Hi,
    Report: SDOE_MOBILESALES_CONFIGURATION was not executed successfully. Metadata of the model is in inconsistent state.
    So, to get back the metadata to correct state please perform following steps.
    1. Goto transaction SE37
    2. Execute function module SDOE_REPAIR_MOBILE_SALES with OLD_GEN value as 'N'.
    3. After successful execution of thie function module
    4. Goto transaction SE38
    5. Execute report: SDOE_MOBILESALES_CONFIGURATION by providing RFC destination name which is configured to CRM system. (User whoever executing this report should have authorizations to login to CRM system using RFC destination).
    6. Wait until queue: DOE_MASS_ACTGEN completes.
    Raise an OSS message if you get any problem after step 6.
    Regards,
    Siva.

  • Exception after Migration to Adaptive RFC 2

    Hi,
    after migration to Adaptive RFC 2 Model I get this exception:
    java.lang.NoSuchMethodError: com.sap.tc.cm.arfc2.gci.ARFC2TypedModel.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;)V
    I did all necessary steps from this documentation:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50f7192d-2808-2d10-189b-df3fa5f71abf?quicklink=index&overridelayout=true
    The exception occurs in the new Class for the model (TimeModel.java) generated by Webdynpro:
    public TimeModel() {
        super(DEFAULT_RFCMETADATA_DEST, DEFAULT_RFCDATA_DEST, WD_CONNECTION_SCOPE, TYPED_MODEL_NAME, MODEL_RFM_NAMES, TYPED_MC_RENAME_MAP, TYPED_MC_FACTORIES, IMPORT_TIME_STAMP);   
    Any ideas?
    Best regards,
    Peter

    Solved the problem, some patches were not installed correctly.

  • How to implement Adaptive RFC?

    Hi Gurus,
    I have a requirement to interact with R/3 through ADAPTIVE RFC.
    Can anyone please send me the step by tsep approach of the same.
    Higher points will be rewarded for the best solution.
    Thanks in Advance,
    Dharani

    Creating RFC Model object
    1>Open NWDS, open a web dynpro project
    2>Right click on model node and select create model
    3>Will get a new window, select “IMPORT Adaptive RFC Model”,
    click next
    4>Will get new window, enter
    a.Model Name
    b.Model Package Name
    c.Enter Logical System name model instance &#61664; “model name_MODELDATA_DEST”
    d.Enter Logical System name RFC Metadata&#61664; “model name_ RFCMETADATA_DEST”
    e.Click Next
    5>SAP Logon Information
    a.Single Server
    If SAP GUI Client is not installed specify system details manually.
    b.Load Balancing
    If SAP GUI Client is installed on same system where NWDS is installed, all system will be available in System drop down list
    c.Click Next
    6>Select RFC Model (when this screen initially appears will be empty)
    a.In Function Name
    Type the function name you need, can also use wildcard(*) to search
    b.Also you can see list of modules after search button has been entered [NOT RECOMENDED]
    c.Click Next
    7>Once Import has completed you will see import log
    8>Result &#61664;What RFC Model has created:
    You will be able to see two sets of object
    a.Dedicated Model Directory
    It has simple type and set of structure
    b.Model Class
    Entire interface of each RFM in the model object

  • Java RFC Class Library

    Hi,
    I'm an SAP programmer (not a Basis person).  I want to write a Java application (using Eclipse) that has to communicate with SAP backend system.  Where can I find Java RFC Class Library to install on my laptop?  I have SAP Frontend installed on my laptop.  Will I find it under SAP Frontend folder?  OR can it be downloaded from a website?
    Thanks

    Try this link....  This is for the JCo adapter - SAP Java Connector is only available from SAP for connecting Java Applications to SAP systems.
    https://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000463649
    Or see OSS Note: http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=DISPL_TXT&_NNUM=413708/
    /people/sap.user72/blog/2005/12/27/first-eclipse-plug-in-for-xi
    http://sourceforge.net/projects/xi-plugins-sdn
    http://weblog.cemper.com/a/200309/25-sap2java-generator-eclipse-plugin.php
    http://eclipsesap2java.sourceforge.net/
    Message was edited by: Barry Neaves - added links to Eclipse plug-in and information.

  • Adaptive RFC use in test/dev systems

    The Adaptive RFC model requires a msg.server for metadata. Does that mean it can't be used in test/dev system where there is only an app server? I find that hard to believe.
    Secondly, during the creation of JCO Connections in the webdnypro content admin tool, the drop down boxes for message server and application server are empty. where is this data defined? saplogon.ini + ...drivers/etc/services files were copied to the WAS/SLD host machine.
    Furthermore, is the Adaptive RFC the best way to use SAP data (called from function modules) in a webdynpro?
    Thanks,
    faB.
    Message was edited by: faB

    Hi,
    1.Even in development system you have centrall services, and as part of this you have a message server. So you can use Adaptive RFC model in development sysetems without any problem.
    2.Regarding you second question: you should define you application system in SLD before using JCO destinations. Just search for SLD in this forum and you will fine the how to configure it.
    3. AFAIK, Adaptive RDC model <b>is</b> the best way (it's better to say the <b>proper</b> way) to use your SAP application system in the WAS context.
    Hope it helps.
    Victor.

  • Adaptive RFC Model vs. Adaptive Web Services Model

    Hi All,
    I would like to compare Adaptive RFC Model and Adaptive Web Services Model
    What are pros and cons ? What kind of data can be transferred in both models?
    Is there any literature out there (I don't mean tutorials on usage, I've seen those)?
    Thanks, Johannes

    Hi Johannes,
    Go through below help documents.
    Adaptive Web Service Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b04308ed-62d5-2910-b3a6-c26771b1c78e
    Do and Don't with Adaptive RFC Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
    Benefits and important infomation about the Adaptive Webservice model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Once you go through the above mentioned documents, you will understand which one to use in which scenario.
    Thanks
    Krishna

Maybe you are looking for