on 09-28-2006 4:49 PM
Hi All
I m facing a problem for mapping ATMAS IDOC to a flat file:
As you know, each line from E1BPE1MATHEAD (Retail Data Transfer: Header Segment with Control Info) there is many in E1BPE1MARMRT (Retail Data Transfer: Units of Measure). The business logic for mapping requires creating on recordSet in the flat file but I need to do same math using all corresponding lines from E1BPE1MARMRT recrdSet.
Ex:
E1BPE1MATHEAD
"""""""""""""
MATERIAL
1223456
E1BPE1MARMRT
""""""""""""
MATERIAL NUMERATOR UNIT
1223456 23 PC
1223456 54 EA
1223456 67 PAL
BL for the out put file:
MATERIAL Value
1223456 235467
Thanks,
P.C
Hi,
You can pass the entire queue to a UDF, then LOOP it and do the math function. Finally add the result to the resultlist.
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Point Cube,
UDF ( User defined function ) is graphical mapping ! ( ok, advanced graphical mapping )
I'm no java guru but I did find it relatively easy to use it . I guess yours should look something like :
public void ResultType(String[] a,ResultList result,Container container)
//write your code here
int j = 0;
int total = 1 ;
for( int i=0;i<a.length;i++){
total = total*a<i>
}
result.addValue(total);
You might need some additional conversion to/from string here and there.
rgds
Dirk
Message was edited by: Dirk Deberlanger
Message was edited by: Dirk Deberlanger : Some code doesn't seem to copy/past right : total = total*a<i>
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
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.