I have around 10 to 15 sequential files to be joined into a single file. let us take it as mara.txt, marc.txt, mard.txt, mvke.txt etc.. The keys and the lay out of these files are different. How ever there is one common field among all these files (matnr) which is part of the key. For example mara.txt has matnr as the key marc.txt has matnr,plant as the key, mvke.txt has matnr,vkorg,vtweg as the key. Also it is possible that for a particular entry in mara.txt there may not be an entry in the mvke.txt file. So I would need to do an outer join effectively. If i want to join all these files and produce one output file in which the combination of all the keys in each of the file will be the key, what are my options?
1. Use merge stage to join two files at a time. The draw back seems to be that since I have huge number of records in each of these files each time I combine two file i will create one file with even more number of records occupying more space.
2. Use a staging database where i will pump these file, use the database joins effectively to create the required output file.
3. some how (ab)use the hash file to to do left outer joins - i am running into problems in this approach because the files which will be the driver table has a key which is a part of the key of reference table.
Which one of this approaches should I be taking?
Or Should I ask the SAP R/3 guys to write ABAP code to generate the file inside R/3 itself. My problem arises from the fact that since Ascential can connect to R/3 and generate ABAP code, they think that I can select all the fileds and generate the 'outer' joins too. Unfortunately the version of SAP that I am working with (3.1) did not have outer joins and hence I am forced to extract the tables individually.
Any ideas???
![Sad :(](./images/smilies/icon_sad.gif)