on 12-23-2015 7:48 PM
I am looking on how to replace the ? character with an empty tag. For example, when field1 = ? , I need just an empty tag for field1 or <field1></field1>
Or in other words, if field1 = ? , produce empty tag, or else produce whatever value it holds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ryan,
Try replaceString function(String Function)
Input----------------------
Constant ?---------------- Replace String---------------------Output
Constant[]--------------
http://wiki.scn.sap.com/wiki/display/HOME/Message+Mapping++Replace+String
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use replaceString text function - replace ? with blank constant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay sorry, I overlooked at it. You are correct, but still not sure if it will help his requirement. It's upto Ryan to test it out that suits his need.
For example, let say he wants to replace 100 with blank space for Field1, your logic will work if the field is 100 or if the field is 200 or etc.. But it defeats the purpose if the Field1 has 100000. The result will be 000. Isn't it.. I'm sorry if I'm missing any logic here..
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan
use replace all method in udf
field1.replaceAll("\\?","");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.