on 08-09-2011 6:02 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Used 'Add file' in the communication channel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please follow the Mark Suggestion.
Regards,
Naga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.