‎2006 Jun 11 7:13 AM
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.
‎2006 Jun 11 7:15 AM
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
‎2006 Jun 11 7:15 AM
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
‎2006 Jun 11 10:03 AM
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?.
‎2006 Jun 11 10:24 AM
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
‎2006 Jun 11 10:36 AM
Sure, I will give a try.
In 1 or 2 day ,I will get back to you.
Thanks,