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 online fields

Former Member
0 Likes
780

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 ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
737

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 ?

3 REPLIES 3
Read only

Former Member
0 Likes
737

Use REUSE_ALV_FIELDCATALOG_MERGE to create the catalog and then decide what you want to do with the resulting catalog.

Read only

Former Member
0 Likes
738

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

Read only

0 Likes
737

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