on 07-24-2006 2:51 PM
Hi All,
In my IDOC there are three item segments E1J3AIT, E1J3AIS, E1TXTH9.They are linked to three different structures SI1, SI2, SI3. I am creating a flat file.
In the target structure there is one common field counter. Now if my first segment has 3 items, 2nd segment has two items and if my 3rd segment has 3items my counter field in my output should start from 0 and end with 8. How can I achieve this? Your help will be highly appreciated.
---Satish
Hi all,
Need to ask smething about the counter to generate the sequence numbers and pass it to the target field.
If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?
So thats the case, then we should use the DB lookup for the same?
Also, the INDEX function in the Statistics part in the GUI of Message Mapping, how much that is helpful?
Respond back at the earliest possible.
Thanks in advance.
Neetesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
You can create simple UDF to generate sequence numbers one by one keeping track of the sequence number previously generated. The latest number to be stored in global container and to be sent out as output.
The output of the function can then be assigned to the counter field of all the segments in target Message.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
Define a user Java function that increments a global variable and returns it. You can define an additional user function to return the value without also incrementing it.
You can press the "java sections" button (in the message mapping toolbar) and define the variable over there.
//increments the counter
public String BeginCounter(Container container){
gCounter = gCounter + 1;
return "" + gCounter;
}
//returns the value of the counter
public String GetCurrentCounter(Container container){
return "" + gCounter;
}
Good Luck,
Ofer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
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.