on 02-14-2013 9:15 AM
Hi all,
i have 3 fields in source
sender
receiver
msg------- it contains vendor no and PO.NO , its a text msg
in my target, i have 4 fields
sender
receiver
vendor
po no
my reqt, i have to split the text msg in to two and to map, i had tried substring, but it doesnt worked.
I need solution for this.
Thanks in adavance,
dhanush
Hi,
if your 3rd input is fixed length value then you can substring that.
what is the max length of your field and length of lifnr and PO NO?
Regards,
Girii
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi karthick,
As per my understanding In you source field msg has to spilt in two part and mapped to vendor , po no .
Just also describe that how will you differentiated between vendor no PO no . There should be any length or any key point so that you can differentiate between then and can split by using UDF .
thanks and regards,
Anup Banerjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hI ANUP,
I will get SMS and got stored in DB, IN DB 3 fields r there. sender,receiver, and msg.
in msg- its a text msg contains lifnr=1000271, PO.NO:1000000725 .
the above is a text msg and like one sentence it will be.
so i want to take the both values and to map with bapi inputs, which is sender,rec,po, vendor.
This is my reqt. Can u tell any alternatives for this.
Thanks,
dhansuh
Hi ,
write a small udf to full fill this.
1)Split the message based on delimiter.
String[] seperated = inputString.split(",");
2)Replace lifnr= and PO.NO: with empty and trim the values before passing as o/p.
First try to write code for above udf .If you could not able to write ;let me know i will write a small piece of code for you.
Regards
Venkat
Hi ,
Here is the code.
for(int i=0;i<inputString.length;i++) //use for loop for mutliplte msg other wise just comment it
{
String[] s = inputString[0].split(",");
vendor.addValue(s[0].replaceAll("lifnr=",""));
PONO.addValue(s[1].replaceAll("PO.NO:",""));
}
use trim b/w udf and o/p fields
Regards
Venkat
Hi,
i was trying with ur code, but cant able to get. can u explain end to end how to use UDF fn, i had created 1 udf, in msg i want to give as vendor and PO,
but still complicated. Can u explain me in brief.
Regards,
dhanush
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.