Skip to Content
avatar image
Former Member

DTW XML Import failing

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 25, 2010 at 02:30 PM

    Hi Liam,

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

    Thanks,

    Gordon

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Jun 25, 2010 at 04:38 PM

    You may check this thread for your issue:

    using-the-dtw-objects-in-sdk

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Jun 30, 2010 at 06:14 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 30, 2010 at 04:16 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded