06-18-2013 1:06 PM
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
06-18-2013 3:27 PM
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.
06-19-2013 5:25 AM
06-19-2013 6:22 AM
06-19-2013 6:38 AM
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.
06-19-2013 6:45 AM
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.
06-19-2013 6:47 AM
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
06-19-2013 7:34 AM
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
06-19-2013 7:40 AM
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.
06-19-2013 7:43 AM
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