简体   繁体   English

防止选择屏幕输入字段转换为大写?

[英]Prevent selection screen input fields conversion to upper case?

I have the table with field title_medi which contains two rows like Mr. and Ms.我有一个字段title_medi的表,它包含两行,如先生女士。

Also I have input field called title with search help of title_medi .另外,我有一个名为 title 的输入字段,带有title_medi搜索帮助。 When I'm selecting Mr. in the search help it gets displayed in the textfield.当我在搜索帮助中选择Mr. 时,它会显示在文本字段中。

If I compare that text field value with the database field.如果我将该文本字段值与数据库字段进行比较。 I'm getting an error.我收到一个错误。

But when I debug and see the value is somewhat getting converted to all uppercase like MR.但是当我调试并看到该值有点像MR一样转换为所有大写字母时 not as exactly in the table.不像表中那样。

Could you please help me out with this?你能帮我解决这个问题吗?

In order to solve this you have 2 options:为了解决这个问题,您有 2 个选择:

  1. Go to the domain of the table field and check Lower case check this转到表字段的域并检查小写检查这个
  2. Use TRANSLATE ABCD TO LOWER CASE before making the comparison check this使用在进行比较之前翻译ABCD为小写检查此

additional info附加信息

In HR, possible quality (Mr, Ms...) are stored in table t522.在 HR 中,可能的质量(Mr、Ms...)存储在表 t522 中。 Corresponding texts are stored in T522T.相应的文本存储在 T522T 中。 The data element is ANREX, associated with the domain of same name.数据元素是 ANREX,与同名域相关联。 This domain is lower case enabled.此域启用小写。

moreover, this also give you the person's gender.此外,这也给你这个人的性别。

I checked the data element but that is also been checked with the lower case.我检查了数据元素,但也用小写字母进行了检查。 So what i did is i have checked the check-box for upper/lower case attribute in screen painter for the concern field.所以我所做的是我检查了屏幕画家中关注字段的大写/小写属性的复选框。 It works fine它工作正常

Use LOWER CASE addition to PARAMETERS, if you refer to selection screen input field.如果您参考选择屏幕输入字段,请使用LOWER CASE添加到参数。

PARAMETERS: p_matnr LIKE mara-matnr LOWER CASE.

I don't know which version OP was using as this is really old question, but this addition is available at least since ABAP 700 SP05我不知道 OP 使用的是哪个版本,因为这确实是个老问题,但至少从 ABAP 700 SP05 开始,此添加项可用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM