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 + modifying layout.

Former Member
0 Likes
894

Hi I need some help related to ALv .

I have to copy a standard program and need to make changes.

Change is to change the alv report layout so that new field anek-usnam(username ) can be viewed and user can choose where they want this field to be shown on the report as with all other fields Via "CHANGE LAYOUT " button in Alv.

I need to put username on selection screen and can fetch data from database(LDB).This thing I will do.

But I am not comfortable with ALV.

Please help me with this .

It will great help if you can provide the step by step procedure.

Thanks&Regards

Gaurav.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
661

Hi Gaurav,

You need to simply add the additional field in the fieldcatalog.

Check in the std program where the code is building the field catalog. You need to just add a small piece of code to include ur fields in the fieldcatlog.

Rest you already know on how to ftech data and populate this field in the internal table.

Cheers

VJ

4 REPLIES 4
Read only

Former Member
0 Likes
662

Hi Gaurav,

You need to simply add the additional field in the fieldcatalog.

Check in the std program where the code is building the field catalog. You need to just add a small piece of code to include ur fields in the fieldcatlog.

Rest you already know on how to ftech data and populate this field in the internal table.

Cheers

VJ

Read only

Former Member
0 Likes
661

Thanks for replying.

I understand that I have to modify the field catalog.

but I have one more doubt ,If you see this standard program "RAABGA_ALV01" .

CALL FUNCTION 'FIAA_ALV_DISPLAY'

EXPORTING

hierarchical = 'X'

use_alv_grid = p_grid

expand = 'X'

variante = p_vari

tabname_header = 'ITAB_DATA'

tabname_item = 'ITAB_DATA2'

summen_bericht = summb

x_t086 = t086

tcollect = tcollect

TABLES

itab_header = itab_data[]

itab_item = itab_data2[]

bukrs = bukrs[]

sortfeld = feld[]

itab_subsort = t_subsort[]

DATA: itab_data LIKE fiaa_salvtab_raabga OCCURS 10 WITH HEADER LINE.

  • Zweite Tabelle für den ALV (Hierarchie)

DATA: itab_data2 LIKE fiaa_salvtab_raabga2 OCCURS 10 WITH HEADER LINE.

To include the extra field usname in alv display ,I think I have to modify fiaa_salvtab_raabga into zfiaa_salvtab_raabga .

AM I right?.

Read only

0 Likes
661

Hi Gaurav,

I fu see the code there is a sunrotuine to populate the field catalog

  PERFORM init_fieldcat.              " normaler Bericht

similar subroutine is called before the FM for alv disolay is called. U need to modify this subrotuine to insert the additional data.

Guess u r right. Try and let me know if it works.

Cheers

VJ

Read only

Former Member
0 Likes
661

Sure, I will give a try.

In 1 or 2 day ,I will get back to you.

Thanks,