cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping and the context issue

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member206604
Active Contributor
0 Kudos

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

Former Member
0 Kudos

So no way to do that just by graphical mapping!?

Thanks,

former_member206604
Active Contributor
0 Kudos

Hi,

I am asking you to do in Graphical mapping. In the user defined function you pass the whole queue (when you create a advanced udf you will get that option) and llop inside the user defined function.

It possible in Graphical mapping.

Thanks,

Prakash

Former Member
0 Kudos

I mean UDF = Java methode,

Thank you Prakash,

Former Member
0 Kudos

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>

Former Member
0 Kudos

Perfect

Thanks Dirk,

Answers (0)