2007 May 24 3:20 PM
2007 May 24 3:22 PM
hi,
what for field catalog is used in alv?
Regards,
siri
2007 May 24 3:22 PM
2007 May 24 3:23 PM
For example, here is a very simply example program which uses the field catalog to define the columns of the ALV grid.
report zrich_0003 .
* Global ALV Data Declarations
type-pools: slis.
* Internal Tables
data: begin of ialv occurs 0,
test1(10) type c,
test2(10) type c,
end of ialv.
data: fieldcat type slis_t_fieldcat_alv.
start-of-selection.
perform get_data.
perform call_alv.
*********************************************************************
* Form GET_DATA
*********************************************************************
form get_data.
ialv-test1 = 'ABC'.
ialv-test2 = 'DEF'.
append ialv.
ialv-test1 = 'GHI'.
ialv-test2 = 'JKL'.
append ialv.
ialv-test1 = '123'.
ialv-test2 = '456'.
append ialv.
endform. "GET_DATA
************************************************************************
* CALL_ALV
************************************************************************
form call_alv.
perform build_field_catalog.
* Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_excluding = excluding
it_fieldcat = fieldcat
tables
t_outtab = ialv.
endform. "CALL_ALV
************************************************************************
* BUILD_FIELD_CATALOG
************************************************************************
form build_field_catalog.
clear: fieldcat. refresh: fieldcat.
data: tmp_fc type slis_fieldcat_alv.
tmp_fc-reptext_ddic = 'Test1'.
tmp_fc-fieldname = 'TEST1'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'Test2'.
tmp_fc-fieldname = 'TEST2'.
tmp_fc-tabname = 'IALV'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
endform. "BUILD_FIELD_CATALOG
Regards,
Rich Heilman
2007 May 24 3:24 PM
Hi Siri,
Fieldcatalog is used to design the display. say we need to display a table with 5 fields .. in normal report we loop the table and write the order in which we need to display, or if we need to display a checkbox, hotspot... all these options are mentioned in the fieldcatalog.
Regards,
Vidya.
2007 May 24 3:25 PM
Field catalog for ALV Output and see the below links
Please refer the following links.
http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5fed2fe11d2b467006094192fe3/content.htm
http://help.sap.com/saphelp_46c/helpdata/fr/52/5f060de02d11d2b47d006094192fe3/content.htm
http://72.14.203.104/search?q=cache:3pSl4by0cTMJ:www.abap4.it/download/ALV.pdffieldcatalog+ALV&hl=en&gl=in&ct=clnk&cd=16
sample program
http://www.sap-img.com/abap/use-simple-alv-functions-to-make-reporting-easy.htm
Also this link is very good it shows how to build them manually.
http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm
Reward Points if it is helpful
Thanks
Seshu
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |