on 02-13-2007 3:35 AM
Message:(Receiver Channel)
0.Root
1.->Header
2.node
1->Record(1..n)
2.BillNo
2.ByersName
2.Nameofgoods
2.Lineofbilling(1..n)
3.line1
3.line2
Receiver channel parameters:
Recordsetstructure: Header,Record,Lineofbilling
Header.fieldNames---node
Header.fieldSeparator--~~
Header.endSeparator---'nl'
Record.fieldNames---BillNo,ByersName,Nameofgoods
Record.fieldSeparator--~~
Record.endSeparator---'nl'
Lineofbilling.fieldNames---line1,line2
Lineofbilling.endSeparator---'nl'
Lineofbilling.fieldSeparator--~~
see that lineofbilling is subnode of Record:
Result:
SJJK0101~~Import Sales Documents
1~2813246579203456788232334458345456445567567567567342467see details in Goods List<b>3~~547~6</b>
3~~~547~6
1~10813246579203456788232334458345456445567567567567342467see details in Goods List<b>refer to sales list~~547~6</b>
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
refer to sales list~~~547~6
The error is that:
refer to sales list~~~547~6(Bold characters)
should come to next line but it comes in same line as see details in Goods List.
Even though I have put 'nl'
It doesnot work for 1st line .It takes it as part of record line.
Although the rest line take new line.
Note: the separator comes between the bold field and others.It means it is taking it as part of record line
Hi,
"Lineofbilling" is inside "Record", so remove it from Recordset structure and add it to Recod.fieldNames.
Also give the sample XML that produced this output, so that its easy understand and solve the problem.
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For every one record there can be multiple n lineofbilling:
<b>SAMPLE INPUT XML File</b>
<?xml version="1.0" encoding="UTF-8"?>
<b><ns0:CN_GoldenTaxCustomerInvoiceRequest</b> xmlns:ns0="http://sap.com/xi/AP/Globalization">
<b> <MessageHeader></b>
<ID schemeID="" schemeAgencyID="" schemeAgencySchemeAgencyID=""/>
<ReferenceID schemeID="" schemeAgencyID="" schemeAgencySchemeAgencyID=""/>
<b> </MessageHeader></b>
<b> <CN_GoldenTaxCustomerInvoiceRequest></b>
<b> <Record></b>
<ID>
<ID schemeID="" schemeAgencyID="" schemeAgencySchemeAgencyID="">1</ID>
<UUID schemeID="" schemeAgencyID=""/>
<TypeCode/>
<ItemID/>
<ItemUUID schemeID="" schemeAgencyID=""/>
<ItemTypeCode/>
</ID>
<b> <BuyersAddressandTaxDetails></b>
<b> <BuyerName></b>
<FormOfAddressCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">1</FormOfAddressCode>
<FormOfAddressName>3</FormOfAddressName>
<GivenName>2</GivenName>
<MiddleName>4</MiddleName>
<b> </BuyerName></b>
<HouseID>345</HouseID>
<StreetName>45</StreetName>
<BuyerBankAccountID>7</BuyerBankAccountID>
<BuyerTaxID schemeID="">8</BuyerTaxID>
</BuyersAddressandTaxDetails>
<Note languageCode=""/>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> </Record></b>
<b> <Record></b>
<UUID schemeID="" schemeAgencyID=""/>
<ID>
<ID schemeID="" schemeAgencyID="" schemeAgencySchemeAgencyID="">1</ID>
<UUID schemeID="" schemeAgencyID=""/>
<TypeCode/>
<ItemID/>
<ItemUUID schemeID="" schemeAgencyID=""/>
<ItemTypeCode/>
</ID>
<BuyersAddressandTaxDetails>
<BuyerName>
<FormOfAddressCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">1</FormOfAddressCode>
<FormOfAddressName>3</FormOfAddressName>
<GivenName>2</GivenName>
<MiddleName>4</MiddleName>
<FamilyName>6</FamilyName>
<AdditionalFamilyName>5</AdditionalFamilyName>
<BirthName>7</BirthName>
<NickName>8</NickName>
<InitialsName>9</InitialsName>
<AcademicTitleCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">2</AcademicTitleCode>
<AcademicTitleName>0</AcademicTitleName>
<AdditionalAcademicTitleCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">3</AdditionalAcademicTitleCode>
<AdditionalAcademicTitleName>4</AdditionalAcademicTitleName>
<NamePrefixCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">5</NamePrefixCode>
<NamePrefixName>6</NamePrefixName>
<AdditionalNamePrefixCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">7</AdditionalNamePrefixCode>
<AdditionalNamePrefixName>8</AdditionalNamePrefixName>
<NameSupplementCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">8</NameSupplementCode>
<NameSupplementName>23</NameSupplementName>
<DeviatingFullName>23</DeviatingFullName>
<NameFormatCountryCode>34</NameFormatCountryCode>
<NameFormatCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">45</NameFormatCode>
</BuyerName>
<HouseID>345</HouseID>
<StreetName>45</StreetName>
<StreetPostalCode>6445</StreetPostalCode>
<CityName>567</CityName>
<CountryCode>567</CountryCode>
<RegionCode listID="" listVersionID="" listAgencyID="" listAgencySchemeID="" listAgencySchemeAgencyID="">567</RegionCode>
<PhoneNumber>
<AreaID>567</AreaID>
<SubscriberID>34</SubscriberID>
<ExtensionID>2</ExtensionID>
<CountryCode>4</CountryCode>
<CountryDiallingCode>5</CountryDiallingCode>
<CountryName languageCode="">6</CountryName>
</PhoneNumber>
<BuyerBankAccountID>7</BuyerBankAccountID>
<BuyerTaxID schemeID="">8</BuyerTaxID>
</BuyersAddressandTaxDetails>
<Note languageCode=""/>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b><Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item></b>
<b> <Item></b>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
</Item>
<Item>
<UUID schemeID="" schemeAgencyID=""/>
<BaseCustomerInvoiceBusinessTransactionDocumentReference schemeID="" schemeAgencyID=""/>
<ProductID schemeID="" schemeAgencyID="" schemeAgencySchemeID="" schemeAgencySchemeAgencyID="">3</ProductID>
<Quantity unitCode="">4</Quantity>
<Description languageCode="">5</Description>
<NetAmount currencyCode=""/>
<TaxRate>6</TaxRate>
<TaxAmount currencyCode="">7</TaxAmount>
<b> </Item>
</Record>
</CN_GoldenTaxCustomerInvoiceRequest>
</ns0:CN_GoldenTaxCustomerInvoiceRequest></b>
<b>RECEIVER Channel:</b>
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:CN_GoldenTax_SJJK0101FileMessage xmlns:ns0="http://sap.com/xi/AP/Globalization">
- <b><MessageHeader></b>
<HeaderCode>SJJK0101</HeaderCode>
<HeaderName>Import Sales Documents</HeaderName>
<b></MessageHeader></b>
- <b><RecordHeader></b>
<BillNo>1</BillNo>
<NumberofLineItems>2</NumberofLineItems>
<ByersName>81324657920345678823233445</ByersName>
<BuyersVATRegistrationNo>8</BuyersVATRegistrationNo>
<BuyersAddressandPhone>34545644556756756756734246</BuyersAddressandPhone>
<BuyersBankAccount>7</BuyersBankAccount>
<NameofGoodsList>see details in Goods List</NameofGoodsList>
- <b><LineofBillingRecord></b>
<ProductDescription>3</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
- <b><LineofBillingRecord></b>
<ProductDescription>3</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b></LineofBillingRecord></b>
</RecordHeader>
-<b> <RecordHeader></b>
<BillNo>1</BillNo>
<NumberofLineItems>10</NumberofLineItems>
<ByersName>81324657920345678823233445</ByersName>
<BuyersVATRegistrationNo>8</BuyersVATRegistrationNo>
<BuyersAddressandPhone>34545644556756756756734246</BuyersAddressandPhone>
<BuyersBankAccount>7</BuyersBankAccount>
<NameofGoodsList>see details in Goods List</NameofGoodsList>
- <b><LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
- <b><LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
<b>- <LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b></LineofBillingRecord></b>-
<b> <LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
<b>- <LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
- <b><LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
<b> </LineofBillingRecord></b>
- <b><LineofBillingRecord></b>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
</LineofBillingRecord>
- <LineofBillingRecord>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
</LineofBillingRecord>
- <LineofBillingRecord>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
</LineofBillingRecord>
- <LineofBillingRecord>
<ProductDescription>refer to sales list</ProductDescription>
<UnitofMeasure />
<Specification>5</Specification>
<Quantity>4</Quantity>
<NetofVATamount>7</NetofVATamount>
<TaxRate>6</TaxRate>
</LineofBillingRecord>
</RecordHeader>
</ns0:CN_GoldenTax_SJJK0101FileMessage>
Hi,
I doubt whether your requirement can be achieved. As far as i know File Content Conversion doesn't support translation of nested structures. The problem that you are getting, as you said in the first post, occurs for all the first "lineitem" field in any "record" element.
So to achieve wat u need, you may go for Java Mapping or an Adapter module. Or else you need to change your target structure.
Regards,
P.Venkat
The message Type had to be changed:
Inserted Billingrecordnode and made BillNo ByersName Nameofgoods
as subelements of it.
By doing so Record will have two nodes BillingRecord and Lineofbilling.
Now since we have two distinct nodes.They can be easily dintinguised as separate nodes with fields
Message type:
0.Root
1.->Header
2.node
1->Record(1..n)
<b>2.BillingRecord</b>
3.BillNo
3.ByersName
3.Nameofgoods
2.<b>Lineofbilling(1..n)</b>
3.line1
3.line2
Receiver channel parameters:
<u>Replaced Record in structure with BillingRecord.</u>
Recordsetstructure: Header,<b>BillingRecord</b>,Lineofbilling
Header.fieldNames---node
Header.fieldSeparator--~~
Header.endSeparator---'nl'
<u>Replaced record with BillingRecord</u>
BillingRecord.fieldNames---BillNo,ByersName,Nameofgoods
BillingRecord.fieldSeparator--~~
BillingRecord.endSeparator---'nl'
Lineofbilling.fieldNames---line1,line2
Lineofbilling.endSeparator---'nl'
Lineofbilling.fieldSeparator--~~
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.