‎2011 Jun 14 8:55 AM
Hello,
I have to insert an "_" in a charfield, using the SE16/SM30. This character is always deleted. Does has anyone an idea to avoid this behavior?
Thanks & Regards
Geert
‎2011 Jun 14 8:57 AM
I have tried with char field, it doesnt get deleted.
COuld you tell exactly which field are you trying to populate.
‎2011 Jun 14 8:59 AM
It's a char 5 field within a customizing table. A table entry screen is generated and with the SE16/SM30 data will be entered.
‎2011 Jun 14 9:03 AM
Hi,
I tried with _abcd , abc,_abc_.
All is accepted. are you creating a z dataelement or directly refering to char5?
‎2011 Jun 14 10:31 AM
I tried both.
Z Domain:
Datentyp CHAR Zeichenfolg
Zahl der Stellen 5
Dezimalstellen 0
Ausgabelänge 5
Konvert.-Routine
Vorzeichen
Kleinbuchstaben
and also CHAR5
Thanks & Regards
Geert
‎2011 Jun 14 10:48 AM
Hi,
Its working fine ,i have tried with several combinations.
FIELD DATAELEMENT TYPE LENGTH DECIMAL DESCRIPTION
TEST CHAR5 CHAR 5 0 R/2 table
Try creating a dummy table and add just char5 data element and see if its working,
‎2011 Jun 14 11:21 AM
Hi Geert,
It's a char 5 field within a customizing table.
Is this customizing table a Z table or a standard SAP table?
Also look at the Modification events, if they have any code that deletes "_" or any special characters.
I tried the same with a Z table and it works fine.
Regards,
Chen
‎2011 Jun 22 7:36 AM
Hi Chen,
sorry for delay, I was on vacation ...
I didn't tell proberly what the problem is. The error orccurs if I write a single "_" or "__". In combination with any other character it works like you mentioned.
Regards,
Geert
‎2011 Jun 22 8:01 AM
Hi Geert,
Yes you are correct, we can not input only underscores in text field.
But this is not only in SM30/SE16 it is valid for Parameters and input output fields also.
Only underscore is considered as blank.
Thanks,
Anmol.
‎2011 Jun 22 8:31 AM
Hi Geert,
You cannot use '_' alone as an input in a text field, i suppose the reason for this is that "_" is a wild character in SQL that represents any character and hence not allowed as input to overcome SQL injection or something.
And Anmol is right, it is not only on the dialog screens but even selection screen elements ignore this. For ex: if you input _ in a mandatory field and execute it will throw an error to fill up the field.
Regards,
Chen
‎2011 Jun 22 8:40 AM
Hi Chen,
thats what I also recognized. I solved the problem with a workaround. If I want to use a single underscore I put a "&" as beginning and filter it during processing. It's a workaround as I menetioned and not a solution.
Best Geert
and thanks for your support