2009 Oct 01 5:14 PM
hello,
I am generating a report which displays some derived fields from IMAK table. Now the output should have ALL the columns of table IMAK IMAV and IHDP ( which have a 1 to 1 mapping ) online on the report so that any of these columns can be selected by the user in output. Will i be required to write field catalogues for all the fields of these 3 tables, or is there an easier way out ?
2009 Oct 01 6:54 PM
define a final internal table with fields from all 3 tables. and get values.. this is data fetching part..
now field catalog.
1. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IMAK'
and get field catalog in gt_fcat1. (this is of type slis_t_fcat_alv.)
2. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IMAV'
and get field catalog in gt_fcat2. (this is of type slis_t_fcat_alv.)
3. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IHDP'
and get field catalog in gt_fcat3. (this is of type slis_t_fcat_alv.)
===
now.
append lines of gt_fcat1 to gt_fcat_final.
append lines of gt_fcat2 to gt_fcat_final.
append lines of gt_fcat3 to gt_fcat_final.gt_fcat_final will hold all the three tables fields fieldcatalog
hello,
I am generating a report which displays some derived fields from IMAK table. Now the output should have ALL the columns of table IMAK IMAV and IHDP ( which have a 1 to 1 mapping ) online on the report so that any of these columns can be selected by the user in output. Will i be required to write field catalogues for all the fields of these 3 tables, or is there an easier way out ?
2009 Oct 01 6:10 PM
Use REUSE_ALV_FIELDCATALOG_MERGE to create the catalog and then decide what you want to do with the resulting catalog.
2009 Oct 01 6:54 PM
define a final internal table with fields from all 3 tables. and get values.. this is data fetching part..
now field catalog.
1. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IMAK'
and get field catalog in gt_fcat1. (this is of type slis_t_fcat_alv.)
2. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IMAV'
and get field catalog in gt_fcat2. (this is of type slis_t_fcat_alv.)
3. call FM REUSE_ALV_FIELDCATALOG_MERGE
pass 'IHDP'
and get field catalog in gt_fcat3. (this is of type slis_t_fcat_alv.)
===
now.
append lines of gt_fcat1 to gt_fcat_final.
append lines of gt_fcat2 to gt_fcat_final.
append lines of gt_fcat3 to gt_fcat_final.gt_fcat_final will hold all the three tables fields fieldcatalog
2009 Oct 01 10:39 PM
Hi,
just use the gt_fcat_final in all calls, REUSE_ALV_FIELDCATALOG_MERGE will always append.
Then delete all multiple fields and the ones not present in your internal table to be displayed.
Regards,
Clemens
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |