Sorting and subtotaling in webdynpro java

Dear experts help me in the following problem,
i need to sort the table based on att/abs type and display the total hours for each att/abs type in Approve/Review time sheets ivew of MSS.

1. Implement class comparator wich will compare records according your sort preferencies,
like this:
     public class record_Comparator implements Comparator{
          public int compare(Object emp1, Object emp2){
      // here is your code for return -1if 'before'  or 0 if equal or 1if 'after'
               int stepId_1 = ((record)emp1).get_someValue();       
               int stepId_2 = ((record)emp2).get_someValue();
               if(stepId_1 > stepId_2)
                    return 1;
               else if(stepId_1 < stepId_2)
                    return -1;
               else
                    return 0;   
than call method sort() with your collection of records,
like this:
Collections.sort(record_collection, new record_Comparator());

Similar Messages

  • Advantages and Disadvantages of webdynpro JAVA over J2ee?

    Hi,
       Can anybody provide me the advantages and disadvantages of webdynpro java over the J2EE?
    Regards,
    Harish.

    Hi,
    Webdynpro is the SAP standard technology for developing business user intrefaces.
    Webdynpro is like the frame work which follows the MVC Design pattern.
    Webdynpro uses most of the UI developement as declarative approach , i.e. most of the code will generated by the framework. so it will reduce the developement efforts.
    Adaptive RFC model to connect with SAP systems.
    All these are advantages over than the J2ee.
    Regards,
    Naga

  • Creating Packages and Namespace for Webdynpro Java applications in NWDS

    Hi Experts,
    I am working on a stand alone application and using NWDS for the same. This application consist of some Webdynpro Java apps, Dictionary perspective DC's and BPM applications.
    I need to create a package and name space for all the applications. I have read some documents on creating SC in SLD and using it in NWDI. But since I am working on NWDS i am not able to see the SC.
    May be I am not following a correct procedure. Can some one provide a basic document or can tell me steps in short that i need to follow, for Name space and package creation and how to use them in NWDS.
    I am working on CE7.1 ehp1.
    Regards
    Pranav

    HI,
    This blog expalins how to Setup and configure NWDI System land scape:
    /people/bhavana.gupta/blog/2007/01/23/installation-and-configuration-of-netweaver-development-infrastructure-was-64
    NWDI Post installation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/419b479b-0801-0010-f8a1-c26208b4b209
    http://help.sap.com/saphelp_nw70/helpdata/en/44/60dc1943c2311ce10000000a155369/frameset.htm
    Complete NWDI Resources:
    NWDI Resources [original link is broken]
    Thanks
    SrinivaS

  • Need Sorter java  file   for sorting the records in webdynpro java

    Hi  Gurus
       I  had urgent requirement please give your inputs
       In my webdynpro java i need to sort entire records in table
       I now we need One sorter java class please provide that java file
       please suggest the all the steps how  to do
    Thanks
    renu.

    1. Implement class comparator wich will compare records according your sort preferencies,
    like this:
         public class record_Comparator implements Comparator{
              public int compare(Object emp1, Object emp2){
          // here is your code for return -1if 'before'  or 0 if equal or 1if 'after'
                   int stepId_1 = ((record)emp1).get_someValue();       
                   int stepId_2 = ((record)emp2).get_someValue();
                   if(stepId_1 > stepId_2)
                        return 1;
                   else if(stepId_1 < stepId_2)
                        return -1;
                   else
                        return 0;   
    than call method sort() with your collection of records,
    like this:
    Collections.sort(record_collection, new record_Comparator());

  • Webdynpro ABAP or Webdynpro Java?

    Hello experts.
    I want to learn to develop WebDynpro's
    Do you which of the two tools do you recommend? webdynpro java or webdynpro abap.
    Greetings

    Hi Lupe ,
    Although both technologies have same functionalities but even then they are not identical.
    Following are some of the differences:
    Language :-  First difference is the programming language used as the names Webdynpro ABAP and Webdynpro JAVA reflect. In ABAP Webdynpro, along with ABAP coding, RFCu2019s are also supported via Service call. Unlike Webdynpro ABAP, we cannot do ABAP coding in Webdynpro JAVA. Instead RFCu2019s and Web services are created and used in it to serve this purpose. In addition to Web services and adaptive RFC, Java Beans is another model supported by Webdynpro JAVA.
    Design Time Environment :-  Webdynpro ABAP requires ABAP Workbench (SE80) while SAP Netweaver Developer Studio is necessary for designing Webdynpro JAVA applications. So, additional installation is required. This studio reduces the development effort and utilizes some visual tools for creating components which can be reused.
    Storage :-  Applications developed using Webdynpro ABAP are stored centrally in ABAP server whereas in case of Webdynpro JAVA, the code remains on the client machine that is developed using a tool called Netweaver Developer studio. So, due to the powerful version control system of Webdynpro ABAP, the load removes from the development machine which is not possible in case of Webdynpro JAVA.
    Skills Required :- For Webdynpro ABAP, a developer should have knowledge of ABAP programming, Development tools, Database concepts, ABAP Objects. However, Webdynpro JAVA requires skill set comprising java programming, java development tools and object-oriented concept.
    Performance:-  Large scale applications that involve large number of web users canu2019t work well on ABAP server. So, for robust and scalable applications, Webdynpro JAVA is preferred because of powerful J2EE server as proved by Sun Microsystems. However, small-scale or applications involving small or medium users can go well with Webdynpro ABAP. Thus, performance varies depending on the number of web users and one can choose ABAP or JAVA accordingly.
    So the decession is that its totaly based on your available skillsets and your scenario to be implemented.
    Thanks & Regards,
    Monishankar C

  • How Does Bapi related to WebDynpro Java

    Hi all,
    I am Very new to WebDynpro. AM working as a java Developer.
    I want to know
    What is Bapi? And How does it related to WebDynpro?
    Thanks & Regards,
    Jyothi.

    Hi,
    BAPI:
    Whereas BAPIs (Business API(Application Program Interface)) are used for interfacing between two systems. They are remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    Function Modules are used in SAP programs to modularze the programs. They are Global ABAP programs created by SAP for reusable purpose. They have IMPORT,EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
    You can create them from TCode SE37.They are similar to Functions we have in C, but with more functionality.
    ECC (Enterprise Control Component):
    Master data will be saved in ECC System only.
    ECC is Standalone and ECC is nothing but a backend system similar to Oracle
    It has two versions: ECC 5.0, ECC 6.0 and Now ECC 7.0 is going to release on coming few months.
    Kernel, support pack and all other tools are very much advance in ecc6.0 compare to any other version of sap. It supports NetWeaver component also like BI, XI and EP. In ECC6.0 all components are integrated in single software.
    Please check this Application. This application relation Between ECC System and WDJAVA.
    [Webdynpro JAVA|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f64e7a90-0201-0010-e0b4-ec1f849ecd4e]
    Hope this helps!!
    Regards
    Vijay K

  • Providing sorting filters for a table in webdynpro java application

    ho to provide sorting  , filters , for a table in webdynpro java application .

    Hi Pradeep,
    Please go through the following article on implementation of filtering and sorting:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33fe65
    The article contains a link to a sample application using the TableSorter and TableFilter Class.
    The same classes can be used by any other web dynpro application. Download the sample application and copy the classes. In case of a specific requirement, modify the TableSorter and TableFilter classes.
    Regards,
    Kartikaye

  • Binding and displaying data to table in webdynpro java

    hi all,
    i want to know how to bind the output values to table in webdynpro java.
    i know how to bind values in context to table,but if we want to display the values from database(back end ) and display in table present in the view.
    eg: i have table in view and want to get values from backend(SQL server) and display it in that table.
    plz help me to know ..
    thanks
    sirisha

    Hi Saisirisha,
    Try this.
    1> Take a Value Node(Employee) cardinality 0..n.
    Employee Structure
    Employee
    |------Surname(Attribute)
    |------FirstName(Attribute)
    |------Category(Attribute)
    2> Bind this value node(Employee) in the View datasource of table.
    3> Try the code inside wdDoInit method.
    try {
         // Load the JDBC-ODBC bridge
         Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
         // specify the ODBC data source's URL
         String url = "jdbc:odbc:SSPer";
         // connect
         Connection con = DriverManager.getConnection(url,"North","Ken");
         // create and execute a SELECT
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery
         ("SELECT Surname,FirstName,Category FROM Per");
         while (rs.next()) {
         // get current row values
         String Surname = rs.getString(1);
         String FirstName = rs.getString(2);
         int Category = rs.getInt(3);
         //create table row and add the value in the table
         IPrivate<Put View Name>.IEmployeeElement empElm = wdContext.createEmployeeElement();
            empElm.setSurname(Surname);
         empElm.setFirstName(FirstName);
         empElm.setCategory(Category);
         wdContext.nodeEmployee().addElement(empElm);
         // close statement and connection
         stmt.close();
         con.close();
    } catch (java.lang.Exception ex) {
         wdComponentAPI.getMessageManager().reportException("Exception : "ex.getMessage()+,true);
    http://www.developer.com/java/data/article.php/3417381
    Regards,
    Mithu

  • Books and Documentation on Webdynpro for Java

    Hi,
       I'am planning to start developing Webdynpro for Java applicatios.I know only Core java and iam not familiar with J2EE.I need some help on this.Any books on webdynpro for java basics and any documentation avail and prerequisite befor going to strat developing Webdynpro for JAVA
      Can anybody please give me suggestions on this.
    With Regadrs
    Praveen

    What is Webdynpro?
    What is Web Dynpro?
    Webdynpro Sample Applications and Tutorialshttps://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    SAP WebAs Samples And tutorials
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143 [original link is broken]
    Basis Webdynpro tutorials....
    http://help.sap.com/saphelp_erp2005/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/1fc0bdb1cdd34f9a11d5321eba5ebc/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/d08342a7d30d53e10000000a155106/frameset.htm
    Web Dynpro Sample Applications and Tutorials: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 [original link is broken]
    http://searchsap.techtarget.com/searchSAP/downloads/SAPPRESS.pdf
    Check the following thread u can get lot of materials,
    WeB Dynpro Documents
    Refer these linkshttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20tutorial%20and%20sample%20applications.faq
    Why WebDynpro ?Why WebDynpro ?
    Why  webdynpro and not BSP or JSP?
    Why webdynpro and not BSP or JSP?BSP to WEB Dynpro
    BSP to WEB Dynpro
    Benifits of using Webdynpro Benifits of using
    Webdynpro
    Java vs. ABAP WEbDynpro Java vs.
    WebDynpro ABAP
    regarding Java related webdynpro
    Regarding Java related Web Dynpro vs. Struts - a few questions
    Web Dynpro vs. Struts - a few What kind of applications are being developed with Web Dynpro?
    What kind of applications are being developed with Web Dynpro?
    http://www.sappro.com/downloads/OptionComparison.pdf
    Hop this will helpful for u..
    Urs GS

  • Webdynpro Java and Webdynpro ABAP

    hi all,
    Im working in webdynpro java. Im confused about WD java and WD ABAP. which one we should select for what? And now a days people are telling that SAP is coming up all business packages in WD ABAP. Is it true? Which one is better either WD Java or ABAP?
    Thanks,
    J.Smitha.

    Smitha,
    It's tough question to answer. Which one to choose either Web Dynpro java or Web Dynpro ABAP , it depends on which technology you are comfortable. In relation to the business packages SAP already provided allmost all of them in java and in the future all the Business packages also available in ABAP. It's all how you want to develop the application. In sap portal world some applciation which we can develop with ABAP Web Dynpro and some applications with JAVA Web Webdynpro as SAP Web AS available as dual stack.
    If someone already has a strong ABAP background and has WD for ABAP available they should probably use that. If they are a J2EE developer they should probably use WD for Java but it is likely they will also then need some ABAP support for the backend systems.
    I think more customers may be asking for WD for Java projects simply because it has been around longer and is more widely available to customers where as some cutomers prefer to develop their application using ABAP Web Dynpro because of SAP propritary. But ultimately it's again all our interest and customer.
    Thanks
    Krishna

  • Connection between webdynpro java and ECC.

    Hi experts,
    I am very new to webdynpro java, I want to learn webdynpro java since I know little bit of java.
    So here is my question,
    I want to connect my webdynpro java to ECC  to get data from ECC and display it on front end and as well i want to send data to ECC, can anyone help me to resolve this one.
    Thanks and Regards,
    Santoshkumar.

    Hi Santosh,
    This is pretty basic stuff in the world of Web Dynpro Java - I'd suggest you search SCN, read content on help.sap.com and then come back here with more specific questions.  All anyone can do to answer your current question is search for you and post links to documents that you could find for yourself.
    Cheers,
    G.

  • Configuration and customization guides for ESS/MSS(webdynpro Java) in EP 7

    Hi All,
    Can anybody help me by providing the guides for Configuration and Customization of ESS/MSS(webdynpro java) in EP 7.0?
    Thanks in advance.
    Regards,
    Shankar

    Hi,
    Please check the links for help
    https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=31476
    Configuring ESS in SAP Enterprise Portal 6.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eb036a-0a01-0010-25a3-b2224432640a
    General Settings for Self-Service Applications
    Configuring MSS on Portal 6.0
    Implementation and Configuration guide for ESS into Portal,Backend R/3 4.7C
    Regards
    Santosh

  • Webdynpro Java and ESS/MSS

    Hello,
    It has been a rumour for a long time and now it seems that SAP will convert all ESS/MSS services into Webdynpro ABAP....so i want to know what's the plan for Webdynpro Java ...? what areas will it be used...? and what are the options for Webdynpro Java Developers....? ...one thing for sure is to learn Webdynpro ABAP...
    Regards,
    Anil

    As far as I know, SAP has changed travel management and HR administraor from WDJ to WDA as of EhP1.
    Do you have any ideas about any other BP?
    Actually, I wonder SAP has been developed any new BP based on WDJ after EhP is introduced.

  • Webdynpro java and EJB integration

    Hi,
    I am new to Webdynpro Java, would require your help in the following area:
    my requirement is I need to read values from oracle database using EJB/Java Beans and display the same using webdynpro JAVA(as user interface).
    Pls suggest the possible solution with required docs & videos(if possible)
    FYI:
    Tools: NWDS 7.0, SAP portal 7.3
    Thanks
    Nag

    Hello Nag,
    there are two possibilities to use your ejb in WD4J:
    1. Via JNDI Lookup
      try {
            InitialContext ctx = new InitialContext();
            <YourEJBInterface Class> service = (<YourEJBInterface Class>) ctx.lookup(<JNDI-Name>);
      } catch (NamingException e) {
            throw new RuntimeException(e);
    2. Via EJB Model:
    here a guide --> http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d2638c-4b04-2d10-d2a3-992fdf1e3d55?quicklink=index&…
    hope this helps.
    Regards
    Tobi

  • Webdynpro java and oracle DB connection..

    Hi,
    I have a good knowledge of WD (web dynpro java) projects having ECC as backend as i have done lot of projects where ECC is backend and WD JAVA is front end.
    but in my new project i have wd java as front end but my backend is oracle DB. I want to know how to create/setup  connection betwen webdynpro java and oracle DB, how to proceed on this ? wat all settings I have to do in VA (visual admin) and all.
    please let me know how to proceed on this. Any document/tutorial on this will be very helpful..

    Hi Rahul,
    Create a DataSource to the oracle db in Visual Admin, give the datasource an alias name and connect to the db from WebDynpro by calling the alias name.
    These document might be useful:
    [http://help.sap.com/saphelp_nw70/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm]
    [SAP Note 867176|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=867176]
    [SAP Note 941594|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0000941594&nlang=E]
    Good luck!
    Regards,
    Aditya

Maybe you are looking for

  • ITunes 8 + OS 10.5.7 NOT Compatible??

    There seems to be a pattern appearing here in the posts on numerous threads relating to iTunes 8 AND OS 10.5.7. Ever since I upgraded to iTunes 8.2 on my MacBookPro running OS 10.5.7, I can no longer play any of the movies or tv shows I downloaded be

  • CS5.5 InDesign & utilizing older, and new jpgs

    I just upgraded from ancient versions of Adobe software & an old MAC, to CS5.5 and an iMAC7. I moved a lot of older Illustrator-built pages and older Photoshop-ed images, psd originals, + images saved for web and web pages as jpgs, all to the iMAC7.

  • Dreamweaver CC - FTP problem to access

    I´m having some problems to upload files with my Dreamweaver CC. Every time I try to upload something to the root of my FTP, I get an error message, meanwhile  I try to upload to a sub-folder I don`t get any. You may think that it's a FTP permission

  • Jsp output as javascript

    i am developing an app using google map api which uses javascript i need a part of the javascript dynamically generated based on data in a database is there a way to do it?

  • SDK 3.4 - Tree and List rollover update flicker

    I have a rollover issue with items in a tree or list.  When the item is rolled over in a tree or list, an update to that item is made from our server.  It seems that the update causes the rollover indication to disappear.  It's like the item is being