Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic table issue with special character

Former Member
0 Likes
2,731

Hi All,

While creating a dynamic internal table if the fieldname in the fieldcatalog contains any special character like dot(.) , ot is showing the message without creating the dynamic internal table.

 

* Create a dynamic internal table with this structure

CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table
= 'X'
it_fieldcatalog
= gt_dyn_fcat
IMPORTING
ep_table
= gt_dyn_table
EXCEPTIONS
generate_subpool_dir_full
= 1
OTHERS = 2

gt_dyn_fcat contains fieldname with dot.

So the table gt_dyn_table is not creating.

I searched in SCN andd found another method

CALL METHOD

cl_abap_structdescr=>create

But the same issue is aslo here in this method.

Please suggest me any new method in sap to solve the issue.

Best Regards,

Munu

1 ACCEPTED SOLUTION
Read only

yogendra_bhaskar
Contributor
0 Likes
2,243

Hi Munu ,

I was also facing the same problem some times ago ,

I was creating a dynamic table where fields where containing special character.

Now , for the solution what I did was , used dynamic variable for those field naming as F1 , F2 , F3 etc.

Hope this will help you out

Regards ,

Yogendra Bhaskar

8 REPLIES 8
Read only

matt
Active Contributor
0 Likes
2,243

A . is a forbidden character in a field. You must remove the . You simply are not permitted to use some characters.

Read only

Former Member
0 Likes
2,243

Hi Matthew,

I understand your suggestion but my requirement is like that. i have to enter a fieldname with dot.

may i use any new methods or any new ideas, will be helpful to me.

Regards,

Munu

Read only

matt
Active Contributor
0 Likes
2,243

How can I put this more clearly? It is not possible in SAP to have a fieldname that contains a dot.

Why do you think you require a fieldname with a dot in it?

Read only

Former Member
0 Likes
2,243

you can't.

I believe you would not be able to use "." in any (or most of them) programming languages, as it is part of other syntax. ABAP (and C, JAVA, even VB etc.) would not be able to sort it out - is it:

a) object method / variable separator?

b) is it still part of the field?

Do not search for any workaround other than suggested by Matthew. Do not try using dots in the field names.

Read only

rosenberg_eitan
Active Contributor
0 Likes
2,243

Hi,

Every programing language has its syntax rules.

If you want to use this language you have to follow the rules.

All the peoples involve with SAP ABAP must follow the rules.

and here it is: from http://help.sap.com/abapdocu_740/en/abennaming_conventions.htm

How abut using underscores (_)

Regards.

Read only

yogendra_bhaskar
Contributor
0 Likes
2,244

Hi Munu ,

I was also facing the same problem some times ago ,

I was creating a dynamic table where fields where containing special character.

Now , for the solution what I did was , used dynamic variable for those field naming as F1 , F2 , F3 etc.

Hope this will help you out

Regards ,

Yogendra Bhaskar

Read only

Former Member
0 Likes
2,243

Hi All,

Actually as per the values entered in the selection screen, the dynamic field will grow as per that.

If in the selection screen we have entered "F.30" then in the dynamic table column it should be F.30.

But while creating the dynamic table it is showing the error.

Thank you in advance.

Best Regards,

Munu

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,243

Could you consider building of the internal table with technical field names : F0001, F0002, etc. and a column header that uses the user input so header of FIELDNAME = 'F0001' would be COLTEXT = 'F.30' ?

Regards,

Raymond