04-20-2006 9:02 AM
About the parameter I_INTERNAL_TABNAME of REUSE_ALV_FIELDCATALOG_MERGE:
DATA: BEGIN OF itab occurs 0,
matnr1 LIKE mara-matnr,
matnr2 TYPE mara-matnr,
END OF itab.
When itab is imported, the exported CT_FIELDCAT contains only 1 record with fieldname 'MATNR1', WITHOUT a record 'MATNR2'. I was puzzled.
The document of the function says: "Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used."
DATA <f> TYPE <type>.
DATA <f> LIKE <obj>.
I'm wondering, does only this declaration difference hide 'MATNR2'?
If so, what's the real difference between the two kinds of data object declarations in this situation?
Thanks to everyone. Any suggestion is appreciated.<u></u>
04-20-2006 9:06 AM
Hi,
If you use LIKE the field takes up all the dictionary field properties...
If you use TYPE the field takes up only the <b>datatype</b> of the referenced field.
Ps: Reward helpful posts.
Regards,
Wenceslaus.
04-20-2006 9:06 AM
Hi,
If you use LIKE the field takes up all the dictionary field properties...
If you use TYPE the field takes up only the <b>datatype</b> of the referenced field.
Ps: Reward helpful posts.
Regards,
Wenceslaus.
04-20-2006 9:11 AM
Thank you, Wenceslaus G.
Could you help to list any property that LIKE takes up while TYPE doesn't?
04-20-2006 9:14 AM
Hi,
The reference using LIKE takes Field Description, Output Length, Sel text
Ps: Reward helpful posts.
Regards,
Wenceslaus.
04-20-2006 9:20 AM
04-20-2006 9:21 AM
Hi,
type declarations the FM will not accept, like declarations it will take. or else if you don't want to change the declaration then go for manuall filling.
if you use fm then use LIKE not type
Regards
vijay