‎2008 Feb 27 10:09 AM
Hi abappers,
When I write a code abap with abap object for obtain code XML and I obtain the next code XML:
...
...
<AccountType />
<Address />
<AddressDetail />
<AuditFile>
<Header>
<AuditFileVersion />
<CompanyID />
<TaxAccountingBasis />
<CompanyName />
<CompanyAddress />
<FiscalYear />
<StartDate />
<EndDate />
<CurrencyCode />
<DateCreated />
<ProductID />
<ProductVersion />
<Telephone />
<Fax />
<Email />
<AuditFileVersion />
<WebSite />
<HeaderComment />
</Header>
<Supplier />
<SupplierID />
<SupplierTaxID />
<Tax />
...
...
but I want inject the code XML of Header with all the elements AuditFileVersion, CompanyID, AccountingBasis,
CompanyName, ..., WebSite, HeaderCommnet in my code abap without write it.
Is possible with abap objects.
Can you help me please?
Thanks.
Cordial greetins.
‎2008 Feb 27 11:12 AM
sorry couldnt understand, but can you show us the (sample of) source XML and after processing how it should look like (sample)
‎2008 Feb 27 11:55 AM
Thank you for you attention,
when I pass the code XML in the parse, I obtain the next code XML schema:
...
...
<xs:element name="AccountType" type="xs:string" />
<xs:element name="Address" type="xs:string" />
<xs:element name="AddressDetail" type="xs:string" />
<xs:element name="AuditFile">
<xs:complexType>
<xs:sequence>
<xs:element ref="Header" />
<xs:element ref="MasterFiles" />
<xs:element ref="GeneralLedgerEntries" />
<xs:element ref="SourceDocuments" />
</xs:sequence>
</xs:complexType>
</xs:element>...
...
and I need obtain the next code:
...
...
<xs:element name='AccountType' type='SAFtextType'>
<xs:annotation>
<xs:documentation>Type of account - Asset/Liability/Sale/Expense</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='Address' type='AddressStructure' />
<xs:element name='AddressDetail' type='SAFtextType' />
<xs:element name='AuditFile'>
<xs:complexType>
<xs:sequence>
<xs:element ref='Header' minOccurs='1' />
<xs:element ref='MasterFiles' />
<xs:element *name*='GeneralLedgerEntries' minOccurs='0'>
<xs:complexType>
<xs:sequence>
<xs:element ref='NumberOfEntries' />
<xs:element ref='TotalDebit' />
<xs:element ref='TotalCredit' />
<xs:element *name*='Journal' minOccurs='0' maxOccurs='unbounded'>...
...
<xs:element *name*='SourceDocuments' minOccurs='0'>...
...
...
...
and then, I want obtain in the code XML schema the
statement element name, only can obtain the statement element ref.
I hope explain well my problem.
Cordial greetings
Edited by: lopez fernandez on Feb 27, 2008 12:56 PM