Application Development and Automation 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: 
Read only

ALV GRID records count?

naveen_inuganti2
Active Contributor
0 Likes
2,289

Hi,

Can I display the NUMBER of records in my output internal table, anywhere apart from the TOP OF PAGE in the ALV GRID Display?

If so How can i do it?

--Naveen Inuganti

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,703

u can display it as title of alv..by passing the count to parameter

I_GRID_TITLE of

Hi,

Can I display the NUMBER of records in my output internal table, anywhere apart from the TOP OF PAGE in the ALV GRID Display?

If so How can i do it?

--Naveen Inuganti

10 REPLIES 10
Read only

Former Member
0 Likes
1,703

This message was moderated.

Read only

GauthamV
Active Contributor
0 Likes
1,703

Define a new field in your final table and pass the count of sy-tabix into that field

and display the same in output.

Read only

0 Likes
1,703

Hi,

Goutham wrote:

>Define a new field in your final table and pass the count of sy-tabix into that field

>and display the same in output.

But it will display a new column in my ALV GRID. I dont think it is sufficiant..!

Any other inputs?

--Naveen Inuganti.

Read only

Former Member
0 Likes
1,703

u can display it as title of alv..by passing the count to parameter

I_GRID_TITLE of

Read only

Former Member
0 Likes
1,704

u can display it as title of alv..by passing the count to parameter

I_GRID_TITLE of

Read only

0 Likes
1,703

TT,

That must be sounds good!

As I am using the method SET TABLE FOR FIRST DISPLAY, I am not sure where we can pass this?

Also,

Let me have some idea to display it in grid list display area like grand total addition we can have extra line!

--Naveen Inuganti

Read only

0 Likes
1,703

Title bar:

DATA:

  • ALV control: Layout structure

gs_layout TYPE lvc_s_layo,

title TYPE LVC_TITLE.

DESCRIBE TABLE gi_sflight LINES i.

title = i.

  • Set grid title

gs_layout-grid_title = title.

CALL METHOD go_grid->set_table_for_first_display

EXPORTING i_structure_name = 'SFLIGHT'

is_layout = gs_layout

CHANGING it_outtab = gi_sflight.

Read only

GauthamV
Active Contributor
0 Likes
1,703

Can I display the NUMBER of records in my output internal table, anywhere apart from the TOP OF PAGE in the ALV GRID Display?

If so How can i do it?

This is what you had asked initially ....

Now you are saying this..

But it will display a new column in my ALV GRID. I dont think it is sufficiant..!

???

Read only

0 Likes
1,703

Ok...Goutham.,

As I mentioned in subject that is for ALV GRID Display only

Let me know the soultion!

_Naveen Inuganti

Read only

nishant_nayyar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,703

Hi Naveen,

To fetch the internal table attributes, you can use the following ABAP Keyword:

DATA: lin TYPE i.

DESCRIBE TABLE itab LINES lin.

For further details on DESCRIBE and How to display ALV header/Footer, follow the links below:

Link-1:

[SAP Help on DESCRIBE Keyword|http://help.sap.com/abapdocu/en/ABAPDESCRIBE_TABLE.htm#!ABAP_ADDITION_2@2@]

Link-2:

[How to display the data in ALV Grid Header|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abapObjects-ALVModel-UsingHeaderand+Footer]

Regards,

Nishant Nayyar.