Passing values for Table in Adaptive RFC model

Hi ,
I am new to WebDynpro ,I have a requirement I need to pass a table for the back end BAPI, the table has two columns say (column1 and column2), before calling the BAPI I need to fill values in the column1 and the when the BAPI returns it should fill the column2 values, Is this possible to do, If so do I need to call invalidate for the values to get reflected after the BAPI returns??
Can some one send me the sample code as to how to do this??
Regards,
emrin.

Hi,
After creating model and context mapping to table,
u write the following code in component controller,
WD Doinit();
Bapi_Flight_Getlist_Input bap=new Bapi_Flight_Getlist_Input();
    wdContext.nodeBapi_Flight_Getlist_Input().bind(bap);
    try{
    wdContext.nodeBapi_Flight_Getlist_Input).currentBapi_Flight_Getlist_InputElement().modelObject().execute();
         wdContext.nodeOutput().invalidate();
    catch(Exception e)
         e.getStackTrace();

Similar Messages

  • 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

  • Changing the default logical system names for adaptive RFC models

    Hello,
    When I create an Adaptive RFC model the dialog that asks me to specify the model name, package, source folder, etc. has default values in the "Default logical system name for model instances" and "... RFC metadata".
    I know I can type in another name there but I'd like to change the default name to something that fits our naming conventions. Can I change that? If so, can someone tell me where?
    Thanks in advance!
    David.

    Suresh,
    Thank you for your response. However, that is not what I was looking for. Sorry if my post was not clear.
    I knew that I could change it AFTER the import. I also know that I can type in something else besides the default DURING the import.
    What I am asking is if there is a way to change some configuration setting so that the 'default' that comes up in the drop down DURING the import is something different than what comes 'out-of-the-box' with NWDS.
    Hope that clears up what I'm looking for.
    David.
    Message was edited by:
            David Z. Pantich

  • Metadata Cache Invalidation for Adaptive RFC Models

    Hi,
    I’m trying the tutorial of the document: Metadata Cache Invalidation for Adaptive RFC Models.
    I’ve downloaded and deployed the EAR for NW7.0 on my server, but when I try to list the JCO destinations I have the following error:
       java.lang.NoSuchFieldError: flush_cache
        at com.sap.invalidation.InvalidationView.onActionGetSLDJCOs(InvalidationView.java:215)
    When I try to invalidate a dictionary, I have the message:
    Cache for Dictionary com.unilog.product.search.model.types.SearchProductModel invalidated
    But the tooltip value is not updated in my application...
    Can anyone give me some tips to use this component?
    Thanks in advance.
    Regards,
    Claire

    hi friends
    u see  this weblogs&pdf,this is helpful for u
    /people/bertram.ganz/blog/2007/01/08/the-top-12-hottest-sap-notes-every-web-dynpro-java-developer-must-know
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f3f93ee7-0c01-0010-2593-d7c28b5377c2
    Regards'
    vino

  • Why SLD for Adaptive RFC Model?

    Hi,
    Is it necessary to configure the settings in SLD in order to run an adaptive RFC Model or does one have alternatives?
    Because, while defining an adaptive RFC Model in NW-Dev-Studio, one does explicitly enter the SAP Log on information.
    Regards
    Meesum

    Hi,
    SLD is required to run the RFC application.
    At design time there is no dependency on SLD and we are not going to specify SLD details during the model import.
    Runtime will pickup the connection info from ContentAdminstrator where we will point to SLD.
    Regards, VIP

  • Error while using Adaptive RFC model

    I am  using adaptive RFC model to consume a function module from BI system. The function module expects a Boolean input. While executing the function module we need to give u2018Xu2019 for that input. When I consumed the function module in the webynpro java project , used it and give the input as u2018trueu2019 on runnig the application it gives the following error: u201Ccom.sap.conn.jco.ConversionException: (122) JCO_ERROR_CONVERSION: Cannot convert a value from type java.lang.Object to CHAR at field I_READ_ATTRu201D
    There is corresponding dictionary type created called u2018BOOLE_Du2019 but I could not access the dictionary type in the controller java file.
    Is there a way to rectify the same or any workaround condition?
    With regards,
    Sougato.

    Hi saurabh,
    I need to give the value from webdynpro. Hers is the sample code.
    rssem_Cha_Values_Get_Input.setI_Read_Attr();
    // It expects a boolean value but if i pass a value to the method the obove error is show.
    Where as there is a simple type "Boole_d" generated when i consumed the RFC in the webdynpro.
    but i couldn't access this simple type in the code.
    With regards,
    Sougato.

  • Problem in displaying a field in webdynpro using Adaptive RFC model

    HI,
    I created a webdynpro application using adaptive RFC model and i have a problem in displaying one of the output fields.
    When i execute the function module it is giving the exact value for my output field in this case telephone number (of type STEXT which is char with length 40).But when i am trying to display that telephone number in webdynpro application it is taking only first 4 digits.
    i deleted the model and recreated it still it doesnot work.
    please let me know how to resolve it.
    points will be awarded for sure
    Bala

    Hi Bala,
    Whenever you reimport the model server restart is necessary otherwise the changes will not get reflected. You will get an error when you deploy the application.There is no go around except restarting the server as the meta data gets cached in the server as long as the server is runnig.So, Once you restart the server the cache will be cleared.
    Check once again whether you are fetching data from correct BAPI field. Still problem persist try debugging.
    Regards, Suresh KB

  • Exception with Adaptive RFC Model: WDDynamicRFCExecuteException

    Hi All,
    I have created an Adaptive RFC Model and called the RFC in my Coding the standard approach that used to work before. Now, I keep receiving the following exception when executing the modelObject.execute() Method.
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException
    Does anybody know what going on? I am calling an RFC that works well and has been able to be called as an RFC before...
    Is this somemthing related to the framework? Do I need a supprt package or so? Am I doing soemthing wrong?
    Thanks, Johannes

    Hi,
    Place a break point in the BAPI in SAP and try to execute the application and see if the break point is triggered and check what is the output value passed back to  the application.  If this works fine then there should be no issue in the RFC side, else need to find out what is happening in the webdynpro application side.
    Regards,
    Manjunath

  • Issue with adaptive RFC model - BAPI

    Hello,
    I created a simple web dynpro application (as a DC project in NWDS) which is using a bapi in an adaptive RFC model.  I based my developments on the official tutorial from SAP and followed each and every step.
    The first view shows a single field and an action button to trigger the bapi call.  Based on the value entered (employee number), the other view should display a list of data (addresses).
    The problem is that after I press the action button, it doesn't make it to the next view.  The animated web dynpro icon shows up briefly but the page stays on the first view.
    I've monitored user activity on the back-end (SM04) and noticed some activity for my user after the button is pressed so I assume, there is no connection issue.
    Any help to solve that issue will be greatly appreciated!
    Thanks,
    Laurent

    Hi,
    Regarding navigation between different view in an WebDYnpro project please have a look into this very good tutorial... and this will solve your navigation problem..
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a137c339-0b01-0010-a688-a87b88706845">How to Navigate Inside Web Dynpro Component Interface Views</a>
    and if need any help regarding Adaptive RFC in WebDynpro.. let me know.. Please reward points if helps..
    Thanks and Regards
    Avijit

  • Error while creating a Adaptive RFC Model

    Hi all,
    I am trying to create a Model using a Adaptive RFC Model, I assign a Model name and the logical system names, enter the details in SAP Logon Information for the Single server,here it gives me a Gateway error. What could be the issue here?
    NB: In the Host Name , I tried with both the Host name of the r/3 server and also with the SAProuter string ( as we have the server at other place) ,still it doesnt work. and I am able to login to the R/3 system from the SAPLogon GUI from my desktop normally.
    Is there any issue of the firewall related to this, if so whats the port number that should be opened so that i can connect to the r/3 system get the list of BAPIs present there into my Webdynpro application .
    Need help on this
    Regards,
    Vijay

    Hi Lohi n Gopi ,
    I have checked out with the your given suggestion of trying with the host name as well as  IP address and also typing all the details,without copy pasting the details . In both the cases it gave the " Connect to gateway failed " error mesg.
    But one intersting thing here that i observered when trying with hostname, IP address, or SAProuter string is as follows .
    <b>with IP address</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="ipaddress",GWSERV=sapgw10,ASHOST="ipaddress",SYSNR=10
    LOCATION CPIC(TCP/IP) on local host
    ERROR      patner not reached(host "ipaddress",service=3310)</i>
    <b>with SAProuterString</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="SAProuterString",GWSERV=sapgw10,ASHOST="SAProuterString",SYSNR=10
    LOCATION SAPRouter on " some HostName"
    ERROR      hostname unknown</i>
    <b>with HostName</b>
    <i>Connect to SAP gateway failed
    Connect_PM GWHOST="hostname",GWSERV=sapgw10,ASHOST="hostname",SYSNR=10
    LOCATION CPIC(TCP/IP) on local host
    ERROR      hostname "hostname " unknown</i>
    Is there any firewall port blocking issue here ?if so , whats the port that needs to be opened ?
    Appreciate your help.
    Thnks,
    NR

  • Login failed error while importing an adaptive RFC model

    Hi there,
    I am trying to import a adaptive RFC model for a BAPI from a 46D system, to which I have connected using VPN from my WAS J2EE server. I have given the login details as Single server(Not load balancing), and given the user login details. However, I am not able to proceed further because it gives me the error 'Name or password is incorrect, please re-enter'. This is strange because I am giving the correct name and password, and I am able to login to this system through SAP GUI using same logon credentials.
    I am confused as to what it is expecting to move forward. I have tried changing case of the user name, restarting my WAS etc. The client is correct, and the login language is EN.
    Could anybody have any clues or have you faced a similar problem?
    thanks in advance,
    LM

    I have had the same problem.
    I think whoever programmed the logon routine at that point should be fired immediately and banned from programming for life! Logging on is a very basic and well-understood task, and programmed gozillions of times since 1940s. Common sense and unwritten rules of programming dictate simply if you make something case-sensitive, then you should accept an input in its original form (i.e. password in smalls, or whatever) but not change it to uppercase and then work case-sensitively. Either this, or you program everything case-insensitively.
    Fire that programmer or give him to us gollumvoice

  • How to find out the destination of an "Adaptive RFC Model - DEPRECATED"

    Hi All,
    How to find out the destination of an "Adaptive RFC Model - DEPRECATED" of an running application
    and Where is the destination created in the server .
    I have got the code of the running project from NWDI .
    Thanks in Advance
    Regards
    Piyas Kumar

    Hi,
    I am not sure I fully understand the question, but as per the guide
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f7192d-2808-2d10-189b-df3fa5f71abf
    Excerpt from Page 7
    Caveat Confector!1
    ARFC1 destinations were created using the Web Dynpro Content Administrator tool. This tool is
    still available for compatibility reasons, but the destinations it creates are not used by ARFC2
    models!
    Instead, you should use the u201CDestinationsu201D tool found on the Configuration Management screen of
    the NetWeaver Administrator.
    Therefore I think if you look up the application in the WD content Admin, there you can find out what kind of JCO/RFC connections are belonging to it. You can find it on http://<host>:<port>/webdynpro/dispatcher/sap.com/tcwdtools/Explorer
    Browse your application here, and then select the JCO Connections tab on the right hand side.
    I hope this helps.
    Best Regards,
    Ervin

  • Importing adaptive RFC model in NWDS CE 7.1 doesn't work

    Dear all,
    I am unable to create an adaptive RFC model in my Web dynpro DC in NWDS CE 7.1.
    This is what happends:
    I select create model from the web dynpro, fill in name and jco destinations on the first page and move to the second page where I fill in SAP login information.
    After clicking next I come to "Select RFC modules", but I never see the studio logging in to the server system. The result is that I dont find any function modules when i click search.
    I am new to NWDS 7.1 so I suppose there is a setting that I have missed.
    Have anyone else experienced the same problem and solved it?
    I currently have an old SAP system (NW04) and a new system (NWCE7.1). On my PC I have installed NWDS 04 and NWDS CE7.1. The old studio can connect to both the new and old backend system just fine but the new studio cant connect to any of them.
    I am very grateful for any help or pointers in the right direction.
    Sincerely,
    Richard Linnander

    Never mind. I solved this myself.
    It was caused by DLL-hell. I was running an old version of librfc32.dll that was for NWDS 04. Works fine with the version that comes fresh with install of NWDS CE 7.1

  • Error in Import Adaptive RFC Model

    Hi SDN,
    I am trying to develop an application using Import Adaptive RFC Model, while creating a model i could not able to connect to the backend system after giving the single server parameters. When i click on the next button a pop up is displayed with an error message *"User Name or Password wrong" *.
    But i could able to login to R/3 with the same userid and password from SAP logon pad.
    Really i am at Six and Seven's to trace out this error. Please suggest me how to overcome this error and create the model succesfully.
    Regards
    Basha

    Hi Praveen & Chaitanya
    Thanks for your quick response and informative threads.
    Actually in order to import an adaptive rfc model
    I have right clicked the model node to create a model and given the model name,package name,model data and metadata names and clicked next button. Then in the next screen
    Tab Strip -> Single Server:
    Host name :
    System Number :
    client details:
    Tab Strip -> Load balancing:
    System :
    Message Server:
    System Name:
    Group:
    (in Tcode: SLMG i have added the group public also)
    client details:
    After entering the required details either in Single Server or Load balancing and clicked the next button  I could not able estabilish a connection to the backend R/3 and get the list of Bapi's or RFc's. Instead i am getting a pop up message "User Name or Password Wrong". I could not able to proceed from here.
    But with the same above parameters i could able to logon to R/3 from SAP Logon Pad. I have tried by giving the user name in Cap's and small letters but no use.
    As i was strucked at the intial step while creating the model but not during the execution of the program, as far as my knowledge is concerned i think we no need to worry on SLD or JCO connections during the creation of the model. Please correct me if i am wrong and suggest me to rectify the error.
    Regards
    Basha

  • Reimporting of Adaptive RFC model

    Hi all, I have added two fields in the BAPI and i have reimported the Adaptive RFC model in Web Dynpro.
    After running the application and accessing the new fields, i am getting this exception.
    java.lang.ArrayIndexOutOfBoundsException
         at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:10161)
    What could be the reason?

    Hi,
    As the error states MetaData.getType it seems that the new changes are not yet reflected in the J2EE server. You need to restart your engine once. You can search this forum for a workaround  by Valery which doesnot need a restart.
    Regards
    Ayyapparaj

Maybe you are looking for

  • How to add an index to a materialized view in Data Modeler 3.3

    Hello everyone, I'm looking for a how-to to add an index to a materialized view in Data Modeler 3.3.0.747, as I coudn't find a way to do it so far. I looked here: Relational Model Physical Model Oracle 11g Materialized Views "my_mv_name" "INDEXES" IS

  • Price List Issue

    Hi Experts, I am preparing Price List for Item Master Data. I go through procedure as below : 1. Filled Base Price for Item 'A' in Price List. 2. In Spl price for BP selected BP Code '123' and updated price, Set Price List on both header and row leve

  • Problem in Hierarchy

    Hi All,   i am trying to install the SAP standard 'Balance sheet' (0FIGL_VC1_Q0001) query. The query uses the hierarchy loaded from the R/3 system to the characteristics 0GLACCEXT. In that i have a leaf node for charc value '0GLACCEXT' = 'EICA/000400

  • XMLEncoder usage for Java to XML Serialization

    I have recently started using XMLEncoder and XMLDecoder to perform Java Bean to XML Serialization and Deserialization. It seems to break when multiple threads are using XMLEncoder, even if each Thread is using a separate instance of XMLEncoder. I was

  • Territory managemet -- Display relationship

    CRM 7.0 In Territory management, when we slect a rule in a territory and click on the display relationship button, it shows a blank page. what could be the reason ?