Skip to Content
author's profile photo Former Member
Former Member

Binding Model with UI Element drives me crazy

I created a Webdynpro application with a model used a Bapi in SAP. I bind the model with my 2 views, controller. But When I deployed my application, The first input field Pernr is enabled to write but not the other fields, it is not possible to write inside ! But configuration of UI Elements is OK.Well I don't know where to find ! Model ? Controller ?


Well, thanks for your help !



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 12, 2005 at 06:25 PM


    In the BAPI that you use the field PERNR is not a structure. The remaining import parameters in the BAPI are structures.

    I guess you have bound the import parameters directly to input fields. If your cardinality is 0..n or 1..n then you will have that problem when you try to bind to a input field.

    Do the following.

    Lets say we want to read the data from screen and populate the data structure "BAPITRMAIN"

    Lets use these 2 attributes of the structure namely

    1. "DEP_DATE" and

    2. "DEP_TIME"

    Create local value attributes for say "DEP_DATE" and "DEP_TIME"

    Map these 2 local attributes to a input field ui element.

    Then in your event read the values of the 2 attributes

    For eg

    String depdate = wdContext.currentContextElement().getDEP_DATE();
    String deptime = wdContext.currentContextElement().getDEP_TIME();

    Now for passing values to the structure "BAPITRMAIN"

    write code like

    catch(Exception e)
      //Some exception

    Check for the syntax :). Just a approximation of what you need to do.

    Hope that helps you. If this doesnt really answer your scenario let me know you scenario in more detail and i will be able to help you out in detail.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 13, 2005 at 05:37 PM

    Hi Henry

    Could you post the BAPI structure and let me know how you mapped the structure?


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 14, 2005 at 04:42 PM


    I assume that you cannot i/e enter the data for RECEIPTS, ADDINFO, ADVANCE and other data structures for that BAPI.

    If so, this is because these are R/3 Table structures, which are initially empty. In WebDynpro model those are available as separate context nodes with no elements initially. If there is no element accesible the input field which is bound to the element is "blanked out" and cannot be edited. Why - because there is no place that the entered data would go.

    If you would like to add a Receipt to your trip in WD, you would first have to add an empty Receipt element to proper node - for example:

    Bapitrvrec receiptRec = new Bapitrvrec();
    IReceiptsElement recEl = wdContext.nodeReceipts().createReceiptsElement(receiptRec);

    The code above could be entered for example in wdDoInit() method of the controller.

    Hope this helps. In your case the example code might not work just after Copy/Paste. Try then to reorganize imports (CtrlShiftO) and consider context nodes names.




    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.