SAPSCript how to print  a comment at the end of main window on first page?

In SAP Scripts, How do I print a comment at the end of the first page (I have several pages of data) in the main window?
- Ven

hi
good
yes we can put condition.....to display the footer window get printed after all data in main window gets over.........................assingn u r footer window to next page [ i.e u r second page] ...and write the condition
In such senario no need to use a window for footer.
In the Script form:
-> In the Main Window itself after all the main data create an Element.
-> Use BOTTOM and END-BOTTOM; write your footer information between them.
In your Driver Program:
-> After printing all the data (means after passing to form and before closing the form) call one WRITE-FORM with the footer element.
I'm sure it will work.
f u r not interested to change the print program. Then simply insert simple code in the footer wondow.
now insert this code in ur footer window
IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES&.
*all code in footer goes here.
ENDIF.
&TTXSY-PAGE& holds the page number of current page.
&SAPSCRIPT-FORMPAGES& holds total form pages.
This will work.
write this code then the footer will be printed in last page itself
/: IF &NEXTPAGE& EQ 0
whatever footer you want.
/: ENDIF
You need to create an element in the MAIN window. You can do it in two ways:
1. In SE71, you can create:
/:E FOOTER
/:BOTTOM
Text
/:ENDBOTTOM
In the print program, just call this element.
2. In you print program, populate parameter type = BOTTOM in FM, WRITE_FORM.
Ex.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
type = 'MAIN'
window = 'BOTTOM'
EXCEPTIONS....
However, if you issue new page having new header data. Thus, new item data. And if it will exceed more than 1 page, the footer will still appear. To solve this, you need to create a new element in MAIN. Ex. INIT_FOOTER. It just contains the following:
/:E INIT_FOOTER
/:BOTTOM
/:ENDBOTTOM
Call this after passing all item data.
reward point if helpful.
thanks
mrutyun^

Similar Messages

  • Need to print horizontal line at the end of main window in each page.

    Hi,
    I am printing a smartform with main window having 10 lines in footer. The problem I am facing is when the content extends upto two or more pages, I am not getting the horizontal line at the base of main window. For last page it is fine as it contains footer.
    Please suggest how to proceed.
    Thanks,
    RKU

    Hi,
    If you don't have any frame set on your main window:
    Go to output options and mark frames, and then go to details and uncheck checkboxes for above, laft and right, leving only below marked.
    This will give you a line in the bottom of you main window.
    If you dont' want to do this on the main window, can you create a new window placed at the bottom of the page and use this framing technic on that window. But in that case don't forget to mark the "always draw box and shading" checkbox. as this window contains no values, the will not get printed unless  you mark this checkbox.
    Regards
    Åsa Thenstedt

  • How doi print Any variable at the end of page in ALV report?

    Hi,
    Anyone can tell me that How do i print Any variable at the end of page in ALV report?
    Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.

    Hi,
    Go through these links
    Thread in sdn regarding FOOTER IN ALV
    [ALV  FOOTER;
    Wiki in sdn regarding HEADER AND FOOTER IN ALV
    [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
    Header and Footer in ALV
    [http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
    Hope this helps.
    Thank you,
    Pavan.

  • How to remove HTML comments at the end of the portal page

    Hi,
    I've noticed that even if you turn off performance comments, some code in the portal UI still sticks this:
    <!--Hostname: bdg-laptop--><!--Portal Version: 6.0.0.199938, Changelist: 199938, Build Date: 08/31/2005 at 07:49 PM-->
    at the bottom of every page.
    Does anyone know how I can suppress these comments?
    Thanks,
    Chris Bucchere | bdg | [email protected] | www.bdg-online.com

    Are you using GB 10.0.2 as well?
    I am using both - GarageBand 10.0.2 and GarageBand '11.
    And if I deselect all regions, File - Add Region to loop library is of course greyed out. Is it possible to save multiple tracks as a loop?
    No.
    Yep, I've deselected all regions. Still no luck.
    My answer above was in answer to your "This time GB felt I only needed the first 4 measures of the song, even though I defined an entire Region over the length of the song and selected everything with Ctrl-A..."
    You should be able to export the complete song, if you deselect all regions, and select all of the song using the cycle region with "Export Cycle region only" enabled, or with "Export Cycle region only" disabled, nothing selected, and the end-of-song marker correctly set.
    However, this will not get rid of the trailing empty bars.
    Reimport the bounced song to a new Ringtone project and trim it and save it as a tone, or to a regular project and add it to the Loop Library.
    Find the AIFF file of the loop in the Loop library - it will be installed in your User Library in your Home folder
    ~/Library/Audio/Apple Loops/User Loops/SingleFiles/

  • How to print SUM & COUNT at the end of the XML template

    Hello,
    I am generating a payment file in oracle Payments and at the end of the file, I would also like to add a trailer record with sum of the payments and number of payments. Can anyone have any suggestions on having a trailer record with SUM & COUNT.
    Thanks,

    You can use,
    COUNT and SUM of the column to get those values.
    In extext, add a new record and add these function on columns.

  • How to print text into different boxes in a main window

    Hi,
         I divided the main window into 5 windows using boxes.
         Now how can I print different data into each of these boxes.
         The data comes from a print program .
      Please suggest.

    Hi
    In smartforms you can create a template object or a table object and set the boxes.
    after you'll create the text object into the templeate and set on which box the data will write.
    best regards
    Marco

  • How to print line item 2times in two different main window in Sap Script

    Hi,
    I am designing check printing form using Sap script. I need to print line items 2times in different 2main window.can yu pls explain  how print like this.
    JK

    i cud not get ur query..pls elaborate

  • How to print a field on the last page of Smartform?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SYSF BUT NOT worked.
    Thank you.
    ROGERIO VAZ

    Hi,
    Goto the conditions tab of that window and enable the check box for Only after the end of main window.
    This will surely print your field in the last page.
    try this and get back to me if any issues.
    Regards,
    Anand.

  • SAP Script: Printing the signature on main window at the end

    Hi,
    I am working on a SAP Script (Benefits enrollment form HR_BEN_ENRO).  I copied the HR_BEN_ENRO into ZHR_BEN_ENRO and making the necessary changes without modifying the driver program.
    The problem I am facing is as follows:
    In the main window there are so many Text elements.  At the end of the main window, after the last text element, I have put some text using Include statement.  The last text element is getting triggered for some employees and hence the text underneeth that is printing, but for some employees the last element is not triggering and hence nothing is printing underneeth that.
    Is there any solution to print the this text at the end of main window after printing all the remaining information.
    I also tried using BOTTOM & ENDBOTTOM. But in this case I don't know how to check that I am in last page of the main window.  I tried the following way:
    /: BOTTOM
    /: IF &PAGE& = SAPSCRIPT-FORMPAGES&
    SIGNATURE:__________   Date:__________
    /: ENDIF
    /: ENDBOTTOM
    In this case the value I am getting for &SAPSCRIPT-FORMPAGES& is 0 (zero).
    Any solution..please.
    Appreciate.

    How to link the ZHR_BEN_ENROL instead of HR_BEN_ENRO?
    I mean when I execute the TCODE: HRBEN0001 and select particular employee and click on Print form under Offer Selection area. Then standard program calls HR_BEN_ENRO. How to replace it with Zform?
    Thanks in advance.
    Regards,
    Krishna

  • Reg: Displaying all the items of main window in the same page itself.

    All,
    I am developing an SAp Script form which is using five windows. Out of which third window is the main window. In the main window i am displaying details of item sold. The form prints perfectly when the number of items is with in the limit of the main window height. When it exceeds the main window height a second page with the same format of the first page is displayed with the remaining items in main window. ie 1,2,4,5 window is repeated in both pages.
    I want to display all the items of the main window in the first page itsel and if it exceeds first page show the remainng items in the next page and then display 4th and 5th window. IS it posiible using SAp script. Am i to do some configuration for this?
    Note: I have assigned Next page to first page itself.

    Thanks Anji.
    I understood about display of first and second windows.
    About main window and Fourth and Fifth window i still have doubt. I have given specific height to main window and after that put the fourth and fifth window with specific height in first page itself. So what happens is that When mainwindow overflows it will print up to specified height in the first page. Then prints the Fourth and Fifth window in first page. Then it goes to second window prints the remaining items in main window then again displays fourth and fifth window. Could you please find a solution for this too.
    Regs
    Rakesh

  • How to print Integrity sql in the preparedstatement?

    How to print Integrity sql in the preparedstatement?
    Connection conn = null;
    String sql = "select * from person where name=?";
    PreparedStatement ps = conn.prepareStatement(sql);
    ps.setObject(1, "robin");
    ps.executeQuery();
    i'm wants print Integrity sql.
    For example:select * from person where name='robin'
    How should I do?
    thanks a lot!

    PreparedStatement doesn't offer methods for that. You can write your own implementation of PreparedStatement which wraps the originating PreparedStatement and saves the set* values and writes it to the toString().
    If needed, myself I just print the sql as well as the values-being-set to the debug statement.Logger.debug(query + " " + values);

  • How can i remove comments from the "tell your frie...

    How can I remove comments from the "tell your friends how you're doing" section?

    Please do a Skype reset.
    Exit Skype : From the system tray >> right click on the skype icon and click "Quit"
    Press WinKey+R
    Type: %appdata% and press Enter.
    Rename the folder "Skype" to "Old_Skype"
    Run Skype.
    You will need your password to re-log on, and re-set any options from default
    Regards,
    Tamim
    Location - Dhaka | Bangladesh - Standard Time Zone: GMT/UTC + 06:00 hour
    If one of my replies has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.

  • How do I find out what the red exclamation mark or "error" on page refers to in a book that I want to send to print?

    How do I find out what the red exclamation mark or "error" on page refers to in a i-photo book that I want to send to print?

    If it's a text box it means the text has overflowed the boundries of the box.  Check for line returns which won't be visible but will trigger the warning.
    OT

  • How to print/store in file the ref cursor in pl/sql block ?

    How to print/store in file the ref cursor in pl/sql block ?.

    How to print/store in file the ref cursor in pl/sql block ?.You question is quite confusing?
    So, i'm providing link in this manner.
    For RefCursor,
    http://www.oracle-base.com/articles/misc/UsingRefCursorsToReturnRecordsets.php
    http://www.oracle.com/technology/oramag/code/tips2003/042003.html
    For UTL_FILE,
    http://www.morganslibrary.org/reference/utl_file.html
    Regards.
    Satyaki De.
    Updated with new morgan library link.
    Edited by: Satyaki_De on Feb 24, 2010 9:03 PM

  • How to print a field on the last page of Smartform with more  of 2 pages?

    HI FRIENDS,
    I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
    HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
    SFSY BUT NOT worked.      
    The form has  more of  2 pages.
    Thank you.
    ROGERIO VAZ

    Hi ,
    You dont have to hard code anything to achieve this functionality,
    just create a window and in that window define a text element to print
    that variable.In the conditions tab of that window check the check box
    "only after end of main window".i think you might have used a main window,
    so irrespective of the no of pages the smartform prints,it always displays that
    field in the last page of the smartform.
    regards,
    srikanth.

Maybe you are looking for

  • Can I update iOS from 6 to 8 directly

    Hi, all, I am using iPhone5 with iOS 6.1.4. Since iOS 8 is out and I like to try it, but the Software Update still shows 7.1.2. I am wondering can I skip iOS7 and update to iOS8 directly. cheers

  • Apple ID Profile Photo Location

    Where can I find the photo on my Apple ID profile? It's the photo I took of myself using iMac's camera while setting it up the first time I turned it on. I looked in the Photo Booth picture folder but it's not there. Does anybody know its location? T

  • File format is invalid

    I am in current version of BI in E Business Suite (shows admin tab). This is for a check printing solution which I have done previously in the older version of BI. When creating my data definition and try to add my xml file, I get an error message th

  • Help me to choose a new MacBook

    I plan to buy a MacBook within next 15 days. Now I am little bit confused to choose between the two models of 13'' MacBook (new) 2.0GHz or 2.4GHz. The 2.4 GHz model has 250 GB HDD and illuminating key board as an extra than the 2.0 GHz model. Now I c

  • Question about microphone,static and Soundblaster L

    I hope i'm directing this question to the appropriate section. Basically, when i plug my microphone into the microphone jack in my Soundblaster Li've card, any noise that i make into the microphone comes out my right speaker. Such as, if i blow into