Webdynpro Table  help

Dear webdynpro gurus,
I have a scenario where i should create a table with with 3 columns with 5 rows each and all fields should be input field,but when i cretae the table  all the fields are i disabled as text view and i cannot enter any values to it,so how to acheive it,PLZ help me
Thanks,
sathya.

Hi,
This is because their is no elements in the node which is bound to the table.
Following are some of the ways to make it editable.
1) Make the cardinality of the node boubd to the table as 1..n , So that atleast the first row is editable when the screen is launched.
2) Create an element of the node either in the init or create a button called add row and code as follows
wdContext.node<YourNodeName>.createAndAddElement();
Regards
Ayyapparaj

Similar Messages

  • Currency Key Reference field in WebDynpro Table Column

    Hi Experts,
    I am using a WebDynpro table (not ALV) showing multiple currency fields in a single row - each one potentially referencing a different currency key e.g. Japanese Yen and USD in a single row.
    My currency context attributes are already defined as currency types, but how can I assign different currency key references to each of my currency context attributes? Or is this somehow done as a property of the table column UI element?
    Thanks for your help,
    Peter

    Hi Kris,
    You answer is very helpful, but I do have a question about going the DDIC route. So you are saying that if I take a DDIC structure into my context with multiple currency keys as reference fields for multiple currency fields, then my WebDynpro context will know exactly which currency key is the reference for which currency field without having do do this programatically as you described? If that's true, can I bring a whole DDIC structure over to the context and then delete the 'Dictionary Structure' refrence from my context node, so that I can add my own additional fields to the context node?  E.g. in the case of DDIC structure VBAP can I get all my currency fields and their reference fields from the DDIC from VBAP and then delete 'VBAP' as a 'Dictionary Structure' from my context node and add my own custom fields. The fields I would have brought in from VBAP still retain their type and everything after the deletion of 'VBAP' as a 'Dictionary Structure', so my question is will it also retain the node_info of what currency key goes with what field?
    Please let me know if you happend to have done this before.
    Thanks,
    Peter

  • Oracle - Webdynpro Tables

    hi experts,
    How to Store and fetch the data from oracle BD and  after fetching i want to display that result in webdynpro table and storing is also from webdynpro view interface.
    can anybody help me on end to end procdure how can i achive.
    Advance Thank you,
    vijai

    Hi vijay,
              <b>  using EJB and connect with oracle.</b>
    the step by step procedure is follow how to connect with oracle
    1) Open the J2EE perspective
    2) Create an EJB Module project
    3) Right click on ejbModule, create a new EJB (select your EJB type)
    4) While creating the ejb itself, you can add business methods by clicking ‘Next’ in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select ‘propogate to local & remote’.
    5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: “MyJndi”.
    6) Right click on the EJB project and add ‘classes12.zip’ file (provided by Oracle) to it’s build path. (under libraries tab). Also check the same file under ‘Order & Export’.
    7) Create an Enterprise Application project.
    8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
    9) Right click on the EJB project, select ‘Build EJB Archive’
    10) Right click on the EAR project, select ‘Build Application Archive’
    11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
    • Java Build path - select the EJB project from ‘projects’ , check the selected project under ‘Order & Export’
    • Project references – select the EAR project
    • WebDynpro references – select ‘sharing references’ tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
    You can find the vendor name under ‘application-j2ee-engine.xml’ file of the EAR project. By default it is ‘sap.com’. So if my EAR project’s name is ABC, my entry would look like ‘sap.com/ABC’
    12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
    InitialContext context = new InitialContext();
    Object obj = context.lookup("MyJndi");
    MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
    MyEJB mybean = home.create();
    int a = 0;
    a= mybean.add(10,15);
    wdContext.currentContextElement().setSum(a);
    where ‘MyEJB’ is my EJB name and ‘MyJndi’ is my JNDI name
    To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    i hope that the above steps are useful for u.
    Regards,
    P.Manivannan.

  • 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

  • WebDynpro Table Contents to  Adobe:

    Hi ,
       I have WebDynpro Table element containing lots of data and on click of button it has to open in Adobe and display all the contents in Adobe Table. The problem is that i receive only one record which is lead selected in WebDynpro table. In Adobe i used one Subform ( Content type is flowed) and a table element.
    Expecting right ans.
    Thanks
       Vinod V
    Points waiting.

    Hi, Vinod,
       Really its surprising. Everything is fine, then y its not working. here I have created a sample application regarding u r problem. Its working fine. While i am giving Updatepdf it shows only one record. In generate pdf, It shows all the records. Possible, Try to create your Interactive form again as its a simple one.
    GS

  • How to make 2 lines in a webdynpro table cell?

    Hi
    Is it possiable to create a WebDynpro Table Call that can contains 2 lines in 1 cell ?

    Hi Ami,
    There are a limited number of UI elements that you may use for a Table Cell Editor, however, with a TextView, you can display text that includes a line break.
    The line break is achieved by including the carriage-return-line-feed characters in the Table's data source...
    LOOP AT lt_flight_tab ASSIGNING <f>.
         CONCATENATE 'Line One' cl_abap_char_utilities=>cr_lf 'Line Two'  INTO <f>-test.
    ENDLOOP.
    Cheers,
    Amy

  • Pagination in Webdynpro Table

    Hi Colleagues.
    Im using NW 7.0 Java webdynpro
    Can I use dynamic pagination for java webdynpro table. I found an article explaining the same with NW7.1.
    Is there any option the functionality available in NW 7.0
    Thanks
    Bala

    Hi
    PLease check this article link
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0d6c30a-c99e-2b10-f09b-c9a00b7e78c6&overridelayout=true
    Also check this blog link
    /people/bertram.ganz/blog/2008/11/27/web-dynpro-java-table-paging-unleashed-optimizing-heavy-table-performance
    Regards
    Ruturaj
    Edited by: Ruturaj Inamdar on Jul 31, 2009 1:32 PM

  • Regarding excel file download from webdynpro table element

    Hi All,
            I want steps to do excel download from webdynpro table element.
    Thanks in advance.
    Regards,
    Muneesh Gitta.

    Hi Gitta,
    There are 2 ways in doing it, one is using GUI DOWNLOAD FM or using class clwd_runtime_services.
    DATA:
        node_node_alv                       TYPE REF TO if_wd_context_node,
        elem_node_alv                       TYPE REF TO if_wd_context_element,
        stru_node_alv                       TYPE wd_this->element_node_alv,
        itab_node_alv                       TYPE TABLE OF wd_this->element_node_alv..
    navigate from <CONTEXT> to <NODE_ALV> via lead selection
    @TODO handle not set lead selection
      IF ( node_node_alv IS INITIAL ).
      ENDIF.
    get all declared attributes
      node_node_alv->get_static_attributes_table(
        IMPORTING
          table = itab_node_alv ).
      DATA:
        node_file_download                  TYPE REF TO if_wd_context_node,
        elem_file_download                  TYPE REF TO if_wd_context_element,
        stru_file_download                  TYPE wd_this->element_file_download ,
        item_fname                          LIKE stru_file_download-fname.
      navigate from <CONTEXT> to <FILE_DOWNLOAD> via lead selection
      node_file_download = wd_context->get_child_node( name = wd_this->wdctx_file_download ).
      get element via lead selection
      elem_file_download = node_file_download->get_element(  ).
      get single attribute
      elem_file_download->get_attribute(
        EXPORTING
          name =  `FNAME`
        IMPORTING
          value = item_fname ).
      CALL FUNCTION  'GUI_DOWNLOAD'
        EXPORTING
          filename                        = item_fname
        FILETYPE                        = 'ASC'
        TABLES
          data_tab                        = itab_node_alv.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    OR
    check this blog for
    Re: Export to Excel Sheet functionality

  • Webdynpro table features

    Hello,
    I have a couple of clarifications on webdynpro table features.
    1.webdynpro table heading currently comes only as one row.Is it possible to store the values in 2 rows.?
    2.I would like to incorporate scrolling on webdynpro table both horizontally and vertically.Whe scrolling is incorporated vertically,is it possible to keep the header always on the screen,even when the webdynpro is scrolled down?
    regards
    Joh

    Hi,
    Check this link,
    Re: WebDnpro Table + Scroll
    John

  • Webdynpro table with dropdow list

    hi experts,
    i wanna webdynpro table rows have their dropdow list,and each row have it's own list values
    how can i do
    best regards
    zlf

    Hi,
    I hope you already have a Solution, if not try the following:
    1-Create a node"table"(0-n) in the context_View
    2-Create 2 attribute in this node.
      - The first"List_atr" to show the list
      - The second "save_atr" to save the value selected from the list
    3- Create a Table in the Layout_View, bind it dateSource to the node"table" in context_view
    3.1- Add a Column in the Table (Layout_View),
         + add a TableCelEditor "DropDownByKey" elt to this Column,
         + bind the "selectedKey" of this Elt to  the first"List_atr" in the node"table" in the context Node
         + Add a eventhandler(method)"onvalSelected" to the Events "onSelect" of this elt
    3.1-implement the method "onvalSelected"
        here tel ur view ctrl to save the value selected in the second "save_atr" in the context_View
    example code:
               wdContext.currentTableElement().setsave_atr( wdContext.currentTableElement().getshow_atr());
    So if you know how to populate the first "show_atr" with some list, coo. So if the user selected one value in the dropdown list, the method will save it in the cell of the table row and so on for each rows.
    If you have another questions just asked.
    Best Regards
    Glap

  • How to Sort single column in webdynpro table

    Hi all
    I have requirement as follows.
    i have webdynpro table with the following columns like Date,firstname,lastname,address etc.
    now when i run the the application the table is populating the data at runtime that is fine.
    i need as soon as table is loaded , Date field in the table should be displayed the values in the decending order...i have the requirement as follows...
    how to sort the single column in table ...by default the values of the column displayed with decending order as soon as table displays at runtime....i dont want to click any button specific button to do the sort for that column
    Regards
    bindu

    Hi, I solved the same problem by modifying the sort() method in the default TableSorter class so that it takes a column id and direction rather than an event.
    I assume you have read the TableSorter tutorial.
    Like this. (This was done on nw ce 7.1 btw but may work on older versions as well.
    Oh and then you just call the sort method right after you have made the request
    //Code that goes into controller/view to execute sorting
    wdContext.currentContextElement().getPensionplanTableSorter().sort("MyColumnId", "Up", wdContext.nodePensionPlan());
    //Part of TableSorter.java
    //The original method that needs an event. Now it just calls the new method
    public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
         // find the things we need
         String columnId = wdEvent.getString("selectedColumn");
         String direction = wdEvent.getString("sortDirection");
         sort(columnId, direction, dataSource);
    //This is the new method.
    public void sort(String columnId, String direction, IWDNode dataSource) {
         if (columnId == null || direction == null ) {
              return;
         IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
         NodeElementByAttributeComparator elementComparator =
    (NodeElementByAttributeComparator) comparatorForColumn.get(column);
         if (elementComparator == null){
         //not a sortable column
              column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
              return;
         // sorting
         elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
         dataSource.sortElements(elementComparator);

  • WebDynpro 中Table的column的换行.

    dear all.
            WebDynpro 中Table的column的长度太长了,有没有换行属性?
    Edited by: Leo Wang on Jan 19, 2009 7:31 AM

    首先要把Table的width属性设备成一个定值,或者将TableColumn的width属性设成一个定值,然后再将Column中的TableCellEditor设成TextView,然后再将TextView的wrapping属性设成true,当TextView中的文本长度超过了Column的长度后,TextView就会自动换行,这样就可以达到换行的目的了。

  • Anymore example of  WebDynpro table to Excel format

    Hi, experts!
    These day I am interested in Webdynpro for java.
    But I am not good at java
    Who can give me easy example for  WebDynpro table to Excel?
    Thanks in advance!

    HI,
    Please post this [WebDynpro For JAVA forum|Web Dynpro Java;. You have more chances there to get a quick reply.
    regards
    Senthivel

  • RFC data  into WebDynpro Table based on Page selected by user in Portal

    Hi All
    I am new to webdynpro. we are developing an application in which we are supposed sent two parameters to RFC to retrive data. Two parameters are Role (plant) and page names(Sub - plant).
    Finally there should only one RFC for whole application which takes parameters when user selects a role and page inside a role.
    How can I do this. Please help me.

    Hi,
    1. Develop an RFC at the backend SAP system, which takes in 2 input ( plant and sub-plant) and gives the list of results as a table.
    2. Create a model in the WD Java application to call the RFC.
    3. call the rfc, get the output and print the result in a table designed in the view.
    There is a sample application which can be found here
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/creating%20a%20web%20dynpro%20application%20accessing%20abap%20functions.pdf
    This does a similar application which you are trying to do. This takes in 2 input parameters from the user 'Departure city' and 'Arrival city' and prints the list if flights. If you go thru this sample application, you can develop urs very easily.
    You can even get the source code of this project in the following link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15 [original link is broken]
    Click 'download from SDN' in the link above.
    Hope this helps you
    Regards,
    Sharadha

  • WebDynpro, Table, selected rows, multiselect

    Hi together,
    I've got a problem with my "table-control" in WebDynpro.
    I just want to read the selected rows in the tablecontrol.
    To read one row is no problem:
    wdContext.currentnode.....
    But if there are more selected rows I don't know how to handle. Could I use the Context-Node, or do I have read the Table-Control-Attributes ? And how ?
    Please help me.
    Thx a lot.
    Greetings
    sb

    You have to look at the selection of the context node used as table data source. The selected elements are given by
    node.getCurrentElement() -> the lead selected element
    node.isMultiSelected(i)  -> if element at index i is part of multiselection.
    Armin

Maybe you are looking for

  • How to get another jsp by clicking a h:commandLink in jsf page

    Hi, I am new to JSF. pls send sample code me how to get another jsp by clicking a commandLink in jsf. SUB: TO go to the page "report7.jsp" -->By getting help from samples i wrote for above in 2 ways. 1) <td><h:commandLink id="RO0007" action="r7" >Sha

  • ITunes not accepting any of my credit cards

    I have tried 5 different cards and repeatedly re-entered the billing info and each time I try to purchase a gift certificate I am told the card was declined. All the cards are valid and useable. What is the problem?

  • Moving rented movies to Apple TV

    I rented a movie on my IMac but when I tried to watch on my Apple tv it doen't appear. i can see the ones I've bought but not the ones I rent. How can I watch rented movies on apple tv?

  • Jitter Analysis Toolkit - Time Interval Error.vi

    Hi, I am having a requirement to find the Time Interval Error. I found that functions under jitter analysis toolkit is capable of finding the TIE(Jitter). I am not sure how to use these functions for my requirement. My requirement is: I will read the

  • Lost WEP password, can't establish AP connection to my iPod and PS3. using AP built into my MacMini.

    I have been using the built in Airport features of my Intel Mini, running OS10.6.8. to provide internet access to my iPod and PS3.  The Mini itself is connected via Ethernet and all is good on that end.  However, wIthout warning iPod 7 PS3 began aski