cancel
Showing results for 
Search instead for 
Did you mean: 

How to hard code a records at the end of file

Former Member
0 Kudos

Hello experts,

I am doing IDOC to File scenario,I need to append 4 records at the end of file each time it is created in XI(These four records are need to be hardcode in the o/p file) .

For example with IDOC to File,the o/p file like

1 name number sal

2 name number sal

3 name number sal

But my expected file is

1 name number sal

2 name number sal

3 name number sal

1 abc 123 2345676

2 bdc 234 11111111

3 aaa 123 11111111

4 fffff 567 33333333

Every time these 4 records are common.How can i hard code the last 4 records in XI.

could u plz help me in this.Thanks in advance.

Regards,

KP

Accepted Solutions (0)

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

<i>1 abc 123 2345676

2 bdc 234 11111111

3 aaa 123 11111111

4 fffff 567 33333333</i>

create a 4 extra fields in the target structure, and map the above data as constants to the same and in the FCC at the recv. side provide the parameters and you should be done

Former Member
0 Kudos

Hi,

Hope u are doing File Content Conversion in ur receiver adapter.

Lets assume that u have structure like below

-Record

-RecordSet

X

Y

Z

Add one more Recordset like for Trailer records

-Record

-RecordSet

X

Y

Z

-TrailerRecordSet

Trailer

In ur mapping hardcode the Trailer node with the four lines (u can use '\n' char to represent nextlines)

In ur Receiver communication channel add the TrailerRecordSet also...

RecordSetStructure: RecordSet,TrailerRecordSet

TrailerRecordSet.fieldSeparator -


'0'

TrailerRecordSet.endSeparator -


'0'

RecordSet Parameters....

......

Regards,

Sudharshan

Former Member
0 Kudos

Hi,

If they are going to be the same for all scenario then, you can do this in your message mapping i think. You can give constant values to all these fields.

If the number of values that will be generated by IDOC is not known and these are need to be added in the end after all IDOC records, use duplicate subtree in the target side and do the mapping after the initial mappings with IDOC.

Regards,

P.Venkat

Message was edited by:

Venkataramanan