‎2006 Apr 19 10:50 AM
Hi
I have want to display a custom label for a field in ALV. But that field uses REFERENCE Table and Field name. hence the label for that column is picked from dictionary level. I even used SEL_TEXT_L of the fieldCatalog, But still the text maintained in Dataelement of the REF field is only displayed.
Here is the code:
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 10.
LS_FIELDCAT-FIELDNAME = TEXT-032.
LS_FIELDCAT-TABNAME = GC_TAB.
LS_FIELDCAT-REF_TABNAME = 'MYTABLE'.
LS_FIELDCAT-REF_FIELDNAME = 'MYFIELD'.
LS_FIELDCAT-OUTPUTLEN = 8.
LS_FIELDCAT-SELTEXT_L = TEXT-012.
‎2006 Apr 19 11:06 AM
Hi Murali,
Move your custom text to FIELDCAT-REPTEXT_DDIC
Regards,
Raghavendra
‎2006 Apr 19 10:55 AM
You remove the reference table then you can get the text. I think it is because you are giving only Long text ie seltext_l give others too then you can get the text you want
‎2006 Apr 19 10:58 AM
Hi Muralidaran,
Try this out...
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = 10.
LS_FIELDCAT-FIELDNAME = 'MYFIELD'.
LS_FIELDCAT-TABNAME = GC_TAB.
LS_FIELDCAT-OUTPUTLEN = 8.
Reward points if the answer was helpful...
Regards,
Kunal
‎2006 Apr 19 11:01 AM
It didnt work. I cannot remove the reference table and field
‎2006 Apr 19 10:59 AM
Murali,
Try maintaining the values for
LS_FIELDCAT-SELTEXT_M
LS_FIELDCAT-SELTEXT_s
as well, _L will work only when you have the column width set to max.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Apr 19 11:02 AM
hi,
comment those 2 lines of code
LS_FIELDCAT-REF_TABNAME = 'MYTABLE'.
LS_FIELDCAT-REF_FIELDNAME = 'MYFIELD'.
in the population.
& give outputlen = 15 like that.
try out this.
regards
srikanth
‎2006 Apr 19 11:06 AM
Hi Murali,
Move your custom text to FIELDCAT-REPTEXT_DDIC
Regards,
Raghavendra