LawnyToast
New Member
Hello All! Happy Wednesday! I have an interesting problem to present today. I am sure the collective Openedge ABL brain has encountered it before, and could possibly offer a solution.
The ERP I am maintaining is interacting with another software and needs to import from another database via XML files. I am using the following code and running into some compilation errors. We operate on OE 10.2B. Right now, I assume there is a conflict in Syntax between the name of the field in the XML file and what I am allowed name a field inside of the temp table. Below are a few important snippets of code and the compilation error.
To my knowledge, when importing from an XML to a temp table directly, the temp table fields must coincide with the XML fields. Any suggestions for altering the temp table field names, or getting around this pesky issue?
I am using the temp-table read from XML function:
This is the main error when attempting to compile and my main hint as to the syntax issues. I don't believe I am able to name a field "availble", as it is a very popular syntax within several functions:
And finally, here is an example of a single record from the XML:
The ERP I am maintaining is interacting with another software and needs to import from another database via XML files. I am using the following code and running into some compilation errors. We operate on OE 10.2B. Right now, I assume there is a conflict in Syntax between the name of the field in the XML file and what I am allowed name a field inside of the temp table. Below are a few important snippets of code and the compilation error.
To my knowledge, when importing from an XML to a temp table directly, the temp table fields must coincide with the XML fields. Any suggestions for altering the temp table field names, or getting around this pesky issue?
Code:
def temp-table row
field id_op_period as char
field available as char
field contract as char
field interval as char
field interval_date as char
field load as char
field sched_mach as char
field sched_wc as char.
I am using the temp-table read from XML function:
Code:
assign v-sourcetype = "FILE"
v-read-xml = "interval.xml"
v-read-xml-path = "\\srvdata\EXPORT\" + v-read-xml
v-readmode = "EMPTY"
v-schemapath = ?
v-override-def-map = ?
v-field-type-map = ?
v-verify-schema-mode = ?
.
TEMP-TABLE row:READ-XML(v-sourcetype, v-read-xml-path , v-readmode, v-schemapath, v-override-def-map, v-field-type-map, v-verify-schema-mode).
This is the main error when attempting to compile and my main hint as to the syntax issues. I don't believe I am able to name a field "availble", as it is a very popular syntax within several functions:
Code:
** Unable to understand after -- "as char field". (247)
** Unable to understand DEFINE statement. (267)
And finally, here is an example of a single record from the XML:
Code:
<row ID="qwer\86791-002\86791-002\50\\19616.5395833333\" >
<id_op_period>qwer\86791-002\86791-002\50\\19616.5395833333\</id_op_period>
<available>45</available>
<contract>qwer</contract>
<interval>168</interval>
<interval_date>14 SEP 2021 07:00</interval_date>
<load>0.25</load>
<sched_mach>A2SHIP1-M1</sched_mach>
<sched_wc>A2SHIP1</sched_wc>
</row>