Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Loop and new-page usage in hr-abap?

Former Member
0 Kudos

Hi experts,

I am developing a report in hr-abap module.In that I am gettting the output in which each is printed twice in output.I am trying to debug but I cant get where the error is...the placement of wf_page_no and loop creates problem.

Kindly clear my doubts.Where to put the new page and clear statement in my pgm.

Thanks,

Sakthi.C

Message was edited by:

Sakthi saravanan

1 REPLY 1

Former Member
0 Kudos

Hello,

<b>CLEAR f.</b>

Additions:

1. ... WITH g

2. ... WITH NULL

Effect

Resets the contents of f to its initial value.

Notes

When CLEAR itab references an internal table itab with a header line, it only resets the sub-fields in the header entry to their initial values (as mentioned above). The individual table entries remain unchanged.

To delete the entire internal table together with all its entries, you can use CLEAR itab[] or REFRESH itab.

Within a logical expression, you can use f IS INITIAL to check that the field f contains the initial value appropriate for its type.

Variables are normally initialized according to their type, even if the specification of an explicit initial value (addition " ... VALUE lit" of the DATA statement) is missing. For this reason, it is not necessary to initialize variables again with CLEAR after defining them.

<b>NEW-PAGE</b>

Additions:

1. ... NO-TITLE

2 ... WITH-TITLE

3. ... NO-HEADING

4. ... WITH-HEADING

5. ... LINE-COUNT lin

6. ... LINE-SIZE col

7. ... PRINT ON ...

8. ... PRINT ON ...

9. ... PRINT OFF

Effect

Starts a new page during list processing.

Terminates the current page and continues output on a new page.

Notes

NEW-PAGE does not generate blank pages, it ignores pages containing no output.

NEW-PAGE increments the page counter (the system field SY-PAGNO).

The event END-OF-PAGE is not processed.

To start a new page depending on the number of unused lines remaining on the current page, use the RESERVE statement.

Addition 1

... NO-TITLE

Effect

Starts a new page but no longer outputs the standard header (title, date and page number). This is the default setting for details lists.

Addition 2

... WITH-TITLE

Effect

Starts a new page and outputs the standard page header (screen output: title, page number; print output: date, title, page number). This is the default setting for basic lists (see REPORT ... NO STANDARD PAGE HEADING).

Addition 3

... NO-HEADING

Effect

Starts a new page but no longer outputs column headers (text elements). This is the default setting for details lists.

Addition 4

... WITH-HEADING

Effect

Starts a new page and outputs the column headers (text elements). This is the default setting for basic lists (see REPORT ... NO STANDARD PAGE HEADING).

Addition 5

... LINE-COUNT lin

Effect

Starts a new page containing the number of lines per page specified by lin, except in the case of LINE-COUNT 0, where the number of lines per page is unlimited, and the internal limit is 60,000 lines. This statement has no effect in print mode.

Note

For the default setting use the addition ... LINE-COUNT in the REPORT statement.

Further notes about the use of LINE-COUNT.

Addition 6

... LINE-SIZE col

Effect

Formats the new page with the number of columns specified in col, except in the case of LINE-SIZE = 0 which indicates line length set by the system according to the standard window width.

The addition ... LINE-SIZE col is only effective on the new page if it is also the first page of a new list level.

Note

The addition works only before initialization of the new list level (with WRITE, SKIP, ...).

For the default setting use the addition ... LINE-SIZE in the REPORT statement.

The maximum line length is 1023. You should keep list width to the miniumum possible. This improves useability and performance, and makes the list easier to print (recommendation: LINE-SIZE < 132). For very wide (LINE-SIZE > 255) lists, see the notes for using LINE-SIZE greater than 255.

Reward if helpful,

Regards,

LIJO