on 11-23-2012 5:52 AM
Hi Every one,
I have a mapping requirement where i have to take only the first seven chars (on left side)in the field.
For example if the value of the target field is 123456789. the mapping result should be only 1234567. can any one please help me how to achive this.
Regards
Swetha
Hi Swetha,
Have you tried using the 'Substring' standard function in your graphical mapping?
http://help.sap.com/saphelp_nw04s/Helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
There should be lots of examples of this on SCN.
Regrds, Trevor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trevor,
I have tried substring,
for example my requirement is:
My source field is S5079826-1-USP1 i want only S507982
for this i use substring 0,6 but it is trowing below error.
Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 6] in class com.sap.aii.mappingtool.flib7.TextFunctions method substring[, 0, 6, com.sap.aii.mappingtool.tf7.rt.Context@7aa16d08]
Please can anyone help me out of this.
Regards
Hi Swetha,
Verify your source field actually has that value and add a check in your mapping to prevent the error, if for example the source doesn't have any value.
This happens when you are trying to take more characters that what is in the source. Also, you should 0,7 for your result.
Regards, Trevor
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.