Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie for XML coding, help needed

Status
Not open for further replies.

vinodkumarn

Programmer
Jan 22, 2004
4
US
Hello,

I am posting the DDL and the exact XML output I need, Please help me with a better approach

Below is the DDL

CREATE TABLE BI_HEADER(
ID VARCHAR2(50),
CREATED_DATE VARCHAR2(50),
CLOSED VARCHAR2(50),
ESTABLISHMENT NUMBER,
CREATED_AT NUMBER,
FINAL_TOTAL NUMBER(17,6),
PROCESS_STATUS VARCHAR2(10),
PUBLISH_DATE DATE,
IZ_BUSINESS_ID NUMBER(10))
/
INSERT INTO BI_HEADER VALUES('12033/16587',NULL,'2018-06-16T10:52:00+02:00',12448014,NULL,'6000.0000','STAGED',NULL,NULL)
/
CREATE TABLE BI_DETAILS(
ID NUMBER,
ERVC_TYPE VARCHAR2(20),
VOIDED_REASON VARCHAR2(20),
PARAMETER_VALUE VARCHAR2(20),
PRODUCT VARCHAR2(50),
BARCODE VARCHAR2(13),
PRICE_NOTAX NUMBER(17,6),
PRICE_WITHTAX NUMBER(17,6),
QUANTITY NUMBER(17,6),
PRICE NUMBER(17,6),
PURE_SALES NUMBER(17,6),
APPLIED_TAXES VARCHAR2(10),
TAX_RATE NUMBER(17,6),
TAX_AMOUNT NUMBER(17,6),
VOIDED VARCHAR2(20),
VOIDED_BY VARCHAR2(100))
/
INSERT INTO BI_DETAILS VALUES(53731,'ERVC','Defect','HUF','S2P2040000',773602397778,4724.4100,6000.0000,1,4724.4100,6000.0000,
'vat',27.00,1275.5900,0,'false')
/


BELOW IS THE SAMPLE XML I NEED


<?xml version="1.0" encoding="UTF-8"?>
<ConsumerTransactionList>
<Header Action="CREATE">
</Header>
<ConsumerTransaction>
<SourceSystem>
<SourceTimestamp>2018-06-16T10:52:00+02:00</SourceTimestamp>
<BusinessDayDate> <BusinessDayDate>
<AffiliateCode>CES</AffiliateCode>
<MarketCode>HUN</MarketCode>
<BrandCode>12</BrandCode>
<TouchPointCode>12448014</TouchPointCode>
<TerminalID> <TerminalID>
<InvoiceNum>12033/16587</InvoiceNum>
</SourceSystem>
<TransactionHeader>
<TransactionTimestamp>2018-06-16T10:52:00+02:00</TransactionTimestamp>
<CurrencyCode>HUF</CurrencyCode>
<Void>false</Void>
<PersonnelList>
<Personnel>
<SourceSystem>
<PersonnelCode>51543902519618</PersonnelCode>
</SourceSystem>
</Personnel>
</PersonnelList>
<NetRevenueVAT>6000.0000</NetRevenueVAT>
</TransactionHeader>
<TransactionDetailList>
<TransactionDetail>
<LineNum>53731</LineNum>
<TransactionTypeCode>sle</TransactionTypeCode>
<LineNum>3</LineNum>
<ReturnReasonCode> <ReturnReasonCode>
<ItemTypeCode> <ItemTypeCode>
<CurrencyCode>HUF</CurrencyCode>
<ProductCode>S2P2040000</ProductCode>
<ProductUPC>773602397778</ProductUPC>
<UnitPriceNoVAT>4724.4100</UnitPriceNoVAT>
<UnitPriceVAT>6000.0000</UnitPriceVAT>
<Quantity>1</Quantity>
<NetRevenueNoVAT>4724.4100</NetRevenueNoVAT>
<NetRevenueVAT>6000.0000</NetRevenueVAT>
<ProductTaxCode>vat</ProductTaxCode>
<ProductTaxAmount>1275.5900</ProductTaxAmount>
<VATPercentageRate>27.00</VATPercentageRate>
<Void>0</Void>
</TransactionDetail>
</TransactionDetailList>
</ConsumerTransaction>
</ConsumerTransactionList>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top