2017 May 24 8:39 AM
Dear Friends,
I am creating dynamic table using RTTS and display in ALV. However, I am not able to use special character as column heading.
The error is caused at statement:
gr_struct_typ = cl_abap_structdescr=>create( p_components = gt_component ).
It gives following error.

I read some thread and tried like this but it did not work.
TRY.
gr_struct_typ = cl_abap_structdescr=>create( p_components = gt_component ).
p_strict = cl_abap_structdescr=>false ).
CATCH cx_sy_struct_creation .
ENDTRY.
I also tried p_strict = space but no success. Can anyone provide a suitable solution that how can i use Special Characters cl_abap_structdescr=>create .
Thanks
2017 May 24 9:35 AM
Is your actual code similar to
lo_structure_type = cl_abap_structdescr=>create(
p_components = lt_component
p_strict = abap_false ). " or ' 'In any case, look quickly at the source of the CREATE method, even with non-strict check, there is a limited list of allowed characters. In strict mode only 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' are allowed, and in non-strict mode only 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789#$%&*-/;<=>?@^{|}' are allowed, so your leading dot is never allowed.
Dear Friends,
I am creating dynamic table using RTTS and display in ALV. However, I am not able to use special character as column heading.
The error is caused at statement:
gr_struct_typ = cl_abap_structdescr=>create( p_components = gt_component ).
It gives following error.

I read some thread and tried like this but it did not work.
TRY.
gr_struct_typ = cl_abap_structdescr=>create( p_components = gt_component ).
p_strict = cl_abap_structdescr=>false ).
CATCH cx_sy_struct_creation .
ENDTRY.
I also tried p_strict = space but no success. Can anyone provide a suitable solution that how can i use Special Characters cl_abap_structdescr=>create .
Thanks
2017 May 24 9:35 AM
Is your actual code similar to
lo_structure_type = cl_abap_structdescr=>create(
p_components = lt_component
p_strict = abap_false ). " or ' 'In any case, look quickly at the source of the CREATE method, even with non-strict check, there is a limited list of allowed characters. In strict mode only 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' are allowed, and in non-strict mode only 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789#$%&*-/;<=>?@^{|}' are allowed, so your leading dot is never allowed.
2017 May 24 10:02 AM
Dear Raymond,
Thanks for your reply. You are right. It will never wok in case of 'dot'. Yes, i tried the same way as you mentioned. So shall i remove leading dot? What would you suggest? Can you please also tell how can i check this with non-strict?
2017 May 24 10:03 AM
2017 May 24 7:29 PM
By the way, your leading dot looks like some names in table DD03L (table of DDIC fields) used for including structures in other structures/tables. Maybe you want to add a component ABAP_ENTW_IN of a structure which would be named BCXE1D_AE. If it's correct that BCXE1D_AE is a DDIC structure/table, don't you want to add BCXE1D_AE as an include? Or do you want to add only one component of the structure?
2017 May 25 10:34 AM
You talk about column heading but the error is about a component name. The two are very different.
Names must follow the standard abap element naming rules. If you want column headings you need to provide field descriptions, where you can use special characters. Provide those as part of your components and you should be OK.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |