cancel
Showing results for 
Search instead for 
Did you mean: 

AUTOMATION OF IMPORTING USING BATCH FILES...!

Former Member
0 Kudos

Hello Everyone!

I want your help on this matter. Actually I am trying to get data( in the form of XML) from BI into MDM SP04.

I want to automate the import process. i have saved the map and defined a port in the console and given the map name for the port.

now i configured the INI file present in the import manager batch.

I read somewhere that to run the importmanagerbatch.exe file i need to create a batch file having info about the INI file and then run the batch file which will execute the .EXE file.

But after doing this still data is not cmg in the repository.

Can anybody list me down all the required steps to automate importing. N can more than 1 map be taken care of in the console? or probably for every map we will have to create new ports for them?

I am totally confused....... please help me out.

Thanks and Regards.

Nitin jain.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Nitin,

to automize the the import process you have to follow the following steps:

Create & Configure a port in the MDM Console;

Adjust the mdis.ini file;

ensure that the service for the Import Server have been started (it may be that by default the service is not starting automatically);

after 30 secounds (default setting) the file should have been processed. You will see the result in the log file/exception folder/data manager

To answer your question:

"...can more than 1 map be taken care of in the console?..."

--> From my point of view you, it is only possible to mention exactly one import map.

Greetings

Tobias

Former Member
0 Kudos

Hi Tobias!

yup, you r absolutely rite.coming to your question, i think there are two methods of automating the import process.

1. either as you said, we can do it using import server by configuring the MDIS.ini file in the import server. But there only one map can be taken care of.

2. to run the multiple maps, you need to use batch files. 1 batch file for 1 map. and then you can schedule those batch files in the windows scheduler. now this all has to be done using IMPORT MANAGER BATCH. configure the MDIS.ini file present there the link it to the batch file. execute the batch file.

when i did this, it wasnt showing the data in the data manager.

i have one more doubt. if we follow the ist case( as u told before), then there will be one more problem. " import to action" can be taken as "create". bt when the delta records come in, the aption saved in the map is "create". how will it use the " update" or"skip" command automatically?????

Thanks and Regrads

Nitin jain

michael_theis
Active Contributor
0 Kudos

Hi Nitin,

I'd suggest using the Import Server. It is correct that one port can handle only one map. But: why don't you create ports for each of your map? MDIS is able to handle multiple ports. It is automatically looping through your port folders thus it is able to handle multiple maps.

Defining your import map you have several import action you should define. Open your IM and have a look at tab "Match Records". You'll see the "Default Import Actions" for several "Match Levels".

Match Level / Match Type <b>None / None</b> means that IM has not found your incoming records in the repository. You can choose if you want to <b>skip</b> or <b>create</b> those records.

In case of delta loads your match level / type will be <b>Single / Exact</b> as the records you want to import are already available in your repository! If you check the import actions, you'll see that there are different ones. <b>Skip</b> won't import your delta. <b>Update (Null Fields only)</b> will import data, that is missing in your repository record but provided by the incoming record. <b>Update (All mapped fields)</b> means that IM will map all the values of the incoming record to the existing one. If some fields are not mapped, IM will keep the old values of the existing record. <b>Replace</b> means that IM deletes the existing record and imports the new one.

BR Michael

Former Member
0 Kudos

Hi Michael,

Actually all the import actions can be taken care of if the MDIS server allows multiple maps. For one map, we can actually just mention the repository password and the interval in the INI file present in the MDIS.

And if we i create another another port and save the next map in that, wat changes will have to be done in the same INI file????? As how will it come to know which map the server has to run first???

And as told by you, for every import action, i will have to save a different map. Is there no other way?? i mean to say using Batch files?????

Thanks and Regards

Nitin Jain

michael_theis
Active Contributor
0 Kudos

Hi Nitin,

like stated above MDIS is able to process multiple maps. But: using multiple maps means the creation of multiple ports as a single port can have only one single map. If you need a sequence in your port processing, you should upgrade to the latest MDM 5.5 SP5 Patch 1 version as this does support a port processing sequence for the MDIS. You can define the sequence during the port creation in MDM Console. In addition, like I told you above, a single import map may have multiple import actions, depending on how you have created the map.

Regarding the MDIS.ini file, this is a configuration file for the Import Server! You cannot do any Import Map configuration in this file! MDIS.ini tells MDIS how it should connect to the repository, how often it should poll through the different port folders, and so on. There is no Import Map specific content available in MDIS.ini!

BR Michael

Former Member
0 Kudos

Hi Michael!

Thanks for replying. It was very helpful.

So i came to a conclusion regarding the limitation of SP04 handling more than 1 import map using import server mechanism. or else the solution will be to create subsequent ports and related maps. again there will be a prob to sequence the ports (which will be available in the SP05).

But i just wanted to know whether there is a way to automate importing using IMPORT MANAGER BATCH by create batch files for 1 map file and then running the batch file through windows scheduler.

If we are able to do this, then we wud be able to automate the importing handling more than 1 map. but i doubt whether SP04 supports batch process. i have already tried it out. It shows me an error! please try it out and let me know.

Thanks and Regards

Nitin Jain

Former Member
0 Kudos

Hi, Nitin,

The Import Batch can handle any number of maps in one batch process. It does have a limitation that the batch ini file will only reference 1 import file. But that file can contain any number of records and different table data.

I have used the Import Batch (only useable on Windows) for importing multiple check table data into the repository. In the dat file, I used the following code for each map. This is the code for the Partner Function.

:: IMPORT MAPS
cd "C:Program FilesSAP MDM 5.5Import Manager Batch"

@echo . STARTED Map: "Partner Functions" %DATE% %TIME% >> "C:MDMImportReport.log"
@echo Executing Map: Partner Functions
ImportManagerBatch.exe /INI "C:MDMMdmImportCheckTables.ini" /CLIENTSYSTEM "R/3 4.7" /MAP "Partner Functions" 
            /LANGUAGE "English [US]" >> "C:MDMImportReport.log"
IF errorlevel 0 (echo . Completed successfully. >> "C:MDMImportReport.log") 
           ELSE  (echo . FAILED with error code %errorlevel% >> "C:MDMImportReport.log")
IF errorlevel 0 (echo Completed successfully - %TIME%) ELSE (echo FAILED with error code %errorlevel%)
@echo . Ended Mapping: "Partner Functions" %DATE% %TIME% >> "C:MDMImportReport.log"
@echo .   >> "C:MDMImportReport.log"

I then repeated this code in the batch.dat file for each map used. In total I had 93 maps.

Kristin