on 03-04-2013 9:04 AM
Hi,
Am new to the XSLT coding.
Could you please help me in providing the code for the total count of the records and the sum of the values of a field for the Target structure at the trailer.
I have provided the target structure and my source is Idoc.
In my scenario the Records are generated based on the Field - RecID.And am going to provide the constant values as shown in the structure
Which parameters i have to use to access the Target structure
Occurrence of Header and Trailer is 1 and the occurrence of Details are unbounded.
Header
Rec0
Details
Rec1
RecID = 1
Amount
Field2
Rec2
RecID = 2
Field3
Field4
Trailer
Count of Records - Count(RecID)
Total Sum of field (Amount) - sum(Amount)
Thanks & Records
Balu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Beena,
Thanks for ur reply
For the RecID i am assigning the constant 1 & 2 for the Record1 & record2 respectively.
and for the Amount field am getting from the source filed /Idoc/E1EDIKU2/MOABETR.
At my target file the details records (for Eg : 1,2,1,2,1,2) can come n times and i have to count the records based on the RecID. Along with this the Amount has many input values and i have to sum up all those and have to provide at my trailer.
Thanks & Regards,
Balu
Hi,
You must be mapping some element in input file to generate RecId and Amount. You can use the same fields with functions count and sum.
Regards,
Beena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.