on 08-08-2007 2:42 PM
Hi experts,
I am doing an idoc to file scenario whose idoc structre is given below
EIMARM(parent segment)
EAN11(field)
EIMARMM(child segment)
EAN11(field)
EIVKEMM(child segmnet)
VKORJ(field)
i have to generate datarecord for each VKORJ in E2MVKEM :If EAN11 is present in E2MARAM and if EAN11 is present in E2MARMM.
for ex:. if EIMVKEM segment come twice and EIMARMM SEGMENT 4 time then total 8 data records to be created.The E1MARM SEGMENT (first one) is the parent segment and it will come only once.
Please guide me how to proceed .Its bit urgent...............
Regards
Neha
Hi Vijay
I used the above udf using remove context funcion before giving the input it worked.But as I have mentioned I have to take only those E1MARM SEGMENT which have EAN1 field so i just put an if condition that
if EAN1(context change to upper lavel) exits
then take
E1MARMM after that ,same output of if coditon i am passing as the input to the udf along with E1MVKEM.the output is showing in display queue is correct but while creating record its taking value from those E1MARMM also which do not have ean1 field.I hope some context related problem plz guide me .
Regards
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Neha, For this better to create the UDF with the folloing logic
1. Take the EIMVKEM & EIMARMM both as input parameters
2. Use queus as the UDF Type
3. first loop with EIMVKEM elements and inside that loop with EIMARMM elements then add the elements result.addValue( " " );
4. then you will get the required values in resultset
<b>Logic:</b>for(int i=0; i<EIMVKEM.length; I++)
{
if( EIMVKEM<i>.equals(ResultList.CC)) continue;
for(int j=0; j< EIMARMM.length; j++)
{
if( EIMVKEM<i>.equals(ResultList.CC)) continue;
result.addValue{ );
}
}
This logic takes 2 elements of EIMVKEM & 4 elements of EIMARMM then it give the output as 8 elemenets. if you need the context change then use the splitbyvalue node function to insert the context change for each element.
Warm Regards,
Vijay
Message was edited by:
Gangisetty Vijaya Bhaskarudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.