Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Question on REUSE_ALV_FIELDCATALOG_MERGE ?

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>

Tags:
Former Member
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question