cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting output to multiple files

Former Member
0 Kudos

Hi,

I am trying to split an incoming message into multiple output files.

I can see from other postings how to split it into outputs of differnet types, but I want to split it into multiple outputs of the same type, with the split based on the content of the segments in the inbound idoc.

For example, suppose my inbound idoc is structured something like this.

ZVM01

....Customer.............101

....DateIn..................16-Jan-06

....DateEnd...............18-Jan-06

....ZVM02

........Title................346

........CoverPrice.......1.00

....ZVM02

........Title................387

........CoverPrice.......1.49

....ZVM02

........Title................402

........CoverPrice.......0.99

ZVM01

....Customer.............102

....DateIn..................16-Jan-06

....DateEnd...............21-Jan-06

....ZVM02

........Title................404

........CoverPrice.......0.49

....ZVM02

........Title................350

........CoverPrice.......0.17

I.e there are multiple customers each with multiple lines of orders.

I want to produce a separate output file for each customer.

Is this possible?, If so how?

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Chris,

You can do this mapping without using a BPM as follows

1. In your message mapping, make sure that the destination message has an occurence of N ( so that for every customer an output is generated ).

2. In you interface mapping also, make sure that u have the occurence as N for your Destination Message Interface.

3. Configure your communication channel, sender agreement, receiver agreement, Receiver Determination as usual.

4. Now, in your configuartion, during Interface Determination, you will find 2 radio buttons RB_SPLIT and RB_CLASSIC. By default, RB_CLASSIC is selected. Just select RB_SPLIT and now in the field that is displayed just select the corresponding Interface Mapping and your task is done.

RB_SPLIT option allows you to perform 1:N mapping without actaully using a BPM.

Hope this helps,

regards,

Bhavesh

Answers (7)

Answers (7)

Former Member
0 Kudos

Oops, my fault, am a bit fuzzy headed with flu today, had not activated the Interface Map.

Former Member
0 Kudos

Okay, I have reached a sticking point here.

When I go into the Interface Determination and use the RB_SPLIP radio button, I get No Objects Found when trying to list available mappings, and am unable to manually type the values in.

In fact, with most Interface Determinations I do I have a similar problem that I get No Objects Found, but on 1to1 Classic view I can usually type these in.

Am I doing something wrong somewhere, or do I have a set up problem?

Cheers

C

Former Member
0 Kudos

Thanks for the assistance all.

I will award points et when I've worked my way through the solutions.

In answer to a couple of the questions.

We are on SP15.

Yes I want separate files.

Two final questions, is there a limit to the number of output files?

I am looking at 5,000+ files per message.

Also, when using the split, can I still use the variable substitution to rename the files according to content?

Cheers

C

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Chris,

You can use variable substitution for generating the file name. But, to uniquely identify each of the files, during configuration of your RECEIVER FILE ADAPTER, you have 5 options in FILE CONSTRUCTION MODE.

1.Append

2.Create

3. Add Time Stamp

4.Add Message ID

5.Add Counter

You can use 3,4,5 to uniquely identify each files.

As for the number of files that can be generated, I am not sure of the number. Do let us know if u get to know.

Regards,

Bhavesh

moorthy
Active Contributor
0 Kudos

Hi,

It is not required to have BPM to split the files.

SP14 onwards, you do this in Interface Determination itself.

In SP14 it it is mentioned as RB_CLASSIC and RB_SPLIT.

But in SP15 it is given as STANDARD and EXTENDED.

In your case if it is SP15, check option button EXTENDED in the Interface Determination and select the multimapping created in the repository.

For more info about this, go thru following link-http://help.sap.com/saphelp_nw04/helpdata/en/26/5ccd3bb4560f01e10000000a11402f/frameset.htm

Regards,

Moorthy

Former Member
0 Kudos

Hi Chris,

The following weblogs deal with the same issue-of splitting into multiple outputs of same type. They might be helpful.

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

Regards

Sushumna

Former Member
0 Kudos

Hi,

check this blog

<a href="/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi">/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi</a>

Regards,

Sudharshan

Former Member
0 Kudos

Hi Sudharshan,

I dont think Chris wants to do a 1:n/m:n mapping..he wants separate files altogether. Please confirm Chris.

Regards

Sushumna

Former Member
0 Kudos

Hi Chris,

You can achieve this using multi mapping in BPM. You should create mapping which has an outbound occurence of more than 1 for the output message.

In the BPM, the output of the map would be a multi line element. You would use "foreach/parforeach" block for this multi line element and send the messages separately.

In the configuration, if you want condition-based routing it can be done in the Receiver dtermination based on the required field in the o/p message.

Thanks,

Renjith