cancel
Showing results for 
Search instead for 
Did you mean: 

Error in content conversion

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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>

Former Member
0 Kudos

I am getting this error inreceiver channnel:

Unknown structure 'LineofBilling' found in document'

If I remove from Recordset structure and add it to Recod.fieldNames.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hey I have give u points ... it was abit helpful

Former Member
0 Kudos

Hi,

If you find a solution to ur problem, please post it here. It will be useful to the community.

Regards,

P.Venkat

Former Member
0 Kudos

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--~~