2015 Jun 24 5:54 AM
Hi everyone,
I am FUNCTION 'REUSE_ALV_GRID_DISPLAY' to display ALV.
I need to use the scrtext_l to display my 35 characters header. However, the header only display if i use scrtext_m which is only 20 characters.
Why is this happening?
Please help.
2015 Jun 24 7:15 AM
It is happening because L, M, S headers are dynamically displayed depending on column width. You can try it by resizing column width with cursor...
If you defined only one header, you can force ALV to display it by setting FC like this:
ls_fc-ddictxt = 'L' (or M, S.. depending on which one you want)
Hi everyone,
I am FUNCTION 'REUSE_ALV_GRID_DISPLAY' to display ALV.
I need to use the scrtext_l to display my 35 characters header. However, the header only display if i use scrtext_m which is only 20 characters.
Why is this happening?
Please help.
2015 Jun 24 6:05 AM
hi,
SAP define that way only
long text 20
medium 15
short text 10
only check at data element level
2015 Jun 24 6:16 AM
Hi,
What i mean is that if i use scrtext_m, the header display normally, but if i use scrtext_l or scrtext_s my header is just blank.
2015 Jun 24 6:41 AM
WA_FCAT-COL_POS = '1'.
WA_FCAT-FIELDNAME = 'EKGRP'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-SELTEXT_L = 'BUYER1234567881255245524555'.
APPEND : WA_FCAT TO IT_FCAT.
CLEAR:WA_FCAT.
2015 Jun 24 6:49 AM
hi,
This type behavior only because of what you pass in FCAT . Some time we pass 2to3 parameter in fcat which have similar fuction like column headings.
share what you pass in FCAT so that we try to give the solution
2015 Jun 24 7:53 AM
PERFORM fld_cat USING 'SA_Text' 'CHAR' '30' '0' 'Service Short Text1213123123126656516' ' '.
FORM fld_cat USING VALUE(p_fldname)
VALUE(p_datype)
VALUE(p_len)
VALUE(p_dec)
VALUE(p_txt)
VALUE(p_sum).
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = p_fldname.
wa_fieldcat-datatype = p_datype.
wa_fieldcat-intlen = p_len.
wa_fieldcat-decimals = p_dec.
wa_fieldcat-scrtext_m = p_txt.
wa_fieldcat-do_sum = p_sum.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
2015 Jun 24 7:54 AM
Yes. it is supposed to show like that.
However, in my case, it only appears if i use SELTEXT_M
2015 Jun 24 7:58 AM
2015 Jun 24 7:15 AM
It is happening because L, M, S headers are dynamically displayed depending on column width. You can try it by resizing column width with cursor...
If you defined only one header, you can force ALV to display it by setting FC like this:
ls_fc-ddictxt = 'L' (or M, S.. depending on which one you want)
2015 Jun 24 8:08 AM
Hi.
I forced the field to accept the only 'L' already, but it is still the same.
wa_fieldcat-colddictxt = 'L'.
wa_fieldcat-selddictxt = 'L'.
wa_fieldcat-tipddictxt = 'L'.
2015 Jun 24 9:03 AM
REUSE_ALV_GRID_DISPLAY is using SLIS field catalog, which have DDICTXT field.
Now you are writing these fields:
wa_fieldcat-colddictxt = 'L'.
wa_fieldcat-selddictxt = 'L'.
wa_fieldcat-tipddictxt = 'L'.
which are not in "SLIS" field cat but in "LVC" (yes there are two types of field catalogs).
How are you actually setting fieldcatalog for REUSE_ALV_GRID_DISPLAY ???
And post which exactly values are you setting for this problem column.
2015 Jun 24 10:46 AM
Hi.
Actually, it is my bad. It did not show the header because when i tried to transfer field from lvc to slis,i used wa_fieldcatalogue-seltext_m previuosly.
FORM new_fld_ctlog_app .
wa_fieldcatalogue-fieldname = wa_fieldcat-fieldname.
wa_fieldcatalogue-seltext_l = wa_fieldcat-scrtext_l.
wa_fieldcatalogue-do_sum = wa_fieldcat-do_sum.
APPEND wa_fieldcatalogue TO lt_fieldcatalogue.
CLEAR:wa_fieldcatalogue, wa_fieldcat.
ENDFORM.
I do this because i have to create dynamic ALV.
2015 Jun 24 10:59 AM
Hi
If you need to use all labels you need to fill them, actually you''re filling long label only:
FORM new_fld_ctlog_app .
wa_fieldcatalogue-fieldname = wa_fieldcat-fieldname.
wa_fieldcatalogue-seltext_l = wa_fieldcat-scrtext_l.
wa_fieldcatalogue-do_sum = wa_fieldcat-do_sum.
APPEND wa_fieldcatalogue TO lt_fieldcatalogue.
CLEAR:wa_fieldcatalogue, wa_fieldcat.
ENDFORM.
so your code should be:
FORM new_fld_ctlog_app .
wa_fieldcatalogue-fieldname = wa_fieldcat-fieldname.
wa_fieldcatalogue-seltext_l = wa_fieldcat-scrtext_l.
wa_fieldcatalogue-seltext_m = wa_fieldcat-scrtext_m.
wa_fieldcatalogue-seltext_s = wa_fieldcat-scrtext_s.
wa_fieldcatalogue-reptext_ddic = wa_fieldcat-coltext.
wa_fieldcatalogue-do_sum = wa_fieldcat-do_sum.
APPEND wa_fieldcatalogue TO lt_fieldcatalogue.
CLEAR:wa_fieldcatalogue, wa_fieldcat.
ENDFORM.
Max
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |