ABAP OLE Word - Delete last page

Dear all,
I have a SAP program which prints some documents in Microsoft Word by using ABAP OLE Objects.
I use a template to take the main context, and after that I send some variables in order to populate the word document.
The problem is when I create the new word document, I paste the template text in a new document, but at the end I have always an empty page. I don't know how to delete this final page, I don't find the corresponding OLE method to do it.
I have found a method to cut a line, but the problem is that line is also empty, and I cannot cut it.
Could anyone help me?
Many thanks in advance and best regards.

Hi,
post some code lines. Format as code, use preview.
Regards,
Clemens

Similar Messages

  • ABAP OLE Word for reading a file

    Hi,
    I am looking for the method or property to get the word document content to send it to the clipboard.
    All I found an OLE is for writing but not for reading and I need it to read a file.
    Someone got an idea?
    Thanks a lot.
    David

    Hi David, the ad on top sucks.
    it's already almost 10 years old but SAP did not develop anything new un this area (as far as I know),
    [Desktop Office Integration (BC-CI) H|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf]
    copy_selection
    You use this method to copy marked text from the office document to the clipboard:
    CALL METHOD document->copy_selection
    EXPORTING no_flush = no_flush
    IMPORTING error = error
    retcode = retcode.
    paste_clipboard
    You use this method to insert the contents of the clipboard at the current cursor position. The
    clipboard contents are inserted as fixed text; there is no link to the object:
    CALL METHOD document->paste_clipboard
    EXPORTING no_flush = no_flush
    IMPORTING error = error
    retcode = retcode.
    select_all
    You use this method to mark all text in the office document.
    CALL METHOD document->select_all
    EXPORTING no_flush = no_flush
    IMPORTING error = error
    retcode = retcode.
    I hope you were looking for this.
    Regards,
    Clemens

  • Not to print last page in Script

    Hi Experts,
    I am having a Z-script for tcode F110.
    There i don't want to print 'last' Page in the form.
    The program which i s calling driver program is a standard sap include RFFORI06 calling
    'Last ' page with window 'Summary'.
    As its a standard include i can't make any changes in driver program.
    Please help.
    Thanks in advance for your support.

    The 'last' page and its window is getting called from a standard sap include as mentioned above.
    Even if i will delete 'last' page but as start_form is calling 'last' page it will generate a blank page irrespective
    of the page 'last' is deleted.
    I have even tried to do so by generating a test program and calling the script.
    Kindly advice.

  • How to supress Last Page in a Script

    Hi
    In a script I have three pages First Next and Last, my requirement doesn't’t need Last page which contains the summary. If I delete Last page with in the script, the output displays with two pages where in the first page contains all the data which I require and the next page shows the fields other than main window [don’t know why it is triggering].
    If i include the Last page with in the script with a blank new window in that, my output displays normally with a blank page at the end.
    Will any one help me how to suppress the ‘Last’ page in the scripts.
    Am working on Cheques ‘F110_PRENUM_CHCK’ and the print program is ‘RFFOUS_C’ where I want to suppress the ‘Summary’ window in the Last page. Here i don't want to modify the original program.
    Thanx
    Message was edited by:
            Shinoy N

    Hi Shinoy,
    we have the same requirement as you mentioned. We have to delete the last page ( with summary and void check ) . I deleted the last page ...eventhough the void check in the last page is reflecting.
    Please do let me know, how to delete the last page.
    Regards,

  • Delete a Page in Word Document

    I want to run a macro to delete the 3rd (and it is also the last) page of a document.  I've found the following code in the forum:
    Selection.HomeKey wdStory
    Selection.Goto What:=wdGoToPage, Count:=3
    Selection.Bookmarks("\Page").Select
    Selection.Delete
    However, when the macro hits the first line, it gets a run-time error 438 Object doesn't support this property or method.
    Interestingly, others responded that this code worked fine. 
    What am I missing?
    Thanks,
    AGI_MEG

    Where is the cursor when you run the macro?
    The problem when attempting to delete 'pages' in a Word document is that Word is not a page layout application. There are no 'pages' in a Word document, only text flowed into a document container which comprises a variety of story ranges. When attempting
    to delete a 'page' it helps to know what is on that 'page'.
    However if you want to delete the last 'page' of a document, then the following may work for you. Ensure the cursor is in the body text of the document.
    Sub Delete LastPage()
    Dim PageCount As Long
    Dim orng As Range
        Selection.EndKey wdStory
        PageCount = Selection.Information(wdActiveEndPageNumber)
        Selection.GoTo What:=wdGoToPage, Count:=PageCount
        Set orng = Selection.Bookmarks("\Page").Range
        orng.End = orng.End + 1 'ensures no empty page at the end after removal.
        orng.Delete
    End Sub
    Graham Mayor - Word MVP
    www.gmayor.com

  • Page numbers from MS Word cannot be deleted in pages

    A colleague sent me a MSWord (Mac) document that I opened in pages 09 and started working on it. I need to delete the page numbers that were put in on the MSWord document. I guess they were put in using the automatic page numbering feature in Word. However, In the Pages09 document they are not in the usual footer location. It almost looks like they are part of the page background. They are not selectable and cannot be removed. It I choose to add page numbers using Pages, they numbers appear in the usual footer location—in addition to and not supplanting– the unselectable page numbers brought over from MSWord. Does anybody know a solution to this?

    Loren,
    The persistent content usually is a Master Object. So, you were right to begin with: Format > Advanced > Make Master Objects Selectable. One would think that if this is always the solution, it would be a simple matter to now select the tenacious item and delete it. The problem is that sometimes the object while now selectable is still not accessible.
    This Master Object can hide behind the Header box, as though the Header was a solid glass wall. Deselecting the Header function, in the Document Inspector, will give you access, but it will also irretrievably delete your Header Content. A better way, I have found, is to change the header Margin figure in the Document Margins Pane of the Document Inspector.
    Once you have moved the Header, Footer, or whatever else might be sharing the space, off the persistent page number, you can click on the page number Object and hit Delete. Now you can put back whatever you had to move, and you should be good to go. Consider yourself lucky if your Pages header doesn't fall over the old Word Header.
    Jerry

  • Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser ..

    Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser .

    Go to '''TOOLS''' then''' OPTIONS''' then in '''GENERAL''' panel in '''STARTUP '''session choose '''Show my home page''', then click '''OK''' to save it, exit firefox and restart-it.
    see for more info: [https://support.mozilla.org/en-US/kb/Options%20window%20-%20General%20panel Options window - General panel]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Can you delete the last page of a document with a script?

    Hello, I have been building a script over the last week to help me remove formatting and reapply some of that formatting on a large number of files. I am still learning alot about how to build scripts and what the commmands are but I am almost doen with everything I need to put in it. One of the last things that I want to add is to delete the last page from the Indesign file whether it has content or not. Is this possible? Can anyone point me in the right direction? Thanks

    Something like this:
    if (app.activeDocument.pages.length > 1)
         app.activeDocument.pages[-1].remove();
    First check if document contains more than one page, and if does, remove last page.
    Hope that helps.
    Marijan (tomaxxi)
    http://tomaxxi.com

  • How to display amount in words in the last page

    Hi,
    I am very new to Oracle Report, but v.good experience in Crystal report.
    How can i display amount in words for an invoice amount total in the last page of the invoice and after total amount. I created a new non repeating frame and put the amount in words inside that, and set the frames diplay property Print on Last Page, but the problem is already there is a repeating frame to print all the invoices item, and the total in figure. But the amount in words frame is not always coming after the total amount,either it should be at the bottom of the last page in fixed position, otherwise it should move just below the total amount.
    I am using Oracle 11g.
    Thanks in advance...
    Fsl

    Hi ,
    Use This function
    create or replace FUNCTION xxg4_zen_conv_words (p_amount IN Number) RETURN Varchar2 IS
    --Creation Date   :  11-DEC-2009
    --Purpose         :  This Function returns amount in words.
    --Parameters      :
    --1) p_amount : Only positive and negative values are allowed.
    Precision can be entered upto 10 digits and only 2 scales
    are allowed e.g 9999999999.99
    -- Index by Tables to store word list
    TYPE typ_word_list IS TABLE OF Varchar2(200) INDEX BY BINARY_INTEGER;
    t_typ_word_list typ_word_list;
    TYPE typ_word_gap IS TABLE OF Varchar2(200) INDEX BY BINARY_INTEGER;
    t_typ_word_gap typ_word_gap;
    -- Local Variables
    v_amount Number := p_amount;
    v_amount_length Number;
    v_words Varchar2(10000);
    v_point_found Varchar2(1) := 'N';
    v_point_value Number;
    BEGIN
    /*Getting value after point if found */
    v_point_value := SUBSTR(v_amount,(INSTR(v_amount,'.',1) + 1),2);
    /*Checking whether amount has any scale value also */
    v_point_found := CASE WHEN (INSTR(v_amount,'.',1)) = 0 THEN 'N'
    WHEN (INSTR(v_amount,'.',1)) > 0 THEN 'Y'
    END;
    /*Converting amount into pure numeric format */
    v_amount := FLOOR(ABS(v_amount));
    v_amount_length := LENGTH(v_amount);
    t_typ_word_gap(2) := 'and Paise';
    t_typ_word_gap(3) := 'Hundred';
    t_typ_word_gap(4) := 'Thousand';
    t_typ_word_gap(6) := 'Lakh';
    t_typ_word_gap(8) := 'Crore';
    t_typ_word_gap(10) := 'Arab';
    FOR i IN 1..99
    LOOP
    t_typ_word_list(i) := To_Char(To_Date(i,'J'),'Jsp');
    END LOOP;
    IF v_amount_length <= 2
    THEN
    /* Conversion 1 to 99 digits */
    v_words := t_typ_word_list(v_amount);
    ELSIF v_amount_length = 3
    THEN
    /* Conversion for 3 digits till 999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(3);
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2));
    ELSIF v_amount_length = 4
    THEN
    /* Conversion for 4 digits till 9999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(4);
    IF SUBSTR(v_amount,2,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2));
    END IF;
    ELSIF v_amount_length = 5
    THEN
    /* Conversion for 5 digits till 99999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(4);
    IF SUBSTR(v_amount,3,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2));
    END IF;
    ELSIF v_amount_length = 6
    THEN
    /* Conversion for 6 digits till 999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(6);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,4,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,5,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,2));
    END IF;
    ELSIF v_amount_length = 7
    THEN
    /* Conversion for 7 digits till 9999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(6);
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,5,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,6,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,2));
    END IF;
    ELSIF v_amount_length = 8
    THEN
    /* Conversion for 8 digits till 99999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(8);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,6,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,7,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,7,2));
    END IF;
    ELSIF v_amount_length = 9
    THEN
    /* Conversion for 9 digits till 999999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,2))||' '||t_typ_word_gap(8);
    IF SUBSTR(v_amount,3,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,3,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,5,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,5,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,7,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,7,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,8,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,8,2));
    END IF;
    ELSIF v_amount_length = 10
    THEN
    /* Conversion for 10 digits till 9999999999 */
    v_words := t_typ_word_list(SUBSTR(v_amount,1,1))||' '||t_typ_word_gap(10);
    IF SUBSTR(v_amount,2,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,2,2))||' '||t_typ_word_gap(8);
    END IF;
    IF SUBSTR(v_amount,4,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,4,2))||' '||t_typ_word_gap(6);
    END IF;
    IF SUBSTR(v_amount,6,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,6,2))||' '||t_typ_word_gap(4);
    END IF;
    IF SUBSTR(v_amount,8,1) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,8,1))||' '||t_typ_word_gap(3);
    END IF;
    IF SUBSTR(v_amount,9,2) != 0
    THEN
    v_words := v_words ||' '||t_typ_word_list(SUBSTR(v_amount,9,2));
    END IF;
    END IF;
    IF v_point_found = 'Y'
    THEN
    IF v_point_value != 0
    THEN
    v_words := v_words||' '||t_typ_word_gap(2)||' '||t_typ_word_list(CASE WHEN LENGTH(SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)) = 1 THEN SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)||'0'
    WHEN LENGTH(SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)) = 2 THEN SUBSTR(p_amount,(INSTR(p_amount,'.',1) + 1),2)
    END);
    END IF;
    END IF;
    IF p_amount < 0
    THEN
    v_words := 'Minus '||v_words;
    ELSIF p_amount = 0
    THEN
    v_words := 'Zero';
    END IF;
    IF LENGTH(v_amount) > 10
    THEN
    v_words := 'Value larger than specified precision allowed to convert into words. Maximum 10 digits allowed for precision.';
    END IF;
    RETURN (v_words);
    END xxg4_Zen_Conv_Words;
    --Thanks
    SAGAR SANKPAL

  • Word 2004 won't print individual or last pages

    When printing a document in Word, the programme has just started missing the last page of docs with 2 or more pages, and won't print any single page documents. Even double sided with an even number of pages it misses the last page on the back of the second last.
    It says it is going to the printer, and the printer detects some data coming in, but then prints nothing. My work around is putting a blank page at the end of each doc, but this is annoying and cumbersome.
    This has only just started happening. Having searched for answers here and other forums, I couldn't find a solution.
    Have tried taking off collation, printing only page ranges, current page, and have looked in all the settings to no avail. This happens with both Kyocera printers (one is new, the other did not have this problem before, and all other appications work fine, making me think it is the application)
    Has anyone encountered this problem before?
    Any help much appreciated.
    Thanks from Downunder,
    Chris

    Hi Chris -
    The first things to be sure of are a) that you have the most current updates for the version of Word you are using, and b) that you have the latest print driver available.
    If you have recently updated Word/Office and-or OS X, you may need to reinstall the printer driver even if it is current.
    You'll find some helpful suggestions here
    Help! Cannot print
    http://discussions.apple.com/thread.jspa?threadID=298892&tstart=0
    Regards |:>)

  • It is possible to script the last (hyphenated) word in a page?

    With this method the checking of words in odd pages could be very helpful to improve the layout and avoiding the visual method.
    Thank you.

    It seems the real place is
    http://www.scriptopedia.org/index.php?post/reportPagesHyphen.html&navlang=en
    But the script is reporting a failure...

  • How to get footer only in last page of report

    anybody tell me
    1).how to get footer only in last page while we are displaying reports
        and header only in first page .
    2) how to create search help and how to use it .
    3) how to create lock objects and how can we use it

    Hi
    This posting has an example of using a splitter container:
    Changing width of a custom container dynamically
    This posting has a discussion about using TOP-OF-PAGE:
    Display Page numbers in ALV
    This posting has an example of using picture control:
    Insert picture in selection screen.
    This posting has an example of putting a picture on top of an ALV grid:
    Logo in OO ALV Grid
    The page footer is defined using the statement END-OF-PAGE.
    The processing block following END-OF-PAGE is processed only if you reserve lines for the footer in the LINE-COUNT option of the REPORT statement.
    <u><b>CREATION:</b></u>
    Go to SE11 Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    <b>Creating Search Help:</b>
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_imp.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm
    A lock object is a virtual link of several SAP tables which is used to synchronize simultaneous access by two users to the same set of data ( SAP lock concept).
    Locks are requested and released in the programming of online transactions by calling certain function modules which are automatically generated from the definition of the lock objects. These lock objects must be explicitly created in the ABAP Dictionary.
    <b>To set locks, you must perform the following steps:</b>
    1. You must define a lock object in the ABAP Dictionary. The name of the lock object should begin with E.
    2. The function modules for requesting and releasing locks which are created automatically when the lock object is activated must be linked to the programming of the relevant online transactions.
    <u><b>Reasons for Setting Locks</b></u>
    Suppose a travel agent want to book a flight. The customer wants to fly to a particular city with a certain airline on a certain day. The booking must only be possible if there are still free places on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked against access from other transactions. This ensures that one user can find out the number of free places, make the booking, and change the number of free places without the data being changed in the meantime by another transaction.
    <u><b>Lock Mechanisms in the Database System</b></u>
    The database system automatically sets database locks when it receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program. Database locks are physical locks on the database entries affected by these statements. You can only set a lock for an existing database entry, since the lock mechanism uses a lock flag in the entry. These flags are automatically deleted in each database commit. This means that database locks can never be set for longer than a single database LUW; in other words, a single dialog step in an R/3 application program.
    Physical locks in the database system are therefore insufficient for the requirements of an R/3 transaction. Locks in the R/3 System must remain set for the duration of a whole SAP LUW, that is, over several dialog steps. They must also be capable of being handled by different work processes and even different application servers. Consequently, each lock must apply on all servers in that R/3 System.
    <u><b>SAP Locks</b></u>
    To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the R/3 System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.
    The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.
    Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary. A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_<lock object name> and DEQUEUE_<lock object name> . You can then set and release SAP locks in your ABAP program by calling these function modules in a CALL FUNCTION statement.
    <u><b>Lock Types</b></u>
    There are two types of lock in the R/3 System:
    <u><b>
    Shared lock</b></u>
    Shared locks (or read locks) allow you to prevent data from being changed while you are reading it. They prevent other programs from setting an exclusive lock (write lock) to change the object. It does not, however, prevent other programs from setting further read locks.
    <u><b>Exclusive lock</b></u>
    Exclusive locks (or write locks) allow you to prevent data from being changed while you are changing it yourself. An exclusive lock, as its name suggests, locks an application object for exclusive use by the program that sets it. No other program can then set either a shared lock or an exclusive lock for the same application object.
    example uses the lock object ESFLIGHT and its function modules ENQUEUE_ESFLIGHT and DEQUEUE_ESFLIGHT to lock and unlock the object.
    For more information about creating lock objects and the corresponding function modules, refer to the Lock objects section of the ABAP Dictionary documentation.
    The PAI processing for screen 100 in this transaction processes the user input and prepares for the requested action (Change or Display). If the user chooses Change, the program locks the relevant database object by calling the corresponding ENQUEUE function.
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_CODE.
        WHEN 'SHOW'....
        WHEN 'CHNG'.
    * <...Authority-check and other code...>
          CALL FUNCTION 'ENQUEUE_ESFLIGHT'
    EXPORTING
    MANDT = SY-MANDT
    CARRID = SPFLI-CARRID
    CONNID = SPFLI-CONNID
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID
    TYPE 'E'
    NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    The ENQUEUE function module can trigger the following exceptions:
    FOREIGN_LOCK determines whether a conflicting lock already exists. The system variable SY-MSGV1 contains the name of the user that owns the lock.
    The SYSTEM_FAILURE exception is triggered if the enqueue server is unable to set the lock for technical reasons.
    At the end of a transaction, the locks are released automatically. However, there are exceptions if you have called update routines within the transaction. You can release a lock explicitly by calling the corresponding DEQUEUE module. As the programmer, you must decide for yourself the point at which it makes most sense to release the locks (for example, to make the data available to other transactions).
    If you need to use the DEQUEUE function module call several times in a program, it makes good sense to write it in a subroutine, which you then call as required.
    The subroutine UNLOCK_FLIGHT calls the DEQUEUE function module for the lock object ESFLIGHT:
    FORM UNLOCK_FLIGHT.
         CALL FUNCTION 'DEQUEUE_ESFLIGHT'
              EXPORTING
                  MANDT     = SY-MANDT
                  CARRID    = SPFLI-CARRID
                  CONNID    = SPFLI-CONNID
              EXCEPTIONS
                  OTHERS    = 1.
         SET SCREEN 100.
    ENDFORM.
    You might use this for the BACK and EXIT functions in a PAI module for screen 200 in this example transaction. In the program, the system checks whether the user leaves the screen without having saved his or her changes. If so, the PROMPT_AND_SAVE routine sends a reminder, and gives the user the opportunity to save the changes. The flight can be unlocked by calling the UNLOCK_FLIGHT subroutine.
    MODULE USER_COMMAND_0200 INPUT.
      CASE OK_CODE.
        WHEN 'SAVE'....
        WHEN 'EXIT'.
          CLEAR OK_CODE.
          IF OLD_SPFLI NE SPFLI.
             PERFORM PROMPT_AND_SAVE.
          ENDIF.
          PERFORM UNLOCK_FLIGHT.
          LEAVE TO SCREEN 0.
        WHEN 'BACK'....
    <b>
    Another Example</b> :
    please see this link with Screen shot .....
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/frameset.htm
    Reward all helpfull answers
    Regards
    Pavan

  • IPhoto 11 - deleted cover page

    Hi,
    I accidentally deleted the last cover page. Button to add a page is not working. Option to add a cover page does not exist. Function to repair the structure of the book does not exist or do not know about it..
    Any idea?
    Help me please, my book has 85 pages and I worked on it for five hours.

    I think I found a solution for this! I was having the same problem and not even Apple Support knew what to do. By accident I found a fix. At least, it worked in my book. My problem was that the last greyed out page was missing and the flap had turned to a full size page next to the back cover. The flap and the back cover no longer said "flap" or "back" when you selected them, they acted like pages instead.
    Somewhere else in the book add two new pages. You should now have a blank page on the left and a blank page on the right. (I set mine to a spread layout so it was easier to move through the book.) Move those pages between your last page and what is supposed to be the flap and cover. In other words, if you have a 50 page book, and even the very last one has a page number, move these two blank pages between pages 48 and 49. Sounds hokey but here is what happened for me: The first new blank page remained blank but magically the second blank page was grey. I double clicked it to enlarge and my flap and back cover were formatted right and said "flap" and "back" once again. I swear this worked in my project.
    I couldn't reproduce the original issue in a new book. It is worth a try though because it saved me the trouble of recreating a 30 hour book project. Hope that works for you.

  • OLE-Word with table

    Hi,
    i use OLE-Word to create a table in a word document and fill them.
    That's work OK, but i will position the table on a specific Positon on the page.
    Position shell be horizontal 7 and vertical 8.
    I have tried it with recording in word, bot i don't know the statements in ABAP.
    Has anyone an idea to solve it or an example?
    thanks.
    Regards, Dieter.
    Edited by: Dieter Gröhn on Jun 16, 2008 10:34 AM

    Here my code:
    REPORT ZGRO_MS_WORD_OLE_FORMLETTER_T0.
    *--Include for OLE-enabling definitions
    INCLUDE OLE2INCL .
    *--Global variables
    *--Variables to hold OLE object and entity handles
    DATA GS_WORD        TYPE OLE2_OBJECT . "OLE object handle
    DATA GS_DOCUMENT    TYPE OLE2_OBJECT . "Documents
    DATA GS_ACTIV_DOC   TYPE OLE2_OBJECT . "Active document
    DATA GS_APPLICATION TYPE OLE2_OBJECT . "Application
    DATA GS_OPTIONS     TYPE OLE2_OBJECT . "Application options
    DATA GS_ACTWIN      TYPE OLE2_OBJECT . "Active window
    DATA GS_ACTPAN      TYPE OLE2_OBJECT . "Active pane
    DATA GS_VIEW        TYPE OLE2_OBJECT . "View
    DATA GS_SELECTION   TYPE OLE2_OBJECT . "Selection
    DATA GS_FONT        TYPE OLE2_OBJECT . "Font
    DATA GS_PARFORMAT   TYPE OLE2_OBJECT . "Paragraph format
    DATA GS_TABLES      TYPE OLE2_OBJECT . "Tables
    DATA GS_RANGE       TYPE OLE2_OBJECT . "Range handle for various ranges
    DATA GS_TABLE       TYPE OLE2_OBJECT . "One table
    DATA GS_BORDER      TYPE OLE2_OBJECT . "Table border
    DATA GS_CELL        TYPE OLE2_OBJECT . "One cell of a table
    DATA GS_PARAGRAPH   TYPE OLE2_OBJECT . "Paragraph
    START-OF-SELECTION .
      PERFORM WORD_APPLIKATION.
      PERFORM TABELLE_ERSTELLEN.
      PERFORM TABELLE_ZELLE.
      FREE OBJECT GS_WORD .
    FORM WORD_APPLIKATION.
    *--Creating OLE object handle variable
      CREATE OBJECT GS_WORD 'WORD.APPLICATION' .
      IF SY-SUBRC NE 0 .
        MESSAGE S000(SU) WITH 'Error while creating OLE object!'.
        LEAVE PROGRAM .
      ENDIF .
    *--Setting object's visibility property
      SET PROPERTY OF GS_WORD 'Visible' = '1' .
    *--Opening a new document
      GET PROPERTY OF GS_WORD 'Documents' = GS_DOCUMENT.
      CALL METHOD OF GS_DOCUMENT 'Add' .
    *--Getting active document handle
      GET PROPERTY OF GS_WORD 'ActiveDocument' = GS_ACTIV_DOC .
    *--Getting applications handle
      GET PROPERTY OF GS_ACTIV_DOC 'Application' = GS_APPLICATION .
    *--Setting the measurement unit
      GET PROPERTY OF GS_APPLICATION 'Options' = GS_OPTIONS .
      SET PROPERTY OF GS_OPTIONS 'MeasurementUnit' = '1' . "CM
    *--Getting handle for the selection which is here the character at the
    *--cursor position
      GET PROPERTY OF GS_APPLICATION 'Selection' = GS_SELECTION .
      GET PROPERTY OF GS_SELECTION 'Font' = GS_FONT .
      GET PROPERTY OF GS_SELECTION 'ParagraphFormat' = GS_PARFORMAT .
    ENDFORM.                    "word_applikation
    FORM TABELLE_ERSTELLEN.
    *--Getting entity handles for the entities on the way
      GET PROPERTY OF GS_ACTIV_DOC 'Tables' = GS_TABLES .
      GET PROPERTY OF GS_SELECTION 'Range' = GS_RANGE .
    *--Adding a table
      CALL METHOD OF GS_TABLES 'Add' = GS_TABLE
           EXPORTING #1 = GS_RANGE
                     #2 = '1' "Number of rows
                     #3 = '1'. "Number of columns
    *--Setting border attribute
      GET PROPERTY OF GS_TABLE 'Borders' = GS_BORDER .
      SET PROPERTY OF GS_BORDER 'Enable' = '0' .                "0 o. 1
    DATA GS_ROWS   TYPE OLE2_OBJECT.
      GET PROPERTY OF GS_TABLE 'Rows' = GS_ROWS.
      SET PROPERTY OF GS_ROWS  'WrapAroundText' = '1'.
      SET PROPERTY OF GS_ROWS  'HorizontalPosition' = '3'.
      SET PROPERTY OF GS_ROWS  'RelativeHorizontalPosition' = '1'.
      SET PROPERTY OF GS_ROWS  'VerticalPosition' = '8'.
      SET PROPERTY OF GS_ROWS  'RelativeVerticalPosition' = '1'.
      set property of GS_ROWS  'AllowOverlap'     = '0'.
    ENDFORM.                    "Tabelle_erstellen
    FORM TABELLE_ZELLE.
    *--Getting cell coordinates
      CALL METHOD OF GS_TABLE 'Cell' = GS_CELL
        EXPORTING #1 = '1'
        #2 = '1'.
    *--Getting the range handle to write the text
      GET PROPERTY OF GS_CELL 'Range' = GS_RANGE .
    *--Filling the cell
      SET PROPERTY OF GS_RANGE 'Text' = 'Test' .
    ENDFORM.                    "TABELLE_Zelle
    in Word i record and get this:
    Sub Makro1()
    ' Makro1 Makro
    ' Makro aufgezeichnet am 16.06.2008
        ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
            1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
            wdAutoFitFixed
        With Selection.Tables(1)
            If .Style <> "Tabellengitternetz" Then
                .Style = "Tabellengitternetz"
            End If
            .ApplyStyleHeadingRows = True
            .ApplyStyleLastRow = True
            .ApplyStyleFirstColumn = True
            .ApplyStyleLastColumn = True
        End With
        With Selection.Tables(1).Rows
            .WrapAroundText = True
            .HorizontalPosition = CentimetersToPoints(2)
            .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
            .DistanceLeft = CentimetersToPoints(0.25)
            .DistanceRight = CentimetersToPoints(0.25)
            .VerticalPosition = CentimetersToPoints(8)
            .RelativeVerticalPosition = wdRelativeVerticalPositionPage
            .DistanceTop = CentimetersToPoints(0)
            .DistanceBottom = CentimetersToPoints(0)
            .AllowOverlap = False
        End With
    End Sub
    i will translate it in abap. how can i do it.
    i tried something in FORM TABELLE_ERSTELLEN but i can see the table, but i don't get the right position.
    Any idea?
    thanks.
    Regards, Dieter

  • OLE Word Documentation

    Dear all,
    Where can i found a documentation about OLE using microsoft word ???
    Thanks.

    hi check this ..
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    this is for word
    REPORT YTEST .
    *--Include for OLE-enabling definitions
    INCLUDE OLE2INCL .
    *--Global variables
    *--Variables to hold OLE object and entity handles
    DATA GS_WORD TYPE OLE2_OBJECT . "OLE object handle
    DATA GS_DOCUMENTS TYPE OLE2_OBJECT . "Documents
    DATA GS_ACTDOC TYPE OLE2_OBJECT . "Active document
    DATA GS_APPLICATION TYPE OLE2_OBJECT . "Application
    DATA GS_OPTIONS TYPE OLE2_OBJECT . "Application options
    DATA GS_ACTWIN TYPE OLE2_OBJECT . "Active window
    DATA GS_ACTPAN TYPE OLE2_OBJECT . "Active pane
    DATA GS_VIEW TYPE OLE2_OBJECT . "View
    DATA GS_SELECTION TYPE OLE2_OBJECT . "Selection
    DATA GS_FONT TYPE OLE2_OBJECT . "Font
    DATA GS_PARFORMAT TYPE OLE2_OBJECT . "Paragraph format
    DATA GS_TABLES TYPE OLE2_OBJECT . "Tables
    DATA GS_RANGE TYPE OLE2_OBJECT . "Range handle for various ranges
    DATA GS_TABLE TYPE OLE2_OBJECT . "One table
    DATA GS_TABLE_BORDER TYPE OLE2_OBJECT . "Table border
    DATA GS_CELL TYPE OLE2_OBJECT . "One cell of a table
    DATA GS_PARAGRAPH TYPE OLE2_OBJECT . "Paragraph
    DATA GV_POS(5) TYPE N . "Position information for table
    CREATE OBJECT GS_WORD 'WORD.APPLICATION' .
    IF SY-SUBRC NE 0.
    MESSAGE S000(SU) WITH 'Error while creating OLE object!'.
    LEAVE PROGRAM .
    ENDIF .
    *--Setting object's visibility property
    SET PROPERTY OF GS_WORD 'Visible' = '1' .
    *--Opening a new document
    GET PROPERTY OF GS_WORD 'Documents' = GS_DOCUMENTS .
    CALL METHOD OF GS_DOCUMENTS 'Add' .
    *--Getting active document handle
    GET PROPERTY OF GS_WORD 'ActiveDocument' = GS_ACTDOC .
    *--Getting applications handle
    GET PROPERTY OF GS_ACTDOC 'Application' = GS_APPLICATION .
    *--Setting the measurement unit
    GET PROPERTY OF GS_APPLICATION 'Options' = GS_OPTIONS .
    SET PROPERTY OF GS_OPTIONS 'MeasurementUnit' = '1' . "CM
    *--Getting handle for the selection which is here the character at the
    *--cursor position
    GET PROPERTY OF GS_APPLICATION 'Selection' = GS_SELECTION .
    GET PROPERTY OF GS_SELECTION 'Font' = GS_FONT .
    GET PROPERTY OF GS_SELECTION 'ParagraphFormat' = GS_PARFORMAT .
    *--Setting font attributes
    SET PROPERTY OF GS_FONT 'Name' = 'Arial' .
    SET PROPERTY OF GS_FONT 'Size' = '10' .
    SET PROPERTY OF GS_FONT 'Bold' = '1' . "Not bold
    SET PROPERTY OF GS_FONT 'Italic' = '1' . "Italic
    SET PROPERTY OF GS_FONT 'Underline' = '0' . "Not underlined
    *--Setting paragraph format attribute
    SET PROPERTY OF GS_PARFORMAT 'Alignment' = '2' . "Right-justified
    CALL METHOD OF GS_SELECTION 'TypeText'
    EXPORTING
    #1 = 'This is an OLE example!'.
    *--Setting the view to the main document again
    SET PROPERTY OF GS_VIEW 'SeekView' = '0' . "Main document view
    *--Reseting font attributes for the title
    SET PROPERTY OF GS_FONT 'Name' = 'Times New Roman' .
    SET PROPERTY OF GS_FONT 'Size' = '16' .
    SET PROPERTY OF GS_FONT 'Bold' = '1' . "Bold
    SET PROPERTY OF GS_FONT 'Italic' = '0' . "Not Italic
    SET PROPERTY OF GS_FONT 'Underline' = '0' . "Not underlined
    *--Setting paragraph format attribute
    SET PROPERTY OF GS_PARFORMAT 'Alignment' = '1' . "Centered
    CALL METHOD OF GS_SELECTION 'TypeText'
    EXPORTING
    #1 = TEXT-000.
    *--Advancing cursor to the new line
    CALL METHOD OF GS_SELECTION 'TypeParagraph' .
    *--Getting entity handles for the entities on the way
    GET PROPERTY OF GS_ACTDOC 'Tables' = GS_TABLES .
    GET PROPERTY OF GS_SELECTION 'Range' = GS_RANGE .
    *--Adding a table with 3 rows and 2 columns
    CALL METHOD OF GS_TABLES 'Add' = GS_TABLE
    EXPORTING
    #1 = GS_RANGE " Handle for range entity
    #2 = '3' "Number of rows
    #3 = '2'. "Number of columns
    *--Setting border attribute for the table
    GET PROPERTY OF GS_TABLE 'Borders' = GS_TABLE_BORDER .
    SET PROPERTY OF GS_TABLE_BORDER 'Enable' = '1' . "With border
    *--Filling the table with dummy data
    *--Reseting font attributes for table content
    SET PROPERTY OF GS_FONT 'Name' = 'Garamond' .
    SET PROPERTY OF GS_FONT 'Size' = '11' .
    SET PROPERTY OF GS_FONT 'Bold' = '0' . "Not bold
    SET PROPERTY OF GS_FONT 'Italic' = '0' . "Not Italic
    SET PROPERTY OF GS_FONT 'Underline' = '0' . "Not underlined
    *--Getting cell coordinates
    CALL METHOD OF GS_TABLE 'Cell'
    EXPORTING
    #1 = '1' "first row
    #2 = '1'. "first column
    *--Getting the range handle to write the text
    GET PROPERTY OF GS_CELL 'Range' = GS_RANGE .
    *--Filling the cell
    SET PROPERTY OF GS_RANGE 'Text' = 'Venkatesh Appikonda' .
    *--Getting cell coordinates
    CALL METHOD OF GS_TABLE 'Cell' = GS_CELL
    EXPORTING
    #1 = '3' "third row
    #2 = '2'. "second column
    *--Getting the range handle to write the text
    GET PROPERTY OF GS_CELL 'Range' = GS_RANGE .
    *--Filling the cell
    SET PROPERTY OF GS_RANGE 'Text' = 'this is ole example' .
    *--Advancing the cursor to the end of the table
    GET PROPERTY OF GS_TABLE 'Range' = GS_RANGE .
    GET PROPERTY OF GS_RANGE 'End' = GV_POS .
    SET PROPERTY OF GS_RANGE 'Start' = GV_POS .
    CALL METHOD OF GS_RANGE 'Select' .
    *--Skip some lines
    DO 10 TIMES .
    CALL METHOD OF GS_SELECTION 'TypeParagraph' .
    ENDDO.
    *--Reseting font attributes for ordinary text
    SET PROPERTY OF GS_FONT 'Name' = 'Times New Roman' .
    SET PROPERTY OF GS_FONT 'Size' = '12' .
    SET PROPERTY OF GS_FONT 'Bold' = '0' . "Not bold
    SET PROPERTY OF GS_FONT 'Italic' = '0' . "Not Italic
    SET PROPERTY OF GS_FONT 'Underline' = '0' . "Not underlined
    *--Setting paragraph format attribute
    SET PROPERTY OF GS_PARFORMAT 'Alignment' = '3' . "Justified
    *--Indent the paragraph once
    GET PROPERTY OF GS_SELECTION 'Paragraphs' = GS_PARAGRAPH .
    CALL METHOD OF GS_PARAGRAPH 'Indent' .
    CALL METHOD OF GS_SELECTION 'TypeText'
    EXPORTING
    #1 = TEXT-002.
    FREE OBJECT GS_WORD .
    this is for excel..
    Report ZMULTICOLOR_TEST no standard page heading.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    include ole2incl.
    handles for OLE objects
    data: h_excel type ole2_object,        " Excel object
          h_mapl type ole2_object,         " list of workbooks
          h_map type ole2_object,          " workbook
          h_zl type ole2_object,           " cell
          h_f type ole2_object,            " font
          h_c type ole2_object.            " color
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    tables: spfli.
    data  h type i.
    table of flights
    data: it_spfli like spfli occurs 10 with header line.
    *&   Event START-OF-SELECTION
    start-of-selection.
    read flights
      select * from spfli into table it_spfli.
    display header
      uline (61).
      write: /     sy-vline no-gap,
              (3)  'Flg'(001) color col_heading no-gap, sy-vline no-gap,
              (4)  'Nr'(002) color col_heading no-gap, sy-vline no-gap,
              (20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
              (20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
              (8)  'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
      uline /(61).
    display flights
      loop at it_spfli.
        write: / sy-vline no-gap,
                 it_spfli-carrid color col_key no-gap, sy-vline no-gap,
                 it_spfli-connid color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
                 it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
      endloop.
      uline /(61).
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-007
           exceptions
                others     = 1.
    start Excel
      create object h_excel 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      set property of h_excel  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'  .
    PERFORM ERR_HDL.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-008
           exceptions
                others     = 1.
    get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
      perform err_hdl.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
      perform err_hdl.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-009
           exceptions
                others     = 1.
    output column headings to active Excel sheet
      perform fill_cell using 1 1 1 200 'Carrier id'(001).
      perform fill_cell using 1 2 1 200 'Connection id'(002).
      perform fill_cell using 1 3 1 200 'City from'(003).
      perform fill_cell using 1 4 1 200 'City to'(004).
      perform fill_cell using 1 5 1 200 'Dep. Time'(005).
      loop at it_spfli.
    copy flights to active EXCEL sheet
        h = sy-tabix + 1.
        if it_spfli-carrid cs 'AA'.
          perform fill_cell using h 1 0 000255000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'AZ'.
          perform fill_cell using h 1 0 168000000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'JL'.
          perform fill_cell using h 1 0 168168000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'LH'.
          perform fill_cell using h 1 0 111111111 it_spfli-carrid.
        elseif it_spfli-carrid cs 'SQ'.
          perform fill_cell using h 1 0 100100100 it_spfli-carrid.
        else.
          perform fill_cell using h 1 0 000145000 it_spfli-carrid.
        endif.
        if it_spfli-connid lt 400.
          perform fill_cell using h 2 0 255000255 it_spfli-connid.
        elseif it_spfli-connid lt 800.
          perform fill_cell using h 2 0 077099088 it_spfli-connid.
        else.
          perform fill_cell using h 2 0 246156138 it_spfli-connid.
        endif.
        if it_spfli-cityfrom cp 'S*'.
          perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
        elseif it_spfli-cityfrom cp 'N*'.
          perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
        else.
          perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
        endif.
        if it_spfli-cityto cp 'S*'.
          perform fill_cell using h 4 0 200200200 it_spfli-cityto.
        elseif it_spfli-cityto cp 'N*'.
          perform fill_cell using h 4 0 000111222 it_spfli-cityto.
        else.
          perform fill_cell using h 4 0 130230230 it_spfli-cityto.
        endif.
        if it_spfli-deptime lt '020000'.
          perform fill_cell using h 5 0 145145145 it_spfli-deptime.
        elseif it_spfli-deptime lt '120000' .
          perform fill_cell using h 5 0 015215205 it_spfli-deptime.
        elseif it_spfli-deptime lt '180000' .
          perform fill_cell using h 5 0 000215205 it_spfli-deptime.
        else.
          perform fill_cell using h 5 0 115115105 it_spfli-deptime.
        endif.
      endloop.
    EXCEL FILENAME
      CONCATENATE SY-REPID '_' SY-DATUM6(2) '_' SY-DATUM4(2) '_'
                  SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
      CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
      free object h_excel.
      perform err_hdl.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    form fill_cell using i j bold col val.
      call method of h_excel 'Cells' = h_zl
        exporting
          #1 = i
          #2 = j.
      perform err_hdl.
      set property of h_zl 'Value' = val .
      perform err_hdl.
      get property of h_zl 'Font' = h_f.
      perform err_hdl.
      set property of h_f 'Bold' = bold .
      perform err_hdl.
      set property of h_f 'Color' = col.
      perform err_hdl.
    endform.                    "FILL_CELL
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    form err_hdl.
      if sy-subrc <> 0.
        write: / 'OLE-Automation Error:'(010), sy-subrc.
        stop.
      endif.
    endform.                    " ERR_HDL
    regards,
    venkat

Maybe you are looking for

  • RFC connection error (VPN-access)

    Hi! I have the following error for the RFC connection: The RFC connection is setup as follows. /H/10.101.7.1/S/3299/H/10.151.6.194 10.101.7.1 = IP of our SAP Router 10.151.6.194 = IP of customer system The RFC connection is established: SAP Router (i

  • RE: local variable cross-talk?

    Jeff A global can be considered as a variable to the entire code, where lots of different vi's can operate it. Locals only have any meaning within their own vi, or instances of their own vi. If anything writes to a particular global, whether in reent

  • APERTURE WON'T START UP!

    Hello everybody. I have a big problem! Aperture 3.1.2 won't start up! We have already deleted the version and installed a new one from the DVD. Update from the apple update installer. And we also tried to start up with option-apple key pushed in. But

  • 3rd Party 24" LCD on a Mac Pro via VGA

    Hello, I have my Mac connected to a 3rd Party 24" LCD via a KVM, which restricts me to using VGA for the connection. With my G5, I was unable to run at 1920x1200 until I upgraded to a Radeon 9800 Pro ME video card. I'm having the same issue with the

  • How to group: groups within group

    Hi. I am resubmitting this question with some changes. Is it possible to group some values and then use those values to group by another group value? For exp: Top level group is Month,i-e Jan, Feb, March etc Next level group is Status,e.g OPEN, CLOSE