on 2021 Jun 16 1:45 PM
Hi,
I need SAP to open a popup message when some dimensional values of lenght and height are out of some defined limits. I have writen a procedure in CU01/CU02 but i have an error message E28016, "too long expression". Do you know how to correct this error ?
Thank you
The code i've written is
DFUNCTION A_FEHMELD(
Fehler_00 = 'Attention dimension hors standard !')
if ((largeur in (1601 - 1700)) and (hauteur > 800)) or
if ((largeur in (1701 - 1800)) and (hauteur > 200)) or
if ((largeur in (1801 - 1900)) and (hauteur > 600)) or
if ((largeur in (1901 - 2000)) and (hauteur > 900)) or
if ((largeur in (2001 - 2100)) and (hauteur > 100)) or
if ((largeur in (2101 - 2800)) and (hauteur > 500)) or
if ((largeur in (2801 - 3100)) and (hauteur > 900)) or
if ((largeur in (3101 - 3200)) and (hauteur > 200)).
Request clarification before answering.
Hello algoproton,
That is a custom function so I'm not sure that you will be able to get help on the forums. I am assuming this is the message you are displaying to users, if so the length is 57. If you are using standard characteristics in your function this length is too long. Attention dimension hors standard,faisabilité demandée!
Also, your if statements are repeated when they don't need to be. Use the If statement once and then the or statements afterwards. I would say you don't need as many parentheses as well.
This this:
if largeur in (1601 - 1700) and hauteur > 800 or
largeur in (1701 - 1800) and hauteur > 200 or
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.