on 06-18-2009 4:22 PM
Hi,
I need to split a string with an undefined length into strings of 132 chars. The problem is, how to map from the source field to the target field,
which belong to an idoc segment. The segment has the occurence 1 to unbounded, and the field 0 to 1. Simplifying, i need to map one source field split it in 132
chars block and put the resultant blocks into an idoc field (maxLength = 132).
-
IDoc
-
Segment X
-
...
-
Segment (occurence 1..unbounded)
-
Field X
Source field SourceA (undefined length)----->-----Field TargetA (occurence 0..1) (maxLength = 132)
-
Segment Y
-
...
Ok...here is one way of achiving what u want - hope ur comfortable with working with context mapping...
Raise the context of ur source field one level higher and write a UDF funtionto do this -
Declare an array list
Read the source string and append it to the arraylist.
Then when u map ur target IDOC text...read from this array list and created ...By maintaining the context...there will be as many segments in the idocas there are in the arraylist..
regards,
arvind R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jose,
You can achieve this via writing a simple UDF in your mapping.
Thx
Pooj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.