Webdynpro context: (invalidate)

Hi there,
My application consists of 2 DC's:
-a data DC in which all the data models are contained
-a bupa DC in which the models are used, and implementation of context, plugs etc are done
When I update a BuPa via my application the values are updated in the abap backend, but when I navigate my application the old values are still shown.
When I refresh the application, the new values are shown..
So what to do to ensure that the newest values are always shown?
I tried doing this with wdContext invalidate (so it will recall the supply function) in the following way:
public void TriggerBuPaMyAccounts( )
    //@@begin TriggerBuPaMyAccounts()
     myAcctsInput = new __Cernum__Crm_Bb_Bupa_Myaccounts_Input();
     myAcctsOutput = new __Cernum__Crm_Bb_Bupa_Myaccounts_Output();
     try{
          wdContext.nodeOutputMyAccounts().invalidate();
          myAcctsInput.execute();
     catch(Exception e){
          msgMngr.reportException(e.toString(), false);
          msgMngr.reportSuccess("error: " + e.getCause());
     myAcctsOutput = myAcctsInput.getOutput();
     this.wdThis.wdGetContext().nodeOutputMyAccounts().bind(myAcctsOutput);
    //@@end
But that didn't help. Did I do anything wrong or...? Any suggestions?
I would rather not use wdContext.reset, or is that 'safe'? If I had to implement that, where should I do it?
Thanks!
Kind regards,
Allan

Hi Allan,
The model defines which connections you use. One model (normally) has its own connection, which is used over and over again in one webdynpro application, as long as you do not close it.
You have to close the connection in the method where you change the data in the backend
Like this:
public void TriggerBuPaMyAccounts( )
    //@@begin TriggerBuPaMyAccounts()
     myAcctsInput = new __Cernum__Crm_Bb_Bupa_Myaccounts_Input();
     myAcctsOutput = new __Cernum__Crm_Bb_Bupa_Myaccounts_Output();
     try{
          myAcctsInput.execute();
             myAcctsOutput = myAcctsInput.getOutput();
             this.wdThis.wdGetContext().nodeOutputMyAccounts().bind(myAcctsOutput);
     catch(Exception e){
          msgMngr.reportException(e.toString(), false);
          msgMngr.reportSuccess("error: " + e.getCause());
     }  finally {
       DynamicRFCModel modelinst;
       modelinst = (DynamicRFCModel) WDModelFactory.getModelInstance(BuPaMyAccountsModel.class);
     modelinst.disconnectIfAlive();
    //@@end
Note: This code seems to read the data. I am talking about a finally clause when writing the data.
J

Similar Messages

  • Round trip clearing adobe form field values not binded to webdynpro context

    Hi ,
    I have developed a webdynpro ABAP application with Interactive form. I'm calling a webservice on 'exit event' of the one of the form fields. Once webservice is executed, Im filling a table with 300 rows which is in the form. The table fileds are binded to webservice fields from the dataview of the form , these are not webdynpro context attributes in the data view.
    But when I open any seach help , this table values are disappearing. I need to execute the webservice again to get the values.
    can any one tell why the values in the table are disappearing? since I have binded to the webservice fields the values should remain there.
    Apprecaite your response.
    Regards,
    Ravi

    I looked over that note yesterday, but too quickly - i thought it was an older note explaining which standard programs to run to test out the connection etc...
    but i see now that there is an important point:
    The "pdfSource" attribute of the InteractiveForm UI element should be linked only if the Web Dynpro ABAP application requires the PDF document for further processing (saving data to the database, and so on). However, it is mostly only the data entered in the interactive form that is relevant for the application. If this attribute is linked, the Web Dynpro ABAP framework must request an updated PDF document from the Adobe document services each time data is changed in the form.
    It looks like this is saying that a round trip is possible in WDA.
    EDIT - I wish SAP would fix this certificate issue. My first post every day is doubled because of it.
    Edited by: robert phelan on Jan 7, 2010 3:22 PM
    Edited by: robert phelan on Jan 7, 2010 3:25 PM

  • Webdynpro context not available in Interactive form layout

    Hi,
    I have take one Interactive form element and provided the Tempalte Source (new formanme) it asked me to create the pdf interface i give the interface name, and,selected the context then save it. pdf layout design is opend but there is not context which i have mapped from wd in pdf.
    where as if i use sflight in webdynpro context node, it is working ( i can see the dataview of sflight in pdf layout) but not in case of z*structures any reason please let me know.
    Thanks,
    mahesh.gattu

    What is the datasource of your UI interactive forms.
    data source is the context of the webdynpro view.
    as i described earlier, i am assigning the context when creating the form interface.
    once it is done automatically datasource will be binded with context ndoe.
    i am getting one more problem,i selected enable check box to become interactive form even though the form is not become interactive why.
    even i tried with activex/native both also.
    thanks,
    mahesh.gattu

  • How to update a webdynpro context node from flex ?

    Hi
    I have an table in webdynpro and a datagrid in flex, both getting the value from the same context node. My requirement is to make the table fields editable and when I make changes in the datagrid, it should get reflected back in the webdynpro table.
    So how can I access the internal table's context node from flex ?
    Can anyone help me with this.

    Hi,
    As you are using a datasource, i assume you have set method in flex to read the datasource(context node). What you need to do is store the reference to this datasource in a local flex variable. Have a look at the below code:
    private var refreshFlexUINode:ArrayCollection;
    public function set refreshFlexUI(datasource:ArrayCollection):void
        refreshFlexUINode=datasource;
    and say you want to edit one row of the table, get that row from ArrayCollection and assign the new value.
    it would be like, if you want to save second row of the datagrid
    Object obj = refreshFlexUI.getItemAt(1)
    obj[<CONTEXT_ATTR_NAME>]=<new value>
    Hope this helps!
    Best Regards,
    Srilatha
    Edited by: Srilatha M on Jun 28, 2011 6:34 AM
    Edited by: Srilatha M on Jun 28, 2011 6:35 AM

  • Webdynpro Context mapping problem

    I have created a Webdynpro component(A) in which i am getting details from the BAPI(model) and I have exposed this component as a public part and I am using this component in another webdynpro component(B).
    In the second webdynpro component(B)  I have an iview and i have made context binding with above Component(Used Webdynpro component).  and in my iview there was an table.
    when i am doing the context binding in the layout its giving error ""Error for UI Element with Label _____" Select an attribute of type String."
    I am using NWDS 2.0.14.  Has anybody facing this problem?

    Hi,
    It seems to be a corruption in the metadata for  the views.
    Or else you might have missed some bindings
    If possible, Go to the Problems view and find the details of the error. Double on that to fix it.
    Regards
    Ayyapparaj

  • Dynamic webdynpro context mapping in GP

    Hi Experts,
    I have created a webdynpro coponent which contains a Dynamic node as a Gp context Output parameter.
    This Dynamic node is mapped to another WD callable object's GP context input parameter.
    Will i be able to transfer data using this dynamic node between these two WD callble objects?
    Regards,
    Ashish Shah

    Hi Shanto,
    This is how i plan to use these dynamic nodes
    i have total 4 WD callable objects
    1) A - Data capture Component
    2) B- Request Component
    3) C- Approver determination Component
    4) D- Approver Action component
    Requester enters data in component A in a static node N1, passing data to dynamic node DN1
    Data input node in component B will be a dynamic node DN2 which will be mapped to node DN1
    Component C will have a Dynamic node DN3 getting data from DN2
    Component D will have a Dynamic node DN4 mapped to node DN3 , from DN4 data will be mapped to static node  N2 and will be utilized further.
    Not sure whether my plan will be able to utilize these dynamic node to its fullest or not.
    May be you can help me analyze it better.
    Regards,
    Ashish

  • How to get prefilled drop down list in Adobe form from WebDynpro context

    Hi All,
    We all know that we can have dropdown list in webdynpro which can be automatically populated by the context node collection.
    How can we have the same functionality in Adobe form drop down list. I tried to bind the node attribute to drop down list in Adobe form but it shows me only first element. I am not able to see all the elements in the dropdown but if I am doing same thing for WebDynpro DropDown list I can see the complete List.
    Anybody with Solution?

    Hi Ricky
    I have started a thread for this problem and got an answer for it already. Unfortunately I did not have the time to check it out yet; have a look over there:
    https://mail.cirrus.ch/exchweb/bin/redir.asp?URL=https:///community [original link is broken]
    I appreciate if you tell me whether it worked for you.
    Andreas

  • Bind webdynpro context to txt file

    Hi, I m creating an application using GP API.
    My first callable object creates a .txt report file and my second callable object sends a mail to administrators, with the previously created .txt report file attached.
    I would like to bind the .txt file atatched to the first callable object context, so that, the second callable object can get it.
    The problem is that I do not know how to do it.
    If I use the type com.sap.ide.webdynpro.uielementdefinitions.Resource it will not be compatible with my text file of type File.
    Any idea ? I would realy appreciate your help, since I've looking for a solution for days...
    Thanks

    Of course I can.
    I create the file like this:
    try {
                   mailData = File.createTempFile("mailData", ".txt");
                   mailData.deleteOnExit();
              } catch (IOException e3) {
                   // TODO Auto-generated catch block
                   logme("IOException : " + e3.getMessage());
    I am developping a Web Dynpro DC as a callabe object. I would like to map this callable object to another one that is in charge to send a mail within the txt file attached. This is my business scenario. I know that I can send a mail directly through the web dynpro application but ti is not part of the business rules.
    I cannot bind the txt file to the context, unless it is binary or IWDResource...
    Thanks for your reply...

  • Binding fileds of a PDF to a webdynpro context

    Hi to all,
    I created a pdf with abobe lifecycle designer 7.1 then I imported it in a webdynpro view as an interactive form element. Then I binded the pdf fields with a context in webdynpro view, this context is binded to a RFC model which writes datas on a sap system table. The aim of this project is to write some datas on the pdf and, after pressing a submit button, all these datas will be saved on the SAP system. My problem is that the binding between fields on PDF and view context doesn't work!!!
    Can you help me, please?
    Thank you very much,
    Antonio

    Ok, got it. I suspected you were looking for something a little more dynamic.
    You're correct, APEX doesn't have such feature yet.
    This is still more code than you may want, but would something like this work:
    -- FETCH Process
    begin
      l_page_base := 'P1_';
      for c in (select column_name, column_value from my_table)
      loop
           apex_util.set_session_state(l_page_base || c.column_name, c.column_value);
      end loop;
    end;You'll need all the items created on the page of course, but it's possible to cut down on the code and make the fetch a little more dynamic.
    Then in the Submit I can do an apex_utl.get_session_state(item) and also loop through the elements.
    I've also used this technique.. but it was a pain as I was re-inventing the wheel completely.
    var options = {
        url:       'http://URL_PROCEDURE'
    // The Form "SAVE/SUBMIT" button would NOT submit the page and instead call this code
    $.post(options.url
      , $(this).serialize()
      , function (pJSON) {processResult(pJSON);}
      , "text");
    function processResult (pJSON) {
       var resp = $u_eval('(' + pJSON + ')');
       if (resp.row[0].status == 'SUCCESS') {
           window.location = 'f?p=&APP_ID.:SUCCESS_PAGE:0:';
       else {
           $('#uSuccessMessage').html((ie)?resp.row[0].error : resp.row[0].htmlError);
           // if get got an item, set the focus on it
           if (resp.row[0].item) {
             $('#' + resp.row[0].item).focus();
    }With this technique, the serialize passes value pairs in the URL to URL_PROCEDURE with all the fields on the form.
    It still required a lot of code and you're not really using APEX at this point any more.
    Good luck.
    -Jorge

  • Export  WebDynpro context node  to CSV format?

    I have successfully implemented exporting the context node to xml format then open through the Excel following the tutorial : Exporting Context Data into Excel Using the Web Dynpro Binary Cache.
    But now, I need to implement another version that export to CSV format, then open through Excel.
    I remembered I read a blog and some forum posts that mentioned about this solution, but I just could not locate where they are now through SDN search now.
    I will appreciate if someone can point me to those links again.
    Thanks.
    Kent

    Hi Kent,
    I am also developing the application wherein Table data needs to be exported to Excel.
    I am trying to download the WDExcelExport.zip from the foll. link
    https://wwwn.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/bad3e990-0201-0010-3985-fa0936d901b4 [original link is broken]
    But I am getting the error
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    The exception was logged. Inform your system administrator..
    See the details for the exception ID in the log file
    Can you please send me the Sample Application WDExcelExport.zip. My mail id is  [email protected]
    Regards
    Nikhil Bansal

  • Java WebDynpro context mapping  best practices

    Hi Friends,
    the data to provide in context for every view controller and component controller.. can bemaintained in different ways.
    1. to map the view controller fields with component controller only when it is required at both the places to be accessed.
    rest all fields which do not need to be accessed at both the places may not be maped.
    or:- Whats the advantage of not mapping the fields between view controllers and component controller?
    2.
    instead of fields as value attributes, one Value Node may be used  as a grouping for a particular group of fields. is is best practice to group the fields into value node as per screen grouping?
    for example screen has three sub parts, so three value node.. and each value ndoe may contain different value attributes. which scenario should be consider as best practice?
    Thanks!

    <i>1) Advantage of not mapping is perfomance;</i>
    Very weak argument. There is no any significant performance lost when mapping used (I bet you save less then a percent comparing to "direct" access).
    Just put simple: your business data originates from controller. You must to show it on view, hence the need for mapping.
    Also view may require certain context nodes just to setup and control UI elements. Declare these nodes directly in view controller and you'll need no mapping in this case.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Dynamic table data isn't transfered to the context, with webdynpro for java

    Hi,
    I'm using LifeCycle designer 7.1 and Adobe reader 7.0.5.
    I'm trying to make a dynamic table in a PDF form, that will be related to a table in the context.
    I've designed the context like it says here: Dynamic Table -  same data repeating in all rows
    I made a dynamic table and related the cells on the row to the context, by dragging the variables from the DataView into them.
    The table is related to TableList, the row to TableWrapper[], and the cells are related like this: TableData[].ItemName
    And there's a button which adds a row to the table.
    And for some reason, that's not working; When hitting the Submit to SAP button, it doesn't appear as though the data was transferred to the WebDynpro context.
    Can anyone help me with it please..?
    By the way - I tried using the SAP standard subform controls, the 'Insert Remove Move' control.
    When trying it through the PDF preview, it doesn't work - whatever I click displays an error message, and when it runs from the browser - It automatically searches for an update for Adove Reader (I use 7.0.5).
    Is it supposed to work only with version 8 of the Adobe Reader?

    Well, I reinstalled ACF, and now the Submit button works, and the Insert Remove Move buttons work as well.
    But the table context still doesn't work.
    I had put some values in the context, in DoInit, and they appeared in the table in the form, but when I changed them in the form it didn't affect the context at all.
    There's a simple attribute value related to a text field, which IS affected when changed in the form, and the Submit button is clicked. Only the table doesn't work.
    How can I make it work?
    Thanks,
    Udi Dekel

  • Dynamic form in Webdynpro for ABAP - Context Cardinality question

    Hello -
    I have an adobe form in a webdynpro for ABAP application which I want to be able to be dynamic. Basically I want to be able to use a Webdynpro context node with a cardinality of 1-N and the form will take each node of the context and create a page for each one. I am able to do a static form with a context node that has a 1-1 cardinality, but once I change my cardinality to 1-N on the node the static form no longer works (there is no data). Is what I want to do possible? I've looked through all the documentation I could find and could not get a definite answer. Any help would be appreciated.
    Widget (1-N)
         -Widget_info (1-1)
              *Name
              *Sku
              *Description
         -Widget_plant (1-M)
              *Plant_Code
              *Plant_State
              *Plant_City
         -Widget_pic (1-1)
              *Picture
    ... So I want to have a form which can print a page for each widget in the context (the number of which can vary). That form would have the Name, sku, description, plant_code, plant_state, plant city and the picture on it. (This is just a generic example of what I need to do)
    Regards,
    - Jason

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

  • How to send adobe data to R/3 using Webdynpro Java

    Hi All,
    I have a requirement in adobe form is i have one textfield on the Adobe form and user will enter input in that textfield.
    Now that input should be sent to R/3 using RFC.
    But i am unable to get the data from adobe form to Webdynpro Context.
    I am having model nodes in the Context. i tried mapping to them, but i am not getting data.
    I also tried taking a Value Node and bind that to Textfield in adobe, but in that also i am not getting data.
    I tried Interactive form example for Textfield and submit, but its showing only on that View only.
    My Major Concern is to map the adobe data to Context and then Send to R/3.
    Pls help me out.....
    Regards,
    Dhruv

    Hi Dhruv,
    Why do you want to retrieve the adobe data to context ?
    May be data connection can help you pass the data from adobe to R/3.
    Create a webservice for the RFC function module and mention the link in the data connection in adobe. It updates R/3.
    Priya Kota.

  • How to Display the content of Excel file into Webdynpro Table

    Hi Experts
    I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body please guide me how to read the content from excel and to Display in the Table.
    Thanks and Regards
    Kalyan

    HI,
    Take for example, if Excel file contains 4 fields,
    Add jxl.jar to JavaBuild path and Use this snippet
    File f=new File("sample.xls");
    Workbook w=Workbook.getWorkbook(f);
    Sheet sh=w.getSheet(0);
    int cols=sh.getColumns();
    int rows=sh.getRows();
    Cell c=null;
    String s1=null;
    String s2=null;
    String s3=null;
    String s4=null;
    ArrayList al=new ArrayList();
    int j=0;
    for(int i=1;i<rows;i++)
    ITableElement table=wdContext.createTableElementz
         s1=sh.getCell(0,i).getContents();
         s2=sh.getCell(1,i).getContents();
         s3=sh.getCell(2,i).getContents();
         s4=sh.getCell(3,i).getContents();
                             table.setName(s1);
         table.setAddress(s2);
         table.setDesignation(s3);
         table.setDummy(s4);
         al.add(j,table);
         j++;                    
    wdContext.nodeTable().bind(al);
    Regards
    LakshmiNarayana

Maybe you are looking for

  • Dynamic Tables - sequential numbering

    Hi all, I'm hoping someone out there can help me. I have created a dynamic table with 'add' and 'delete' buttons. My problem is when I add a new row I would like the row (and subsequent rows) to be numbered automatically (in the left-hand column). I'

  • Laser jet P3015 printer problems

    I have a HP P3015 and it defaults to Tray 1, and asking for Glossy paper. There is no paper in Tray 1, and it is shut.  For each print job, I have to press OK to change print trays, and OK again to print.  How can I clear these settings so that the p

  • HT4106 Lightning to USB adapter.

    Lightning to USB adapter. When I plug into iPad mini with nothing attached to it I still get that error message it is drawing to much power. Why?

  • How can I get a count of records in a DB?

    If I want to get a count of the number of records in a table how do I do it?

  • Cache.clear()

    Hi,      I have a question about the behaviour of cache.clear().      I have a cache that is read very heavily and inserted into at a much lower rate. There is an event that occurs periodically which means that all the keys (& values) in the cache be