Changing code to Drawings

I am having problems coverting the code below so instead of entering the date and month and clicking update calendar there are arrows at the top so it looks like this:
< (year) >
< (month) >
and then the calendar below. The user should be able to click on the arrows and move the calendar foward/backwards through the months and years. I am having a hard time trying to figure out how to draw triangles and add them to the applet with actionlisteners. I appreciate any help I can get.
import java.applet.Applet;
import java.awt.*;
import java.util.Date;
public class Calendar extends Applet
static final int YTOP = 80; // y-size of margin above calendar box
static final int YHEADER = 30; // y-size of horz strip with day names
static final int NCELLX = 7; // number of cells across
static final int CELLSIZE = 40; // size of each square cell
static final int MARGIN = 8; // margin from number to cell top, right
static final int FEBRUARY = 1; // special month during leap years
// Data entry controls at top.
Label yearLabel = new Label("Year:");
TextField yearTextField = new TextField("1996", 5);
Label monthLabel = new Label("Month:");
Choice monthChoice = new Choice();
Button newCalButton = new Button("New Calendar");
// Date object to get current month and year.
Date now = new Date();
// Font for controls at top.
Font smallArialFont = new Font("Arial", Font.PLAIN, 15);
// Font for for month/year caption above calendar.
Font largeArialFont = new Font("Arial", Font.BOLD, 25);
String days[] = {"S", "M", "T", "W",
"T", "F", "S"}; //Sun, Mon, Tues, Wed, Thurs, Fri, Sat
String months[] = {"January", "February", "March", "April",
"May", "June", "July", "August", "September",
"October", "November", "December"};
int DaysInMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
// Month and year entered by user.
int userMonth;
int userYear;
public void init()
USE: Get current month and year, initialize controls.
NOTE: Called automatically when applet starts.
setBackground(Color.white);
// Init month and year to current values.
userMonth = now.getMonth();
userYear = now.getYear() + 1900;
// "Year:" label.
yearLabel.setFont(smallArialFont);
add(yearLabel);
// Text field to get year from user.
yearTextField.setFont(smallArialFont);
yearTextField.setText(String.valueOf(userYear));
add(yearTextField);
// "Month:" label.
monthLabel.setFont(smallArialFont);
add(monthLabel);
// Combo box to get month from user: add months, set default to now.
monthChoice.setFont(smallArialFont);
for (int i = 0; i < 12; i++)
monthChoice.addItem(months);
monthChoice.select(userMonth);
add(monthChoice);
// "New calendar" button.
newCalButton.setFont(smallArialFont);
add(newCalButton);
} // init
public void paint(Graphics g)
USE: Draw calendar using globals userMonth and userYear.
NOTE: Called automatically whenever surface needs to be redrawn;
also when user clicks 'New Calendar' button, triggering repaint.
FontMetrics fm; /* to get font info */
int fontAscent; /* character height */
int dayPos; /* y-position of day strings */
int xSize, ySize; /* size of calendar body (cell table) */
int numRows; /* number of rows in cell table (4, 5, 6) */
int xNum, yNum; /* number position at top right of cells */
int numDays; /* number of days in month */
String dayStr; /* day of the week as a string */
int marg; /* margin of month string baseline from cell table */
String caption; /* month string at top center */
// Get font info for number string positioning (default small font).
fm = g.getFontMetrics();
fontAscent = fm.getAscent();
dayPos = YTOP + (YHEADER + fontAscent) / 2;
// Get x-size of calendar body (cell table).
xSize = NCELLX * CELLSIZE;
// Header rectangle across top for day names.
g.drawRect(0, YTOP, xSize, YHEADER);
// Put days at top of each column, centered.
for (int i = 0; i < NCELLX; i++)
g.drawString(days[i], (CELLSIZE-fm.stringWidth(days[i]))/2 + i*CELLSIZE,
dayPos);
// Get number of calendar rows needed for this month.
numRows = NumberRowsNeeded(userYear, userMonth);
// Vertical lines of cell table.
ySize = numRows * CELLSIZE;
for (int i = 0; i <= xSize; i += CELLSIZE)
g.drawLine(i, YTOP + YHEADER, i, YTOP + YHEADER + ySize);
// Horizontal lines of cell table.
for (int i = 0, j = YTOP + YHEADER; i <= numRows; i++, j += CELLSIZE)
g.drawLine(0, j, xSize, j);
// Init number positions (upper right of cell).
xNum = (CalcFirstOfMonth(userYear, userMonth) + 1) * CELLSIZE - MARGIN;
yNum = YTOP + YHEADER + MARGIN + fontAscent;
// Get number of days in month, adding one if February of leap year.
numDays = DaysInMonth[userMonth] +
((IsLeapYear(userYear) && (userMonth == FEBRUARY)) ? 1 : 0);
// Show numbers at top right of each cell, right justified.
for (int day = 1; day <= numDays; day++)
dayStr = String.valueOf(day);
g.drawString(dayStr, xNum - fm.stringWidth(dayStr), yNum);
xNum += CELLSIZE;
// If xNum to right of calendar, 'new line'.
if (xNum > xSize)
xNum = CELLSIZE - MARGIN;
yNum += CELLSIZE;
} // if
} // for
// Set large font for month/year caption.
g.setFont(largeArialFont);
// Get font info for string positioning (large font now current).
fm = g.getFontMetrics();
// Set margin for y-positioning of caption.
marg = 2 * fm.getDescent();
// Set caption to month string and center at top.
caption = months[userMonth] + " " + String.valueOf(userYear);
g.drawString(caption, (xSize-fm.stringWidth(caption))/2, YTOP - marg);
} // paint
public boolean action(Event e, Object o)
USE: Update month and year globals, paint when user clicks button.
int userYearInt;
if (e.target instanceof Button)
if ("New Calendar".equals((String)o))
// Get month from combo box (Choice control).
userMonth = monthChoice.getSelectedIndex();
// Get year from TextField, update userYear only if year ok.
userYearInt = Integer.parseInt(yearTextField.getText(), 10);
if (userYearInt > 1581)
userYear = userYearInt;
// Call paint() to draw new calendar.
repaint();
return true;
} // inner if
} // outer if
return false;
} // action
int NumberRowsNeeded(int year, int month)
USE: Calculates number of rows needed for calendar.
IN: year = given year after 1582 (start of the Gregorian calendar).
month = 0 for January, 1 for February, etc.
OUT: Number of rows: 5 or 6, except for a 28 day February with
the first of the month on Sunday, requiring only four rows.
int firstDay; /* day of week for first day of month */
int numCells; /* number of cells needed by the month */
/* Start at 1582, when modern calendar starts. */
if (year < 1582) return (-1);
/* Catch month out of range. */
if ((month < 0) || (month > 11)) return (-1);
/* Get first day of month. */
firstDay = CalcFirstOfMonth(year, month);
/* Non leap year February with 1st on Sunday: 4 rows. */
if ((month == FEBRUARY) && (firstDay == 0) && !IsLeapYear(year))
return (4);
/* Number of cells needed = blanks on 1st row + days in month. */
numCells = firstDay + DaysInMonth[month];
/* One more cell needed for the Feb 29th in leap year. */
if ((month == FEBRUARY) && (IsLeapYear(year))) numCells++;
/* 35 cells or less is 5 rows; more is 6. */
return ((numCells <= 35) ? 5 : 6);
} // NumberRowsNeeded
int CalcFirstOfMonth(int year, int month)
USE: Calculates day of the week the first day of the month falls on.
IN: year = given year after 1582 (start of the Gregorian calendar).
month = 0 for January, 1 for February, etc.
OUT: First day of month: 0 = Sunday, 1 = Monday, etc.
int firstDay; /* day of week for Jan 1, then first day of month */
int i; /* to traverse months before given month */
/* Start at 1582, when modern calendar starts. */
if (year < 1582) return (-1);
/* Catch month out of range. */
if ((month < 0) || (month > 11)) return (-1);
/* Get day of week for Jan 1 of given year. */
firstDay = CalcJanuaryFirst(year);
/* Increase firstDay by days in year before given month to get first day
* of month.
for (i = 0; i < month; i++)
firstDay += DaysInMonth[i];
/* Increase by one if month after February and leap year. */
if ((month > FEBRUARY) && IsLeapYear(year)) firstDay++;
/* Convert to day of the week and return. */
return (firstDay % 7);
} // CalcFirstOfMonth
boolean IsLeapYear(int year)
USE: Determines if given year is a leap year.
IN: year = given year after 1582 (start of the Gregorian calendar).
OUT: TRUE if given year is leap year, FALSE if not.
NOTE: Formulas capture definition of leap years; cf CalcLeapYears().
/* If multiple of 100, leap year iff multiple of 400. */
if ((year % 100) == 0) return((year % 400) == 0);
/* Otherwise leap year iff multiple of 4. */
return ((year % 4) == 0);
} // IsLeapYear
int CalcJanuaryFirst(int year)
USE: Calculate day of the week on which January 1 falls for given year.
IN: year = given year after 1582 (start of the Gregorian calendar).
OUT: Day of week for January 1: 0 = Sunday, 1 = Monday, etc.
NOTE: Formula starts with a 5, since January 1, 1582 was a Friday; then
advances the day of the week by one for every year, adding the
number of leap years intervening, because those years Jan 1
advanced by two days. Calculate mod 7 to get the day of the week.
/* Start at 1582, when modern calendar starts. */
if (year < 1582) return (-1);
/* Start Fri 01-01-1582; advance a day for each year, 2 for leap yrs. */
return ((5 + (year - 1582) + CalcLeapYears(year)) % 7);
} // CalcJanuaryFirst
int CalcLeapYears(int year)
USE: Calculate number of leap years since 1582.
IN: year = given year after 1582 (start of the Gregorian calendar).
OUT: number of leap years since the given year, -1 if year < 1582
NOTE: Count doesn't include the given year if it is a leap year.
In the Gregorian calendar, used since 1582, every fourth year
is a leap year, except for years that are a multiple of a
hundred, but not a multiple of 400, which are no longer leap
years. Years that are a multiple of 400 are still leap years:
1700, 1800, 1990 were not leap years, but 2000 will be.
int leapYears; /* number of leap years to return */
int hundreds; /* number of years multiple of a hundred */
int fourHundreds; /* number of years multiple of four hundred */
/* Start at 1582, when modern calendar starts. */
if (year < 1582) return (-1);
/* Calculate number of years in interval that are a multiple of 4. */
leapYears = (year - 1581) / 4;
/* Calculate number of years in interval that are a multiple of 100;
* subtract, since they are not leap years.
hundreds = (year - 1501) / 100;
leapYears -= hundreds;
/* Calculate number of years in interval that are a multiple of 400;
* add back in, since they are still leap years.
fourHundreds = (year - 1201) / 400;
leapYears += fourHundreds;
return (leapYears);
} // CalcLeapYears
} // class Calendar

If you post code, please post only the relevant parts and use the code tags to maintain the formatting.
http://java.sun.com/docs/books/tutorial/uiswing/
My hint is to use JLabels and JButtons in a panel. One panel like:
B L B
B L B
for navigation and one panel like
L L L L L L L
L L L L L L L
L L L L L L L
L L L L L L L
L L L L L L L
to show the calendar. Set the label's texts to whatever you need.

Similar Messages

  • Dreamweaver Changes Code

    Mutter mutter!
    Absolutely horrified - DW8.0.2 appears to act like a
    Microsoft product and changes code on opening.
    I have recently become aware that after having corrected
    every fine detail to meet W3C validation - including changing from
    <body onLoad=
    to
    <body onload=
    to comply . Just fine!
    Now whenever I return to open that same file to modify
    content only - DW has reverted my code to <body onLoad=.
    I thought only FrontPage did that. YUK!
    Check it out here at one of my clients sites.
    www.arkits.com/index.php
    I am using the following DocType:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    My Preferences :
    Under Code Rewriting I have the following "set"
    - Remove extra closing tags
    - Warn when fixing or removing tags
    - Never rewrite code with default extensions -.as .asr .asc
    .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp
    .php .php3 .vb .xml .xsl .xslt .xul
    - Special characters
    - both active content - insert and convert
    Can someone please explain and tell me what property setting
    would stop same - or is there a workaround.?
    Thanks in anticipation
    John

    I have this page -
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="TRUE"
    />
    <meta name="robots" content="index,follow" />
    </head>
    <body onload="foo()">
    <p>This is a test</p>
    <p>of a page </p>
    </body>
    </html>
    I save it. Close it. Reopen it. The code remains the same. My
    Preferences are quite ordinary. So, I cannot reproduce your
    complaint.
    And for what it's worth, your Microsoft rant is misplaced
    here.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "AceTutor_Warwick" <[email protected]> wrote
    in message
    news:[email protected]...
    > Mutter mutter!
    >
    > Absolutely horrified - DW8.0.2 appears to act like a
    Microsoft product and
    > changes code on opening.
    >
    > I have recently become aware that after having corrected
    every fine detail
    > to
    > meet W3C validation - including changing from
    > <body onLoad=
    > to
    > <body onload=
    >
    > to comply . Just fine!
    >
    > Now whenever I return to open that same file to modify
    content only - DW
    > has
    > reverted my code to <body onLoad=.
    >
    > I thought only FrontPage did that. YUK!
    >
    > Check it out here at one of my clients sites.
    > www.arkits.com/index.php
    >
    > I am using the following DocType:
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    >
    > My Preferences :
    > Under Code Rewriting I have the following "set"
    > - Remove extra closing tags
    > - Warn when fixing or removing tags
    > - Never rewrite code with default extensions -.as .asr
    .asc .asp .ascx
    > .asmx
    > .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp .php
    .php3 .vb .xml .xsl
    > .xslt .xul
    >
    > - Special characters
    > - both active content - insert and convert
    >
    > Can someone please explain and tell me what property
    setting would stop
    > same -
    > or is there a workaround.?
    >
    > Thanks in anticipation
    >
    > John
    >
    >

  • Adding or changing code

    can any one help me how to add or change code in abap editor.
    actually i created customer exit.
    so i need to include the code in the enhancements.
    so pls help me.
    thanks in advance.

    Hi cmr,
    Explain us clearly.R u enhancing a datasource ?
    In CMOD First there should be one project -> Enhancement ->Components -> double click on Exit -> double click on Include program zxrs*. then write ur code.
    Assign points if it helps..
    Regards,
    ARK

  • How change CODE page in the notify-mails from the VO ?

    NW65Sp7
    Create TeamGroup with sharefolder.
    Confgure Notify over email: Notify - when users put new file.
    This work. But i need change CODE PAGE in which this mail send...
    Where i can configure this ?
    Serg

    serg,
    It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com/ to search the knowledgebase and check the other support options available on that page under "Self Support" and "Support Programs".
    - You could also try posting your message again. Make sure it is posted in the correct newsgroup. (http://support.novell.com/forums)
    If this is a reply to a duplicate posting, please ignore and accept our apologies and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Error: Making this change would require changing code that is locked....

    DWCS3
    Rebuilding site -- I know this is a common problem, but what are the steps to resolve it?
    Error: "Making this change would require changing code that is locked by a template or a translator.  The change will be discarded."
    Click OK and the change is made anyway, oftentimes resulting in loss of document CSS and dynamic code, which is then unretrievable. EXTREMELY FRUSTRATING!!!
    There is another code at the top of all documents using the template:
    "<!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->"
    However, this line has always been in my previous documents and created no problem.
    The oddest thing is, I can be in an editable region of a document, click on an image to edit in Fireworks, edit, click DONE and it comes back in DW with that error. ???

    Looking at DW preferences, I found two Fireworks editors listed for .png, .gif, and .jpg.  Maybe that was causing a problem.
    Don't know if this will help, but....
    Here is sort of what my template code looks like:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <!-- DW6 -->
            <head>
           <!-- TemplateBeginEditable name="meta" -->
      <meta name="keywords" content="blah blah blah" />
      <meta name="description" content="blah blah blah/>
      <meta name="robots" content="noarchive, nofollow" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <meta name="google-site-verification" content="8KWIMcjzjngBlH7XsAnwF4W5M_novbbavDYWk2YIZgk" />
      <link rel="shortcut icon" href="/favicon.ico" />
              <!-- TemplateEndEditable -->
        <!-- TemplateBeginEditable name="doctitle" -->
      <title>document title</title>
              <!-- TemplateEndEditable -->          
                    <!-- TemplateBeginEditable name="stuff" -->
                    <link href="../CSS/file.css" rel="stylesheet" type="text/css" />
                    <link href="../CSS/file.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    function MM_popupMsg(msg) { //v1.0
      alert(msg);
    //-->
    </script>
            <!-- TemplateEndEditable -->
    </head>
    Here's code from a document using the template:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
      <!-- DW6 -->
            <head>
           <!-- InstanceBeginEditable name="meta" -->
      <meta name="robots" content="noarchive, nofollow" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
              <!-- InstanceEndEditable -->
        <!-- InstanceBeginEditable name="doctitle" -->
    <title>my document title</title>
    <script type="text/javascript">
    function toggleMe(a) {
    var e=document.getElementById(a);
    if(!e)return true;
    if(e.style.display=="none") {
    e.style.display="block"
    else{
    e.style.display="none"
    return true;
    </script><!-- InstanceEndEditable -->          
                    <!-- InstanceBeginEditable name="stuff" -->
                    <link href="CSS/file.css" rel="stylesheet" type="text/css" />
                    <link href="CSS/file.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    function MM_popupMsg(msg) { //v1.0
      alert(msg);
    //-->
    </script>
      <style type="text/css">
    <!--
    .blahblahblah {
    padding: 0 100px 20px 125px;
    line-height: 1.3em;
    .blehblehbleh {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #006666;}
    -->
                     </style>
    <!-- InstanceEndEditable -->
    </head>

  • Capturing change code/Reason code in CAT2 transaction for time change

    Experts,
    Wanted your suggestion and expertise in a solution where in CAT2 if a user changes the time/wbs element/tax area/work type he should be forced to put the reason code for change. The change event would populate/capture the change code, reason for change at cell level in CAT2
    Your pointers would be of great help

    The following enhancements are required to achieve the new pop up window functionality:
    1.     A new customer field should be added to the CATS time entry screen in the CATSDB.
    2.     A new check table should be created in CATSDB containing the allowable drop down entries for the new field.
    Customer fields are inserted into the CI_CATSDB structure. This structure is contained in the database table for the Time Sheet (CATSDB).
    Steps:
    1. Create a customer project using the SAP enhancement CATS0005.
    2. On the initial project administration screen, select the Enhancement components field and choose Change.
    3. Select the entry CI_CATSDB and choose Edit -> Components.
    4. Create the structure CI_CATSDB.
    5. Insert the new field to the Time Sheet database table into the structure.
        Select the data dictionary type CHAR
    6. Check and save the structure.
    7. Activate the structure.
    8. In the Cross Application > Time sheet section of the IMG Choose Make field assignment.
    9. Assign the new field to the view.
    10. Assign a number from 1 - 10 specify the name of the field, u201CChange Reasonu201D.
    Then Conditions Check for New Field:According to requirement

  • Advice needed for changing code within the Web IC...

    Hi,
    I need to change some code within the GET_QUERY_RESULT Method, which is found:
    BSP->Z_CRM_IC
    View->AuiSearch
    Controller class ZL_CRM_IC_AuiSearch_impl
    Method do_handle_event
    Method eh_onsearch
    Method get_query_result
    At present the method get_query_result belongs to class CL_CRM_AUI_QUERY_SERVICE.
    I can create a subclass from this and call it ZL_CRM_AUI_QUERY_SERVIC, then redefine the method get_query_class, and then make the appropriate changes. But that may be all uneccessary. What I don't know is how to ensure this modified code can be called.
    I have already made changes for method DO_INIT_CONTEXT, hence the reason the controller class ZL_CRM_IC_AUISEARCH_IMPL is identified. But this was simple because the view linked directly to this whereas you can see the code I need to change is further down in process chain.
    I know that method get_query_result calls a number of BADI's, but these BADI's are too low for the information that I need and therfore really need to make my code changes in the get_query_result method.
    I have been reading as much as I can on this subject, but without much success and therefore really count on experienced developers like yourselves to steer me in the right direction, or give advice.
    Jas

    I will not suggest to put your Enhancements into CL_CRM_AUI_QUERY_SERVICE.
    Rather in  Component BT  -> Class CL_CRM_BTIL .  AUi Query Service will Internally call the BOL Component ( get query result )
    In your Framework Profile Config  , you specify the Component Set  . Ex: ALL
    Component set have a List of Component Ex BP , BT .
      SPRO-> CRM -> CRM Cross Application Components -> Generic Interaction layer -> Basic Settings
    Now you can have your Custom , Component Set ( Ex : ZALL ) and Component ( ( Ex ; ZBT , Totally advisable for CIC Development Framework )
    Have BT Copied into ZBT and  Specify  ZL_CRM_BTIL (  Inherited from CL_CRM_BTIL )
    And in your Custom Component Set , Specify ZBT instead of BT . 
    Now Specify your Custom Component Set in your Framework Profile .
    Now you got the Enhancement Spot in  ZL_CRM_BTIL->GET_QUERY_RESULT
    Let me know if it make sense

  • Form for password changing. code problem

    hi dears,
    i am using forms6i. i was making a form for password changing purpose. i've written this code this is successfully compiled but it is not changing the password. wil u plz tell me where is the problem.
    declare
         v_user varchar2(50);
         v_oldpassword varchar2(50);
         v_var2 varchar2(50);
         v_leng number(3);
    begin
         v_oldpassword := get_application_property(password);
         v_user:=user;
         v_var2:=upper(:password_old);
         if v_var2<>v_oldpassword then
         message ('Old Password Is Not Correct...');
         message ('Old Password Is Not Correct...');
         raise form_trigger_failure;
         end if;
         if :password1<>:password2 then
              message ('Typed Passwords Are Not The Same...');
              message ('Typed Passwords Are Not The Same...');
              raise form_trigger_failure;
         end if;
         v_leng:=length(:password2);
         if :password1=:password2 and v_leng<=3 then
         message ('Password Must Have Four Characters...');
         message ('Password Must Have Four Characters...');
              raise form_trigger_failure;
         end if;
         if v_var2=v_oldpassword and :password1=:password2 then
         FORMS_DDL('alter user ' || v_user || ' identified by ' ||:password.password2);
         message ('Password Is Changed... Please Restart The Oracle Applications...');
         end if;
    end;
    COMMIT;
    LOGOUT;
    thanks

    Hi dear,
    Please use this code to change your password:
    declare
    v_user varchar2(50);
    v_oldpassword varchar2(50);
    v_var2 varchar2(50);
    v_leng number(3);
    begin
    v_oldpassword := get_application_property(password);
    v_user:=user;
    v_var2:=upper(:password_old);
    v_leng:=length(:password2);
    if v_var2 != v_oldpassword then
    message ('Old Password Is Not Correct...');
    message ('Old Password Is Not Correct...');
    raise form_trigger_failure;
    elsif
    :password1 != :password2 then
    message ('Typed Passwords Are Not The Same...');
    message ('Typed Passwords Are Not The Same...');
    raise form_trigger_failure;
    elsif
    :password1=:password2 and nvl(v_leng,0) <=3 then
    message ('Password Must Have Four Characters...');
    message ('Password Must Have Four Characters...');
    raise form_trigger_failure;
    elsif
    v_var2 = v_oldpassword and :password1 = :password2 then
    FORMS_DDL('alter user ' || v_user || ' identified by ' ||:password.password2);
    message ('Password Is Changed... Please Restart The Oracle Applications...');
    end if;
    end;

  • How to change Code, Name Lenght & Description

    Hi,
    How can I change the fields that are automatically generated when you create a Table? (Code & Name)
    I want to create tables with diferent kind of Key.
    For example:
    I want a date to be the key of a master file. I don´t need a name in this master file.
    I want a code with different lenght (default is 8) for another master file.
    Etc.
    I Have seen the e-learning, tutorials, and tried to create tables and fileds by code, but DI APIs always create these two fields, and I havén´t find a way to override it. I Haven't find information about it.
    I look at B1 Tables and there are different code and name fields. That´s the reason I think there would be a way to change this attributes.
    Thanks a lot.
    Guillermo

    Hi Guillermo,
    I'm afraid there is no way to override the creation of the Code and Name fields on a UDT. You could use your own non-SBO tables (SAP don't recommend it but it is allowed within certification rules) but that approach does have limitations as well (eg user can't see your table in Query Generator).
    Kind Regards,
    Owen

  • How to change code in IView (JSP)

    Hi:
    I need to remove some functionality from a standard MSS IView application, since the application is an IView I can’t remove part of the functionality from the Portal, How I can edit and change the Code? I think it is a JSP application.
    Thanks!
    Zeus

    Hi,
    Configuring Business Package
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21eb036a-0a01-0010-25a3-b2224432640a
    Regards,
    Beevin.

  • How to change code in MV50AFZZ

    HI,
    i want change the code in Include MV50AFZZ (FORM USEREXIT_LGORT_DETERMINATION). this include is provided for user exits. can any one please help me how to change the code in this Include and what are the necessary actions i need to take.

    You'll have to request a SCCR Key on SAP OSS ( http://service.sap.com )
    Then :
    -> Sap Notes Search
    -> Key and request
    -> SSCR Keys
    -> Registration ( You provides the following info : Basis Release, eg 620 then
    R3TR / Prog / MV50AFZZ
    Of course, you need an OSS user.
    Best Regards,
    Erwan

  • Help changing code for photos.

    hi, i am a complete novice and have managed to use this code
    to load videos into a div on a page, make them invisable, and play
    each individual video on a player when clicked on via a picture
    link in the same page. It works fine, but now i need to change the
    code to do the same thing for showing pictures
    here's the code for the vids
    obviously i have to change the links to photos, and the image
    source, but i need to change something else in the java script to
    get it to work. and i don't know the function for images etc.
    Please could somebody point me in the right direction.
    Thanks

    Hi Tom J.
    If you are intent on mouseover effects for the button, you
    are probably in for a fun ride coding some special solution.
    Personally, if I want an image for these, I take the
    following approach:
    Insert an image.
    Insert the RelatedTopics control and choose "Hidden, for
    scripts"
    Note the actual name of the control. Often it is simply
    RelatedTopics. But depending on how it was inserted, may be
    object1. Just hover the control in your WYSIWYG editor and the name
    should pop up in a tooltip.
    Select the image and make it a hyperlink. But in the
    hyperlink properties, type
    JavaScript:RelatedTopics.Click();. (and if the name differs
    from RelatedTopics, use what you saw instead.
    This method will make it so your user clicks the image and
    the control activates.
    Cheers... Rick

  • How to make the change code result available on development system

    Dear Friends,
    I have done the source code changes after check out code from the SLD.
    In our SLD, the NWDI is installed on Development system and configured other systems are Training, Quality and Production.
    I would like to view the result of changes on development system.
    How can I do that?
    Do I need to activate the code? or Check in the code?
    I do not want to check in the code unless it is confirmed.
    Please help me.
    Early reply appreciated.
    Thanks in advance.
    Lakshmikanthaiah

    Hi Pascal,
    Thanks for ur prompt update.
    Well, in my practice I gone ahead with on more step.
    I check-in the code and asked for activation.
    Meanwhile generated Activation Request Number displayed.
    But even after that there is no changes resulting while executing the page.
    Can you help me further on this.
    Thanks in advance.
    Thanks and regards,
    Lakshmikanthaiah

  • Change code in ABAP debugger mode ?

    Hello ABAP Experts,
    How to change the code in the abap Debugger mode.
    Suggestions appreciated.
    Thanks,
    BWer

    You can not change the code in ABAP debugger. But you can change the value of variable/ internal table / structure in ABAP Debugger. Also you can not change the constant and if you are debugging the function module, you can not change the import parameters while debugging.
    Regards,
    Pratik

  • Having problems: can't open an html file with textedit to change code

    Hi. I have been trying to open up both my index.html and my Welcome.html files with textedit in order to change the HTML codes for them - but it doesn't seem to work. When I open them using text edit I still get a discomboblutaed form of the web page and no html codes. HOWEVER when I open them with Word I can get at the HTML code. Will changing the code in Word work or must I use textedit to do it? ULtimately does anyone know how to fix the fact that your web URL always gets redirected to the home page because of the index file. For Instance, my web site is www.zanzibarhotelbeach.com but when you type that in it redirects to the opening page www.zanzibarhotelbeach.com/Home.html which is a problem for when you want to submit your web site to be found on the net. Any help would be MUCH appreciated! Cheers!

    Give TextWrangler a try. It's a free editor by the makers of BBEdit and is very well suited for editing HTML.
    But as far as your URL in the window, unless you have URL forwarding with masking you will always get the page name at the end of the URL in the browser's window. That's just how it works. With masking you will only get www.zanzibarhotelbeach.com in every window of the site. BUT visitors will only be able to bookmark the first page of your site. My tutorial site, http://toadstutorials.info/ is set up that way.
    This thread discusses how the different domain name forwarding works:
    http://discussions.apple.com/thread.jspa?threadID=1164519&tstart=0
    OT

Maybe you are looking for

  • Trace file, questions

    Could some one help me figure out what the pr, pw and time of this line means: STAT #19 id=1 cnt=109879 pid=0 pos=1 obj=72085 op='TABLE ACCESS FULL MF (cr=8214 pr=955 pw=0 time=561423 us)' Also I have problmes understanding what the parameter of bind

  • No Import aperture library option after upgrade 06 to 08

    About 2 years ago I started Aperture and stopped iPhoto06. Now I want to make a calendar. So I have read that iPhoto08 has option to import Aperture library... I got cd on ebay and upraded. Now I have iPhoto 08 ( he he nice ) but I do not have option

  • Can't create new bookmarks in safari. Lost all my existing book marks

    Lost all bookmarks, cannot create new ones.

  • PO 7.4 Upgradation details

    Hi Experts, Could you please guide me what are all the things need to take care while migrating from PI 7.11 to 7.4 single stack. Also kindly let me know what are all the post configurations needs to be done once all existing interfaces are moved to

  • EVDRE encountered error retrieving the data from web Server

    Hi, I know this is the common/generic error message, following is our scenario: We installed BPC NW 7.5 on our production box and configured F5 load balancing for two .NET servers. We are getting the error "EVDRE encountered error retrieving the data