Skip to Content
author's profile photo Former Member
Former Member

AT_NEW use on page

In a clasic reportthe requirement is that at every AT_NEW statement ,the related matter shld be printed on new page.

for eg. if for div. from 1 to 5, for each div. the related matter shld be printed on new page. thus report consists of at least 5 pages.

Thanks & Regards,

Gowd.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:29 AM

    Hi,

    after AT-NEW statment use skip lines command . Skip maximum number of lines .

    Suppose if you have defined 32 lines per page then you can use

    skip 32 lines .

    No need to use complex logic.

    Reward points if useful

    Regards,

    Nageswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 12:59 PM

    Pls look this.

    hope it will help you.

    Reward if help.

    All this AT NEW, AT FIRST, AT END OF and AT LAST are called control break statements of Internal tables and are used to calculate the TOTALS based on sertain key fields in that internal table

    FIrst to use these statements the ITAB has to be sorted by the key fields on whcih you need the SUM of the fields.

    Some time you will get * when mopving data from this int table to other table using these commands

    so you have to use

    READ TABLE ITAB INDEX SY-TABIX in AT..ENDAT..if you are using other fields between them

    DATA: sflight_tab TYPE SORTED TABLE OF sflight

    WITH UNIQUE KEY carrid connid fldate,

    sflight_wa LIKE LINE OF sflight_tab.

    SELECT *

    FROM sflight

    INTO TABLE sflight_tab.

    LOOP AT sflight_tab INTO sflight_wa.

    AT NEW connid.

    WRITE: / sflight_wa-carrid,

    sflight_wa-connid.

    ULINE.

    ENDAT.

    WRITE: / sflight_wa-fldate,

    sflight_wa-seatsocc.

    AT END OF connid.

    SUM.

    ULINE.

    WRITE: / 'Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    SKIP.

    ENDAT.

    AT END OF carrid.

    SUM.

    ULINE.

    WRITE: / 'Carrier Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    NEW-PAGE.

    ENDAT.

    AT LAST.

    SUM.

    WRITE: / 'Overall Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    ENDAT.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 01:00 PM

    Hi,

    use command new-page in at new

    for more info

    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/new_pa01.htm

    regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 01:00 PM

    YOU SHOULD USE

    AT NEW DIV.

    new-page.

    then whatver filds you wanna write.

    endat.

    but remember to take all fields that you want to print in separate variables because "at new " wont recognize them

    it will recognize new variables.

    reawrd if helpful

    keep rockin

    vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2008 at 01:01 PM

    Hi Muneshwar,

    You can use NEW-PAGE command in your AT NEW event.which will trigger new page for every new delivery.

    This might help you.

    Regards,

    kalyan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 01:02 PM

    Use AT NEW and then NEW_PAGE and then WRITE

    Narendra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:22 AM

    Hi,

    at every AT_NEW put NEW-PAGE.

    Regards.

    Chaitanya.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.