cancel
Showing results for 
Search instead for 
Did you mean: 

new to abap

Former Member
0 Kudos

Hi all,

I am new to abap

what does it mean line-count8(2) and line-count0(1)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

...another is when u use the line-count addition in the report statement..

report yxxxx .....line-count 2(1)

it means LINE-COUNT page_lines(footer_lines)

rgds,

PJ

Answers (5)

Answers (5)

Former Member
0 Kudos

REPORT zhari_temp LINE-SIZE 40 LINE-COUNT 8(2).

what this code is doing

END-OF-PAGE.

ULINE.

START-OF-SELECTION.

DO 4 TIMES.

WRITE / sy-index.

ENDDO.

DO 2 TIMES.

WRITE / sy-index.

ENDDO.

RESERVE 3 LINES.

WRITE: / 'LINE 1',

/ 'LINE 2',

/ 'LINE 3'.

Former Member
0 Kudos

in your examples

no. of page lines = 8

footer lines = 2

read the following from documentation....

***************************************************

... LINE-COUNT page_lines[(footer_lines)]

Effect

This addition specifies the page length for the basic list of the program to page_lines lines and fills the system field sy-linct with this value. If the LINE-COUNT is not specifed, and if page_lines are less than or equal to 0 or greater than 60,000, then the page length is set internally to 60,000. This setting overwrites the passed value of the like-named LINE-SIZE addition to the statement SUBMIT and can be overwritten during list creation with the like-named LINE-COUNT addition to the statement NEW-PAGE.

If you optionally specify a number for footer_lines, a corresponding number of lines are reserved for the page footer, which can be described in the event block END-OF-PAGE.

You must specify page_lines and footer_lines as numeric literals.

Former Member
0 Kudos

hi,

line-count 8(2)

specifying a fixed number of lines (LINE-COUNT) for each list page in the REPORT or NEW-PAGE statement

read above documentation

regards,

venu.

Former Member
0 Kudos

Line-count8(2) actually Creates a report list with 8 lines per page, of which 2 lines are reserved for the END-OF-PAGE processing.

Ur program is printing sy-index six times and after that prints line1 , line2 and line 3 in next page because reserve 3 lines means if there is not enough space left on the current page for at least 3 lines, start a new page.

Dont forget to reward if this is useful

Former Member
0 Kudos

Hi Hari,

<b>Top-of-page , End-of-page</b> are the event for displaying data in user required format while displaying a list.

<b>ULINE</b> dispays a horizontal line in the output list

Start-of-selection is the event for reteriving data from database and is the default event.

<b>OVER VIEW:</b> u r looping and displaying the index.

Regards,

Azee.

Former Member
0 Kudos

Hi,

some of them said that line-count 8(2) means 8 lines per page in that 2 lines for footer.but its not behaving like that so can you please expalin me clearly.whetehr header lines has to be counted r what

Former Member
0 Kudos

Hi priyank,

so you mean totaly 10 lines will be taken. so can you please explain how the program is working

Message was edited by: hari haran

Former Member
0 Kudos

because of the reserve statement it doesn't show total 10 lines..

reserve 3 means if there is a space for 3 line only then print on current page other wise print on next page

Former Member
0 Kudos

no... total 8 lines....2 for footer...

REPORT ytestpri line-count 8(2).

do 15 times.

write 😕 'page'.

enddo.

end-of-page.

do 5 times.

write 😕 'end'.

enddo.

run this program and see the output...it will be clear...

Former Member
0 Kudos

hi,

check with this

Addition 3

... LINE-COUNT n(m)

Effect

Creates a report list with n lines per page, of which m lines are reserved for the END-OF-PAGE processing. If you omit the "(m)", the default value 0 applies. The system field SY-LINCT contains the current number of lines per page for generating lists.

If the LINE-COUNT specification is missing, the number of lines per page is calculated dynamically from the number of lines actually output on this page. Here, a page break no longer occurs automatically, (internal limit: 60,000 lines) but must be specified explicitly with NEW-PAGE, and the system field SY-LINCT is set to 0. (NEW-PAGE ... LINE-COUNT)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The page lines includes the heading, the detail lines, and the footer. And yes, the underline counts as a line.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi hari,

welcome to SDN.

<b>Use of LINE-COUNT in Lists</b>

When specifying a fixed number of lines (LINE-COUNT) for each list page in the REPORT or NEW-PAGE statement, you should be aware of the following:

In general terms, you should use the default value (0 = no fixed number of lines per list page) for the LINE-COUNT specification because this is the only way you can achieve formatting appropriate for the screen without any arbitrary page break.

When printing, the user should be able to define the page size to suit the printer. Therefore, the program should not specify the page size, but rather allow for meaningful results with any page size.

Defining a fixed number of lines makes sense only with lists with a fixed page layout, but you should always consider whether it would not be better to use a SAPscript layout set.

If you use the default setting (no ...LINE-COUNT), the system assumes an internal page length of 60000 lines. If a list has more than 60000 lines, there is an automatic page break.

reward points for helpfull answers and close the thread if your question is solved by clicking radio buttons on the top left.

regards,

venu.

Former Member
0 Kudos

hi,

this is called offset

for ex if line-count value is xudydydyyydd

line-count8(2) will be yy - from 8 th position to 2 characters

cheers,

sasi

Former Member
0 Kudos

one possibility...

if it is line-count0(2) then means read the 2nd character of attribute count0 of field string line.

if it is line-count+8(2)

means read 2 characters of the attribute count of field string line starting at the 8th position...

similarly line-count+0(1) means first character

rgds,

PJ

Message was edited by: Priyank Jain

Former Member
0 Kudos