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: 

what is this statment mean

Former Member
0 Kudos
765

REPORT z_kngkont MESSAGE-ID 9c LINE-SIZE 132 NO STANDARD PAGE HEADING

1 ACCEPTED SOLUTION

Former Member
0 Kudos
242

It is defining a report named 'z_kngkont'. All the messages issued within the report will use the message class '9C', if no explicit message class is used. The output list will have 132 character width for the lines and the standard heading which prints the description of the report, will not be printed.

10 REPLIES 10

Former Member
0 Kudos
242

Hi,

Press F1 over <b>REPORT</b> and you will see the meaning of all additions.

Svetlin

0 Kudos
242

This is how a ABAP report is coded. The first line of code is always a REPORT statement.

REPORT z_kngkont 
    MESSAGE-ID 9c 
    LINE-SIZE 132 
      NO STANDARD PAGE HEADING

Line 1 here is the report name, or the name of the program

Line 2 here is the declaration of the message class which is used in the is program

Line 3 says that the output list is 132 characters across

Line 4 says "don't put any standard heading in the output list".

Regards,

Rich Heilman

0 Kudos
242

the whole statement is divided in diffrent additions ,so iam not getting proper idea so can you please explain it

0 Kudos
242

Hi Rich,

Can you please tell me why this statement is written in the program and why we have to give these kind of statements in the program.what is the effect of it in the program

0 Kudos
242

You will get detailed information by placing the cursor on the 'REPORT' word and press F1.

0 Kudos
242

Well, it really just specifies the begining of the source code for the program, using the extension of the statement is really beneficial factor. I say this because you can actually type anything as the report name and the syntax checking will allow it. Using the extensions such as message class, line-size, line-count, and "No standard page heading" is really what you use this statement for.

Please make sure that you award points for all helpful answers and mark this post as solved. Thanks.

Regards,

Rich Heilman

0 Kudos
242

No, no problem is specifying a message from a different class explicitly.

Report ztest
             message-id zzsd.

....

message e000.  " Message 000 of ZZSD

....

message e000(ZMM).   " Message 000 of ZMM

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Former Member
0 Kudos
242

Hi,

what rich said is correct

this might help you.

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.

<b>Using Values Greater than 255 for the LINE-SIZE of a List</b>

If you use a column with greater than 255 as the LINE-SIZE in the REPORT or NEW-PAGE statement, the following notes apply:

Type definitions: The type group SLIST defines the valid maximum value for the list width (SLIST_MAX_LINESIZE), and contains a type for list lines with maximum type (SLIST_MAX_LISTLINE).

Printing: You cannot print the list using standard printing functions. To print it, you must create a special print routine that arranges the data in shorter lines (for example, using the ... PRINT ON addition in the NEW-PAGE) statement.

Accessing the entire contents of a line:: To read or modify the entire contents of a wide line, you can use the ... LINE VALUE addition in the READ LINE or MODIFY LINE statements. This is an alternative to using SY-LISEL that is independent of the attributes of the system field (since the length of SY-LISEL is 255 characters).

Hroizontal lines: With extra-wide lists, the "ULINE." statement corresponds to "WRITE / SY-ULINE.". So, for example, "ULINE AT 5(300)." corresponds to "WRITE AT 5(300) SY-ULINE.".

Output length:: You can use the length specification in WRITE (or ULINE) to extend the output length of an extra-wide list up to the value of LINE-SIZE. If you want to output a whole field that is longer than 255 characters, you must use this, even if the field itself is defined as longer than 255 characters.

Example

NEW-PAGE LINE-SIZE 1000.

DATA: F1(500) VALUE 'F1'.

WRITE: / F1 COLOR COL_NORMAL. " Output with length 255

WRITE: /(500) F1 COLOR COL_NORMAL. " Output with length 500

<b>in detail</b>

REPORT

Basic form

REPORT rep.

Additions:

1. ... NO STANDARD PAGE HEADING

2. ... LINE-SIZE col

3. ... LINE-COUNT (m)

4. ... MESSAGE-ID mid

5. ... DEFINING DATABASE ldb

Effect

REPORT is the first statement in a program. rep can be any name, but you are recommended to use the name of the ABAP program.

Example

REPORT ZREPNAME.

Note

Only standard SAP reports should begin with 'R'.

Addition 1

... NO STANDARD PAGE HEADING

Effect

Suppresses output of the standard page header (see NEW-PAGE).

Addition 2

... LINE-SIZE col

Effect

Creates a report with col columns per line.

If the LINE-SIZE specification is missing, the line length corresponds to the current screen width. The system field SY-LINSZ contains the current line size for generating lists. The maximum width of a list is 1023 characters. You should keep lists to the minimum possible size to improve useability and performance (recommendation: LINE-SIZE < 132). For very wide lists (LINE-SIZE > 255), you should consult the notes for using LINE-SIZE

greater than 255.

Notes

The specified LINE-SIZE must not appear in quotation marks.

If the you want the report list (i.e. the output) to be printable, do not define a LINE-SIZE with a value greater than 132 because most printers cannot handle wider lists. You cannot print lists wider than 255 characters at all using the standard print functions. To print the contents of the lists, you need to write a special print routine that arranges the data in shorter lines (for example, using the PRINT ON addition in the NEW-PAGE statement.

At the beginning of a new list level, you can set a fixed line width for the level using the ... LINE SIZE addition to the NEW-PAGE statement.

Example

REPORT ZREPNAME LINE-SIZE 132.

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)

Note

The LINE-COUNT must not be enclosed in quotation marks.

Further information about using LINE-COUNT.

Examples

REPORT ZREPNAME LINE-COUNT 65.

The page has 65 lines.

REPORT ZREPNAME LINE-COUNT 65(8).

The page has 65 lines, of which the last 8 are only used by END-OF-PAGE.

Addition 4

... MESSAGE-ID mid

Effect

This addition specifies the standard message class for the main program. This contains the messages used with the simple MESSAGE statement.

Note

This message class must not be enclosed in quotation marks.

You can use a namespace prefix with message class names.

Example

REPORT RSTEST00 MESSAGE-ID SY.

Addition 5

... DEFINING DATABASE ldb

Effect

All the database programs must specify in the REPORT statement the 20-character name of the logical database to which they belong.

This addition is generated automatically (in the REPORT statement) when you create a logical database by choosing Utilities -> Development/test -> Logical databases.

Note

You can use a namespace prefix with logical database names.

Example

REPORT SAPDBKDF DEFINING DATABASE KDF.

reward with points and close the thread if solves your problem.

regards,

venu.

Former Member
0 Kudos
243

It is defining a report named 'z_kngkont'. All the messages issued within the report will use the message class '9C', if no explicit message class is used. The output list will have 132 character width for the lines and the standard heading which prints the description of the report, will not be printed.

0 Kudos
242

Hi srinivas,

Your explanation is very good and i need some more information like,

if define a message from other class whether it will create any problem in the program.