cancel
Showing results for 
Search instead for 
Did you mean: 

Recordset per message

Former Member
0 Kudos

Hello All,

I have a flat file of fixed lenth which has to be read by SAP PI.

Structure of the file is as below:

BHABCDYYUU 00000001

DLWERLKJLKF

BHAWEDYYUU 0000002

DLWEDSLKJLKF

BHDFEDYYUU 00000003

DFSFSDFSDF

BH-Batch Header

DL-Detaled Linte Item

As part of my requirement I have to read one set(a BH followed by DL). Hence I put the recordset per message as 1.

And recordset structure as BH,DL.

But when I execute the Interface the channel reading the above file in random order instead of reading from top to bottom.

Due to that I am missing the correct order. Tried EOIO.

Can some one tell me the solution to read the file from top to bottom in a sequence with recordset per message as 1

Thanks,

Regards,

Moorthy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Moorthy,

there is no issue, it's the normal process of file adapter.

The file is well read from top to bottom by the adapter, but as you say you want only one record (BH/DL) per message, that means the adapter create several XML messages. After that, as you know, your messages are asynchronous... and so they will be treated in parallel processes among different queues, in order to have good performance. The consequence of this parallel treatment is that the file sequence is no more respected... That's the normal process !

So either you continue to say "I want to have only one record per message" and you want to keep the file sequence, so you have to use a EOIO processes... and accept the risk of using a EOIO: if one message is in error, it's the whole queue which is locked, and so all other messages xhich are locked... until you see the error, solved it and restart messages.

or you create only one XML message which will contain all records (BH/DL) of your file (*). Your file sequence will be respected.. but after that it depends what is your treatement ? which mapping ? which target structure ? is it possible to keep the sequence with this target system ? Do you really need to keep this sequence from end to end ?... depending of your response, maybe you need a true EOIO from end to end.

(*) to do that, use option "keyField" on your "BH" and "DL". Many exm in SDN.

regards

mickael

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Murthy,

Record set per message option most of the time it would work like top to bottom only, but now where SAP mentioned order format(as per my knowledge).

check your flat file order once again and monitor the format if it is behaving same then sort it out in Mapping level and dont use record set per message option pull all records at one time convert in to multiple records and sort in PI mapping level(tricky mapping logic nut can be done).

could you please tell me why are you using record set per message option in your requirement(huge flat file??).

Regards,

Raj