Skip to Content
avatar image
Former Member

xml file to B1 Sales Order

Hi,

I'd like to read xml file which is not standard B1 xml file and created new sales order.

Thi is a data mapping xsl tempate

<xsl:template match="b1im:B1IMessage/b1im:Body/b1im:Payload[./@ObjectTypeId=&apos;Z.F.AnySystem_FileIn&apos;]">

<BOM>

<BO>

<AdmInfo>

<Object>17</Object>

<Version>2</Version>

</AdmInfo>

<Documents>

<row>

<DocDate>20100617</DocDate>

<DocDueDate>20100617</DocDueDate>

<CardCode><xsl:value-of select="Envelope/Documents/PurchaseOrder/TradingPartnerID"></xsl:value-of></CardCode>

</row>

</Documents>

<Document_Lines>

<row>

<xsl:for-each select="Envelope/Document_Lines/row">

<ItemCode><xsl:value-of select="ItemCode"></xsl:value-of></ItemCode>

<Quantity><xsl:value-of select="Quantity"></xsl:value-of></Quantity>

<Currency>USD</Currency>

<Rate>1</Rate>

<TaxCode>0</TaxCode>

</xsl:for-each>

</row>

</Document_Lines>

</BO>

</BOM>

</xsl:template>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 22, 2010 at 06:46 AM

    And This is a xml details to read

    <ENV:Envelope TransactionID="234567" xmlns:ENV="schemas-hiwg-org-au:EnvelopeV1.0">

    <ENV:SenderID>ABC</ENV:SenderID>

    <ENV:RecipientID>XYZ</ENV:RecipientID>

    <ENV:DocumentCount>1</ENV:DocumentCount>

    <Documents>

    <PurchaseOrder RecordType="10" xmlns="schemas-hiwg-org-au:PurchaseOrderV2.0">

    <TradingPartnerID>C42000</TradingPartnerID>

    <MessageType>ORDERS</MessageType>

    <VersionControlNo>2.0</VersionControlNo>

    <DocumentType>220</DocumentType>

    </PurchaseOrder>

    </Documents>

    <Document_Lines>

    <row>

    <ItemCode>Nylon Black</ItemCode>

    <Quantity>2</Quantity>

    </row>

    <row>

    <ItemCode>Nylon White</ItemCode>

    <Quantity>3</Quantity>

    </row>

    </Document_Lines>

    </ENV:Envelope>

    But this event is fileted with this result message

    "Mapping from LocalObjectType Envelope to object Type failed."

    I've tried to use ENV:Envelope logical objecttype instead of Envelope. But result is same.

    I hope someone can help me

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Joanne,

      In order to import some information from an Inbound file you need to:

      1. Create an object type for the FileSystem system type.

      B1iSN Tools -> Development Tools -> Generator Object Type

      2. Generate a mapping for the new object you created.

      B1iSN Tools -> Configuration Tools -> Config File Inbound - Map

      I think in your case the mapping is missing.

      There is a presentation available in SMP and pointed from SDN explaining a File2DB sample. The inbound part is the same for your File2B1 scenario. Please have a look at it: http://service.sap.com/~sapidb/011000358700000891552010E.pdf (SAP user required for SMP).

      You have also other samples in the B1iSN tips for beginners blog at:

      /people/mariatrinidad.martinezgea/blog/2009/12/18/b1isn-tips-for-beginners

      Hope it helps

      Trinidad.