on 2010 May 22 6:04 PM
Hi,
I have product id with the format 9624-6569-5856 in data source, How shold I write a routine to remove the Hyphen .
HI,
You can write this in the object level routine or the start routine in the transformations.
Try this.
DATA: string1 type string,
string2 type string.
string1 = '9624-6569-5856'.
REPLACE string1 WITH space INTO string2.
CONDENSE string2.
Finally string2 is your o/p.
Hope this helps.
thanks,
rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the following code .. modify it according to your source data type.
Data:
ZINPUT1 Type String,
ZINPUT2 Type String,
ZINPUT3 Type String,
ZINPUT4 Type String,
ZOUTPUT Type String.
ZINPUT1 = '9624-6569-5856'.
split zinput1 At '-' into ZINPUT2 ZINPUT3 ZINPUT4.
Concatenate ZINPUT2 ZINPUT3 ZINPUT4 into Zoutput.
write zoutput.
Regards,
Srivatsan.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.