Application Development 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: 

Field names for cl_alv_table_create=>create_dynamic_table

IanStubbings
Active Participant
0 Kudos

Morning All

My client is currently implementing SAP QM at one of the labs and I have come across a situation where the fieldnames required for a dynamic table creation can potentially contain spaces and special characters. So far I have urged them to remove all such characters as the call to the cl_alv_table_create=>create_dynamic_table method will dump if they are present.

My question therefore is, is there a definitive list of characters that cannot be used as part of a fieldname? I intend to use such a list to then search and replace the special characters to enable me to match fieldnames.

For those of you that know QM, we cannot use internally assigned numbers for master characteristics (client decision) and special characters are frequently used as names in the lab. My client sees it as a limitation to remove the spaces and special characters from the names but unfortunately it causes problems for me if they don't.

I need to match the names to determine results for a report so substition seems to be the way forward - unless some else has another suggestion?

Thanks in advance

Ian

1 ACCEPTED SOLUTION

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is a form called SAACHECK in module pool RDDU0001 that the data dictionary program uses to check the validity of field names. You should probably have a look at the logic.

But why use the Master characteristics as the field name anyway? Why not instead create a cross reference in an internal table and generate a simple sequence for each unique master characteristic. That way your field names are just the sequence number, but you can still match up your data with a binary read on the cross reference internal table.

2 REPLIES 2

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is a form called SAACHECK in module pool RDDU0001 that the data dictionary program uses to check the validity of field names. You should probably have a look at the logic.

But why use the Master characteristics as the field name anyway? Why not instead create a cross reference in an internal table and generate a simple sequence for each unique master characteristic. That way your field names are just the sequence number, but you can still match up your data with a binary read on the cross reference internal table.

0 Kudos

Perfect!

You answered both questions with exactly what I needed. This is why you write for SDN and I do not, I guess! As it happens I have been reading your weblog on 'ABAP OO mixed with Classic Dynpro' this morning so rather fitting that you should answer my post.

Thank you.

Ian