‎2008 Aug 11 2:11 PM
Hi ABAP Gurus,
Can any one explain me the Diff Between Manually Building fieldcatalog and using function module
REUSE_ALV_FIELDCATALOG_MERGE.
Thanks and Regards
Srini
‎2008 Aug 11 2:13 PM
HI
Reuse....FM , will create field catalog with all fields present in DB table or structure, whereas if we create manually we can add fields which we require
BR
Lavanya
‎2008 Aug 11 2:13 PM
HI
Reuse....FM , will create field catalog with all fields present in DB table or structure, whereas if we create manually we can add fields which we require
BR
Lavanya
‎2008 Aug 12 6:11 AM
‎2008 Aug 12 6:18 AM
Hi srini,
1. For practical purposes, there is no difference.
The field catalogue is basically an internal table
which provides information to the alv regarding
the fields, the fields length, the data type, sequence,
whether key field or not etc.
2. So if we fill this field catalogue internal table manually,
or we fill this using the FM does not make any difference.
3. To reduce the coding, its always better to use the FM.
After that if required, we can modify the field catalogue
internal table to suit our requirements.
regards,
amit m.
‎2008 Aug 12 6:28 AM
Hi,
"REUSE_ALV_FIELDCATALOG_MERGE"
Create field catalog from dictionary structure or internal table.
Supports the creation of the field catalog for the ALV function modules based either on a structure or table defined in the ABAP Data Dictionary, or a program-internal table.
The program-internal table must either be in a TOP Include or its Include must be specified explicitly in the interface.
The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:
Performance is affected since the code of the table definition must always be read and interpreted at runtime.
Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used.
If the field catalog contains more than 90 fields, the first 90 fields are output in the list by default whereas the remaining fields are only available in the field selection.
Manual field catalog building is also the same way but the coding required to write is more and even we can add the required fields.
hope this helps.
thanx,
dhanashri
Edited by: Dhanashri Pawar on Aug 12, 2008 7:28 AM
‎2008 Aug 12 6:32 AM
Hi
Create field catalog from dictionary structure or internal table
Supports the creation of the field catalog for the ALV function modules based either on a structure or table defined in the ABAP Data Dictionary, or a program-internal table.
The program-internal table must either be in a TOP Include or its Include must be specified explicitly in the interface.
The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:
Performance is affected since the code of the table definition must always be read and interpreted at runtime.
Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used.
If the field catalog contains more than 90 fields, the first 90 fields are output in the list by default whereas the remaining fields are only available in the field selection.
If the field catalog is passed with values, they are merged with the 'automatically' found information
‎2008 Aug 12 6:48 AM
Hi Srini,
I will tell you there are differences between Manual fieldcatlog building and using Reuse_alv_fieldcatalog_merge
As per the performance issues, using field catalog Function module is preferable.
But this can be dont only if we have pre defined database structure or database table.
In this case, the database structure should be same as your internal table.
But using Manual fieldcatalog is preferable in many ways.
1) You can define any structure based on your requirements
2) Also this structure is independent, while transporting program no need to transport any other structues and build manual database structures
3) Also, you can define hotspots, perform additional tasks only for few fields in output like displaying totals, subtotals, sortings, column hiding, automatic alv events, etc.
So, it depends purely on your program requirements.
Check for SLIS_ALV_FIELDCATALOG_MERGE for the several options you can specify individually to each and every field in the output list.
Regards,
Santosh Kumar M.