on 01-16-2007 7:01 AM
Hi,
I am doing a scenario SAP to Siebel and i am facing a problem with mapping.
1) Target side i have string field of length 2000 characaters.
2) I am using ORDERS standard IDOC, in that i have a segment E1EDKT2 and field TDLINE. The length of the TDLINE field is 70 characters. Basically this field is used to populate some status text data, so once the 70 characters are exhausted one more segment will be getting populated. All these TDLINE fileds shuld display as a string in the target.
ex:-
SOURCE TARGET
-
-
1)abcd abcdefghijklmnopqrstuvwxyz
2)efghij
3)klmnopq
4)rstuvwxyz
Can we achive this with standard mapping! if so plz guide me. Your help in this issue is highly solicited.
regards
Hi Venkat,
Tq, Jay's coding is working but small discrepancy. Hope, he wl break that.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay & Venkat,
Thanks alot, my problem is solved.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Friends
Any inputs on how to eliminate those special characters between the lines? I mean when the second and subsequently line getting concatenated to the 1st line, prefix to the second and subsequently lines i am getting a unwanted characters like '__cC_'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think that is representation of Context Changes. U try changing the context of the input. Check the output in the display queue, You should not get any context changes in that.
If that doesnt work add these lines of code before ' result.addValue(result1);'
result1 = result1.replaceAll("_cC_","");
result1 = result1.replaceAll("_cC","");
Regards,
P.Venkat
Message was edited by:
Venkataramanan
Hi Jay,
I have not changed anything. Ur code is working but i am getting extra characters as specified in my previous post.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
I am sorry to say, its thowing an error as :
Source code has syntax error: C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1f6cf980a54a11dbbc730014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:547: illegal start of expression public void test_channel$(String[] a,String[] b,ResultList result,Container container){ ^ C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1f6cf980a54a11dbbc730014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:568: ';' expected } ^ C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1f6cf980a54a11dbbc730014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:569: '}' expected ^ 3 errors
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
Tq u, ur code is working but the problem is in the target i am getting extra characters like"
Source
-
Awaiting Paper work
Awaiting Credif On Assignment
Extra Status Notes
Target:
-
Awaiting Paper Work_cC_Awaiting Credif on Assignment_cC_Extra Status Notes_cC
like this i am getting. Can u plz look into this!
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
thanx for ur reply...i tried ur code but no luck
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dominic,
my source is not only four strings.. it may spread to over 278 strings comprises of 70 characters per string.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Still its throwing the error as:
Source code has syntax error:
C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map2bfe79c0a53c11db87df0014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:539: cannot resolve symbol
symbol : variable length
location: class java.lang.String
for(int j=0; j<a.length; j++){
^
C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map2bfe79c0a53c11db87df0014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:540: array required, but java.lang.String found
result += a[j];
^
2 errors
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijaya,
using the standard concat function only lets you concat two strings. Here's a simple UDF for your 4 Strings:
String concatString = new String() ;
concatString = str1+ "" + str2+ "" +str3+ "" + str4;
return concatString;
You have to define a UDF with 4 input values (str1-4).
If you're not sure if all strings will be filled use the standard function "mapWithDefault". Otherwise you'll get an error.
Regards
Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijaya,
I do not have XI open .. but I guess this can be done using standard functions..
You have to use the concatenate function and there is a function I guess which suppresses spaces...
Please let me know if you are able to find those.
Thanks and Regards,
Himadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use advanced UDF to concatenate.
Input to the UDF is TDLINE(with context as parent of E1EDKT2):
input: a
The following is the code:
String result=null;
for(int i=0' i<a.length, i++){
result += a<i>;
}
return result;
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Thnx 4 ur quick reply. I have tried with ur coding, but its throwing an error. Can u plz look in to this, as i am not tht gud in java.
Source code has syntax error: C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc72ffb0a53711dbadef0014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:539: unclosed character literal for(int i=0' i<a.length, i++){ ^ C:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc72ffb0a53711dbadef0014220ffc27/source/com/sap/xi/tf/_Orders05_to_Siebel_Orders_RequsetMessage_MM_.java:544: illegal start of expression } ^ 2 errors
I tried ur code as follows:
public String result(String a,Container container){
String result=null;
for(int i=0' i<a.length, i++){
result += a<i>;
}
return result;
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
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.