cancel
Showing results for 
Search instead for 
Did you mean: 

Validation on SGTXT

former_member190954
Participant
0 Kudos

Dear Experts,

I'm trying to define a validation on the field BSEG-SGTXT via formula builder. I would like to define the validation without programming a function module. The system should check the structure of the field SGTXT based on this criteria:

The allowed value is: *NUM4*NUM10*Text. NUM4 is always 4 numbers, NUM10 is up to 10 numbers. If some of the numbers are missing all the "*" must remain.

I tried something like this:

But it doesn't work correctly because if there is "*" + any other character, the system evaluates it as an error.

Any help would be much appreciated.

Thanks in advance.

Regards,

Ondrej Zatopek

Accepted Solutions (1)

Accepted Solutions (1)

iklovski
Active Contributor
0 Kudos

Hi,

I'm afraid, you have to do it via user-exit using ABAP REGEX. Formula builder is not able enough for this task.

Regards,

Eli

former_member190954
Participant
0 Kudos

Hello Eli,

that is what I was afraid of. Anyway, thanks for your answer.

Regards,

Ondrej

iklovski
Active Contributor
0 Kudos

Not at all You know, that you have a program DEMO_REGEX_TOY, which helps you to find fitting REGEX statement for your needs. If you experience a problem, you can consult your ABAPer.

Answers (0)