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: 

own DDIC-Type - CHAR but without numbers/ digits

Former Member
0 Kudos

Hi there..

I want to define my own data element / domain.

This should be a type of CHAR with the length of 12, but there only should be such entries entries possible: HELLOTEST, ATTRIBUTE, CAR, HOUSE_NUMBER, CHANGED_BY, ...

So, no numbers should be allowed.

I didn't find a solution how to define this data type yet - but on my opinion it should be easy to define..........

I hope someone had the problem before.

Greetings,

Andreas

9 REPLIES 9

Former Member
0 Kudos

Hi Andreas

Create a DOMAIN.

Assign these values in the Fixed Values of the DOMAIN.

RANGE

AAAAAAAAAAAA TO ZZZZZZZZZZZZ

aaaaaaaaaaaa to zzzzzzzzzzzz

it should work.

0 Kudos

HI Yakub,

It is not working...

0 Kudos

Hi,

Can you elaborate your requiremnt.

0 Kudos

Well,

In that case ... it is not possible to restrict it at data element / domain level.

This validation needs to be in place at the screen level where the entry will be done.

matt
Active Contributor
0 Kudos

You can set the data type and length. You can set domain values -either directly or via a config table. The validation however, must be done programmatically.

FredericGirod
Active Contributor
0 Kudos

I'm agree with matthew http://scn.sap.com/message/14136471#14136471

you have to add a field exit, in this function you have to check that your value Contain Only SY-ABCDE.

regards

Fred

0 Kudos

Dear Girod,

How to use SY-ABCDE  to check the below condition.

data : a(12) type c.

if a contains any numeric value it should trough error.

Regards,

Ramesh.T

FredericGirod
Active Contributor
0 Kudos

CN Contains Not Only; True if a logical expression with CO is false, that is, if operand1 contains not only characters from operand2. sy-fdpos is set in the same way as for CO. If the comparison is true, sy-fdpos contains the offset of the first character in operand1 that is not contained in operand2. If the comparison is false, sy-fdpos contains the length of operand1.

if a CN SY-ABCDE.

message text-e01 type 'E'.

endif.

maybe you have to translate a in upper case before the test.

gopi_narendra
Active Contributor
0 Kudos

Hi Ramesh,

Use the code below, to validate

PARAMETERS : p_char TYPE c LENGTH 12.

IF p_char CA '1234567890'.

   MESSAGE eXXX(XXXXXX) WITH 'Only characters.. please'.

ENDIF.

Regards

Gopi