Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Error by using OLEDB with SAP

Avatar

Former Community Member
Hello,



I try to include Data from SAP into a pdf. There is a driver for SAP and the Designer recognizes it and allows to create the data connection.



the elements of the data connection look like this in the Data View:



i.e.



[0CALQUARTER].[LEVEL01].[MEMBER_CAPTION]



afterwards I want to look at the PDF Preview without dropping any fields with binding to the data connection but it says:



"Xml parsing error: not well-formed (invalid token) (error code 4), line 384, column 3 of file"



and in warnings there is:



"Illegal name specified for node: [%1]"



but the empty PDF is created.



If I now add an element i.e. text field to the PDF and set Binding>Default Binding to the element mentioned above it looks like this:



"$record.SAPDataConnection.[0CALQUARTER]\.[LEVEL01]\.[MEMBER_CAPTION]"



If I know want a preview it failes with:



"Generating PDF Document...

Font Service: Default font typeface is Myriad Pro.

Illegal name specified for node: [%1]

Script failed (language is formcalc; context is xfa[0].datasets[0].data[0].root[0].SAPDataConnection[0])

script=0CALQUARTER

Error: accessor 'CALQUARTER' is unknown.

Malformed SOM expression: $record.SAPDataConnection.[0CALQUARTER]\.[LEVEL01]\.[MEMBER_CAPTION]

Error: accessor 'CALQUARTER' is unknown.

End of processing: Failure"



I guess the "." in the names of the data connection's elements cause the problems.



Can anyone help? Thank you!



Martin
1 Reply

Avatar

Former Community Member
Since it says "Illegal name specified for node: [%1]", my guess is that you have a column named [%1] in your SAP database and the xml parser doesn't like the percent symbol.



If you can change that table name to something without a special character, your problem should be fixed. Otherwise, if you don't need the data from the [%1] column, you can just build a custom query string where you don't select that particular column.



A third possibility may exist with the optional portion of the document's prolog. Scroll down to the section labeled "Telling the parser about your entities" on the link below.




http://www.xml.com/pub/a/2001/01/31/qanda.html



Good Luck!

Brent