Check on document 24 hours after created

I have a request to calculate the Created date with the Modified date.  The request is to know if a document has been altered / "touched" within 24 hours of it's being created.  I assume that would be a calculated column?  I am just
having trouble with the logic and trying to think it out.
I can do so in a sharepoint workflow as well.  do NOT need to have this be complex at all!
Was thinking of the created date in calculated column but calculated + 24 (how do I do hours or seconds, (1440 minutes) (24 hours = 86 400 seconds).  Don't know if it's created + 24 - modified and a yes or no?  or if the date = / or not
equal to or greater than or equal to [Created] - [Modified] => [today]+1 ?  No that doesn't seem right at all.

You could use the DATEDIF function:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/datedif-function-HA001160981.aspx
So something like this:
=DATEDIF(Created,Modified,"D") = 1
The trick will be on the "=".  Since ">" won't work as it may return true anytime after 1 day.
Brandon Atkinson
Blog: http://sharepointbrandon.com

Similar Messages

  • Profit center document not generated after creating the billing document

    Hi,
    I have few billing document for which the accounting document is created, but no profit center document got generated. What could be the reason? The profit center is captured at the account assignment tab of sales order as well as at the item level of Invoice and in accouting document too. The only problem is it has not generated the "Profit center document".  Pl help. Thanks in advance.

    Hi
    When you save the billing document then the accounting document and Controlling document gets generated.
    A profit center gets captured and it can be used when we check the accounting  document. But make sure that for the G/L accounts profit center is assigned and in your controlling area details  also profit center is checked.While configuring controlling then the profit center should also be assigned . to the G/L accounts .So kindly check with the help of your FICO consultant wheather proper assignment has been done or not
    Regards
    Srinath

  • Billing document should not be cancelled after creating return sales order

    Hi All,
    Billing document should not be cancelled after creating return sales order with reference to billing document. Please suggest configuration settings on the same.
    Sudheer.

    Hi,
    In SAP, when the sub-sequent document is existing , we can not cancel the preceeding document. Therefore if you want to cancel the billing document you need to calcel the documents which are created with reference to that.
    Check and confirm.
    Regards,
    Ravi Duggirala

  • HT4942 After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • After creating a sales document type in tvak

    after creating a new sales document type in tvak what next to link it to BP number.

    Hi
    it should be done via configuration, not using the tcode
    goto SPRO
    press F5
    search for SALES DOCUMENT TYPES
    <b>in sales & distribution
    sales
    sales documents
    sales document header
    define sales document types</b>
    there you have to add extra new entries
    Regards
    Anji

  • Purchase Requisitions Change after create existing document.

    Hi,
    We want to restrict System not allow to change the Purchase Requisition Quantity after create the existing document RFQ & PO with reference of PR.
    Regards
    Aamir

    Dear Amir,
    We had also faced same problem in our organization 2 years back. Then I have change the screenlayout of ME52N as follows.
    SPRO -> Materials Management -> Purchasing - > Purchase Requistion -> Define screeen layout at document level -> Create new entry ME52N by coping ME52. Then goto qty & price field, tick the Qty field as display.
    Due to this changes in PR Qty in ME52N will not be possible. If any change in PR QTY before creation of PO has to be done then user has to delete that line item in ME52N & create new line item in same PR.
    This development is successful at our end.
    Regards,
    Shekhar Gaikwad.
    SAP MM Consultant

  • Encore CS4 crashes after creating new document

    Encore crashes after creating a new document. I have tried different accounts with and without administrative privileges still the same result. Everytime a document is created or opened it results in Encore crashing. Encore will run fine if nothing is opened or created. The machine is running Windows XP with a P4 3.0 GHz processor with 4GB of RAM.

    What is the graphics card on your machine? Please try updating the latest display drivers and see if this helps.
    Also which XP OS version you are running? Is it 32 bit or 64 bit? Please note that XP64 is not a supported OS for CS4

  • After Creating Price Change its showing as Conflict Checking

    Hi All,
    In RPM 13.1.1 After creating the Price Change and submitted .After approving the price change .it shows the status as conflict checking.
    After executing the price change batches the pricing XML file is generated without FBODY.
    It displays only FHEAD and FTAIL.
    Any help on these would be thankful.

    What is the conflict check message displayed???

  • Close File 24 hours After Opening

    (Not having experience with pdf java script), I've been trying for 5 or 6 weeks to write a script - to be placed in Document Scripts (I'd prefer to say away from form fields) - that keeps a file open 24 hours after it's first launched––and then closes. (It's a 24 hour trial version).
    I've tried different configurations. (This following script works but doesn't serve my goal: Reason is, in the script below, the "final date" is fixed. The final date  has to be calculated as 24 hours (1440 * 60 * 1000) after the initial launch date.):
    var curDate = new Date();
    var finalDate = new Date("8/08/2011");
    if(finalDate.getTime() < curDate.getTime())
    {this.closeDoc(true);}
    I've tried using the following as the launch date but I can't make it work:
    var f = this.getField("Today");
    f.value = util.printd("mm/dd/yy", new Date());
    The user is free to open and close the file during the 24 hours: So: I'm also concerned that the initial "curDate" remain stable. If it doesn't, I must change that part of the script as well and use a "Date the file was opened" as a variable. I've triend to use calcluations - but have not been able to succeed. At least, I figured out, there are 3 variables: the open-file-date, the 24 hours after open file date, and current date. In the end, I check to see if the 24-hours-after-open file is < than current date and if so, closeDoc. At least I learned that much.
    Can anyone help me? I bet it's simpler than what I'm making it out to be, but I'm burnt to a crisp - I've spend all my time on this and have come to realize, it's  above my skill level and could use some help..... thank you in advance
    Clint

    You should be aware that even if you get the code right, this method can easily be disabled simply by the user disabling JavaScript, or using a non-Adobe PDF viewer.
    The main difficulty seems to be that you are not recording and storing the initial opening date/time. You will have to store this date somewhere, either in the document or in a global variable. The problem with storing it in the document is the modified document would have to be saved by the user, which may not happen. So that leaves using a global variable.
    Your code could first check for the existence of the global variable that you set up for this, and if it doesn't exists, create it, set its value to the current date/time, and set it to be persistent. You do this with the global.setPersistent method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.778.html
    Read up on the other information on the global object in the documentation.
    You then just need to compare the current date to this stored date whenever the document is opened. If the difference exceeds 24 hours, oyu cna close the document using the doc.closeDoc method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.448.html
    Here's a little information on date arithmetic: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_AcrobatForms.76.35.ht ml
    And you should be able to find more with a search.
    Again, this can't be considered secure or robust, but it may be sufficient for your needs.

  • Problem entering values in table after creating it in Word using OLE2

    Hi,
    I want to create a Word document from a Oracle Forms 6i application. The document will have standard text followed by a table. The cells of this table are to be populated from fields in the Forms application.
    I have created a sample code below. When executed from within the Forms application, it creates a document fine. It writes the text "Hello World". It then creates a table as expected. But when I try to enter a value "Cell Value" in the table, the value does not get written to the cell of the table. Instead it writes the value outside the table.
    Can someone please tell me what I am doing wrong here and what I need to do so that after writing the text on the document I can write values into the table also.
    Any help will be much appreciated.
    Here is the code(it works but then it doesn't ):
    PROCEDURE TEST_PROC IS
    hApplication OLE2.OBJ_TYPE;
    hDocuments OLE2.OBJ_TYPE;
    hDocument OLE2.OBJ_TYPE;
    hSelection OLE2.OBJ_TYPE;
    hParagraphFormat OLE2.OBJ_TYPE;
    hRange OLE2.OBJ_TYPE;
    hFont OLE2.OBJ_TYPE;
    hTables OLE2.OBJ_TYPE;
    hTable OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    wdAlignParagraphLeft CONSTANT number(3) := 0; --Default
    wdword9tablebehavior CONSTANT NUMBER (5) := 1;
    wdautofitfixed CONSTANT NUMBER (5) := 0;
    ---- wdUnits Class members
    wdcharacter CONSTANT NUMBER (5) := 1;
    wdmove CONSTANT NUMBER (5) := 0; --Default
    --wdBorderType Class members
    wdborderleft CONSTANT NUMBER := -2;
    wdborderright CONSTANT NUMBER := -4;
    wdbordertop CONSTANT NUMBER := -1;
    wdborderbottom CONSTANT NUMBER := -3;
    --WdLineStyle Class member
    wdlinestylenone CONSTANT NUMBER := 0;
    BEGIN
    hApplication:=OLE2.CREATE_OBJ('Word.Application');
    OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
    hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
    hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
    hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 11);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphLeft);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Hello World');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    htables := ole2.get_obj_property (hdocument, 'Tables');
    hrange := ole2.get_obj_property (hselection, 'Range');
    args := ole2.create_arglist;
    ole2.add_arg_obj (args, hrange); --Range
    ole2.add_arg (args, 1); --NumRows
    ole2.add_arg (args, 6); --NumColumns
    ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
    ole2.add_arg (args, wdautofitfixed); --FitBehavior
    htable := ole2.invoke_obj (htables
    ,'Add'
    ,args
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcharacter);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveLeft'
    ,args
    ole2.destroy_arglist (args);
    args := ole2.create_arglist;
    ole2.add_arg (args, 'CellValue');
    ole2.invoke (hselection
    ,'TypeText'
    ,args
    ole2.destroy_arglist (args);
    ole2.RELEASE_OBJ (happlication);
    ole2.RELEASE_OBJ (hdocuments);
    ole2.RELEASE_OBJ (hdocument);
    ole2.RELEASE_OBJ (hfont);
    ole2.RELEASE_OBJ (hparagraphformat);
    ole2.RELEASE_OBJ (htables);
    ole2.RELEASE_OBJ (hrange);
    END;

    Once again thanks for the help John. Unfortunately I cannot use only bookmarks, because the text to be entered from the application is of undetermined length and therefore since the possibility of wrapping exists, it would not be able to give me the same formatting abilty as using a table.
    However, the good news is that I have been able to find the solution. I am posting my code here so that it is available to anyone else who might have the same issue. Thanks again.
    Here is my code and my comments in it explain what it does.
    PROCEDURE extract_to_word
    IS
    /* First of all I would like to acknowledge the help I have got from experts who have posted a lot of this code on the web which I have used here. Special thanks go to someone by the name of sfvb
    found here http://www.tek-tips.com/userinfo.cfm?member=sfvbsfvb
    This procedure does the following:
    1. Opens a word document.
    2. Creates a header and pastes a picture in the header e.g your company logo with address. Please note that the image should have both the address and the logo in it. It can be created using paint where you can write your address at one end and paste a bmp or jpg picture of your logo at the other end.
    3. Writes text with specified font and size. It calls a separate procedure PRINT_LINE to do this.
    4. Creates a table on the document with specified number of columns with fixed width.
    5. Populates the cells of the table-
    first with headers written by calls to WRITE_HEADINGS procedure.
    next with data from a block of the Forms application by calls to WRITE_DATA procedure
    6. Comes out of the table and continues to write text.
    The three procedures that are repeatedly called are described after the end of this procedure.
    Note: While I have made every attempt to ensure that the code does not generate error on account of my writing the explanatory notes, I cannot be sure of having made some typos. If the code does not compile, it is most probably be on account of something I have missed in entering the comments and explanation.
    Disclaimer:
    I am not the sole author of this code. I have taken help from other open sources and copyright infringement if any is entirely unintentional.
    happlication ole2.obj_type;
    hwindow ole2.obj_type;
    hpane ole2.obj_type;
    hview ole2.obj_type;
    hdocuments ole2.obj_type;
    hdocument ole2.obj_type;
    hselection ole2.obj_type;
    hparagraphformat ole2.obj_type;
    hrange ole2.obj_type;
    hfields ole2.obj_type;
    hfont ole2.obj_type;
    hinlineshapes ole2.obj_type;
    hpars ole2.obj_type;
    hpar ole2.obj_type;
    htabstops ole2.obj_type;
    hactivedocument ole2.obj_type;
    htables ole2.obj_type;
    htable ole2.obj_type;
    hcolumns ole2.obj_type;
    hcells ole2.obj_type;
    hrows ole2.obj_type;
    hshading ole2.obj_type;
    hinsertrow ole2.obj_type;
    hborders ole2.obj_type;
    hshading ole2.obj_type;
    args ole2.list_type;
    wdalignparagraphleft CONSTANT NUMBER (3) := 0;
    wdalignparagraphcenter CONSTANT NUMBER (3) := 1;
    wdalignparagraphright CONSTANT NUMBER (3) := 2;
    wdseekcurrentpageheader CONSTANT NUMBER (3) := 9;
    wdseekcurrentpagefooter CONSTANT NUMBER (3) := 10;
    wdseekmaindocument CONSTANT NUMBER (3) := 0;
    wdfieldpage CONSTANT NUMBER (3) := 33;
    wdfieldnumpages CONSTANT NUMBER (3) := 26;
    wdpagebreak CONSTANT NUMBER (3) := 7;
    wdstory CONSTANT NUMBER (3) := 6;
    wdword CONSTANT NUMBER (5) := 2;
    wdsentence CONSTANT NUMBER (5) := 3;
    wdword8tablebehavior CONSTANT NUMBER (5) := 0;
    wdword9tablebehavior CONSTANT NUMBER (5) := 1;
    wdautofitcontent CONSTANT NUMBER (5) := 1;
    wdautofitfixed CONSTANT NUMBER (5) := 0;
    wdautofitwindow CONSTANT NUMBER (5) := 2;
    wdunderlinesingle CONSTANT NUMBER (5) := 1;
    ---- wdUnits Class members
    wdcell CONSTANT NUMBER (5) := 12;
    wdcharacter CONSTANT NUMBER (5) := 1;
    wdword CONSTANT NUMBER (5) := 2;
    wdsentence CONSTANT NUMBER (5) := 3;
    wdline CONSTANT NUMBER (5) := 5;
    ---- wdMovementType Class members
    wdextend CONSTANT NUMBER (5) := 1;
    wdmove CONSTANT NUMBER (5) := 0;
    --wdBorderType Class members
    wdborderleft CONSTANT NUMBER := -2;
    wdborderright CONSTANT NUMBER := -4;
    wdbordertop CONSTANT NUMBER := -1;
    wdborderbottom CONSTANT NUMBER := -3;
    --WdLineStyle Class member
    wdlinestylenone CONSTANT NUMBER := 0;
    mytab CONSTANT VARCHAR2 (1) := CHR (9);
    myblue CONSTANT NUMBER (8) := 16711680; --FF0000
    mygreen CONSTANT NUMBER (8) := 65280; --00FF00
    myred CONSTANT NUMBER (8) := 255; --0000FF
    mydkgreen CONSTANT NUMBER (8) := 32768; --008000
    myblack CONSTANT NUMBER (8) := 0; --000000
    mytext VARCHAR2 (2000);
    BEGIN
    happlication := ole2.create_obj ('Word.Application');
    ole2.set_property (happlication
    ,'Visible'
    ,1
    hdocuments :=
    ole2.get_obj_property (happlication, 'Documents');
    hdocument := ole2.invoke_obj (hdocuments, 'Add');
    -------- Create Header and Footer --------
    hwindow :=
    ole2.get_obj_property (happlication, 'ActiveWindow');
    hpane := ole2.get_obj_property (hwindow, 'ActivePane');
    hview := ole2.get_obj_property (hpane, 'View');
    ---- Header Section ---
    ole2.set_property (hview
    ,'SeekView'
    ,wdseekcurrentpageheader
    hselection :=
    ole2.get_obj_property (happlication, 'Selection');
    hfont := ole2.get_obj_property (hselection, 'Font');
    ole2.set_property (hfont
    ,'Name'
    ,'Calibri'
    ole2.set_property (hfont
    ,'Size'
    ,10
    ole2.set_property (hfont
    ,'Bold'
    ,FALSE
    ole2.set_property (hfont
    ,'Color'
    ,myblack
    ole2.RELEASE_OBJ (hfont);
    args := ole2.create_arglist;
    --Below is the location of your jpg file that contains the logo and address
    ole2.add_arg (args, 'C:\temp\AMHeader2.jpg');
    hinlineshapes :=
    ole2.get_obj_property (hselection, 'InlineShapes');
    ole2.invoke (hinlineshapes
    ,'AddPicture'
    ,args
    ole2.destroy_arglist (args);
    ole2.RELEASE_OBJ (hinlineshapes);
    ole2.set_property (hview
    ,'SeekView'
    ,wdseekmaindocument
    ole2.RELEASE_OBJ (hview);
    ole2.RELEASE_OBJ (hpane);
    ole2.RELEASE_OBJ (hwindow);
    -------- Insert Text --------
    hfont := ole2.get_obj_property (hselection, 'Font');
    ole2.set_property (hfont
    ,'Name'
    ,'Calibri'
    ole2.set_property (hfont
    ,'Size'
    ,9
    ole2.set_property (hfont
    ,'Bold'
    ,FALSE
    ole2.set_property (hfont
    ,'Color'
    ,myblack
    ole2.invoke (hselection, 'TypeParagraph');
    hparagraphformat :=
    ole2.get_obj_property (hselection, 'ParagraphFormat');
    ole2.set_property (hparagraphformat
    ,'Alignment'
    ,wdalignparagraphleft
    ole2.RELEASE_OBJ (hparagraphformat);
    print_line (hselection
    , 'Date ' || TO_CHAR (TRUNC (SYSDATE), 'MM/DD/YYYY')
    ,NULL
    print_line (hselection
    ,NULL
    --The following prints the address of the recipient of the letter.
    print_line (hselection
    ,addr_line1
    ,NULL
    print_line (hselection
    ,addr_line2
    ,NULL
    print_line (hselection
    ,addr_line3
    ,NULL
    print_line (hselection
    ,addr_line4
    ,NULL
    print_line (hselection
    ,addr_line5
    ,NULL
    --Call like the one below are to insert blank lines
    hselection :=
    ole2.get_obj_property (happlication, 'Selection');
    print_line (hselection
    ,NULL
    ,NULL
    print_line (hselection
    ,'Your salutation'
    ,NULL
    print_line (hselection
    ,NULL
    ,'NULL
    print_line (hselection
    ,'Ref: '
    ,NULL
    print_line (hselection
    ,NULL
    ,NULL
    print_line
    (hselection
    ,'Whatever text you want to appear on this line.'
    ,NULL
    print_line (hselection
    ,NULL
    ,NULL
    -------- Create Table --------
    htables := ole2.get_obj_property (hdocument, 'Tables');
    hrange := ole2.get_obj_property (hselection, 'Range');
    args := ole2.create_arglist;
    ole2.add_arg_obj (args, hrange); --Range 
    ole2.add_arg (args, 1); --NumRows    The rest of the rows are created later as and when required
    ole2.add_arg (args, 6); --NumColumns This creates a table of 6 columns.
    ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
    ole2.add_arg (args, wdautofitfixed); --FitBehavior
    htable := ole2.invoke_obj (htables
    ,'Add'
    ,args
    ole2.destroy_arglist (args);
    -- [Borders removal start]The following piece of code removes all the borders. Use of this is optional.
    hborders := ole2.get_obj_property (htable, 'Borders');          
    ole2.set_property (hborders                                        
    ,'OutsideLineStyle'
    ,wdlinestylenone
    ole2.set_property (hborders
    ,'InsideLineStyle'
    ,wdlinestylenone
    ole2.RELEASE_OBJ (hborders);
    --[Borders removal end]
    --The following code makes the cursor enter the table. I took quite some time
    --figuring this out.
    hselection := ole2.get_obj_property (hdocument, 'Tables');
    hselection := ole2.get_obj_property (happlication, 'Selection');
    --WRITE_HEADINGS is the procedure called each time only to write headings.
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 1'
    ,8
    --The following moves the cursor to the next cell on the right.
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 2'
    ,7
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 3'
    ,7
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 4'
    ,8
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 5'
    ,5
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_headings (hselection
    ,'Heading 1 on cell at row 1 column 6'
    ,8
    --The following moves the cursor back to the first cell on row 1 column 1
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 6);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveLeft'
    ,args
    ole2.destroy_arglist (args);
    --Now we need to write data sourced from a multi record block in Oracle Forms
    GO_BLOCK ('your_block');
    FIRST_RECORD;
    record_cnt := 0;
    LOOP
    record_cnt := record_cnt + 1;
    ---In my application I gave the choice to the user to put a check mark on those records that he would want to print ------on the document and so the following.
    IF :your_block.cb_print = 'Y'          
    THEN               
    --This creates a new row below the first row that contains the column headers.
    args := ole2.create_arglist; ole2.add_arg (args, 1);
    ole2.invoke (hselection
    ,'InsertRowsBelow'
    ,args
    ole2.destroy_arglist (args);
    --WRITE_DATA is called each time to write the data in the cells.
    write_data (hselection
    , :your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
                   , :your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
                   ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
         ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
         ,:your_block.item);
    args := ole2.create_arglist;
    ole2.add_arg (args, wdcell);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveRight'
    ,args
    ole2.destroy_arglist (args);
    write_data (hselection
    ,:your_block.item);
    END IF;
    EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    --The following makes the cursor exit the table and back on document for any further
    --writing of text.
    args := ole2.create_arglist;
    ole2.add_arg (args, wdline);
    ole2.add_arg (args, 1);
    ole2.add_arg (args, wdmove);
    ole2.invoke (hselection
    ,'MoveDown'
    ,args
    print_line (hselection           --As mentioned earlier, this enters a blank line.
    ,NULL
    ,NULL
    print_line (hselection
    ,'Boilerplate text: '
    ,your_variable
    print_line (hselection
    ,'Boilerplate text: '
    ,your_variable
    --You can print as many lines as required by making call to the PRINT_LINE procedure.
    ole2.RELEASE_OBJ (htables);
    ole2.RELEASE_OBJ (hfont);
    ole2.RELEASE_OBJ (hselection);
    ole2.RELEASE_OBJ (hdocument);
    ole2.RELEASE_OBJ (hdocuments);
    ole2.RELEASE_OBJ (happlication);
    END;
    PROCEDURE PRINT_LINE
    ( v_sel OLE2.OBJ_TYPE
    , v_text VARCHAR2
    , v_field varchar2)
    IS
    /* This procedure takes in three arguments.
    The first v_sel is the VB selection object.
    v_text is the static or boilerplate text that needs to be printed on the document.
    v_field is the value of the item or variable from the program.
    v_args      OLE2.LIST_TYPE;
    hTab     CONSTANT varchar2(1) := chr(9); --This is the vb constant for tabstop
    BEGIN
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, v_text);
    OLE2.INVOKE(v_sel, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    --The following replicates tabbing. This was used so that the field values are aligned at a tabstop.
    --When printing a blank line NULL is passed in as the argument
    v_args := OLE2.CREATE_ARGLIST;
         OLE2.ADD_ARG(v_args, hTab);
         OLE2.INVOKE(v_sel, 'TypeText', v_args);
         OLE2.DESTROY_ARGLIST(v_args);
    --The following writes the value of the variable at the tabstop.      
         v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, v_field);
    OLE2.INVOKE(v_sel, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    OLE2.INVOKE(v_sel, 'TypeParagraph');
    END;
    PROCEDURE WRITE_HEADINGS (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2, COUNTIN NUMBER)
    IS
    /* This procedure is used to write headings in the first row of the table.
    SELIN is the Selection object
    TEXTIN is the boilerplate text to be written as the header of a column.
    COUNTIN is the number of characters in the header text. This is required
    to replicate the action bolding the font of the header.
    hFont          OLE2.OBJ_TYPE;
    v_args OLE2.LIST_TYPE;
    wdCharacter CONSTANT number(5) := 1; --Default
    --wdUnderline Class members
    wdUnderlineSingle                     CONSTANT NUMBER(5) := 1;
    ---- wdMovementType Class members
    wdExtend CONSTANT number(5) := 1;
    wdMove CONSTANT number(5) := 0; --Default
    ---- WdParagraphAlignment Class members
    wdAlignParagraphCenter CONSTANT number(5) := 1;
    wdAlignParagraphLeft CONSTANT number(5) := 0;
    wdAlignParagraphRight CONSTANT number(5) := 2;
    ---- HexColor = BBGGRR
    myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
    BEGIN
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', True);
    OLE2.RELEASE_OBJ(hFont);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, textin);
    OLE2.INVOKE(selin, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, wdCharacter);
    OLE2.ADD_ARG(v_args, countin);
    OLE2.ADD_ARG(v_args, wdMove);
    OLE2.INVOKE(selin, 'MoveLeft', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, wdCharacter); --Unit
    OLE2.ADD_ARG(v_args, countin); --Count
    OLE2.ADD_ARG(v_args, wdExtend); --Extend
    OLE2.INVOKE(selin, 'MoveRight', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
    OLE2.RELEASE_OBJ(hFont);
    END;
    PROCEDURE WRITE_DATA (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2)
    IS
    /*This procedure writes data in the cells of the table
    hFont     OLE2.OBJ_TYPE;
    v_args OLE2.LIST_TYPE;
    wdCharacter CONSTANT number(5) := 1; --Default
    --wdUnderline Class members
    wdUnderlineSingle                     CONSTANT NUMBER(5) := 0;
    ---- wdMovementType Class members
    wdExtend CONSTANT number(5) := 1;
    wdMove CONSTANT number(5) := 0; --Default
    ---- WdParagraphAlignment Class members
    wdAlignParagraphCenter CONSTANT number(5) := 1;
    wdAlignParagraphLeft CONSTANT number(5) := 0;
    wdAlignParagraphRight CONSTANT number(5) := 2;
    ---- HexColor = BBGGRR
    myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
    BEGIN
    hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', False);
    OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
    OLE2.RELEASE_OBJ(hFont);
    v_args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(v_args, textin);
    OLE2.INVOKE(selin, 'TypeText', v_args);
    OLE2.DESTROY_ARGLIST(v_args);
    END;
    Edited by: smilingbandit on 31-Mar-2010 7:05 PM
    Edited by: smilingbandit on 31-Mar-2010 8:23 PM
    Edited by: smilingbandit on Apr 1, 2010 6:14 AM: Reason - Fixed formatting of comments.

  • Materials Document in COGI, after doing CO11N

    Hello Guru,
    I have created confirmation for our production order 100005166 by CO11N transaction. Result is correct material document for MvT 101 but all documents with MvT 261 failed to COGI with error "Number range different or No item with number range requirement" I do not understand this error. When I use Refresh for this lines manually in COGI transaction it is OK and they are processed correctly.
    What are the possible cause of this king of error we encountered? and what are the solution we have to do in order to correct this and not anymore encounter such issue?
    Thanks for the kind response and help for this. Please response.
    Edited by: SAP_PHIL on Aug 11, 2009 7:20 AM
    Edited by: SAP_PHIL on Aug 11, 2009 9:07 AM

    Hi,
    Kindly check with T Code OMBT, is the Number Range defined for group "Material documents for goods movements and inventory diffs" for 'WL' category documents for the current year.
    Hope that gives some clues.
    Regards,
    Rohit.
    Added: Also check the Document number after posting it from COGI. Is it macthing with the Range, if defined?
    Edited by: Rohit Chauhan on Aug 11, 2009 9:36 AM

  • Accounting Document not updated after Vf01(billing)

    Hi Gurus,
    After creating invoice in vf01 when i m looking at accounting document, then my value is updated but the quantity is not updated in fb02.
    when i see table BSEG then the value of MENGE is not updated there.
    It is always coming ZERO.
    Thanks in advance

    Hi
    Please check whether FI doculments summarisation is active for this field under procedure VBRK.
    Regards

  • Getting error message after creating project ess~org from ESS track

    Hi All,
    Our basis team just now implemented the track for ESS and MSS.So we need to sync all application from DTR.
    We are facing problem with one Dc essOrg.I have created project essOrg from ESS track in inactive DC of development configuration.Build of DC is successful,where as in the Task tab its showing below error message:
    " Tree TreeCont [dataSource]: Context element and property are not compatible Orgchart.wdview     NWI_HR1_Dessorg~sap.com/src/packages/com/sap/xss/hr/org/chart  "
    I have done the follwing steps :
    1.I have close the project.Then remove it from client.Then close the NWDs and reopen it.Still the same error we are getting after creatig project from the track.
    2.Even we tried to repair the DC.Its asking for check out.Then after creating activity its showing an error pop up message "org.eclipse.jdt.core.JavaModelException: Classpath contains duplicate entry: D:Documents and settings/susmita.panigrahi/.dtc/2/DCs/sap.com/pcui_gp/xssfpm/_comp/gen/default/public/FloorplanManager/lib/java/sap.compcui_gpxssfpm~FloorplanManager.jar "
    3.I have open the OrgChart view of VcOrgChart Component in NWDs.I have found that the data source property of Tree node is showing red cross mark with name OrgTab(name of context node).I have tried to select another node also other than the context node OrgTab , getting message "Select an attribute of Type"
    Can any body tell me how to solve the error"Context element and property are not compatible " coming for DC ess~Org?
    Thanks
    Susmita

    If you have created other projects and they are working fine? Standard application should work without any modifications, so you may like to revert all the changes(before they cause further problem).
    Well you may like to clean up your directory , unless you have loads of application checked out.. Remove all applications from this particular Track, ensure that everytime you delete project from Studio , select to remove code from directory.
    This is likely that you are working on applications from two tracks, where version of FPM component is not the same. I always prefer to work one at a time, and i remove other track if i am done with application(This is lame way of handling it, but i prefer this.. saves loads of time to clean/repair)
    Also hope you are using compatible version of Studio.
    Rgds

  • Getting error after creating project of DC ess~Org  from ESS Track

    Hi All,
    Our basis team just now implemented the track for ESS and MSS.So we need to sync all application from DTR.
    We are facing problem with one Dc essOrg.I have created project essOrg from ESS track in inactive DC of development configuration.Build of DC is successful,where as in the Task tab its showing below error message:
    " Tree TreeCont dataSource: Context element and property are not compatible Orgchart.wdview NWI_HR1_Dessorg~sap.com/src/packages/com/sap/xss/hr/org/chart "
    I have done the follwing steps :
    1.I have close the project.Then remove it from client.Then close the NWDs and reopen it.Still the same error we are getting after creatig project from the track.
    2.Even we tried to repair the DC.Its asking for check out.Then after creating activity its showing an error pop up message "org.eclipse.jdt.core.JavaModelException: Classpath contains duplicate entry: D:Documents and settings/susmita.panigrahi/.dtc/2/DCs/sap.com/pcui_gp/xssfpm/_comp/gen/default/public/FloorplanManager/lib/java/sap.compcui_gpxssfpm~FloorplanManager.jar "
    3.I have open the OrgChart view of VcOrgChart Component in NWDs.I have found that the data source property of Tree node is showing red cross mark with name OrgTab(name of context node).I have tried to select another node also other than the context node OrgTab , getting message "Select an attribute of Type"
    Can any body tell me how to solve the error"Context element and property are not compatible " coming for DC ess~Org?
    Thanks
    Susmita

    Hi,
    after creating the project, dont build it, close the project and close you NWDS then open the NWDS ,open the project and build, it will work ithink,
    i faced the same problem, try this may be it weill work.
    dont remove from client, only close the project.,
    Cheers,
    Apparao

  • Pages file document went missing after force quit. cant find it anywhere even after using recovering files softwares. HELP

    pages file document went missing after force quit. cant find it anywhere even after using recovering files softwares. HELP
    i was working on a document with pages. while transferring files from USB, the 'pinball' thing popped up for the longest time which lead me to force quit the document. the document had been saved before quitting. however, my macbook starts to reboot, and after rebooting that specific file is missing. Before it quit, it says that the file is locked and asked me to create a duplicate, which i clicked yes to.

    Hi,
    just to say that while waiting for a help
    I decided to go back from zero and moved to a second network (thanks i got some few computers available for my tests ) and this time i run in another trouble wich is the subject of a former post (with no reply...) <<HELP!! "Checksum failed" & "Integrity check on decrypted field failed ">>
    http://forum.java.sun.com/thread.jspa?threadID=791804&messageID=9468957#9468957
    Seems this always just leads us to problems...
    Strange Sun Java Security Team just won't do anything to help us deploy quite easily on one of the most widely-spread platform ( despite we don't like them that much it's MS servers (2000 and 2003) )
    Anyway if one could help... on one of the two issues Thanks

Maybe you are looking for

  • Is there actually a way to back up attached drives and have it work?

    I have 2 identical 500GB drives attached to my Mac Mini (media computer). One of them contains nothing but my iTunes library (a little over 120GB) and I was just manually copying that to the other once a week or so. After reading up on Time Machine i

  • Indesign CC

    I have updated my OS system to new Maverick, however since then i have issues with Indesign CC. Everytime I send a file to my rip to output only part of the image appears, i checked to see if this was a rip problem by also sending the same file in In

  • Finder problems after update

    Every three minutes or so, no matter what program I'm using, Mac OS X switches, on its own, to Finder. I updated my computer with the latest updates yesterday. Any ideas on why this is happening or how to fix it?

  • AVi Video to DVD

    I have some family 8mm film from the 1950's.  It was converted to the AVi format.  I am creating DVD's.  If I uncheck the "Quality:  Fit contents to available space," and set the quality slider  to Highest Quality, will the DVD's play in a DVD or Blu

  • Windows 7 64bit BSOD issue

    I've been recently getting some BSOD on my pc (win7 64bit) and for the life of me I can't figure out what's causing them. I've run memtest and didn't find any issues. One thing I've noticed is that it will sometimes sit at the login screen and just r