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: 

Changing custom table field's data type from DEC to CHAR

Former Member
0 Kudos

Hello,

My requirement is that the end user wants to able to differentiate between 0 and blank for a particular field.

The field of type DEC, and as a result both null and 0 values are always being stored as 0.00.

I am considering changing this custom table's non-key field from DEC to CHAR. [no foreign key dependencies]

I will activate and adjust this table in SE14, with "Save" option.

This table is being used in around 10 custom remote-enabled function modules.

What are the problems that could arise with this change?

What kind of impact analysis and tests do I need to perform?

Thanks and Regards,

Kavya

1 ACCEPTED SOLUTION

naveen_inuganti2
Active Contributor
0 Kudos

As you mentioned, after doing SE14 activation.. do a where used check on that field.

1. Check for syntax errors in each dependent object.

2. Check if there are any mathematical operations in those objects. Char will still support it but your field is now eligible to have Alphabets also, 3. hence add additional validations before performing mathematical operations.

3. Check if you are passing this field value to any other field. They should be able to run even with Char type, now. Add validations if required.

4. You need to check with users of these RFCs, especially if this field is part of your RFC interface then target audience should aware of this change.

5. If there is any display transaction available for this table (TMG) then you should re-generate TMG. 

Thanks,

Naveen

6 REPLIES 6

naveen_inuganti2
Active Contributor
0 Kudos

As you mentioned, after doing SE14 activation.. do a where used check on that field.

1. Check for syntax errors in each dependent object.

2. Check if there are any mathematical operations in those objects. Char will still support it but your field is now eligible to have Alphabets also, 3. hence add additional validations before performing mathematical operations.

3. Check if you are passing this field value to any other field. They should be able to run even with Char type, now. Add validations if required.

4. You need to check with users of these RFCs, especially if this field is part of your RFC interface then target audience should aware of this change.

5. If there is any display transaction available for this table (TMG) then you should re-generate TMG. 

Thanks,

Naveen

0 Kudos

Thanks Naveen,

I have another question.

What will happen when I transport this changed table to QA?

Will the table become inactive till I adjust it using SE14, or is there a chance of data getting deleted?

Regards,

Kavya

0 Kudos

You dont have to adjust that in non-development systems like QA. Transport Management System will take care of that.

Yes, data will be adjusted. It will not be deleted in your case (Because this is not CHAR to DEC/CURR). If there is no change to total output length then you will not notice any adjustments/changes to data (Ex: DEC 17, 2 to CHAR20+, there will be no change to data in this case as we are not decreasing overall length) 

Remember, change is limited to this field only and nothing will happen to rest of the fields.

Regards,

Naveen

former_member184569
Active Contributor
0 Kudos

All arithmetic operations done for these fields would result in dump..

field GT 0, or field + 1 etc

Any comparisons that were made on these field without quotes would results in dump.

if field = 0 should be changed to

if field = '0'.

In all the assignment also, make sure that the value is given in quotes.

field = 1 must be changed to field = '1'.

Former Member
0 Kudos

yes may be  there is a possibilty of getting data deleted. i would suggest please do where used list check before doing any corrections. if the table contains lots of data so in that case there is a possibility to change or loss of data so better to have archive that data before doing it any changes.

please do test in development test environment and then go ahead with quality test.  

nabheetscn
Active Contributor
0 Kudos

Hi Kavyashree

SAP help has clearly documented the various conversion problem which you can encounter in such scenario's including the one's listed above.

Please go through this link to understand the issues SAP Library - Database Utility

Nabheet