Interesting difference between books and tutorials

I started coding in Java about four years ago. When I started I learned from a book (that I no longer have), I think it was "Sam's Teach Yourself Java in 24 Hours". I was just a kid then and I became fairly proficient in all of the basic requirements and such. Now, four years later, I am looking into getting back to Java when I can find the time, and possibly getting a certification. Instead of the book, I now use the online tutorials and API docs. Something I noticed about the tutorials is that they use coding methods that I never saw in the book. For instance from this tutorial on using the SpringLayout, the code follows this syntax:
import /*neccessary items*/
public class SpringDemo1 {
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the                  <----I didn't add this. Guessing it has something
     * event-dispatching thread.                                    to do with preventing the thread from crashing...?
    private static void createAndShowGUI() {
        //Create and set up the window.
        JFrame frame = new JFrame("SpringDemo1");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //SpringLayout code here....
        frame.pack();
        frame.setVisible(true);
    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
}whereas, when I learned from the book, I always did this and I still do:
import /*neccessary items*/
public class myClass extends JFrame {
    public myClass() {
        //set up GUI here
    public static void main(String args[]) {
        myClass mc = new myClass();
}If I am going to get my certification, I don't want to be using practices that could cause a program to crash and get someone angry at me. If I am doing something wrong, please chew me out. It's better than losing a job...

The book is old-fashioned, that's all. Neither version of the code is so bad that it will crash and you will lose your job and become a drug addict accosting people on the street for money.
The "extends JFrame" version was the usual way to write things back in the early days of Java. And then people started thinking more about object orientation, and noticed that there was nothing in most Swing programs which created a modified JFrame. They simply used the features of a JFrame to get their work done.
So under the flag of "Prefer composition to inheritance", the OO people rewrote the standard Swing application to do that. And so they should... Java is an object-oriented language, after all, so why not do things right? Let's not extend JFrame (inheritance) if we can just create one and use it (composition).
Of course they couldn't go back and change all the paper books and all the thousands of programs that people had already written in the old way, but they could change the tutorials. And they did.
So my suggestion would be to follow the style shown in that tutorial. You won't lose your job over it. In fact being able to explain why you did it might even improve your status at your job.

Similar Messages

  • What is the difference between books and audiobooks on itunes?

    On my ipod classic, I can play audiobooks but books will not even sync to my ipod. Are books only usable on other apple products?

    Rebecca18,
    Are you talking about ebooks? Ones that you read rather than listen to?  If so, then the answer is no.  Ebooks are only compatible with the iPhone, iPad, and iPod Touch.
    B-rock

  • Difference between booked items and requested items

    Hi Gurus,
    I wanted to understand the difference between
    Booking History - booked items – booked date
    Booking History – requested items –booked date
    The Series definition has the same definition given in the hint. I checked one of the below links for the same topic but couldn't get a full view.
    Which series go to Actual_quantity in Standrad collections
    Can any one let me know what the difference between booked items and requested items is? As I understand in OM, we have no differentiation. Do let me know
    Thanks
    DNP

    Hi
    In normal circumstances, there is no difference between requested item vs. booked item. But if you're using Item Substitution, these could be different. For example, a customer may call to request item A but for multiple reasons it may be substituted by a different item (usually an upgrade with similar form, function etc).
    Oracle APS supports this functionality out of box in order promising and ASCP where it can be done based on a pre-defined relationship based on availability etc.
    Hope this answers your question, please feel free to let me know if I may help calrify further
    Navneet Goel
    Inspirage
    [email protected]

  • What is the difference between QuickTime and iMovie?

    Why would I need to upgrade my QuickTime to QuickTime Pro if I have iMovie? If I did have these two programs wouldn't that be redundant? They both edit the same kind of information, right? If you use both programs, please provide pros and cons. Thank you.
    iMac G5   Mac OS X (10.4.4)  

    It would take a book to describe the differences between iMovie and QuickTime Pro, so I won't go down that road. Here's Apple's QT Pro Tutorial, which will help introduce its features:
    http://www.apple.com/quicktime/pro/tutorials.html
    I use QuickTime Pro every day to help with one task or another. It's a very useful tool, which gets you closer to the basic functions of QuickTime than does iMovie. It also helps you learn more about QuickTime software, the heart of iMovie. Like most other things, the more you understand the fundamentals the more you understand the program using them.
    There's one important difference: Unlike iMovie, whatever task you want to perform with QuickTime Pro can also be done with an AppleScript script. So if you have repetitive tasks with movies, QuickTime Pro is a must. Just write a script that you call from within QuickTime Pro to perform just about any task, or collection of tasks. The script literally "tells" QuickTime Pro to perform the task.
    I strongly recommend QT Pro for anyone who uses iMovie HD a lot, or who is interesting in understanding the underlying structure of QuickTime movies.
    Karl

  • Key Configuration differences between SAP and ORACLE Financials

    Hello,
    After spending good 7 years in SAP related projects recently I started working in ORACLE Applications. I used to be an ORACLE programmer years back. To my surprise the same <b><u>ORACLE Forms</u></b> are still very much the heart of the ORACLE UI.
    Then I thought what will be the key differences between ORACLE and SAP in terms of configuration elements. While I know a bunch of configuraion items in SAP , I am not sure about the same in ORACLE world. I am not even sure some of the configuration items that are available in SAP exists in ORACLE.
    Does anyone know both sides of the coin ? The terminology and design ?
    SAP has
    Client,Company code, Business area, Functional Area, GL, Posting Key, Document Type.
    I am trying to get the details of the equivalents of these in ORACLE.
    Does anyone know it ?
    For e.g , when you post to <b>AP</b> or <b>AR</b> in <b>SAP</b> , <b>GL</b> is updated  automatically. In <b>ORACLE</b> you post to a <b>AP Book</b> or <b>AR Book</b> then Run a batch to move them to <b><u>GL Book</u></b>.
    ORACLE uses SQLLoader to load data . You can write a PL SQL and update the tables directly, which is not the case in SAP. For dataloads and conversions, SAP uses BDC's ( though XI can be used but its slow).For ORACLE its the good old SQL and PlSQL combo.
    What are the equivalents of the configuration elements in ORACLE world ?
    Also what are the major differences between these two in terms of designing a financial system.
    Does any one know ?

    Genie,
    I agree that a case is made on how well these two ERPs solve the day to day tasks before a company chooses one of these two. But my question is aimed at finance to begin with. You are going to need a general ledger for any company or government regardless of ERP. And how well you can drive the ledger to map your business is the key here.
    The way ledger is built is around a business area ,company or country and is very tighly designed in SAP. I would like to know if there is any equivalent of the configuration items in ORACLE. I am more interested in terminology of ORACLE.
    For example ,
    <u><b><u><b>SAP ====> ORACLE</b></u>
    <u><b>GL ==> Book In ORACLE</b></u>
    <b><u>Document Number ===> Invoice Number</u></b>
    <b><u>Posting Period in SAP ==> Posting period In ORACLE</b></u></u></b>
    Most of the terms are finance terms , so they are common ( eg. an account number is an account number in ORACLE and SAP ) between two systems. I am interested in any specific thing that is available in ORACLE but not in SAP and  vice verse.
    thanks for the link you have provided.
    Its very useful.

  • What are the similarities and differences between iMovie and Final Cut Pro

    I have become semi-proficient in iMovie and considering upgrading to Final Cut Pro.  I would love to hear from anyone with informatoin pertaining to the learning curve, and the similarities & differences between iMovie and Final Cut Pro. 

    wvu.gordon wrote:
    …  the transition is very manageable, even for an amateur.
    if you're familiar with iMovie-b, the GUI looks familiar, although tons of new buttons and sliders and knobs to play with ...
    There're zillion of features, you probably don't need in the beginning - what gave my projects the most 'boost' is Color Grading/manipulation
    for a start, and as a good read on a loooong Sunday afternoon:
    http://www.colorgradingcentral.com/final-cut-pro-x-color-grading-table-of-conten ts
    offers you free tutorials to the many options to give your videos some professional 'look'.
    and don't miss the many & free podcasts of MacBreak Studio, avail in iTunes, or the tutorials at CreativeCow.com
    Tom is a gentleman not recommending his own products, so I do:
    FCPX - Making the creative leap
    … is his actual book for all us 'switchers' from iMovie (or FC/e).

  • Difference between composition and aggregation

    Could anyone explain to me the difference between aggregation and composition. I remember studying some but cant recall it.

    though this question has been put in for quite some time now but being of an interesting nature I would like to answer that still.
    As far as I know aggregation is a simple has a relationship
    e.g A student has books.
    A professor has students.
    Naome has a Car.
    Now you cannot say that : -
    A student is composed of books.
    However in composition the relationship is has a, is composed of .
    So A university is composed of many schools.
    A car is composed of parts.
    A housed is composed of windows.
    The second type of relationship is compositiob while first one is aggregation.

  • Whats the difference between EPMA and Essbase Studio

    Aren't they both used for designing applications?
    And do one really need Essbase Studio?

    Whats the difference between EPMA and Essbase Studio ^^^It is a bit confusing, isn't it? As far as I understand EPMA's role, it's a way to share common dimensions and data across multiple Oracle EPM products including Essbase, Planning, and HFM. I actually don't know if other products live in EPMA. What EPMA does not have is a nice way of sourcing or manipulating dimension and fact tables (or even files). Oh, there are interface tables, but you will write code/use the EPMA dimension utility to load dimensions. I have to say I've never tried to load data through EPMA so someone else is going to have to comment on that. Once dimensions are built, you can deploy Essbase (and other products) from common and database-specific dimensions.
    Studio is the tool you would use to go against a data warehouse, or something awfully close to a data warehouse to build Essbase databases. It's for Essbase only -- Planning, HFM, etc. are not the targets of Studio's output.
    What gets confusing/intriguing is that when EPMA deploys Essbase apps, it uses Studio under the covers to do so. Thus the interesting implementations where people use Studio (which is way more flexible than EPMA because it is a development tool as opposed to a dimension/data management app) to read the EPMA interface tables (and for all I know, the base EPMA tables) and build Essbase apps that way.
    If you think there is overlap, I would agree with you, but you can see they really aren't the same.
    And do one really need Essbase Studio?^^^You don't have to use Studio to build Essbase databases. You can go hog-wild in EAS with SQL load rules if you want, although at some point it probably will be easier/more straightforward to build it in Studio. Although Studio has been mentioned as the replacement for EAS for some time, I suspect the effort required to build a database in Studio will keep EAS around for quite a while or Studio Lite will have to come out. There's a lot to be said (sometimes) for the amazing flexibility EAS/Essbase have -- Studio requires a more methodical approach and EPMA has a very formal set of standards and methods.
    Whew, I'm sorry, I wrote a book about this and I'll bet you get a bunch of differing opinions on this.
    If you're interested in Studio, you might do well to pick up a copy of Glenn Schwartzberg's "Look Smarter Than You Are with Oracle Essbase Studio 11". I receive not a penny from its sale although I was one of the copy editors (hey, I got a mention in the acknowledgements). It's a good book and an excellent introduction to the tool.
    Regards,
    Cameron Lackpour

  • Difference between RAC and MySQL Cluster !

    Difference between RAC and MySQL Cluster
    Please write me in well explanation , with examples , needed useful link and all other stuffs.
    (1)Italian dealers/distributors for MySQL
    (2)Difference between RAC and MySQL Cluster
    (3)Pricing about MySQL and PostgreSQL
    (4)How and which type / Way to deliver support by MySQL
    (5)Security features about MySQL Vs Oracle
    (6)Management Console
    MySQL Vs Oracle
    Thanks in advance !
    MySQL Cluster

    Ha ha, most amusing.
    I suggest you try googling for answers to these things. This is a site dedicated to the Oracle database, the questions are answered by volunteers (not Oracle employees) and we are primarily geeks rather than marketing droids. If you have a specific Oracle question please feel free to post anytime.
    Thank you for your interest.
    Arrivederci, APC

  • What are the major differences between BODS and Talend ?

    Hi Friends,
    We had a client meeting 2 days back regarding BODS project, But our client is showing more interest on Talend. We have explained/demo him on BODS.  Could any one please tell me, What are the major differences between BODS and Talend ? What are the features of BODS which are not there in TELEND ?
    Thanks,
    Bheem.

    Hi,
    If you talk difference than Talend is an open source. SAP DS as huge advantage when it comes to loading data into SAP and it is more flexible with lots of inbuilt features and easy to load data into SAP using DS directly and extracting data from various legacy systems.

  • What's the difference between jsp and jsf?

    who can tell me what's the difference between jsp and jsf?
    I'm puzzled when I found some of the technology in jsp is so similar to the ones in jsp( javaserver page)

    Hi,
    Find the difference between JSP and JSF
    1. A developer has more control with JSP, but (should) get easier development with JSF
    2. Event handling is done differently in JSP (HTTP) and JSF (Java)
    3. The UI is designed differently (or should be at least) with JSP (markup) and JSF (components).
    4. The end product should also be defined differently - JSP page versus a JSF application.
    Is this the only thing that is need to make a decision for either or? Probably not. There are other pieces that need to be taken in account when deciding which technology to use - tools support, enough components, type of application etc.... At this point there are not enough JSF components (although there are some interesting projects underway - Ajaxfaces, Myfaces, ADF Faces, and WebChart 3d) and enterprise tools support is still limited to a few tools vendor. Looking at our ADF Faces components they are currently available as early access (not production) and demands for these components are stacking up, literally, outside my office doorstep. Although I would love to make them production - now! - it is not a viable solution since we are still checking features and fixing critical bugs.
    All this combined - not enough enterprise level components in production, lacking tools support etc... - leave customers in a vacuum where the decision is either to continue with JSP, since it is mature and has a wide developer base, or move forward with JSF not sure if the support, or the developers will be there. This is particularly sensitive to customers that need to get started now and be production by summer.
    If you are in this vacuum here are some key points promoting JSF:
    1. Fundamental unit is the Component
    2. Built in event and state management
    3. Component sets can be provided by any vendor
    4. Closer to ASP.Net or Swing development
    5. Choice of UI technology
    6. Scale up (rich clients)
    7. Scale down (mobile devices)
    8. Built into J2EE containers in J2EE 5.0 (tentative)

  • What's the Difference Between OLAP and OLTP?

    HI,
    What's the difference between OLAP and OLTP ? and which one is Best?
    -Arun.M.D

    Hi,
       The big difference when designing for OLAP versus OLTP is rooted in the basics of how the tables are going to be used. I'll discuss OLTP versus OLAP in context to the design of dimensional data warehouses. However, keep in mind there are more architectural components that make up a mature, best practices data warehouse than just the dimensional data warehouse.
    Corporate Information Factory, 2nd Edition by W. H. Inmon, Claudia Imhoff, Ryan Sousa
    Building the Data Warehouse, 2nd Edition by W. H. Inmon
    With OLTP, the tables are designed to facilitate fast inserting, updating and deleting rows of information with each logical unit of work. The database design is highly normalized. Usually and at least to 3NF. Each logical unit of work in an online application will have a relatively small scope with regard to the number of tables that are referenced and/or updated. Also the online application itself handles the majority of the work for joining data to facilitate the screen functions. This means the user doesn't have to worry about traversing across large data relationship paths. A heavy dose of lookup/reference tables and much focus on referential integrity between foreign keys. The physical design of the database needs to take into considerations the need for inserting rows when deciding on physical space settings. A good book for getting a solid base understanding of modeling for OLTP is The Data Modeling Handbook: A Best-Practice Approach to Building Quality Data Models by Michael C. Reingruber, William W. Gregory.
    Example: Let's say we have a purchase oder management system. We need to be able to take orders for our customers, and we need to be able to sell many items on each order. We need to capture the store that sold the item, the customer that bought the item (and where we need to ship things and where to bill) and we need to make sure that we pull from the valid store_items to get the correct item number, description and price. Our OLTP data model will contain a CUSTOMER_MASTER, A CUSTOMER_ADDRESS_MASTER, A STORE_MASTER, AN ITEM_MASTER, AN ITEM_PRICE_MASTER, A PURCHASE_ORDER_MASTER AND A PURCHASE_ORDER_LINE_ITEM table. Then we might have a series of M:M relationships for example. An ITEM might have a different price for specific time periods for specific stores.
    With OLAP, the tables are designed to facilitate easy access to information. Today's OLAP tools make the job of developing a query very easy. However, you still want to minimize the extensiveness of the relational model in an OLAP application. Users don't have the wills and means to learn how to work through a complex maze of table relationships. So you'll design your tables with a high degree of denormalization. The most prevalent design scheme for OLAP is the Star-Schema, popularized by Ralph Kimball. The star schema has a FACT table that contains the elements of data that are used arithmatically (counting, summing, averaging, etc.) The FACT Table is surrounded by lookup tables called Dimensions. Each Dimension table provides a reference to those things that you want to analyze by. A good book to understand how to design OLAP solutions is The Data Warehouse Toolkit: Practical Techniques for Building Dimensional Data Warehouses by Ralph Kimball.
    Example: let's say we want to see some key measures about purchases. We want to know how many items and the sales amount that are purchased by what kind of customer across which stores. The FACT table will contain a column for Qty-purchased and Purchase Amount. The DIMENSION tables will include the ITEM_DESC (contains the item_id & Description), the CUSTOMER_TYPE, the STORE (Store_id & store name), and TIME (contains calendar information such as the date, the month_end_date, quarter_end_date, day_of_week, etc).
      Database Fundamentals > Data Warehousing and Business Intelligence with Mike Lampa
    Search Advice from more than 250 TechTarget Experts
    Your question may have already been answered! Browse or search more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.

  • Is there any performance difference between unique and no unique index

    Hi,
    We are working with both databases Oracle and MS-SQL and we have an open channel to MS-SQL server core team.
    We got the word from them that there is a difference between unique and no unique index from the optimizer perspective, i.e. the optimizer knowing that the index is unique may choose a more suitable plan for running a specific query, we're still trying to find a specific example.
    Anyway, since we do not have an open channel to Oracle core, I thought maybe one of you guys knows something about Oracle optimizer behavior on this issue.
    I am interested verified answers from certified sources and not suggestions or thoughts.
    Thanks in advanced,
    Tal ([email protected]).

    Maybe, you will like to check this link for a similar question answered by Tom Kyte
    http://asktom.oracle.com/pls/ask/f?p=4950:8:385900000490041683::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:7641143144618,

  • What is the difference between  ABAP and HR-ABAP?

    Hi people,
    Could u just tel me abt what is the difference between ABAP and HR-ABAP?
    Thanks in advance,
    Sanjeev K.V

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    Also,
    HR:
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    And finally,
    Few notes are below:
    InfoSets in the HR Application
    You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
    InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
    If you want to create InfoSets for HR, you can use logical databases PNP, PNPCE, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
    The reports you can execute using InfoSets based on logical databases PNP (or PNPCE) or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
    Logical database PNP/PNPCE* PCH PAP
    Selection of Persons Objects from Personnel Planning Applicants
    Infotypes that can be included in the InfoSet Infotypes for· Personnel Administration (0000-0999) · Time Management (2000-2999) · Payroll infotypes · Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:· Infotypes for the object type · Infotypes for objects that can be related to the specified object typeIf the object type is not specified:· All infotypes · Infotypes for Recruitment (4000-4999)· Some infotypes for Personnel Administration (such as 0001 and 0002)
    · Customer infotypes
    Reporting examples · Selection of all persons who participated in a specific business event, output of prices for reserved business events · Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons · Selection of all business events held in London in March, output of all persons who participated in these business events · Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions · Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
    Logical database PNPCE (PNP Concurrent Employment) functions just like logical database PNP. The procedure for creating InfoSets is also the same. It only becomes significant if you work with Concurrent Employment.
    Creating InfoSets
    The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
    1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
    2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
    Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
    This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
    3. Choose .
    This takes you to the Infotype Selection for InfoSet  screen. You now have the option of creating field groups and assigning fields as required for non-HR InfoSets. Field groups that correspond to infotypes and already contain fields, however, are always created for HR InfoSets. The field groups are displayed in an overview tree in the top right section of the screen.
    The infotypes that you included in the InfoSet are displayed in an overview tree on the left of the screen. The infotype fields that are already included in field groups are displayed in a different color, and the corresponding field group ID is displayed.
    In the standard system, a field group is created automatically for each infotype that you included in the InfoSet (a field group corresponds to an infotype).
    In the standard system, each field group contains the infotype-specific fields. To ensure that working with the InfoSet is as easy as possible, you are advised to restrict your use of fields in each field group to those you really require. This means you should remove fields that are not required.
    An infotype's fields must only be assigned to the pertinent field group. Make sure this assignment is correct. If the assignment is incorrect, the InfoSet could be rendered unusable.
    When an InfoSet is created, the following fields are transferred automatically to the first field group:
    § Logical database PNPCE or PNP Personnel number
    § Logical database PAP Applicant number
    § Logical database PCH Object ID, plan version, and object type
    6. Determine the fields that must be included in the field groups of your InfoSet. If you require further information, see Assigning Fields to a Field Group.
    If you want, you can change the default sequence of field groups and fields as required using Drag&Drop.
    7. To save the InfoSet, choose .
    8. To generate the InfoSet, choose .
    On the Change InfoSet (InfoSet name) screen, you can choose Edit ® Change infotype selection to add more infotypes to the InfoSet, or to remove infotypes from the InfoSet. Remember to regenerate the InfoSet afterwards.
    This screen also enables you to update InfoSets if, for example, the system contains new additional fields for specific key values. To do so, choose InfoSet ® Additional functions ® Update additional HR fields.
    9. Go back to the initial screen for InfoSet maintenance.
    10. Choose User group assignment.
    11. Select a user group, and save your entry.
    sample code
    START-OF-SELECTION.
    GET pernr.
    rp_provide_from_frst p0000 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0001 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0001-plans. " earliest.
    endif.
    endif.
    rp_provide_from_last p0014 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0014 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0014-LGART. .
    endif.
    endif.

  • Graph axes assignment: performance difference between ATTR_ACTIVE_XAXIS and ATTR_PLOT_XAXIS

    Hi,
    I am using a xy graph with both x axes and both y axes. There are two possibilities when adding a new plot:
    1) PlotXY and SetPlotAttribute ( , , , ATTR_PLOT_XAXIS, );
    2) SetCtrlAttribute ( , , ATTR_ACTIVE_XAXIS, ) and PlotXY
    I tend to prefer the second method because I would assume it to be slightly faster, but what do the experts say?
    Thanks!  
    Solved!
    Go to Solution.

    Hi Wolfgang,
    thank you for your interesting question.
    First of all I want to say, that generally spoken, using the command "SetCtrlAttribute"is the best way to handle with your elements. I would suggest using this command when ever it is possible.
    Now, to your question regarding the performance difference between "SetCtrlAttribute" and "SetPlotAttribute".
    I think the performance difference occures, because in the background of the "SetPlotAttribute" command, another function called "ProcessDrawEvents" is executed. This event refreshes your plot again and again in the function whereas in the "SetCtrlAttribute" the refreshing is done once after the function has been finished. This might be a possible reason.
    For example you have a progress bar which shows you the progress of installing a driver:
    "SetPlotAttribute" would show you the progress bar moving step by step until installing the driver is done.
    "SetCtrlAttribute" would just show you an empty bar at the start and a full progress bar when the installing process is done.
    I think it is like that but I can't tell you 100%, therefore I would need to ask our developers.
    If you want, i can forward the question to them, this might need some times. Also, then I would need to know which version of CVI you are using.
    Please let me now if you want me to forward your question.
    Have a nice day,
    Abduelkerim
    Sales
    NI Germany

Maybe you are looking for