Monday, January 23, 2012

ABAP: Things to consider for CHAR type fields in tables

If you are enhancing your table structure with CHAR type data elements,  there are few things which you must consider.

If the newly added field is NOT a key field and you have not marked the field for Initial Values = 'X'.


1. If you check values in this field in your programs you cannot be sure that the condition “IS INITIAL” or “IS SPACE” is working correctly. Same holds for comparisons with other variables having a SPACE or INITIAL value.


2. If you need to check for an initial value in this field you should make sure to use the condition ( IS INITIAL OR IS NULL) as depending on DB system a NULL value is stored.


3. If you use this field to store character strings w/o usage in SAP GUI screen fields that’s OK. However, when you use it on SAP GUI screens you cannot use lowercase characters as it is not based on a domain with lowercase option. So an automatic uppercase conversion is done when a screen input is used.

Cheers,
Sandeep 


No comments:

Post a Comment