Table drawing

Hi  Gurus,
I have to display some list in the output from an internal table.
But here I have to display the list in  a TABLE along with the field descriptions.
I can't use the FM REUSE_ALV_LIST_DISPLAY(version 4.3).
Could any post some logic for this with which I could able to draw the lines forming a table, and  display the values in the output from the internal table.
Thanks
G sandeep Kumar.

Display your table in output using WRITE statement. Use uline, vline to draw table.
Press F1 on these to know more.

Similar Messages

  • Edit append to table draw

    I have an append to table draw that I need to populate with data when creating document records (draw) using bapi_document_create2.  How can I include the append fields, or at the very least, edit them later, without doing direct table updates.

    Hi Andrew,
    I had a quick look at bapi_document_create2, but couldn't find a predefined structure for own extensions. But this would be necessary - if there aren't structures for own extensions, you can't populate own (append-) fields.
    Anything else as direct table update? Did you add your fields somewhere into a screen? Then BDC would be an option. But there as to be a field-filling somewhere (never had the luck to get content by a standard move-corresponding - especially because append fields start with ZZ) - if no user-exit or anything else provides content for your fields, then there is definitely no other way to direct update.
    By the way: as long as you have checked now all possible ways to populate your fields and didn't find something: direct update won't lead to inconsistencies. In case of own append fields (without dynpro connection somewhere), direct update is not much worse as an update of a z-table.
    Regards,
    Christian

  • What is the link between the tables DRAW and MARA

    Hi,
    Can you tell What is the link field between the tables DRAW and MARA
    Nagesh

    Hi,
    There is no direct relationship. But you can find the materials attached as object liink to the document in table DRAD.
    Hope it helps,
    Rajat

  • Table draw!

    Hello,
    How can I draw a table using scripts?
    Note that my table may have spanned rows and/or columns!
    Many thanks,
    Aurel

    @Aurel:
    JavaScript: basically by adding a table object to an insertionPoint of a text frame or a story.
    If you have selected an empty text frame:
    var myTable = app.selection[0].insertionPoints[0].tables.add();
    Then add columns (4) and rows (10) to the table:
    myTable.columnCount = 4; //Limit: 200
    myTable.bodyRowCount = 10 //Limit: 10.000 ???
    This table will span the whole text frame, all four columns evenly devided.
    For more properties and methods for text frames, insertionPoints, tables, columns, rows and cells see Jongware's excellent documentation of the DOM:
    http://www.jongware.com/idjshelp.html
    Uwe

  • JApplet of table drawing blank screen

    Hi,
    I got a simple table applet which is supposed to show the table in accordance with the specs set in the applet. However, when I am running this applet it is showing blank gray screen. Cannot figure out where the problem is. Any help is appreciated in advance. Thanks.
    THE CODE:
    // Imports
    import java.awt.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.*;
    import javax.swing.border.*;
    public class SimpleTable extends Applet {
    private JPanel topPanel;
    private JTable table;
    private JScrollPane scrollPane;
    public void init()
    setSize( 300, 200 );
    setBackground( Color.gray );
    //Create a panel to hold all other components
    topPanel = new JPanel();
    topPanel.setLayout( new BorderLayout() );
    // Create columns names
    String columnNames[] = { "Column 1", "Column 2", "Column 3" };
    // Create some data
    String dataValues[][] =
    { "12", "234", "67" },
    { "-123", "43", "853" },
    { "93", "89.2", "109" },
    { "279", "9033", "3092" }
    // Create a new table instance
    table = new JTable( dataValues, columnNames );
    // Add the table to a scrolling pane
    scrollPane = new JScrollPane( table );
    topPanel.add( scrollPane, BorderLayout.CENTER );
    }

    Like I said before. You forgot to add your topPanel to the applet.
    Be patient. Don't cross-post.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=298900

  • More info on DRAW table and DRAZ table

    Hello,
    I am new in SAP trying to upgrade some existing code. I am looking for information concerning the DRAW and DRAZ tables and their benefits.
    any help is highly appreciated.
    Thank you

    Hi ,
             DRAW is main Doument Info Record Table for Document Management system Module.
    When you create a document Thru CV01N the doucment is updated in table DRAW and other tables .When you attach an file or an attachment to the documnet that information is stored in table DRAZ.
    If you want to know more tables you transaction SARA and enter object name CV_DVS you will get a list of tables.
    Please reward if useful .

  • How to enhance table control in DMS. Need to display doknr more than 25 cha

    Hi there.
    In transaction IL03 - document tab - I need to display a doknr which is longer than 25 characters.
    I search for exit/enhancement for DMS - saplcv140/control SUB_DOC, but cant find anything.
    If it is not possible to enhance this field, i would like to add a new field (more than 25 char) and fill in the long doknr.
    The documents that are attached contains both an internal docnumber(from the external system) and an external docnumber (functional location type of number). It is very important to show external documentno in the table control.
    Actually in the table DRAW the external dok number is in the field MRK_FILEP. Can this field somehow get in the tablecontrol?
    Anybody has experience with docno longer than 25 characters? Or how to enhance tablecontrol sub_doc (screen 0204) in fuction group CV140.
    Br,
    Liselotte.

    The BAdI CRM_BADI_RF_Q1O_SEARCH is for enhancing OneOrder based searches. Not for business partners.
    The BAdI CRM_BUPA_IL_SEARCH is the way to go. I just checked in our system.
    In the method SEARCH_CRITERIA_INITIAL check if your field is supplied in IS_PARAMETERS. If yes return CV_IS_NOT_INITIAL = 'X'.
    Then in SEARCH_PARTNERS you delete the entries from table CT_PARTNER_KEYS according to your parameter.
    However this is not very performant. If you have a search with criteria only of your own for the BAdI SAP coding will first select everything and then you filter out.
    Anyway, it is much faster to implement than a new search...
    cheers Carsten
    Edited by: Carsten Kasper on Nov 18, 2008 7:44 PM

  • How to set border lines in table and also in template in the smartforms ?

    How to set border lines in table and also in template in the smartforms ?
    As I have to create table with following detals
    total row = 3
    row1 = 3 column
    row2 = 6 column
    row3 = 9 column
    for 2nd and 3rd row data to be fetched using coding.
    so can anybody explain me what should i use
    Table or Template ?
    and I want the border like excel format.
    Can anybody suggest me ?
    Thanks
    naresh

    if the data is multiple i.e. line items choose table.
    if the data is single i.e. fixed choose template.
    Create table
    >  Draw u r no lines
    > choose option select pattern
    > select display framed patterns
    Choose u r required one.
    out lined, or full lined. u can choose option.
    same procedure to be followed for template also.
    with regards,
    Kiran.G

  • How to fill data in a table automatically

    Hello Experts,
    I would like to know if its possible to fill data in a table by looping.
    I have the following table:
    Draws(
    NUM NUMBER,
    START_DATE DATE NOT NULL,
    END_DATE DATE NOT NULL,
    ACTIVE CHAR(1 BYTE) DEFAULT 'Y')
    Now my table should contain the foll:
    Num start_date end_date active
    1 23/01/2010 21:00:00 30/01/2010 19:00:00 Y
    2 30/01/2010 21:00:00 06/02/2010 19:00:00 Y
    I have an initial start date and the end_date is always (start_date + 7) and the next start date starts with the previous end_date but time changes from 19:00 to 21:00.
    Is there a way i can enter those values on a weekly basis???
    Thanks
    Edited by: Kevin CK on Jul 5, 2010 3:07 AM

    there are a number of ways to do weekly inserts. it just depends on your environment and what you want to manage.
    1. write a PL/SQL procedure to do the periodic insert. i assume you know how to do this since you only asked about doing the insert weekly.
    2. options for running the procedure weekly:
    a. using your OS job scheduler, schedule a batch job to run a sql script to execute the procedure.
    b. inside the Oracle database, use DBMS_SCHEDULER (or DBMS_JOB if you are on a version older than 10g) to run the procedure.
    c. write yourself a reminder on a sticky note to run the procedure each week, post it on your computer, and run it manually.
    if you need more details, just say so.

  • About DIR and original file correlative table?

    Hello,
    I want to retieve  documents' origial files in batches  whether check in kpro or not from correlative table(DRAW,DMS_PH_CD1,DMS_DOC2LOIO,DMS_PHIO2FILE,DMS_DOC_FILES,DMS_PHF_CD1,etc.),
    but I didn't wholely understand the relation about document tables.how to know that original file 's statu is check in or check out or initial.
    please help me.
    thank you.
    best regards.
    pangyanting.

    Hi,
    you can use the Report: DMS_KPRO_CHECK1
    Or built your own report by using the function module CV120_KPRO_MASTER_DATA. Check the field protected in the return table ptx_data.
    There are also ways to get what you want via function module SDOK_PHIO_PROPERTIES_GET.
    BAPI are also available see SAP documentation in [note 766277|https://service.sap.com/sap/support/notes/766277].
    regards,
    Steffen

  • Need guidance with animated table

    Hi,
    I believe I need to write my own custom table drawer. The requirements of the table:
    Main one that differ from JTable
    Cells can scroll to the left or right and up or down on key press(animated-not simply changing the cell values)
    An example is the TV guide channel only mine will also scroll left and right.
    Standard table stuff
    Cells can have images and/or text
    Cells bgcolor can be modified
    Cells can span multiple columns.
    Any cell can be selected/highlighted
    All cells content must be antialiased
    Can someone please give me some direction on how to do this? Should I just start hacking away using the standard Graphics2D class? How should I handle the scrolling? Can I somehow use the JTable class with animated scrolling? I'm just worried about efficiency if I create my own class with the Graphics2D class. The table will usually be about 100 rows by 5 columns full of data (text and images).
    Thanks, sorry for sounding somewhat newbish :)

    Hi there,
    You have to implement your own JTable. I never had to deal with JTable before but here is how you could start...
    public class MyJTable {
      public MyJTable() {
        //modify the behavior here...
      public void paintComponent(Graphics g) {
        //paint your JTable the way you want... 
    }The performance may be an issue if you will use animations. Let me know if you need any more help.
    Berk Can Celebisoy

  • Document object AUSP DRAW

    Hİ,
    In table 'AUSP! field i have field called 'OBJEK' which is a combination of the fields in table 'DRAW'. i have the fields of draw : dokar, doknr, dokvr, doktl but cannot convert it to the field of ausp
    EX:
    draw-dokar = C5P
    draw-doknr = 61708-89010-01
    draw-dokvr = AA
    draw-doktl = 000
    ausp-objek = C5P61708-89010-01           AA000

    Hi ,
    You can use the concatenate statemnet for this.
    See the sample code below:
    data: p_dokar like draw-dokar,
    p_doknr like draw-doknr, 
    p_dokvr like draw-dokvr ,
    p_doktl like draw-doktl , 
    p_objek like ausp-objek.
    p_dokar = 'C5P'.
    p_doknr = '61708-89010-01'.
    p_dokvr =  'AA'.
    p_doktl =  '000'.
    concatenate:  p_dokar p_doknr p_dokvr p_doktl into p_objek .
    You can now assign this p_objeck to the feild you want in your table of type ausp-objek.
    Regards,
    Saurabh

  • Some questions on SAP DMS

    Hello
    some questions on SAP DMS:-
    - can versions of same document be shown graphically. ?
    - can links be created for documents. can we make sure that links are not broken when document is moved ?(links to document on 1st location shall not be broken)
    - is there a notification mechanism(user can recieve e-mail when document gets changed)
    - is there a review mechanism, before doc. is archived.(sort life cycle)
    Thanks

    Hi Shovon,
    1. can versions of same document be shown graphically?
    You can display all existing versions of a document info record by using the menu 'Extras' >> 'Versions'. Then you will see all existing document version for this specific document number. Further you will see which is the current version at the moment.
    2. can links be created for documents. can we make sure that links are not broken when document is moved ?(links to document on 1st location shall not be broken)
    I'm not quite sure what you mean by links to documents. If you mean linking document info records together, I can confirm that this works also in DMS. You can maintain the object DRAW for object links in the customizing and then you will be able to link one document info record to another. The data for all document info records is stored in table DRAW.
    If you are talking about originals which are linked to document info records, please note that if you check in an original the system creates a unique LOIO- and PHIO-ID which is stored in the Content Server and in the database tables DMS_DOC2LOIO and DMS_PHIO2FILE. But there are also different reports to migrate original data from one content Server to another (e.g. DMS_RELOCATE_CONTENT).
    3. Is there a notification mechanism(user can recieve e-mail when document gets changed)
    Yes you can activate an event type linkage for object
    DRAW     CHANGED     DOKST
    DRAW     CHANGED     DWNAM
    in transaction SWE2. Here you just have to set the flag for 'Type linkage' (linkage activated). Then everytime the document is changed a notification is sent to the entered USER of this document info records.
    4. Is there a review mechanism, before doc. is archived.(sort life cycle)
    Normally there is no special lifecycle. You can control this by maintaining a released status and if there are more versions always version with the release status is the current one. But there is no specific date when the document info record expires or something like that.
    Best regards,
    Christoph
    P.S.: Please reward points for useful information.

  • How to select range for dater in BAPI_DOCUMENT_GETLIST2

    Hi All
    I have following problem with this FM BAPI_DOCUMENT_GETLIST2. I was looking a lot on different forums but I cannot find answer which corresponds to my problem.
    I have in DMS saved files for our customer and Iu2019m using object linking as
    Objlinkselection-DOKOB  =  KNA1
    Objlinkselection- OBJKY   = KUNNR.
    It works well, but it takes all doc from beginning.  Iu2019d like to make selection that final table documentdata is in range of defined range date with values 20111201 to 20111231
    Now I have to select all documents for this customer and after that I have to make loop to get correct files. And it takes a huge time and in a few years it will collaps
    LOOP AT LT_DOCUMENTDATA INTO <FS> WHERE CREATEDATE IN  rn_DATE.
    ENDLOOP.
    Any hint how to make this faster? 
    Just to avoid any misunderstandings, I'm not asking on loop speed but how to select by FM less rows based on create date.
    Thank a lot fo any hint
    Petr

    Hello Deepak,
    Thanks a lot for your answer. I have read this thread already, but it is not realy what I need. But anyway in the night I have found solution.
    I will go through table DRAW where I will get just DOCNUMS for current date range.
    Than I will select correct rows from table DRAD for selected KUNNR.
    Final set od DOCNUMS I will use as selection criteria for BAPI.
    It should help, now I go to try it.
    Thansk anyway
    Petr

  • Calendar Functionality for a date field in HTML of  a ITS service

    Hi
    I am working with SRM EBP module we want to add date help(with calendar function) to existign date fields in Shopping cart and PO screens . I found some HTML and Javascripts in SYSTEM and BBPGLOBAL services (named as calendar)but not sure which ones to use if anyone used date functionality or even have access to Standard SAP ITS screens that already have date field with calendar fuctionality can you help???????????????
    Thanks in Advance

    Hi
    Let me first thank you for the quick response and timely help you provided calendar popup works great but one minor issue i am not able to click on the date entry and bring the field back into the field not sure if this funcitonality is in show_calendar.
    I would really appreciate if you get time to look at below i am almost there with your help......thanks again
    Here are the steps I did
    I have a HTML page  SAPLBBP_SC_UI_ITS screen 300 in SRM module , I created a new HTML page (zcalendar.html) in the same internet service BBPSC01 as suggested and I included in my HTML page SAPLBBP_SC_UI_ITS screen 300 and also I added below code to add a icon and a href call to the show_calendar function.
    Code works great I get the popup but when I double click on the date it is not selecting the date into the field back .
    Any thoughts??????
    <!-- Start ghantavine -->
    `include (~service="bbpsc01", ~name="zcalendar.html")`
    <!-- End ghantavine -->
    <!--    10/24/05 ghantavine--delivary date  -->
    `TR()`
        `if (GS_SCR_BASIC_I-DELIV_DATE.visible)`    
         `TR()`                                    
           `if (gs_scr_basic_i-deliv_date.disabled)`
              `TD(class="label", nowrap="x",
    active="")``TXT_BASIC_I-DELIV_DATE.label` 
              `TD(class="label", nowrap="x", active="")``gs_scr_basic_i-deliv_date.value`
            `else`  
                `TD(class="label", nowrap="x", active="")`<label
    for="`GS_SCR_BASIC_I-DELIV_DATE.name`">`TXT_BASIC_I-DELIV_DATE.label`</label>     
                `TD(class="data",  nowrap="x")`  
                <input type="text" id="GS_SCR_BASIC_I-DELIV_DATE"
    name="GS_SCR_BASIC_I-DELIV_DATE"  value="`GS_SCR_BASIC_I-DELIV_DATE.value`"
    maxlength="010" size="008">          
           <a href=http://mail.yahoo.com/config/login?/"_javascript:show_calendar();">
           <img id="anchor1" src="`mimeurl(~service="bbpglobal",
    ~name="images/button/f4.gif", ~language="", ~theme="99")`" />
           </a>
             `end`
          `TR()` `Lines()`
        `end`
    <!--      10/24/05 ghantavine--delivary date    -->
    below is the showcalendar code
    Hi , u save this as a html file and call this show_calendar fn  from Onclick button of your Calendar image .
    //  For generating the calendar
    var weekend = [0,6];
    var weekendColor = "#e0e0e0";
    var fontface = "Verdana";
    var fontsize = 2;
    var gNow = new Date();
    var ggWinCal;
    isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
    isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
    Calendar.Months = ["January", "February", "March", "April", "May", "June",
    "July", "August", "September", "October", "November", "December"];
    // Non-Leap year Month days..
    Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    // Leap year Month days..
    Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
         if ((p_month == null) && (p_year == null))     return;
         if (p_WinCal == null)
              this.gWinCal = ggWinCal;
         else
              this.gWinCal = p_WinCal;
         if (p_month == null) {
              this.gMonthName = null;
              this.gMonth = null;
              this.gYearly = true;
         } else {
              this.gMonthName = Calendar.get_month(p_month);
              this.gMonth = new Number(p_month);
              this.gYearly = false;
         this.gYear = p_year;
         this.gFormat = p_format;
         this.gBGColor = "white";
         this.gFGColor = "black";
         this.gTextColor = "black";
         this.gHeaderColor = "black";
         this.gReturnItem = p_item;
    Calendar.get_month = Calendar_get_month;
    Calendar.get_daysofmonth = Calendar_get_daysofmonth;
    Calendar.calc_month_year = Calendar_calc_month_year;
    Calendar.print = Calendar_print;
    function Calendar_get_month(monthNo) {
         return Calendar.Months[monthNo];
    function Calendar_get_daysofmonth(monthNo, p_year) {
         Check for leap year ..
         1.Years evenly divisible by four are normally leap years, except for...
         2.Years also evenly divisible by 100 are not leap years, except for...
         3.Years also evenly divisible by 400 are leap years.
         if ((p_year % 4) == 0) {
              if ((p_year % 100) == 0 && (p_year % 400) != 0)
                   return Calendar.DOMonth[monthNo];
              return Calendar.lDOMonth[monthNo];
         } else
              return Calendar.DOMonth[monthNo];
    function Calendar_calc_month_year(p_Month, p_Year, incr) {
         Will return an 1-D array with 1st element being the calculated month
         and second being the calculated year
         after applying the month increment/decrement as specified by 'incr' parameter.
         'incr' will normally have 1/-1 to navigate thru the months.
         var ret_arr = new Array();
         if (incr == -1) {
              // B A C K W A R D
              if (p_Month == 0) {
                   ret_arr[0] = 11;
                   ret_arr[1] = parseInt(p_Year) - 1;
              else {
                   ret_arr[0] = parseInt(p_Month) - 1;
                   ret_arr[1] = parseInt(p_Year);
         } else if (incr == 1) {
              // F O R W A R D
              if (p_Month == 11) {
                   ret_arr[0] = 0;
                   ret_arr[1] = parseInt(p_Year) + 1;
              else {
                   ret_arr[0] = parseInt(p_Month) + 1;
                   ret_arr[1] = parseInt(p_Year);
         return ret_arr;
    function Calendar_print() {
         ggWinCal.print();
    function Calendar_calc_month_year(p_Month, p_Year, incr) {
         Will return an 1-D array with 1st element being the calculated month
         and second being the calculated year
         after applying the month increment/decrement as specified by 'incr' parameter.
         'incr' will normally have 1/-1 to navigate thru the months.
         var ret_arr = new Array();
         if (incr == -1) {
              // B A C K W A R D
              if (p_Month == 0) {
                   ret_arr[0] = 11;
                   ret_arr[1] = parseInt(p_Year) - 1;
              else {
                   ret_arr[0] = parseInt(p_Month) - 1;
                   ret_arr[1] = parseInt(p_Year);
         } else if (incr == 1) {
              // F O R W A R D
              if (p_Month == 11) {
                   ret_arr[0] = 0;
                   ret_arr[1] = parseInt(p_Year) + 1;
              else {
                   ret_arr[0] = parseInt(p_Month) + 1;
                   ret_arr[1] = parseInt(p_Year);
         return ret_arr;
    // This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists.
    new Calendar();
    Calendar.prototype.getMonthlyCalendarCode = function() {
         var vCode = "";
         var vHeader_Code = "";
         var vData_Code = "";
         // Begin Table Drawing code here..
         vCode = vCode + "<TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\">";
         vHeader_Code = this.cal_header();
         vData_Code = this.cal_data();
         vCode = vCode + vHeader_Code + vData_Code;
         vCode = vCode + "</TABLE>";
         return vCode;
    Calendar.prototype.show = function() {
         var vCode = "";
         this.gWinCal.document.open();
         // Setup the page...
         this.wwrite("<html>");
         this.wwrite("<head><title>Calendar</title>");
         this.wwrite("</head>");
         this.wwrite("<body " +
              "link=\"" + this.gLinkColor + "\" " +
              "vlink=\"" + this.gLinkColor + "\" " +
              "alink=\"" + this.gLinkColor + "\" " +
              "text=\"" + this.gTextColor + "\">");
         this.wwriteA("<FONT FACE='" + fontface + "' SIZE=2><B>");
         this.wwriteA(this.gMonthName + " " + this.gYear);
         this.wwriteA("</B><BR>");
         // Show navigation buttons
         var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
         var prevMM = prevMMYYYY[0];
         var prevYYYY = prevMMYYYY[1];
         var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
         var nextMM = nextMMYYYY[0];
         var nextYYYY = nextMMYYYY[1];
         this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
              ");" +
              "\"><<<\/A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
              ");" +
              "\"><<\/A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
              ");" +
              "\">><\/A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
              ");" +
              "\">>><\/A>]</TD></TR></TABLE><BR>");
         // Get the complete calendar code for the month..
         vCode = this.getMonthlyCalendarCode();
         this.wwrite(vCode);
         this.wwrite("</font></body></html>");
         this.gWinCal.document.close();
    Calendar.prototype.showY = function() {
         var vCode = "";
         var i;
         var vr, vc, vx, vy;          // Row, Column, X-coord, Y-coord
         var vxf = 285;               // X-Factor
         var vyf = 200;               // Y-Factor
         var vxm = 10;               // X-margin
         var vym;                    // Y-margin
         if (isIE)     vym = 75;
         else if (isNav)     vym = 25;
         this.gWinCal.document.open();
         this.wwrite("<html>");
         this.wwrite("<head><title>Calendar</title>");
         this.wwrite("<style type='text/css'>\n<!--");
         for (i=0; i<12; i++) {
              vc = i % 3;
              if (i>=0 && i<= 2)     vr = 0;
              if (i>=3 && i<= 5)     vr = 1;
              if (i>=6 && i<= 8)     vr = 2;
              if (i>=9 && i<= 11)     vr = 3;
              vx = parseInt(vxf * vc) + vxm;
              vy = parseInt(vyf * vr) + vym;
              this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}");
         this.wwrite("-->\n</style>");
         this.wwrite("</head>");
         this.wwrite("<body " +
              "link=\"" + this.gLinkColor + "\" " +
              "vlink=\"" + this.gLinkColor + "\" " +
              "alink=\"" + this.gLinkColor + "\" " +
              "text=\"" + this.gTextColor + "\">");
         this.wwrite("<FONT FACE='" + fontface + "' SIZE=2><B>");
         this.wwrite("Year : " + this.gYear);
         this.wwrite("</B><BR>");
         // Show navigation buttons
         var prevYYYY = parseInt(this.gYear) - 1;
         var nextYYYY = parseInt(this.gYear) + 1;
         this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" +
              ");" +
              "\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
         this.wwrite("[<A HREF=\"" +
              "javascript:window.opener.Build(" +
              "'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" +
              ");" +
              "\">>><\/A>]</TD></TR></TABLE><BR>");
         // Get the complete calendar code for each month..
         var j;
         for (i=11; i>=0; i--) {
              if (isIE)
                   this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
              else if (isNav)
                   this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
              this.gMonth = i;
              this.gMonthName = Calendar.get_month(this.gMonth);
              vCode = this.getMonthlyCalendarCode();
              this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>");
              this.wwrite(vCode);
              if (isIE)
                   this.wwrite("</DIV>");
              else if (isNav)
                   this.wwrite("</LAYER>");
         this.wwrite("</font><BR></body></html>");
         this.gWinCal.document.close();
    Calendar.prototype.wwrite = function(wtext) {
         this.gWinCal.document.writeln(wtext);
    Calendar.prototype.wwriteA = function(wtext) {
         this.gWinCal.document.write(wtext);
    Calendar.prototype.cal_header = function() {
         var vCode = "";
         vCode = vCode + "<TR>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
         vCode = vCode + "<TD WIDTH='16%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
         vCode = vCode + "</TR>";
         return vCode;
    Calendar.prototype.cal_data = function() {
         var vDate = new Date();
         vDate.setDate(1);
         vDate.setMonth(this.gMonth);
         vDate.setFullYear(this.gYear);
         var vFirstDay=vDate.getDay();
         var vDay=1;
         var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
         var vOnLastDay=0;
         var vCode = "";
         Get day for the 1st of the requested month/year..
         Place as many blank cells before the 1st day of the month as necessary.
         vCode = vCode + "<TR>";
         for (i=0; i<vFirstDay; i++) {
              vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT SIZE='2' FACE='" + fontface + "'> </FONT></TD>";
         // Write rest of the 1st week
         for (j=vFirstDay; j<7; j++) {
              vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
                   "<A HREF='#' " +
                        "onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
                        this.format_data(vDay) +
                        "';window.close();\">" +
                        this.format_day(vDay) +
                   "</A>" +
                   "</FONT></TD>";
              vDay=vDay + 1;
         vCode = vCode + "</TR>";
         // Write the rest of the weeks
         for (k=2; k<7; k++) {
              vCode = vCode + "<TR>";
              for (j=0; j<7; j++) {
                   vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
                        "<A HREF='#' " +
                             "onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
                             this.format_data(vDay) +
                             "';window.close();\">" +
                        this.format_day(vDay) +
                        "</A>" +
                        "</FONT></TD>";
                   vDay=vDay + 1;
                   if (vDay > vLastDay) {
                        vOnLastDay = 1;
                        break;
              if (j == 6)
                   vCode = vCode + "</TR>";
              if (vOnLastDay == 1)
                   break;
         // Fill up the rest of last week with proper blanks, so that we get proper square blocks
         for (m=1; m<(7-j); m++) {
              if (this.gYearly)
                   vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
                   "><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'> </FONT></TD>";
              else
                   vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
                   "><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>";
         return vCode;
    Calendar.prototype.format_day = function(vday) {
         var vNowDay = gNow.getDate();
         var vNowMonth = gNow.getMonth();
         var vNowYear = gNow.getFullYear();
         if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear)
              return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>");
         else
              return (vday);
    Calendar.prototype.write_weekend_string = function(vday) {
         var i;
         // Return special formatting for the weekend day.
         for (i=0; i<weekend.length; i++) {
              if (vday == weekend<i>)
                   return (" BGCOLOR=\"" + weekendColor + "\"");
         return "";
    Calendar.prototype.format_data = function(p_day) {
         var vData;
         var vMonth = 1 + this.gMonth;
         vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
         var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
         var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
         var vY4 = new String(this.gYear);
         var vY2 = new String(this.gYear.substr(2,2));
         var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;
    /*     switch (this.gFormat) {
              case "MM\/DD\/YYYY" :
                   vData = vMonth + "\/" + vDD + "\/" + vY4;
                   break;
              case "MM\/DD\/YY" :
                   vData = vMonth + "\/" + vDD + "\/" + vY2;
                   break;
              case "MM-DD-YYYY" :
                   vData = vMonth + "-" + vDD + "-" + vY4;
                   break;
              case "MM-DD-YY" :
                   vData = vMonth + "-" + vDD + "-" + vY2;
                   break;
              case "DD\/MON\/YYYY" :
                   vData = vDD + "\/" + vMon + "\/" + vY4;
                   break;
              case "DD\/MON\/YY" :
                   vData = vDD + "\/" + vMon + "\/" + vY2;
                   break;
              case "DD-MON-YYYY" :
                   vData = vDD + "-" + vMon + "-" + vY4;
                   break;
              case "DD-MON-YY" :
                   vData = vDD + "-" + vMon + "-" + vY2;
                   break;
              case "DD\/MONTH\/YYYY" :
                   vData = vDD + "\/" + vFMon + "\/" + vY4;
                   break;
              case "DD\/MONTH\/YY" :
                   vData = vDD + "\/" + vFMon + "\/" + vY2;
                   break;
              case "DD-MONTH-YYYY" :
                   vData = vDD + "-" + vFMon + "-" + vY4;
                   break;
              case "DD-MONTH-YY" :
                   vData = vDD + "-" + vFMon + "-" + vY2;
                   break;
              case "DD\/MM\/YYYY" :
                   vData = vDD + "\/" + vMonth + "\/" + vY4;
                   break;
              case "DD\/MM\/YY" :
                   vData = vDD + "\/" + vMonth + "\/" + vY2;
                   break;
              case "DD-MM-YYYY" :
                   vData = vDD + "-" + vMonth + "-" + vY4;
                   break;
              case "DD-MM-YY" :
                   vData = vDD + "-" + vMonth + "-" + vY2;
                   break;
              default :
                   vData = vMonth + "\/" + vDD + "\/" + vY4;
    vData = vY4vMonthvDD ;
    //vData = vDD"."vMonth"."vY4;
         return vData;
    function Build(p_item, p_month, p_year, p_format) {
         var p_WinCal = ggWinCal;
         gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);
         // Customize your Calendar here..
         gCal.gBGColor="white";
         gCal.gLinkColor="black";
         gCal.gTextColor="black";
         gCal.gHeaderColor="darkgreen";
         // Choose appropriate show function
         if (gCal.gYearly)     gCal.showY();
         else     gCal.show();
    function show_calendar() {
              p_month : 0-11 for Jan-Dec; 12 for All Months.
              p_year     : 4-digit year
              p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
              p_item     : Return Item.
         p_item = arguments[0];
         if (arguments[1] == null)
              p_month = new String(gNow.getMonth());
         else
              p_month = arguments[1];
         if (arguments[2] == "" || arguments[2] == null)
              p_year = new String(gNow.getFullYear().toString());
         else
              p_year = arguments[2];
         if (arguments[3] == null)
              p_format = "MM/DD/YYYY";
         else
              p_format = arguments[3];
         vWinCal = window.open("", "Calendar",
              "width=300,height=250,status=no,resizable=no,top=100,left=100");
         vWinCal.opener = self;
         ggWinCal = vWinCal;
         Build(p_item, p_month, p_year, p_format);
    Yearly Calendar Code Starts here
    function show_yearly_calendar(p_item, p_year, p_format) {
         // Load the defaults..
         if (p_year == null || p_year == "")
              p_year = new String(gNow.getFullYear().toString());
         if (p_format == null || p_format == "")
              p_format = "MM/DD/YYYY";
         var vWinCal = window.open("", "Calendar", "scrollbars=yes");
         vWinCal.opener = self;
         ggWinCal = vWinCal;
         Build(p_item, null, p_year, p_format);

Maybe you are looking for