cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC - to - File with multiple File names for a unique(same) IDOC from R/3

Former Member
0 Kudos

Hi Experts ,

please give me your inputs on how to achieve the below requirement.

Scenario : IDOC - to - Flat File

I have u2018nu2019 number of pay runs running at back end. Each pay run will generate few IDocs with same PAYRUN ID and PAYRUN date.All the IDocs generated as a result of all pay runs will be collected at ABAP side and sent to PI at a time.

PI should process these IDocs and create u2018nu2019 flat files with 1 header and multiple line items .

For suppose 1st pay run resulted in 5 IDocs and 2nd pay run resulted in 6 IDocs, all the 11 IDocs will be sent to PI at a time .

And output will be 2 flat files (group the IDocs having same PAYRUNID) with 1st file having 1 header and 5 line items (corresponding to 5 IDocs of 1st pay run) and 2nd file having 1 header and 6 line items (corresponding to 6 IDocs of 2nd pay run)

Please give your views as soon as possible.

Thanks in advance.

Best Regards,

Lakshman

Accepted Solutions (0)

Answers (1)

Answers (1)

PriyankaAnagani
Active Contributor
0 Kudos

Hi Lakshman,

Change the occurrence of target message to 0..unbounded in message mapping. Follow the below logic to map the target message type.

PAYRUNID>removecontext>sort>splitByValueChange>collapseContext-->MT_Target

Regards,

Priyanka

Former Member
0 Kudos

Hi Priyanka,

Thanks for the reply. In mapping we can handle only the sorting and splitting of the IDOCs which belong together. I want to have different flat file with differnet names to be written to the target application as explained in my qurery.

One way is using the BPM - with co-relation step involved in that.

I want to do this scenario w/o BPM . is there any other way to achieve this w/o using BPM ?

Thanks & Best Regards,

Lakshman

Former Member
0 Kudos

Hi,

yes for w/o BPM, by using:

1. in ECC, RSEOUT00 program scheduled every N min, with a package size = 100 (for instance).

2. in PI, use a Sender CC (idoc) with option Idoc PacKaging + Idoc Packaging size = 100 (for intance or higher)

3. in PI mapping, use a N -> N occurence. Create one outbound message based on your rule.

And for each outbound message, you have only one file.

constraint :

1. the collect is not done in a BPM, but by the sender: ECC program ) RESOUT00.

2. depending on RSEOUT00 scheduling and package size, maybe the sending to PI could be in several messages... and so w/o BPM, maybe you can have different target file.

Does your target files have a timestamp ? or does the filenames is pre-defined ?

Regards

Mickael

PriyankaAnagani
Active Contributor
0 Kudos

Hi Lakshman,

You can achieve this without using BPM. Use IDOC packaging(PI 7.11)..create IDOC sender adapter which will collect the multiple IDOCs into single PI message....and change the target message occurrence and follow the logic...It'll work...And for Different filenames you've to write UDF to generate the filename dynamically...

Regards

Priyanka