Create a Table Dynamically in WEB Dynpro Java with diferent type of column

Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)
Thank you everyone
Atte Israel

Hello,Israel.
Yes , it is possible through dynamic programming in wdModify of the View.
You can do this ,for example, using cell variants.
IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");               
IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i); 
cellV.setVariantKey("NotEditableVariant");
cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i);  // -- here you control the type of the object that is displayed in the cell
textViewi.bindText(dayAttrib);
cellV.setEditor(textViewi);          
tabColumn.addCellVariant(cellV);
tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());     
Using this code you can control even specific cells in the table and not only columns.
Hope this helps you,
Constantine

Similar Messages

  • Web Dynpro Java with Adaptive Model

    when i Created Web Dynpro Java with an Adaptive Model I got  Some error in webdynpro.  the error is
    com.sap.dictionary.runtime.DdException: Type com.sap.cust.model.types.Zcustdata does not exist
    what would be the problem .
    can u anybody please help me out in this.

    Hi ,
    i re-imported the and checked even though i got the same problem
    com.sap.dictionary.runtime.DdException: Type com.sap.cust.model.types.Zcustdata does not exist
    com.sap.tc.webdynpro.services.exceptions.TypeNotFoundException: type extern:com.sap.cutm.model.model.types.CustmModel:com.sap.cutm.model.model.types.Zcustdata2 could not be loaded: com.sap.dictionary.runtime.DdException: Type  com.sap.cutm.model.model.types.Zcustdata2 does not exist
    can u please help me out
    or can u please send me the sample pdf documents which contains step by step process.
    Thanks in advance,
    Venkat.

  • Is it possible to integrate web dynpro java  with xPD screens?

    We have a requirement to integrate the xPD screens with Adobe using web dynpro java. The UI has to be completely Adobe and the xPD transactions would be triggered through Adobe.
    Is it possible?? Please let me know how if anyone worked on this.
    We are using SAP NW SP12 and NWDS 7.0.1
    Thank you,
    Vasu

    Vasu,
    I'm in the same boat as you because I have no idea where to start either.  Right now we are just evaluating some possible solutions for our UI needs that our Business is asking for.  Originally I only heard about the Adobe Forms.  Then I heard about this Web Page Composer which could also provide us a way to display our iViews and other links in a more user friendly page.
    So learning how to display xPD in either area is new to me and I am just starting to learn SAP all together.  If I hear anything or read anything, I will share with you.  Maybe we can help each other out. 
    Jennifer

  • Creating context node dynamically in web dynpro for java

    Hi
    I am having requirement where user can ask for 3 tables . I have created tables dynamically. But now  i want that context node should also be created dynamically.
    Thanks and Regards,
    Saurabh

    Hello Saurabh,
    Refer the below link:
    http://wiki.sdn.sap.com/wiki/display/WDJava/DynamicUIGeneration.
    There is a section Dynamically Building the Context. Please refer to that.
    There are lots of things available in SDN for the same.
    Regards
    Nizamudeen SM

  • May I create  a  editable table cell in web dynpro java?

    Hi erveryone:
    i can see the readonly property of table in studio,but i can't input data after deployed view to the portal,can i create table include editable cell?
    best regard
    reefish

    Hi,
    When u create the table, choose apply template option>choose table>select the context node to be bound. In the Table Binding Wizard, choose the editor as Input Field.
    Regards,
    Rachel

  • Create a table editable in Web dynpro

    Hi,
    I want create a Web dynpro in Abap where there is a table editable. I 'm a beginner of web dynpro anyone could tell me how to do?
    Thank you.

    Please check the PDF and Let me know the status.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    Kanagarja L

  • Nested tables and subforms (Web Dynpro Java)

    Hi to all you gurus,
    my scenario is the following: I have 3 nested nodes in a view context like these
    DEFECTS_NODE
    |          ACTIONS_NODE
    |           |        SUBS_NODE
    |           |          |__action value
    |           |          |__defect value
    |           |          |__sub value
    |           |__action value
    |           |__defect value
    |__defect value
    |__ decription
    All 3 nodes have cardinality 0...n. These nodes are structured as if we have some actions under the same defect value and some subs under the same action value and defect value and so on. so we can have more defects_node with more nested actions_node (with the same defect value) and more nested subs_node (wiith the same action value).
    I hope I was clear...
    Now, I have to read these nodes and output them in a pdf with 3 nested subforms (defects, actions, subs). These 3 subfoms must be a mirror of the 3 nested nodes.
    can you help me??how can i do this?
    thank you very much in advance,
    Enrico
    Edited by: Enrico Grimaldi on Mar 29, 2010 12:50 PM

    hello,
    I don´t understand your problem. When you´re in LCD and can see your context data in the data view tab, you can just drag and drop the root of your form context and when placing that on the form layout, the whole structure should be generated by the system for you.
    Otto

  • Error Input table in web dynpro java

    Hi expert
    I'm trying to create a service order via web dynpro java, but i can't use the input parameter of type table;
    With this implementation of the method init of the custom controller ,on the table i can insert only an element, because the table have only a row.    wdContext.nodeIt_Input_Items().size() = 1
      public void wdDoInit()
        //@@begin wdDoInit()
         Crm_Wap_Order_Create_Input input = new Crm_Wap_Order_Create_Input();
              wdContext.nodeNode_custom_controller().bind(input);
         Crm_Wap_Input_Items table = new Crm_Wap_Input_Items();
                   wdContext.nodeIt_Input_Items().bind(table); 
              input.setIv_Bp(input.getIv_Bp());
                   input.setIv_Currency(input.getIv_Currency());
                   input.setIv_Description(input.getIv_Description());
                   input.setIv_Offline_Luid_Order(input.getIv_Offline_Luid_Order());
                   input.setIv_Ord_Delivery_Date(input.getIv_Ord_Delivery_Date());
                   input.setIv_Order_Guid(input.getIv_Order_Guid());
                   input.setIv_Pers_Resp(input.getIv_Pers_Resp());
                   input.setIv_Po_Number_Sold(input.getIv_Po_Number_Sold());
                   input.setIv_Proc(input.getIv_Proc());
                   input.setIv_Save(input.getIv_Save());
                   input.setIv_Selected_Prod(input.getIv_Selected_Prod());
                   input.setIv_Ship_To(input.getIv_Ship_To());
              for(int i=0;i<wdContext.nodeIt_Input_Items().size(); i++) {
                   table.setOrder_Qty(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getOrder_Qty());
                   table.setProd(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getProd());
                   table.setDelivery_Date(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getDelivery_Date());
                   table.setSequence(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getSequence());
                   table.setUom(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getUom());
                   table.setLine_Guid(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getLine_Guid());
                   if(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getProd()!= null)
                    input.addIt_Input_Items(table);
        //@@end
    I've tried, with a button, to insert more row, and i do that, but the additionals rows are not passed to the function, but only the row created with the method wdDoInit();
    How can i bind the additional row at the context??
    Somebody know a tutorial for create an order via web dynpro java??
    Please Help me
    Best regards
    Marco

    hi Bhargava
    sorry for the late..
    no in the init method i do the binding of the parametere, because if i'dont it in the init mothod the parameters are not editable..
    Link:[http://img29.imageshack.us/i/56a7250185252a1d06af141.png/]
    in me button metho i execute the BAPI....
      public void wdDoInit()
        //@@begin wdDoInit()
         Crm_Wap_Order_Create_Input input = new Crm_Wap_Order_Create_Input();
        wdContext.nodeNode_custom_controller().bind(input);
             //input.setIt_Input_Items(new AbstractList());
         Crm_Wap_Input_Items table = new Crm_Wap_Input_Items();
         wdContext.nodeIt_Input_Items().bind(table); 
              input.setIv_Bp(input.getIv_Bp());
                   input.setIv_Currency(input.getIv_Currency());
                   input.setIv_Description(input.getIv_Description());
                   input.setIv_Offline_Luid_Order(input.getIv_Offline_Luid_Order());
                   input.setIv_Ord_Delivery_Date(input.getIv_Ord_Delivery_Date());
                   input.setIv_Order_Guid(input.getIv_Order_Guid());
                   input.setIv_Pers_Resp(input.getIv_Pers_Resp());
                   input.setIv_Po_Number_Sold(input.getIv_Po_Number_Sold());
                   input.setIv_Proc(input.getIv_Proc());
                   input.setIv_Save(input.getIv_Save());
                   input.setIv_Selected_Prod(input.getIv_Selected_Prod());
                   input.setIv_Ship_To(input.getIv_Ship_To());
              for(int i=0;i<wdContext.nodeIt_Input_Items().size(); i++) {               
                   //wdContext.nodeIt_Input_Items().ge
                   table.setOrder_Qty(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getOrder_Qty());
                   table.setProd(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getProd());
                   table.setDelivery_Date(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getDelivery_Date());
                   table.setSequence(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getSequence());
                   table.setUom(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getUom());
                   table.setLine_Guid(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getLine_Guid());
                   input.addIt_Input_Items(table);
        //@@end
    this is the init...
    in the button method
      public void CreateOrder( )
        //@@begin CreateOrder()
         try
              wdContext.currentNode_custom_controllerElement().modelObject().execute();
              wdContext.nodeOutput().invalidate();
              catch (Exception ex)
               ex.printStackTrace();
        //@@end

  • Date Column not getting sorted in a table in web Dynpro Java

    Hi All,
    I am facing an issue while sorting the date column in a table in my web dynpro java application.
    When the date is displayed in the sql format in tha table, I am able to sort the date column successfully but when we convert the date field from sql format to util format in our table and then sort it does not work.
    Kindly let us know the steps to be followed in this case to sort the date column of a table in Simple Date format as we do not want date in the sql format to be displayed.
    Thanks & Regards,
    Anurag

    Hi,
    You might want to check whether both your browser's language settings are identical. The browser language could also determine the date format.
    As a workaround, you could add an extra attribute to your context, and set the calculated property to 'true'.
    In your table, add a new column and bind to this new attribute, and hide your original date column
    If you sort using the date column that's hidden now, you could use the calculated field to fixed-format your date the way you prefer (by using the SimpleDateFormatter class for instance)
    Cheers,
    Robin

  • ALV table in Web dynpro java

    Hello Experts,
    I have a task to migrate the usage of UI element IWDtable to ALV Table in my application for some features like Sorting and filtering supported in ALV table.
    I searched in Google and SDN about the ALV table, could not find any document about ALV table in Java (Found docs only with ABAP).
    Is ALV table supported in Web dynpro java ? If yes, please pass me the URL for the basics of ALV table.
    Thanks in Advance,
    Regards,
    Harish

    Hello,
    I understand from previous posts in this thread, that the ALV is not yet available for use within WebDynpro. Although it is already documented in the NWDS documentation under:
    SAP NetWeaver CE Developer Studio Documentation > Developer's Guide > Developing and Composing Applications > Developing User Interfaces with Web Dynpro for Java > Reference > UI Element Guide > Tables and Lists > Displaying Lists with SAP List Viewer > Integrating SAP List Viewer into Applications
    Since it is listed under "Developing User Interfaces with Web Dynpro for Java" I would assume that is should be possible. We are on NW CE 7.1 SP5.
    I tried to get a test application running based on the documentation, but the documentation is too thin and I run into an Null-Pointer exception in a SAP class called:
    at com.sap.ip.bi.alv.rendering.ALVGraphicsRenderer.init(ALVGraphicsRenderer.java:117)
    If it is not yet released for use then I wonder why it is already part of the documentation ?
    Take care
       Ingo

  • Create  PCD folder using web dynpro Java

    Hi All ,
    I would like to create pcd folder structure using web dynpro java
    i.e. My folder at top level and under this there will be iviews , roles , worksets  etc.
    Is it possible using WDJ ?
    I have checked the below link , but for folders I did not get anything.
    http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
    Can you please help me ?
    Thanks,
    Sandip

    Hi,
    Please refer to the following document
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    The same can be implemented in webdynpro also.
    Regards,
    Raju Bonagiri
    Edited by: Raju Bonagiri on Sep 3, 2010 8:36 AM

  • Adobe interactive forms in web Dynpro java

    Hi Everyone,
    I am new to webDynpro development and as I am working on Interactive forms, I need pdf's and related materials for the same.
    I mean pdf's for how to create Adobe interactive forms in web Dynpro java.
    Thanks in advance.

    Go Through the following document.
    It will give you good overview.
    Interactive Forms-->Functionality
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59
    Cheers
    Satya

  • Reusable objects using web dynpro java...any suggestions ?

    Hello All,
    I want to create few Reusable objects using web dynpro java. Please suggest some scenarios.
    regards
    Mrinalini.

    Hi,
    I can suggest especially this one:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d56578-f7e5-2a10-5ab5-8afc55d2e0e8
    Some other hits you may find useful:
    This guide mentions some tutorials about reusability:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f2c38?quicklink=index&overridelayout=true
    Here
    Web Dynpro Java [original link is broken]
    and here
    SAP NetWeaver Composition Environment Samples Center [original link is broken]
    you'll find other tutorials as well.
    Best Regards,
    Ervin

  • Microsoft Silverlight Islands with Web dynpro java

    Hi
    Please anyone know how I can integrate Web Dynpro Java with Microsoft Silverlight island?
    something like this link of flash islands but microsoft flash
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/203ece12-85bf-2b10-31a1-cc051670e9c7
    Regards
    Carlos Sevillano

    There exists a UI element named SilverlightIsland (in release 7.20).
    http://help.sap.com/saphelp_nwce72/helpdata/en/49/cb5db03372736fe10000000a42189b/content.htm
    Armin

  • Creating a purchase order in web dynpro for java.........

    hello all,
    i am new to web dynpro for java.i have already done an application
    "Creating a Web Dynpro Application Accessing ABAP Functions" this application
    have good document on sdn.
    this application is working fine .
    Now i got an requiremnt for creating a purchase order in web dynpro for java.
    in normal report when i call  the bapi the parameter are the header, headerx,item, itemx is an internal table.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        POHEADER                     = HEADER
        POHEADERX                    = HEADERX
      POADDRVENDOR                 =
      TESTRUN                      =
    IMPORTING
      EXPPURCHASEORDER             =
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
    TABLES
       RETURN                       = RETURN
       POITEM                       = ITEM
       POITEMX                      = ITEMX.
    i just want to know how can i fill these internal table in web dynpro
    for java to create an application accessing "Bapi_po_create" .
    Thanks

    Hi Gopal,
    I'm not sure what is your issue, it seems you're not really understanding how the Model structure works in WDP.
    I'll assume few things here, like you know how to Import the Model into the WDP, and you know a little bit about what Java Classes will represent this Model in the Project.
    Try these steps:
    1. Import your Model into the Project;
    2. Open your Component Modeler, create a Data Link between your Model / Component (Or Custom Controller, as you prefer)
      - You can also use the "Apply Template -> Service Controler"
    3. Map the Input of your Model as the Main Node, check the Input Tables (you prob. will have two, POITEM = ITEM - POITEMX = ITEMX)
    4. Also, check the Return box, since this is BAPI return (You can use to display Backend messages)
    Now you have the Model mapped into your Controller, you need to develop the Java function to execute it.
    1. Create a new Input class, like
    BAPI_PO_CREATE1_Input purchaseOrderCreateInput = new BAPI_PO_CREATE1_Input();
    2. Bind your Input Node, in the Controller, with your Input Class;
    wdContext.nodeBAPI_PO_CREATE1().bind(purchaseOrderCreateInput);
    3. Set any Import parameters you need:
    purchaseOrderCreateInput.setEXPPURCHASEORDER(XXXX);
    4. To Add references to the Table, you will perform something like:
    First, you need to know what "Structure" you need to add (POItem Structure) - You have a Java class that represents that Structure..
    POITEM_Element poItemElement = new POITEM_Element();
    poItemElement.setPROPERTY();   /// Set your Properties
    purchaseOrderCreateInput.getPOITEM().add(poItemElement);
    5. Execute your Input,
    purchaseOrderCreateInput .execute();
    Hope it helps,
    Regards,
    Daniel

Maybe you are looking for

  • This operation can't be completed because the item is in use.

    I have been researching this for months and no one seems to have an answer, lots of discussions but never a result. 1 - I have a MacBook Pro running Lion (I tried it with Leopard too) 2 - I have an external Iomega raid drive which is being used as a

  • IPod touch 2G battery life draining

    Hello all, Usually on my iPod, I turn off WiFi and lock the screen when I go to sleep and when I wake up 8 hours later, the battery is still full as it was when I left it and I can use it again happily. However, since last week, if I do this, the bat

  • Final Cut Pro Timeline- finicky audio playback

    I'm not sure what is going on here. After I've had final cut pro open for a while, sometimes a few hours, sometimes a few minutes, it starts having audio play back issues. It's really strange but sometimes it will only play back the audio of every ot

  • How to include JAR file in NetBean library?

    i have downloaded JavaMail jar file and now i want to include this file into NetBean library. pls help me out.

  • Agent determination in PO release

    HI all, In my work flow 2 agents are there. I usng the standard rule ( 20000027)to identifying the agents. This is identifying the 1 st agent , not working for 2nd agent . to find out the agents I find the below code from SDN and wrote it .. Still it