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: 

doubts regading reports>>>>>>>>>

Former Member
0 Kudos
125

hi ,

can any one just explain me the difference lies between sy-linct, line-count.

what is the exact difference.

what is the role of system fields.

2. list of function modules used in complex reports and alvs.

3. list of report events and how they are triggered accordingly.

thankx

baleeq.

8 REPLIES 8

Former Member
0 Kudos
85

hi

the list of events r

initialization

at selection-screen

start-of-selction

top-of-page

at line-selection

at user-command

end-of-page

end-of-selection

some of the FMs

in alv reports we use

<b>TYPE-POOLs : SLIS</b>

reuse_alv_grid_display

reuse_alv_list_diaply

u can make a search with

<b> reuse_alv*</b>

in se37 to find out various alv FMs

<b>ABAP system fields</b> exist in all ABAP programs. The runtime system fills them with values, depending on the context of the program, and you can query their values to find out about the state of the system. Although they are variables, you should only read from them. If you change them, you may overwrite information that is important for the next stage of running the program. There are cases in which you can control how the system behaves by overwriting the value of a system field (for example, using SY-LSIND to navigate in detail lists).

The names and data types of system fields are stored in the structure SYST in the ABAP Dictionary. In an ABAP program, you can address the fields using the form SY-component name. In screen flow logic, you can also use the prefix SYST.

<b>line-count</b> will give set the number of lines displayed in one page of the list

former_member181962
Active Contributor
0 Kudos
85

1) System fields give the inoformation of certain parameters which are dynamic in nature.

sy-linct gives the value of line-count at run time.

i.e you cannot use line-count in write statement.(you can only write: sy-linct.)

See the below example

<b>REPORT YRT_TEST1 line-count 67.

write: sy-linct.</b>

2) Go to se37 and try REUSE* (Press F4).

for eample programs on alvs, go to se38 and give balv and press f4.

3) http://www.sap-img.com/abap/events-related-to-reporting.htm

REgards,

Ravi

Former Member
0 Kudos
85

Hi,

the list of function modules in alvs are :

reuse_alv_list_display

reuse_alv_grid_display,

reuse_alv_fieldcatalog_merge,

reuse_alv_commentary_write.

list of report events :

<b>initialzation</b> - this event is triggered at the start and the default values can be assigned to the variables in this event.

<b>at selection-screen</b> :

in this event, validations for the input parameters are done.

<b>start-of-selection</b> :

this event carries the actual logic of the program.

<b>top-of-page</b> :

the header part of the program is written here. this is triggered whenever the first WRITE statement is encountered.

<b>end-of-selection</b> :

mostly the final write statements are written under this event

<b>end-of-page</b>:

the footer item is written in this event.

apart from these, there are 3 other events for interactive reports,

<b>at line-selection</b> :

this is used for getting the secondary list for the reports. the system variable used is sy-lsind.

<b>at user-command</b> :

here the buttons and their funtionalities are coded.

Thanks,

Aswin

Former Member
0 Kudos
85

Hii

Events associated with report are as follows and each one will be discussed in detail.

¨ INITIALIZATION

¨ AT SELECTION-SCREEN

¨ AT SELECTION-SCREEN ON

This FM displays the data on the screen.

Regards

Naresh

rahulkavuri
Active Contributor
0 Kudos
85

2. There are lot of function modules which we use in reports and ALV's according to the need but in ALV we need to use some like

'REUSE_ALV_FIELDCATALOG_MERGE'

'REUSE_ALV_LIST_DISPLAY'

'REUSE_ALV_GRID_DISPLAY'

'REUSE_ALV_COMMENTARY_WRITE'

3.

Initialization.

At selection-screen.

At selection-screen on <field>.

Start-of-selection

Top-of-page.

End-of-page.

End-of-selection.

Manohar2u
Active Contributor
0 Kudos
85

SY-LINCT

Page length of list. SY-LINCT is 0 for a standard list of any length and has a value unequal to 0 for lists with fixed page length.

· LINE-COUNT in the statements REPORT, PROGRAM, FUNCTION POOL sets SY-LINCT for the current program.

· LINE-COUNT in the SUBMIT statement sets SY-LINCT for the called program

2. You can use different ALV fuction modules for ALV reporting. You will find them in package/development class SLIS

3. You can find the list of events in the below link

Program Events

Former Member
0 Kudos
85

hi baleeq,

1) sy-linct gives the value of line-count at runtime and with line-count you can restrict the number of lines in the output eg: line-count 25(3)which means the list will have total 25 lines which includes 3 line for footer.

2)FM'S ARE

REUSE_ALV_VARIANT_DEFAULT_GET

This FM is used to get the default variant for the report if it has been set.

REUSE_ALV_COMMENTARY_WRITE

This FM is used to write a comment and logo on the report header.

REUSE_ALV_EVENTS_GET

Used to get all the events available in ALV list processing

REUSE_ALV_VARIANT_F4

This FM is used to get the possible values of the variants on the selection screen.

REUSE_ALV_VARIANT_EXISTENCE

Check existence of a display variant

REUSE_ALV_FIELDCATALOG_MERGE

This FM creates field catalog from dictionary structure or internal table.

REUSE_ALV_GRID_DISPLAY

This FM displays the data on the screen.

REUSE_ALV_LIST_DISPLAY

This FM displays the data on the screen.

3)INITIALIZATION

AT SELECTION-SCREEN

AT SELECTION-SCREEN ON <field>

START-OF-SELECTION

TOP-OF-PAGE

TOP-OF-PAGE DURING LINE-SELECTION.

AT LINE-SELECTION.

AT USER-COMMAND.

END-OF-PAGE

END-OF-SELECTION

HOPE THIS HELPS,

PRIYA.

Former Member
0 Kudos
85

Hello Baleeq,

the set of common function modules used in alv reports are:

1. REUSE_ALV_VARIANT_DEFAULT_GET

2. REUSE_ALV_VARIANT_F4

3. REUSE_ALV_VARIANT_EXISTENCE

4. REUSE_ALV_EVENTS_GET

5. REUSE_ALV_COMMENTARY_WRITE

6. REUSE_ALV_FIELDCATALOG_MERGE

7. REUSE_ALV_LIST_DISPLAY

8. REUSE_ALV_GRID_DISPLAY

9. REUSE_ALV_POPUP_TO_SELECT

list of events in reports:

Initialization : triggered when the report is loaded in memory.

At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.

At selection-screen / <field> : before leaving the selection screen.

start-of-selection : the first event for displaying the report.

end-of-selection : after the start-of-selection is completed.

classiscal report events.

top-of-page : every time a new page is started in the list.

end-of-page : every time the list data reaches the footer region of the page.

interactive report events.

top of page during line selection : top of page event for secondary list.

at line-selection : evey time user dbl-clicks(F2) on the list data.

at pF<key> : function key from F5 to F12 to perform interactive action on the list

Page length of the list. For a default list of indefinite length, SY-LINCT is 0. If the page length is defined, SY-LINCT has that value.

LINE-COUNT in the REPORT, PROGRAM, or FUNCTION POOL statement sets SY-LINCT for the current program.

LINE-COUNT in the SUBMIT statement sets SY-LINCT for the program called in the statement.

award points if it helps,

regards,

keerthi.