cancel
Showing results for 
Search instead for 
Did you mean: 

N:1 All IDocs created in a day in a single CSV file

Former Member
0 Kudos

Hi,

The scenario is: Send all the materials, purchase order, stock etc which has been changed in a day as IDocs to PI through batch job which will run around midnight.

All these idocs should be clubbed in a single csv file based on IDoc type.

Is this possible?

I know single XI msg can be converted to single CSV file but how to create single CSV file for multiple XI msg?

Please guide.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Riya

I wouuld suggest you to create separate scenario for each idoc type.Normally we follows this approach only.

Once you have a separate scenario, you can consiider the two options which I have mentioned.

Former Member
0 Kudos

Thank you Indrajit for quick response.

1.Is there any disadvantage for 2nd option?

2. How File channel will know that all Idocs for that day has been appended?

Client says a batch job will run which will identify all changed processes and IDocs will be created and triggered.

3. Other than ALE settings is there any other ways how we can connect ECC and PI to transfer data?

Thanks.

Former Member
0 Kudos

Hi Riya

For option 1 , the advantage is that it will have only one message in PI for each idoc type.But the disadvantage is that if any of idoc has wrong data and failed in PI mapping, then all the idocs will also fails.

For option 2 , we will have more messages in PI for each idoc type and trust me in most of the idoc interfaces we follows this approach only.

If we are using idoc , then its recomened use ALE as its a very stable. If you don't want to use idocs, then you can think of proxy and RFC.

Former Member
0 Kudos

Hi,

How PI will understand if all IDocs for that day has hit PI and file appending has to be stopped and made available for 3rd party system to read?

Please guide.

Thanks.

Former Member
0 Kudos

Hi Riya

As you have mentioned that the idocs will be triigered by a batch job. There must be a schedule for the job. For example if the job runs daily once on a fix time say 1 PM, then you can schedule your 3rd applicaton after that time say 3 PM .The time difference you plan based on the volume of the idoc numbers.

But if the job runs every hour on each day, then it will be little bit difficult. In this case you can populate the file name based on system time and include the hours in the file name. So after each hour a new file will be popoluated with names like

output_file_01

output_file_02

...

output_file_23

and on the 3rd party side , every hour the application will look up for files for the previous hours

for example if the 3rd party application look up at 2 PM it should pick the

output_file_01

.

Hope this will give you some idea.

Former Member
0 Kudos

Hi Indrajit,

I understood your point.

Basically what i came to know after reading is PI locks the file untill all append has happened. Until PI release the lock the file is not available for 3rd application to read.

So my question is how PI will know when to release the lock or when the whole append has happened?

Please help.

Former Member
0 Kudos

Hi Riya,

PI will lock the file only when it is writing to the file. So if you have 10 IDOCs coming in from SAP (of same IDOC Type) then XI will append all these IDOCs into a 1 single file. Now the file lock will only happen when PI is wirting the content of the IDOC into file. During the time period between 2 IDOCs, the PI will not have any lock on the file. So once the last IDOC has been written, PI will have no lock on the file. Also consider that if you are writing file on FTP server rather than NFS, then PI will not lock the file at any time. Hope this helps.

Regards,

Anurag Mahendru

Answers (2)

Answers (2)

subhro_de
Active Participant
0 Kudos

Hi Riya,

As already mentioned by Indrajit, all this data are generally separate idoc types and so separate scenarios can be configured.

In ECC partner profile you can set collect idocs and in sender idoc communication channel select the option of "Multiple IDocs in single XI message" and then proceed with mapping.

Regards

Subhro

Former Member
0 Kudos

Hi Subhro,

Client says he does not want to use collect Idocs feature.

The requirement is identify all changed process (materials, PO) in a day and create IDoc through batch job and send to PI.

Other than ALE settings is there any other way how we can connect ECC and PI to transfer data?

Thanks.

Former Member
0 Kudos

Hi Riya

yes we ca do this easily in PI. We can do this buy two ways

1. From ECC we can send multiple idocs in a single message to PI and 1 file will be generated after mapping which will contain all the idoc data.

2. We can send idoc separately and in the file communcation channel we will choose the option append. So all idocs will be written to the same file.

Former Member
0 Kudos

Hi Indrajit,

PI will be receiving idocs separately from ECC.

If we use append option in receiver file communication channel, then how can we differentiate between various idoc types?