cancel
Showing results for 
Search instead for 
Did you mean: 

DTW XML Import failing

Former Member
0 Kudos

Hi Guys,

I wondered if somebody had a solution to an issue I am encountering when trying to process a DTW file in using an XML file run from a batch file.

I have copied the SAP workshop example word for word on the batch file. DTW opens and then I think it executes the XML file and I receive the error saying "Object variabe or With block variable not set".

Has anybody come across this before and know what the solution is please?

Thanks,

Liam.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Guys,

Thanks for the replies. I have solved the issue now. The batch file worked for me using this...

cd "C:\Program Files\SAP\Data Transfer Workbench"

DTW -s C:\MRP.xml

I hope this helps anyone else trying to create a batch file for DTW.

Regards,

Liam.

0 Kudos

Hello Liam,

I solved this error by editing the .bat file. DTW has somehow a problem with spaces in the path. I put the xml and bat file directly in C:\Program Files\SAP\Data Transfer Workbench\

The bat file just consists of: dtw.exe -s config.xml

This solved the mentioned error for me (now have a new one...)

Regards

Marco

Former Member
0 Kudos

You may check this thread for your issue:

Former Member
0 Kudos

Hi Gordon,

Thanks for the link but nothing on there has given me any ideas as to a solution to this problem. I had a look at the SAP Wiki page and re did the batch and xml files and I was still coming up with the same error once DTW loads up.

Does anybody know if the functionality for this still exists in SAP B1 2007A SP01 PL07?

Thanks,

Liam.

Former Member
0 Kudos

Hi Liam,

Could you post you XML code here for others to check?

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

Thank you for replying, here is the XML code I am trying to use:

- <Transfer>

- <login>

<UserName>manager</UserName>

<Password>qKbKrIpK</Password>

<Company>SBO_DemoUK</Company>

<Server>liamw</Server>

<UserAuthentication>0</UserAuthentication>

<Language />

<LicenseServer />

<ChooseDB>1</ChooseDB>

<DBType>4</DBType>

<DBUser>sa</DBUser>

<SybasePort />

<DBPassword>nBaJiKoDbJ8J</DBPassword>

</login>

<objectCode>oItems</objectCode>

- <FileExtractor>

- <Extorlogin>

<ExID />

<ExDSN />

</Extorlogin>

<FilesTypes>0</FilesTypes>

- <Files>

<Items>C:\Documents and Settings\Liamw\Desktop\MRP Minimum Stock Import.csv</Items>

<Items_Prices />

<ItemWarehouseInfo />

<ItemCycleCount />

</Files>

</FileExtractor>

- <map>

- <fields>

- <Items>

- <SourceFields>

<RecordKey />

<ItemCode />

<MinInventory />

</SourceFields>

- <TargetFields>

<RecordKey>RecordKey</RecordKey>

<ItemCode>ItemCode</ItemCode>

<MinInventory>MinInventory</MinInventory>

</TargetFields>

</Items>

- <Items_Prices>

- <SourceFields>

<RecordKey />

<ItemCode />

<MinInventory />

</SourceFields>

<TargetFields />

</Items_Prices>

- <ItemWarehouseInfo>

- <SourceFields>

<RecordKey />

<ItemCode />

<MinInventory />

</SourceFields>

<TargetFields />

</ItemWarehouseInfo>

- <ItemCycleCount>

- <SourceFields>

<RecordKey />

<ItemCode />

<MinInventory />

</SourceFields>

<TargetFields />

</ItemCycleCount>

</fields>

</map>

- <run>

<import>1</import>

<rollback>False</rollback>

<maxerror>20</maxerror>

<update>1</update>

<TestRun>0</TestRun>

<addallitems>0</addallitems>

</run>

</Transfer>

Thanks,

Liam.