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: 

plz ans all ques

former_member198892
Participant
0 Kudos

Hi All,

Please answer all the question..

1. what is line-size and line-count in report?

2. what r all the events available in Abap prog and which one hire first and last?

3. how to display the page no in report?

(ex: if 5 page is there means its display like 1 of 5, 2 of 5.up to..5 of 5)

4. could u upload the image in report? if yes how?

5. how many inner loop can use inside the loop?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

1. what is line-size and line-count in report?

Line-size is the width of the report like 255 char or 200 char

Line-count is the number of lines per page apart from Top-of-page and end-of-page lines.

2. what r all the events available in Abap prog and which one hire first and last?

Events in ABAP Programming

Classical Reporting:

INITIALIZATION

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN

START-OF–SELECTION.

TOP-OF-PAGE

END-OF-PAGE

END-OF-SELECTION.

Events in Interactive Report

TOP-OF-PAGE DURING LINE-SELECTION

AT USER-COMMAND.

AT LINE-SELECTION

AT PF-FUNCTION KEY

3. how to display the page no in report?

(ex: if 5 page is there means its display like 1 of 5, 2 of 5.up to..5 of 5)

data: n type p, m type i.

n = CEIl( (sy-dbcnt / (sy-linct - 3 ) )

m = n

write : sy-pagno 'of' m.

4. could u upload the image in report? if yes how?

Yes we can see this

In the transaction OAOR, you should be able to insert your company Logo.

GOTO - OAOR (Business Document Navigator)

Give Class Name - PICTURES Class Type - OT..... then Execute

It will show you the list, then select ENJOYSAP_LOGO.

On that list, you will find one control with a "create" tab.

Click std. doc types.

Select SCREEN and double-click.

It will push FILE selection screen.

Select your company logo (.gif) and press OK.

It will ask for a description- for instance: "company logo".

It will let you know your doc has been stored successfully.

You can find your logo under ENJOYSAP_LOGO->Screen->company logo.

Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.

FORM TOP-OF-PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEADING[]

I_LOGO = 'ENJOYSAP_LOGO'

I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.

.

ENDFORM. "TOP-OF-PAGE

Here 'ENJOYSAP_LOGO' will replace by ur created logo.

Refer this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm

http://www.sap-img.com/abap/alv-logo.htm

http://www.sap-img.com/fu002.htm

5. how many inner loop can use inside the loop?

There is no such limit

but always try to avoid loop..within a loop. that is better.

Reward points for useful Answers

Regards

Anji

4 REPLIES 4

Former Member
0 Kudos

Hi,

<b>1.Line-Size & Line-Count</b>

Line-Size is used to change the width of all pages of a new list level.

Line-Count is used to determine the page length of each page individually.

<b>2.Events in ABAP</b>

1. Initialization

2. At line-selection

3. Start-of-selection

4.Top-of-page

5. Top-of -page during at line-selection

6. At PF

7. At user-command

8.End-of-selection

9. End-of-page

<b>3.Page Number in Reports</b>

Using SY-PAGNO ,U ll get the Page Number.

Regards,

Padmam.

Former Member
0 Kudos

Hi

1. what is line-size and line-count in report?

Line-size is the width of the report like 255 char or 200 char

Line-count is the number of lines per page apart from Top-of-page and end-of-page lines.

2. what r all the events available in Abap prog and which one hire first and last?

Events in ABAP Programming

Classical Reporting:

INITIALIZATION

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN

START-OF–SELECTION.

TOP-OF-PAGE

END-OF-PAGE

END-OF-SELECTION.

Events in Interactive Report

TOP-OF-PAGE DURING LINE-SELECTION

AT USER-COMMAND.

AT LINE-SELECTION

AT PF-FUNCTION KEY

3. how to display the page no in report?

(ex: if 5 page is there means its display like 1 of 5, 2 of 5.up to..5 of 5)

data: n type p, m type i.

n = CEIl( (sy-dbcnt / (sy-linct - 3 ) )

m = n

write : sy-pagno 'of' m.

4. could u upload the image in report? if yes how?

Yes we can see this

In the transaction OAOR, you should be able to insert your company Logo.

GOTO - OAOR (Business Document Navigator)

Give Class Name - PICTURES Class Type - OT..... then Execute

It will show you the list, then select ENJOYSAP_LOGO.

On that list, you will find one control with a "create" tab.

Click std. doc types.

Select SCREEN and double-click.

It will push FILE selection screen.

Select your company logo (.gif) and press OK.

It will ask for a description- for instance: "company logo".

It will let you know your doc has been stored successfully.

You can find your logo under ENJOYSAP_LOGO->Screen->company logo.

Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.

FORM TOP-OF-PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEADING[]

I_LOGO = 'ENJOYSAP_LOGO'

I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.

.

ENDFORM. "TOP-OF-PAGE

Here 'ENJOYSAP_LOGO' will replace by ur created logo.

Refer this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm

http://www.sap-img.com/abap/alv-logo.htm

http://www.sap-img.com/fu002.htm

5. how many inner loop can use inside the loop?

There is no such limit

but always try to avoid loop..within a loop. that is better.

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

Hi,

1.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.

2.load of programe (system defined)

initialization

at selection screen

start of selection

top of page

end of page

end of selection..

so initialization is used to pass default values to parameters & select-options

end of page is triggered when the content in the list reaches the no of lines specified....in case if it fails then use reserve n lines to explicitly trigger end of page...

select-options & ranges are basically internal tables...

however ranges have no selection screen whereas seleft-options do have.....

the main difference between them is in ranges the fields low & high are statically declared wheras in select-options we can dynamically specify the range of selection....

3.data:it_mara type table of mara with header line.

parameters: p_check type c.

start-of-selection.

perform get_data.

perform write_report.

top-of-page.

perform top_of_page.

form get_data.

select * into corresponding fields of table it_mara

from mara up to 300 rows.

endform.

form write_report.

data: page(4) type c.

loop at it_mara.

write:/ it_mara-matnr.

endloop.

write sy-pagno to page left-justified.

do sy-pagno times.

read line 1 of page sy-index.

replace '****' with page into sy-lisel.

modify current line.

enddo.

endform.

form top_of_page.

write:/32 'Test Program',

at 62 'Page:', at 67 sy-pagno, 'of', '****'.

endform.

4. we cant upload image in se38.

5. Using loops affetc the performance. Avoid using that.

There can be any no. of loops.

Regards,

Priyanka.

varma_narayana
Active Contributor
0 Kudos

Hi,

1. Line-count means the number of lines per page

Line-size is the number of columns(character positions) per a line.

2. The Event which is triggered first is LOAD-OF-PROGRAM then INITIALIZATION

The last event in basic list is END-OF-SELECTION.

3. To pring Total number of pages like Page 1 of 5:

Check this below code. You will get the clear idea.

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

REPORT YTEST no standard page heading line-count 60(5).

data: v_totpage type i.

data: v_temp(3) type c.

Start-of-selection.

do 50 times.

write:/ sy-index.

enddo.

end-of-selection.

v_temp = v_totpage.

do v_totpage times.

read line 1 of page sy-index.

replace '@@@' in sy-lisel with v_temp.

modify line 1 of page sy-index.

enddo.

top-of-page.

write:/60 'page', sy-pagno, '/','@@@'.

v_totpage = sy-pagno.

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

hint: sy-lisel contains the content of the line after READ LINE statement

4) You can upload images as LOGO in case of ALV Report.

5) You can have as many inner loops but that may effect the performance.

Reward if you these solutions apt.

Regards,

Varma