cancel
Showing results for 
Search instead for 
Did you mean: 

Complicated n:1 mapping without BPM

0 Kudos

Hi all,

I have a very hard requirement from my boss.

There will be two source csv files. Header and Details.

The target is an IDOC.

There can be multiple lines in the Header, and in the Details as well. I need to join these two files and then group the right Header and Detail (using a key field in both sources).

Here is an example:

Source Header File

123456 10001 20110809 cotton

111111 10002 20110808 wood

121212 10003 20110807 metal

Source Details File

123456 London A

123456 Paris B

123456 Amsterdam C

111111 Japan A

111111 Singapore B

111111 China C

121212 Egypt A

121212 South Africa B

121212 Syria C

Target

1st IDOC

123456 10001 20110809 cotton

123456 London A

123456 Paris B

123456 Amsterdam C

2nd IDOC

111111 10002 20110808 wood

111111 Japan A

111111 Singapore B

111111 China C

3rd IDOC

121212 10003 20110807 metal

121212 Egypt A

121212 South Africa B

121212 Syria C

I need to do this without BPM. Any help would be appreciated.

Thanks!

Regards,

SAPenthusiast

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I have a very hard requirement from my boss.

There will be two source csv files. Header and Details.

The target is an IDOC.

There can be multiple lines in the Header, and in the Details as well. I need to join these two files and then group the right Header and Detail (using a key field in both sources).

Not possible without BPM, your scenario is not n:1, there are two csv's which needs to be split into different idocs. So this is n:m mapping, which really needs bpm. Unless you do something on the sender side e.g combine the header and details file, then your scenario needs BPM.

Hope this helps,

Mark

Answers (6)

Answers (6)

0 Kudos

Used 'Add file' in the communication channel

0 Kudos

Thanks for all your replies

sad to say, we are avoiding BPM.

has anyone tried attaching a document in the sender communication channel? Then using an xslt in the mapping?

rajasekhar_reddy14
Active Contributor
0 Kudos

attaching document in CC not possible in case of File adapter.

0 Kudos

Hi raja,

how about the 'Additional File(s)' in the Sender File Comm channel? Can't I use that?

former_member207622
Contributor
0 Kudos

Create 2 message types for header file having same fields but with differnt name ,

2 message types for detail file having same fields but differnt name

In the second message type add extra field called header and detail respectively

for header --- Map message type 1( header) with message type 2 ( header only but with an extra field )

for detail --- Map message type 1( detail ) with mesage type2 ( detail only but with an extra field for file name)

then comes the multimapping in which source will be message type 2 of header and message type 2 of detail and target will be idoc

since both the source message type will have source data and file name in them .. write a logic and try

first the single one -to one mapping will get executed then the multimapping will get executed ( if u write condition in it)

even if u place both the files simultaneously on server there will be time gap in picking of these files therfore you have to write the condition and identify in multimapping to check and see that one header and one detail is present

hope this helps I m not too sure .. BPM will only be used in case when u want the files at the same time for multimapping

if u can try and find logic to avoid that it wil work

thanks

Ninad

rajasekhar_reddy14
Active Contributor
0 Kudos

if you use this option then aditional files come as a attachment, so this is bit complicated process.

What you can do is

Write Unix script to merge header and line item records in one file and place them in FTP,then use FTP channel to pick up the file and process it in mapping write a logic to sort and differentiate records .

no BPM in this case.

Regards,

Raj

rajasekhar_reddy14
Active Contributor
0 Kudos

You can ask Third Party people to place data in once CSV file, in this case you can easily write mapping logic to sort files beased one key and you can genarate IDoc easily.in this case no need of BPM

0 Kudos

Hello,

Please follow the Mark Suggestion.

Regards,

Naga.

Former Member
0 Kudos
Former Member
0 Kudos

Hi Friend,

Its impossible to do n:1 mapping.

Its possible only with the help of BPM. You may use one of following pattern. http://help.sap.com/saphelp_nw2004s/helpdata/en/11/13283fd0ca8443e10000000a114084/frameset.htm

Also refer to the example -

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...