2011 Dec 30 10:53 PM
Hey friends !
My question is when we display a field in ALV i m using the following code
wa_fieldcat-fieldname = ' '.
wa_fieldcat-ref_tabname = ' '.
wa_fieldcat-outputlen = .
wa_fieldcat-tabname = ' '.
wa_fieldcat-seltext_m = ' '.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
repeatidly for all fields ..
Now , if i want to add a field which is ""not a field of any database TABLE"" but we have defined it under types .
So My question is what I give in the
wa_fieldcat-ref_tabname
if we do not have any database table for that ...
while debugging im getting the correct value for it but it is not displaying the same in ALV ... pLS SUGGEST
2011 Dec 31 11:08 AM
Hi,
No need to pass ref table name, just pass wa_fcat-fieldname - field declared in structure
wa_fcat-tabname - internal table name
wa_fcat-seltext_m - this to display field label in output
Regards,
Ravi
2012 Jan 02 7:14 AM
hi
u doesnt need to pass table name u can use below code
wa_fcat-fieldname - field declared in structure
wa_fcat-tabname - internal table name given
wa_fcat-seltext_m - text to be display field label in output
regards,
maddy rockstar
2013 Dec 13 10:53 AM
2012 Jan 02 10:07 AM
Hi,
Please find about the reference field and and reference table as mentioned below:
REF_FIELD:
You must fill this field if:
u2022 the output table field described by the current entry in the field catalog has a corresponding field in the Data Dictionary and
u2022 the field name in the output table is not identical to the field name of the field in the Data Dictionary.
If the field names are identical, it is sufficient to specify the DDIC structure or table in field REF_TABLE of the field catalog.
REF_TABLE:
You must fill this field only if the output table field described by the current entry in the field catalog has a corresponding entry in the Data Dictionary. Using this assignment, the ALV Grid Control can copy the text for the column header from the Dictionary.
Thanks,
Renuka S.