Why do we need Profiles ?

Hi all,
I know it a bit stupid question you would think but do read it complete before answering.
1. When we create a role the role name is given and tcodes are assigned to it.
Then we go to the authorization tab, before that it asks us to save the role.
So the function of the role is only that much ? .
2. Then we go to the authorization tab and then go to generate profiles. It pulls the authorizations and authorization profiles for all the objects in a role.
Now my question is :-->
Why SAP needed to maintain roles and profiles separately, whereas it could simply have a single activation button as we have in ABAP in authorization tab which would pull the authorization into the objects ?  That would not generate any profile and we need not maintain tables related to Profiles.
NOW PLEASE DONT ANSWER THAT WITHOUT PROFILE ROLE IS OF NO USE.....TILL WE DONOT GENERATE THE PROFILE WE CANNOT USE THE ROLE.
hope all have understood my question if there is any doubt let me know.

The profiles hold the actual authorizations which are checked in the software (by the AUTHORITY_CHECK statement).
The roles are a sort of building and administration aid.
Apart from that, as Wojtek points out, the roles bring along additional functionality which has no influence on the actual authorizations.
In earlier versions of SAP (as I've been told, my experience starts at 4.5) the profiles were maintained manually, which was not an easy task.
Nowadays the role concept (started from activity groups...) makes authorization maintenance a lot easier. More intuitive interfaces etc... underneath these lies the original profile concept. As you can guess it is nearly impossible to chuck the whole profile concept overboard and replace it with roles as this would not only mean rewriting the statement AUTHORITY_CHECK but also debugging all programs in the system. Backward compatability can be a good thing.
So, think of the profile generator as your nifty toolbox in which you can click all requirements together and, once satisfied, hit the button that does all the boring stuff (creating the actual profile) for you.
With this I do not really understand the second part of your question as it is only the role you have to maintain. The profile is generated at the push of a button.
Hope this helps
Jurjen
Edited by: J. Heeck on Jan 2, 2008 12:06 PM

Similar Messages

  • Why do I need to use a CMYK profile?

    Hi all,
    I am new to these forums, but have some theoretical and a bit of practical knowledge on Color Management. I know what a dot gain, color space, true black vs composite black, etc are, yet I struggle to build the big picture of the whole thing. I am actually doing design work, where we are going to print a brochure. I have done the Illustrator artwork, it has an embedded image and I am trying to make it ready for a good precise print.
    My question is, why do I need a CMYK profile at all??
    As I understand it, my document IS CMYK already, i.e. it uses component C, M, Y and K numbers for artwork primitives, and as far as I can understand the whole point of working with CMYK instead of RGB (which is for additive colorimetry - i.e electron guns and LCDs) is the fact that it is suitable for printers. If Cyan, Magenta, Yellow and BlacK inks get input from the CMYK numbers, then the print should look the same on all ink-utilizing devices, should it not?
    That said, I understand the point of RGB-to-CMYK conversion and vice versa, since obviously i have to preview my art on my monitor before it gets into printing. But since CMYK profiles exist, does it mean printers printing the same CMYK values get different results? (disregarding issues of different paper weights and dot gains)
    Thanks. This has been bugging me, and I am not THAT much into printing yet as to buy the Real World Color Management book i ve been hearing so much about.

    If I may add,
    The ONLY times most of us need to embed an ICC profile in a CMYK file are:
    1) We want to PROOF it faithfully on a hardware-calibrated monitor (Photoshop reads the embedded profile and Converts it to Monitor RGB).
    2) We want to PROOF it faithfully on any other hardware-calibrated printer that uses a different Target color space (Photoshop reads the embedded profile and Converts it to the specific target profile). (Or the workflow ignores my Source Profile and Converts to target proofing space based on the wrong working space).
    3) We need to CONVERT it to another profile (Photoshop reads the embedded profile and Converts it to a new target space/profile).
    PERSONALLY, when I deliver CMYK it is already Converted to the correct CMYK (directly from my 16-bit Adobe RGB file), and I do not want anyone downstream dinking around with My Color.
    The old Quark did this task nicely -- simple place the tif and print the job.
    Today's pdf and color-managed layout programs make understanding and implementing this instruction much more confusing and hazardous (how to send 'the numbers' straight through).
    If I trust the print shop 100%, I will hand them my 8-bit Adobe RGB and let them do the Conversion to their press CMYK.
    Otherwise, send [my] CMYK 'numbers' straight through. Period.
    +++++++
    The problems with people who do not understand HOW ICC profile work is they will strip my profile (knowingly or unknowingly) and Assign-Apply-Assume their own profile -- effectively -- hosing my color.
    This problem is easy to see in Photoshop by Assign profile.
    The classic real-world example is the old-school print shop's clueless "color expert" who ignores our embedded profile, because he says, he has turned "color management off" and "doesn't use profiles." He tells us our file is bad because his print is bad, and he will try to correct our bad color and print another round of proofs.
    Does this sound familiar?
    What the cave man actually did was strip our embedded file of its profile, and/or he Applied-Assumed-Assigned his own working space to our file then he takes a sledgehammer and beats our color up into his closed workflow (and he is probably working on an uncalibrated monitor to boot).

  • Why we maintain Partner Profiles in WE20??

    HI,
    What is the affect of entries in the following T-codes:
    And the following are the entries maintained for respective T-CODEs, in our project.
    OBCA: ( LOGICAL SYSTEM - SYSTEM - CUSTOMER - CUSTOMER COMPANY CODE) 
    OBCE: (LOGICAL SYSTEM - SYSTEM - CUSTOMER COMPANY CODE)
    And what about WE20 partner profiles maintenance why do we need to do so?
    Please explain about these three T-CODES
    Regards,
    Venkat

    it is just another way to maintain the same thing in the same tables. Classification notspecific to release strategies, materials and batches, vendors and customers can be classified too.
    You can do this from withion those objects, or from the central classification menu using the classification transactions.
    People here recommending this for production system after you have transported the strategy from developement to production. Becaues classification is master data and cannot be transported the usual way. And many here do not know how this can be done with ALE

  • Why do we need to soft proof?

    So it occurred to me that when LR soft proofs an image it "knows" how to represent my original image as though it it is printed.  My job then is to get the "Proof image" to look like the original image by tweaking the sliders etc.
    But here's the thing, LR "knows" all of the colours of my original image and the way I want them represented.  It then changes the image to represent how it will be printed, so it "knows" the effect the profile will have.  So why do I need to fiddle with sliders etc when LR has the knowledge to do the tweaking to get the colours via the profile, back to the original?
    Surely the experts could program a function that when I click a button automatically it changes the settings in the proof copy to match as close as possible the original?  I can then make choices from there.
    Any thoughts?
    Peter

    You can assing one there, and / or on dialer interfaces. It depends on what you are doing.
    These will be the address used by PPP when it runs on the B-channels.

  • Why do I need to enter my credit card information, including 3 digits secure code to activate Genius?!

    Hello,
    I have installed iTunes in order to use Genius and receive ideas about what could please me.
    When I activate genius I am always led to a page where my credit card information, including the three digit security code are asked.
    If a transaction is attempted, please tell me: which one, of what amount?
    If not, because Genius is free, why are you needing my security code (the three digit under my card)?
    Regards,
    Grunt.

    I just attempted to create a new account when downloading a free application, and the problem remain the same. There is no way to select no credit card and a payment mode is mantadory.
    The best way would be to add the choice:
    "No Payment mode yet"
    on that web page, to allow all users to select their payment mode only at buying time.
    This would be far more secure for all the reasons I've said:
    APPLE MAY BE HACKED LIKE SONY AND SHALL NOT STORE CREDIT CARDS INFORMATION.
    ESPECIALLY NOT THE SECURE CODE!!!!!
    Don't you agree?
    Apple forces users to find messages among the Internet to understand how they could register without a credit card,
    and not only these explainations don't work, but its far more complex for users to find them and try to follow them than to select a proper option THAT IS NOT HERE but should have been if the web site had been made a honest way.
    BUT, if someone at Apple feel able to setup my account a way no payment mode is mandory,
    please exceute yourself the proper operations to ensure it can truely be done,
    because myself I am now sure that there is no way TODAY to create such account.
    And no one from Apple will able to prove me I am wrong.
    If you believe I am only doing mistakes during my registration, and this is what you are suggesting and I am doing attempts after attempts many differents way, please finish it well from you internal computing services. And eventually, if you failed or refuse to do so, change your web page instead to set that missing option on it.
    Stop telling I am doing wrong:
    Either correct my profile YOURSELVES at Apple, or correct your web site like any good company that pretend being customer friendly would do.
    Apple,
    You have a bug.
    A design flaw.
    Or you are too greedy.
    BUT YOU SHALL ASSUME. And do the proper corrections accordingly without boring me anymore.
    Thanks!

  • Why do we need to set site owner of a site collection?

    Hi All,
     why
    do we need to set site owner of a site collection?
    Thanks,
    Mohakk

    Hi Mohakk,
    Thanks for posting your issue, Kindly find the required details below
    The System Owner is responsible for the availability, and support and maintenance of a system and for the security of data residing on that system. The system owner is responsible for the availability, and support and maintenance, of a system and for the
    security of the data residing on that system. The system owner is responsible for ensuring that the computerized system is supported and maintained in accordance with applicable SOPs. The system owner also may be the process owner.
    The System Owner acts on behalf of the users. A System Owner may:
    Approval of key documentation as defined by plans and SOPs
    Ensuring that Standard Operating Procedures (SOPs) required for maintenance of the system exist and are followed
    Ensuring adequate training for maintenance and support staff
    Ensuring changes are managed
    Ensuring the availability of information for the system inventory and configuration management
    Providing adequate resources (personnel including SMEs, and financial resources) to support the system
    Reviewing audit reports, responding to findings, and taking appropriate actions to ensure compliance
    Coordinating input from other groups (e.g., finance, information security, safety, legal)
    Also, you can attend online learning course on below mentioned URL
    https://www.microsoft.com/learning/en-us/course.aspx?id=55035a
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • 7.1: Why do we need Hierarchy Groups?

    Hi, dear experts!
    Could you please explain why do we need Hierarchy Groups? As I see we can only use it to group devices, profiles and so on one screen. But can we use hierarchy groups to search for devices, mobile components or mass perform any actions?
    Best regards,
    Anton.

    Hi Anton,
    to my understand you can use them first to group and structure your devices into hierarchies. This has the advantage that you for sure will keep the overview about your devices. But more important you can assign data distribution rules and mobile components to individual groups. These assignments will then be propagated to all child groups.
    This gives you a lot of flexibility to setup a big number of devices (mass device setup).
    Regards,
    Stefan

  • Why am i needing to reset airport extreme almost daily?

    why am i needing to reset airport extreme almost daily? Is it just too old?

    Teresa,
    You haven't provided any useful information so it's almost impossible to help you. If you are really running OS X 10.2.x as your profile states then you are posting in the wrong forum, this forum is for Intel based iMacs that began shipping with Tiger 10.4.x. Also you haven't stated what Airport Extreme you have, there have been many models over the years. Once you locate which AE you have I'd recommend posting in the appropriate AE forum and try to paint a clear picture of what is happening and also provide the verison of OS X you're using, the Mac model and ever the firmware version of the AE you have.  You can find the firmware version by running Airport Utility.

  • Any idea on why an enterprise provisioning profile would install on an iphone 4s but fail on the new ipad?

    Any idea on why an enterprise provisioning profile would install on an iphone but not the new ipad?

    As you have suggested yourself, there really isn't a correct answer to the question other than "what would serve your needs".
    If you are using cloud services, and iTunes match, you could very well get by with a 16gb. However, you might want to consider how much time you might spend when getting online would be difficult (in the air traveling for example), and what you would want available during those times. My original iPad was a 16GB, and it served me well, but I did opt for 32GB when I upgraded to the New iPad. I don't regret the decision since it gives me more flexibility. BTW, I do use cloud services, including iTunes Match (currently just shy of 17,000 tracks loaded), extensively.

  • Archiving cds and why do i need id3 tags

    here comes another one of those questions looking at which codec to use to store music.....i also have tag questions.....
    i'm about to (re-)rip my cd collection and looking at some info re codecs and id3 tags
    now.....i believe i understand the benefits of alac (lower file sizes, keeping id3 tags, lossless compression) v wav(no compression)
    however (and for some out there) if we just entertain the fact that wav may have some minute benefit for me depending on my questions and answers given.....and yes i know wav and alac will sound the same to the human ear - i accept that as a given of lossless compression ......
    points i'd like to outline:
    i am looking to rip my cds, firstly and mostly, for an archiving purpose!! purpose numero uno!!
    i could well want to re-create cds with these archived records in the future
    size of files is of no concern to me at all
    i'm using a mac nowadays
    i will convert most of these files, where needed, to use with a portable music player (i'm not bothered with having, say a wav file and then also converting and having an alac file, as crazy as that sounds)
    this is where i ask for info re the benefits of embedded tags that are found in alac:
    are these tags that important?
    where do they come into play in ripping and later converting music?
    are these uses just bells and whistles that have no benefit to my needs?
    if i rip cds to wav (or aiff), say, using itunes, will cd info and track listings be available on the downloading database (eg itunes) to name these wav files?
    if i then ensure these song files are kept under the album's folder, have i just done what tags do? surely not. that is all i have needed in the past.
    this is where i feel i may be really missing what id tags (can) do
    are tags more than just managing song files and where they belong and where they have come from?
    is it just a convenience of not personally managing your song files (as per previous paragraph)?
    (in the past i had ripped cds to mp3 codec. i think i used "cd rip" or something like that on my pc.
    my mp3 files were individually named and sorted and kept under album folders under artist name folders.
    apart form the very odd occasion all track and album info i needed was found on a database that was attached to the ripping software.
    i never had a problem managing/maintaining these files and folders.)
    i welcome some enlightenment on some of my questions above and other info that may be relevant
    and yes, i understand that music will sound the same as a wav file or alac file - but humour me re using wav and tell me why i need id3 tags
    i guess the crux of it is:
    why do i need id3 tags?
    does my managing of my song file in the album folder do what tags do?
    what problems/shortcomings/headaches may i encounter by not having those tags if i use wav as opposed to alac?
    what do i not know about these little buggers?
    what codec is best for my purpose of archiving and re creating of cds (for playing in cd players)
    thanks in advance for your input and any clarity that i may experience through this
    peter t
    excuse my long windedness (i have spent some time editing this entry)

    Crows2012 wrote:
    as mentioned earlier if i just have songs (wav) in album folders, when i import these albums into itunes, do you know if these will come up under AN album with their file names purely using my filename setup (but with no artwork)?
    Yes, iTunes will read the filename, such as "Track 1" or something else and display it. But nothing else. No Album or Artist.
    so the tracks will remain grouped as an album based on their initial folder and the albums and tracks as per file name?
    Crows2012 wrote:
    also, does aiff have limitations (apart from the full size of the file)?
    I'm not sure I understand what you mean. For all practical purposes AIFF and WAV are exactly the same thing. They're just file containers.
    i thought that i had read somewhere that aiff tags could run into some issues with its tags - ie may not always be transferred 100% accurately with certain players (or hardware maybe)
    Crows2012 wrote:
    and how do these codecs work re-creating an album for the purposes of playing in a cd player? - this is a crucial question for the purpose of my archiving/backup of CDs THEMSELVES
    That's actually going to depend on what burning software you use. Once you rip the tracks to whatever file container you choose (WAV/AIFF/ALAC) you'll never really exactly re-create the album. But for archiving purposes all three file containers will do what you want, which is to create a lossless archive. AIFF has the advantage of supporting embedded ID3, which ALAC has the additional advantage of the files also being about half the size of AIFF/WAV files.
    i was thinking that maybe wav was able to recreate an album (in effect duplicate one) if my cd was lost or damaged in the future. i was thinking this IF when ripping to wav everything is unchanged (unless there is other data on the original cd). and maybe only possible with wav. the purpose for this would be to play recreated cds on my cd player
    any idea on this one?
    (i havent looked too thoroughly on this angle but i'll keep googling on this one)
    much appreciate all info thus far
    peter t

  • I want to know that if i want to download facebook on my iphone 4 or any other apps then it ask me put my card details for payment. why is that. if they are free then why do i need to give my card details?please help me anyone.

    I want to know that if i want to download facebook on my iphone 4 or any other apps then it ask me put my card details for payment. why is that. if they are free then why do i need to give my card details?please help me anyone.

    Just select no credit card as outlined here:
    http://support.apple.com/kb/ht2534

  • Why do I need to connect my Ipad mini with my Mac Book Pro via iCloud?

    Why do I need to connect my Ipad mini with my Mac Book Pro via iCloud? I don't have iCloud on my MacBook Pro and only intend to use the mini to check e-mail and use Garage Band and Photo Booth for song writing when traveling . . .

    Thanks Community! I solved the problem. In fact it was not a problem but lack of understanding. These guys at Apple are way ahead in thir thinking. I will try to explain as short as I can.
    In Lion, ihe Prefferences/Display show only two choices: 6-7 steps of resolution and some color tab. No two screens, no two display to overlap, nothing for us to do. "That was the problem"! Everything is automatic.
    When I connected the HDMI cable to the Miniport into a T-bolt slot, the TV screen showed the "spiral galaxy" how Zyriab is calling it. In fact he gave me the best clue. That shows the connection is good. But where is the Mac Book image?
    You have to drag it to the right out of the Mac Book display area, and "voila!" it will continue on the TV screen. The same with the mouse pointer, push it out ofthe Mac Book display area and you see it on the TV sreen. Good image, you can keep the max resolution, etc. The sound is still on the Book's speakers. I have to figure that out.
    Thank everybody, especialy Zyriab, ne was the closest.
    High regards to everybody

  • Keynote and pages are now free, but why do i need to pay for them still when there now free?!?

    keynote and pages are now free, but why do i need to pay for them still when there now free?!?

    Users can obtain the iWorks and iLife applications free, if they purchased a Mac after the beginning of October 2013.
    Older Mac purchases require a paid purchase of these applications.

  • Why do I need to start up Screen Sharing twice to get it to work ?

    I have an Intel Mac Mini connected to my TV, so I started using Screen Sharing from my MacBook Pro to be able to work on it when others were watching TV.
    Both Macs used to have OSX 10.5 Leopard, and everything worked fine.
    Now they both have OSX 10.6 Snow Leopard, and whenever I startup Screen Sharing, the connection-windows asking for my Name & Password comes up properly, but then it hangs... it stays in "Connecting..." for ever (litteraly).
    I'm not able to quit or force-quit the connection-window by then, so it stays in view...
    (Screen Sharing isn't even listed in the force-quit list as a running app)
    but...
    when I just try Screen Sharing again, I get connection immediately and it seems to work flawlessly...
    ...it's just that the connection-window is impossible to quit...
    it stays in view an is really annoying...
    this looks really crappy...
    can anyone tell me why I do need to startup Screen Sharing twice to get it to work ?
    Is this a bug ?
    (If so : please apple fix this a.s.a.p.)
    ...or am I doing something wrong ?
    (if so : what am I doing wrong ? and how can I get rid of this annoying screen ?)
    Thank you for your kind reply.
    Toon.B

    it's October and this really annoying problem still exists !
    the unnamed screensharing-loginwindow keeps "Connecting...", and I'm unable to shut it down...
    ...even after my screen sharing session is over
    ...even force-quitting is impossible (this 'app' just isn't showing up in the force-quit-window...)
    please Apple - fix this ; under 10.5 it was working great !
    Does anyone have any idea how to fix this ?
    (besides restarting my Mac)
    Thanks !
    Toon.B

  • Why do I need to catch this exception?

    Hello all
    This is a question about exception handling. I have to build a diary application that lets you save reminders on particular dates using xml. Just to make it a little tougher, I was not allowed to use the Calendar class. This is the code I wrote:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.*; 
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;     
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;                                                                                                                                                                                                                         
    import static java.lang.Math.*;
    public class CalendarAssignment extends JFrame implements ActionListener
         int MonthLength [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
         public JButton [] days = new JButton[43];
         private JLabel lbl, reminderlbl;
         private JPanel top, grid, remindercenter, reminderbottom;
         private JFrame reminderframe;
         private JTextField year1, reminderinput, dayno;
         private JComboBox months;
         private Container container;
         private JButton fetch, save, cancel;
         private Document doc;
         private File file;
         private Node node;
         private String year, month, day;
              public static void main( String[] args ) {
                   CalendarAssignment c = new CalendarAssignment( );
                   c.setSize( 400, 300 );
                   c.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                   c.show( );
              public CalendarAssignment( ) {
                   int CurrentYear, CurrentMonth;
                   String YearString, MonthString, Now;
                   Date today;
                   container = getContentPane( );
                   container.setLayout( new BorderLayout( ) );
                   SimpleDateFormat DateFormatter;
                   DateFormatter = new SimpleDateFormat( "MM.yyyy" );
                   today = new Date( );
                   Now = DateFormatter.format( today );
                   MonthString = Now.substring( 0,2 );
                   YearString = Now.substring( 3,7 );
                   CurrentMonth = Integer.valueOf( MonthString );
                   CurrentYear = Integer.valueOf( YearString );
                   top = new JPanel( );
                        String [] items = { "January", "February", "March", "April", "May", "June",
                                      "July", "August", "September", "October", "November",
                                      "December" };
                        months = new JComboBox( items );
                        months.setEditable( false );
                        months.setSelectedIndex( CurrentMonth - 1 );          
                        year1 = new JTextField( );
                        year1.setText( YearString );
                        year1.setEditable( true );
                        year1.setHorizontalAlignment( year1.CENTER );
                        fetch = new JButton( "Fetch Month" );
                        fetch.addActionListener( this );
                        top.setLayout( new GridLayout( 1, 3, 20, 0 ) );
                        top.add( months );
                        top.add( year1 );
                        top.add( fetch );
                   grid = new JPanel( );
                        grid.setLayout( new GridLayout( 7, 7, 0, 0 ) );
                        String [] week = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun" };
                        for ( int a = 0; a < 7; a ++ ) {
                                  JLabel lbl = new JLabel( week[a], JLabel.CENTER );
                                  grid.add( lbl );
                        for ( int i = 0; i < 42; i ++ ) {
                                  days[i] = new JButton( );
                                  grid.add( days[i] );
                                  days.addActionListener( this );
                        DrawCalendar( CurrentMonth, CurrentYear );
                        container.add( top, BorderLayout.NORTH );
                        container.add( grid, BorderLayout.CENTER );
              private void DrawCalendar( int SelectMonth, int SelectYear ) {
                        int DisplayMonthLength, Buttons;
                        String ButtonID = "";
                        int OffSet = MonthStart( SelectMonth, SelectYear );
                        DisplayMonthLength = MonthLength [SelectMonth - 1];
                        if ( SelectMonth == 2 )
                             DisplayMonthLength += LeapYear( SelectYear );
                        for ( Buttons = 1; Buttons < 43; Buttons ++ ) {
                             if ( ( Buttons <= OffSet ) || ( Buttons > ( DisplayMonthLength + OffSet ) ) ) {
                                  ButtonID = "";
                                  days[Buttons-1].setEnabled( false );
                             else {
                                  ButtonID = Integer.toString( Buttons - OffSet );
                                  days[Buttons-1].setEnabled( true );
                        days[Buttons-1].setLabel( ButtonID );
                        grid.add( days[Buttons-1] );
              private int LeapYear( int year ) {
                        int FourHundred, OneHundred, Fourth;
                        FourHundred = year % 400;
                        OneHundred = year % 100;
                        Fourth = year % 4;
                        if( ( ( FourHundred == 0 ) ) || ( ( OneHundred != 0 ) && ( Fourth == 0 ) ) )
                             return ( 1 );
                        else
                             return ( 0 );
              private int MonthStart( int Month, int Year ) {
                        int OffSet, LastMonths, BeforeOrAfter, Years;
                        int AllDays = 0;
                        int YearDays = 365;
                        int YearMonths = 12;
                        BeforeOrAfter = Year - 2006;
                        Years = abs( BeforeOrAfter );
                        if( BeforeOrAfter != 0 )
                             BeforeOrAfter = BeforeOrAfter / Years;
                        switch( BeforeOrAfter ) {
                             case 1:
                                  for( int a = 2006; a < Year; a ++ ) {
                                       AllDays += YearDays + LeapYear( a );
                                  AllDays += LastMonthsCalc( Month, Year );
                             break;
                             case -1:
                                  for( int a = 2005; a > Year; a -- ) {
                                       AllDays += YearDays + LeapYear( a );
                                  for( LastMonths = YearMonths; LastMonths >= Month; LastMonths -- ) {
                                       AllDays += MonthLength[LastMonths - 1];
                                       if( LastMonths == 2 )
                                            AllDays += LeapYear( Year );
                             break;
                             default:
                                  if( Month > 1 )
                                       AllDays += ( LastMonthsCalc( Month, Year ) );
                        OffSet = AllDays % 7;
                        if( BeforeOrAfter ==( -1 ) )
                             return( 6 - OffSet );
                        else if( OffSet > 0 )
                             return( OffSet - 1 );
                        else
                             return( 6 );
              private int LastMonthsCalc( int Month, int Year ) {
                        int Counter;
                        int days = 0;
                        for( Counter = 1; Counter < Month; Counter ++ ) {
                             days += MonthLength[Counter - 1];
                             if( Counter == 2 )
                                  days += LeapYear( Year );
                        return( days );
              public void CreateReminder( String buttonID, String yearID, String monthID ) {
                        reminderframe = new JFrame( );
                        reminderlbl = new JLabel( );
                        reminderframe.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                        remindercenter = new JPanel( );
                             reminderlbl = new JLabel( "Please type in reminder to be saved for " + buttonID + " " + monthID + " " + yearID + ":", JLabel.CENTER );
                             reminderinput = new JTextField( 30 );
                             reminderinput.setHorizontalAlignment( reminderinput.CENTER );
                             reminderinput.setEditable( true );
                             remindercenter.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                             remindercenter.add( reminderlbl );
                             remindercenter.add( reminderinput );
                        reminderbottom = new JPanel( );
                             save = new JButton( "Save" );
                             save.addActionListener( this );
                             cancel = new JButton( "Cancel" );
                             cancel.addActionListener( this );
                             dayno = new JTextField( buttonID );
                             dayno.setEditable( false );
                             dayno.setEnabled( false );
                             dayno.show( false );
                             reminderbottom.setLayout( new FlowLayout( ) );
                             reminderbottom.add( save );
                             reminderbottom.add( cancel );
                             reminderbottom.add( dayno );
                        reminderframe.setSize( 500, 75 );
                        reminderframe.add( remindercenter );
                        reminderframe.add( reminderbottom );
                        reminderframe.pack( );
                        reminderframe.show( );
              public void SaveReminder( String dayID, String yearID, String monthID ) throws Exception {
                        file = new File( "Diary.xml" );
                        doc = DocumentBuilderFactory.newInstance( ).newDocumentBuilder( ).parse( file.toURL( ).toString( ) );
                        String year = yearID;
                        String month = monthID;
                        String day = dayID;
                        //System.out.println( year );
                        //System.out.println( month );
                        //System.out.println( day );
                        CreateEntry( doc.getDocumentElement( ) );
                        writeXmlFile( );
              public boolean CreateEntry( Node node ) {
                        Node searchNode;
                        searchNode = getYear( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Year" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", year );
                        node = searchNode;
                        searchNode = getMonth( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Month" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", month );
                        node = searchNode;
                        searchNode = getDay( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Day" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", day );
                        node = searchNode;
                        String entry = reminderinput.getText( );
                        Node textNode = doc.createTextNode( entry );
                        node.appendChild( textNode );
                        return true;
              private Node getYear( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if(node.getNodeName( ).equals( "Year" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == year )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getMonth( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Month" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == month )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getDay( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Day" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == day )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private void writeXmlFile( ) throws Exception {
                   Source source = new DOMSource( doc );
                        Result result = new StreamResult( file );
                   Transformer xformer = TransformerFactory.newInstance( ).newTransformer( );
                   xformer.setOutputProperty( OutputKeys.INDENT,"yes" );
                   xformer.setOutputProperty( OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd" );
                   xformer.transform( source, result );
              public void actionPerformed( ActionEvent e ) {
                        String IDButton = e.getActionCommand( );
                        String IDYear = year1.getText( );
                        Object IDMonthObj = months.getSelectedItem( );
                        if( e.getSource( ) == fetch ) {
                             String YearText = year1.getText( );
                             int YearNumber = Integer.valueOf( YearText );
                             int MonthsIndex = months.getSelectedIndex( ) + 1;
                             DrawCalendar( MonthsIndex, YearNumber );
                        else if( e.getSource( ) == cancel ) {
                             reminderframe.hide( );
                        else if( e.getSource( ) == save ) {
                             String IDDay = dayno.getText( );
                             String IDMonth = String.valueOf( IDMonthObj );
                             SaveReminder( IDDay, IDYear, IDMonth );
                        else {
                             String IDMonth = String.valueOf( IDMonthObj );
                             Toolkit.getDefaultToolkit( ).beep( );
                             int n = JOptionPane.showConfirmDialog( null, "Set reminder on this date?", "Question", JOptionPane.YES_NO_OPTION );
                             if( n == JOptionPane.YES_OPTION ) {
                                  CreateReminder( IDButton, IDYear, IDMonth );
    If you compile it, you will realise that I get an error about exception handling. My lecturer gave me an example code of how to do the same thing without using a GUI:
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class CallDOM
         Document doc;
         File file;
         Scanner input;
         int year, month, day;
         String currentYear, currentMonth;
         public static void main(String args[]) throws Exception
              CallDOM cd=new CallDOM();          
         CallDOM() throws Exception
              file=new File("Diary.xml");
              //create DOM from file
              doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file.toURL().toString());
              input=new Scanner(System.in);
              System.out.println("1) Create entry");
              System.out.println("2) Read entry");
              System.out.println("3) Show Diary");
              System.out.println("4) Quit");
              int choice=input.nextInt();
              while(choice!=4)
                   switch(choice)
                        case 1: GetDate();CreateEntry(doc.getDocumentElement());break;
                        case 2: GetDate();ReadEntry(doc.getDocumentElement());break;
                        case 3: ShowDiary(doc.getDocumentElement());
                   System.out.println("1) Create entry");
                   System.out.println("2) Read entry");
                   System.out.println("3) Show Diary");
                   System.out.println("4) Quit");
                   choice=input.nextInt();
              writeXmlFile();
         public void GetDate()
              System.out.println("Enter date (dd mm yyyy)");
              day=input.nextInt();
              month=input.nextInt();
              year=input.nextInt();
         public boolean ReadEntry(Node node)
              node = getYear(node);
              if(node==null) return false;
              node = getMonth(node);
              if(node==null) return false;
              node = getDay(node);
              if(node==null) return false;
              node = node.getFirstChild();
              while(node!=null)
                   System.out.println(node.getNodeValue().trim());     
                   node=node.getNextSibling();
              return true;               
         public boolean CreateEntry(Node node)
              Node searchNode;
              searchNode = getYear(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Year");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(year));
              node = searchNode;
              searchNode = getMonth(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Month");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(month));
              node = searchNode;
              searchNode = getDay(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Day");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(day));
              node = searchNode;
              System.out.println("Enter Text");
              String entry=input.next();
              entry+=input.nextLine();
              Node textNode = doc.createTextNode(entry);
              node.appendChild(textNode);
              return true;               
         public void ShowDiary(Node node)
              Stack<Node> stack=new Stack<Node>();
              Node child;
              stack.push(node);
              while(!stack.empty())
                   node = stack.pop();
                   if(ProcessNode(node))
                        child = node.getLastChild();
                        while(child!=null)
                             stack.push(child);
                             child = child.getPreviousSibling();
         private boolean ProcessNode(Node node)
              if(node.getNodeName().equals("Year"))
                   currentYear=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Month"))
                   currentMonth=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Day"))
                   System.out.print(node.getAttributes().item(0).getNodeValue()+"/"+
                                            currentMonth+"/"+currentYear+": ");
                   node=node.getFirstChild();
                   while(node!=null)
                        System.out.println(node.getNodeValue().trim());
                        node=node.getNextSibling();
                   return false;
              return true;               
         private Node getYear(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Year")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==year)
                             return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getMonth(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Month")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==month)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getDay(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Day")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==day)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private void writeXmlFile() throws Exception
            Source source = new DOMSource(doc);
            Result result = new StreamResult(file);
            Transformer xformer = TransformerFactory.newInstance().newTransformer();
            xformer.setOutputProperty(OutputKeys.INDENT,"yes");
            xformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd");
            xformer.transform(source, result);
    }My question is, why does the exceptions in the example code not need to be caught? And why do I have to catch the exceptions in my code? Several exceptions are thrown in the example code, but there is no catch statement.
    Thanks for any advice!!

    Since your question didn't come with any relevant details, and since you have huge steaming piles of irrelevant code, all I can give is a general answer to "Why do I need to catch this exception?"
    [url http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html]Exception tutorial at http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
    Here's a quick overview of exceptions:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

Maybe you are looking for