cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem

Former Member
0 Kudos

Hi Experts,

I am creating a Idoc to file scenario and at target structure have a file with structure as HEADER,DETAILS and TRAILER.

My complication is if we have 6-7 idocs being processed then only one header should be created and should have a field with identification no. for all of them/country and trailer should have a field with sum of a field present in DETAILS part.

Also is there any approch where we can calculate no. of particular segment in the idoc.

Thanks

AKHIL

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi AKHIL,

a) use count/index in statistic (standard) functions.

b) If you need exactly one header line, set minOccurs = maxOccurs = 1

Regards Mario

Former Member
0 Kudos

that i have done my main problem is how to process data of target structure to get sum ...

Former Member
0 Kudos

Hi,

U need to write an UDF.

input ur amount which need to be added.take it one queue.

input =a

UDF:

for(i=0;i<a.length;i++)

{

write a code to add the values

result.addValue(return the final values)

}

pass this output to trailer record element.

Thanks and Regards,

Chirag.

Jitendra_Jeswan
Contributor
0 Kudos

Please elaborate more on this along with the Source/target structures in question.

Regards.Jeet

Former Member
0 Kudos

source structure is a IDOC FIDCC2 and target structure is Header-field a,Field b

Details-Field 1,Field 2,Field3 etc....

Trailer-Fielda,fieldb...

here a file has to be created out of target structure where header comes once , Details can come n no. of times(equal to no. of idocs processed ) and trailer comes once..

for eg field b in trailer should contain the sum of Field 2 for all details...

Hope it helps..

Akhil

Edited by: Akhil Rastogi on Feb 25, 2008 11:12 AM