UIModel XML file location - creation and refactoring
I am using JDeveloper 9.0.5.2. How can I control where the UIModel XML file is created when I create it explicitly or implicitly via drag-drop within JDeveloper?
This is giving me fits. I have had some success only when explicitly creating the UIModel, but if its implicitly created before I get to it, it seems to have a mind of its own.
So likewise, once a UIModel is created, how can I rename it or move it to a different package?
B
Jdeveloper creates the UIModel files in the projects default package. (Project Properties|Input Paths).
The only way to refactor UIModels is to do it manually. You need to copy the uimodel to the correct directory, then remove it from the application workspace, and open the new uimodel and add it to the workspace.
Finally, edit the Databindings.cpx file in a text editor and update the package name of the uimodel.
Gareth
Similar Messages
-
Location for UIModel.xml file
I've a problem storing UIModel.xml files in a package. Right now when ever i create
any datapage, everytime the UIModel.xml file is always getting stored in a package structure defined earlier. Basically i just want to know, where exactly i need to specify the package to store this file, instead of it itself getting stored in a
package of its choiceTry changing the following:
Tools -> Project Properties -> Common -> Input Paths -> Default Package -
Help:UIModel.xml file for ADF Tree with three level depth
Hello,
I am trying to create a DCTree with structure like this:
root....branch1----child11,child12
..........branch2......branch21---child212,child212
............................branch22---child221,child222
Because I can not create more than one binding rule due to the problem that "Add New Rule" button disappears after the first rule is created when I use the tool under Createbinding/Input/Tree to create the DCTree.
Could somebody post or send me a script of the UIModel.xml file of the tree structure above so that I can work around this problem?
Thanks in advance,
DeborahHi,
I haven't test it for more than 3 layers but I have never seen this limitation mantioned anywhere.
I used HGrid and this is my code:
1. UIX file (the relevant part highlighted):
<?xml version = '1.0' encoding = 'windows-1252'?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
xmlns:myTemplate="test">
<templates xmlns="http://xmlns.oracle.com/uix/ui">
<templateImport source="baseTemplate.uit"/>
</templates>
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
<!-- Add DataProviders (<data> elements) here -->
</provider>
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title=""/>
</metaContainer>
<contents>
<body>
<contents>
<form name="form0">
<contents>
<myTemplate:baseTmpl title="" xmlns:myTemplate="test">
<contents>
<rowLayout>
<contents>
<link text="Bets View" destination="browseCustBets.do"/>
<spacer width="10" height="10"/>
<link text="Customer Bets" destination="viewCustBets.do"/>
</contents>
</rowLayout>
<rowLayout>
<contents>
<spacer width="10" height="10"/>
</contents>
</rowLayout>
<rowLayout>
<contents>
<hGrid id="hg1" treeData="${uix.data.treeData}" proxy="${uix.eventResult.hGridProxy}">
<columnHeaderData>
<col text="Email"/>
<col text="Bet Date"/>
<col text="ID"/>
<col text="Is Winner"/>
<col text="Amount"/>
<col text="Rate"/>
</columnHeaderData>
<columnHeaderStamp>
<text text="${uix.current.text}"/>
</columnHeaderStamp>
<columnFormats>
<columnFormat columnDataFormat="textFormat" width="140"/>
<columnFormat columnDataFormat="textFormat" width="160"/>
<columnFormat columnDataFormat="textFormat" width="40"/>
<columnFormat columnDataFormat="textFormat" width="70"/>
<columnFormat columnDataFormat="textFormat" width="70"/>
<columnFormat columnDataFormat="textFormat" width="40"/>
</columnFormats>
<contents>
<text text="${uix.current.Email}"/>
<text text="${uix.current.BetDate}"/>
<text text="${uix.current.BetID}"/>
<text text="${uix.current.IsWinner}"/>
<text text="${uix.current.Amount}"/>
<text text="${uix.current.Rate}"/>
</contents>
</hGrid>
</contents>
</rowLayout>
</contents>
<tabs/>
<pageButtons/>
<globalButtons/>
<pageHeader/>
<start/>
<end/>
<about/>
<copyright/>
<privacy/>
<corporateBranding/>
<productBranding/>
</myTemplate:baseTmpl>
<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>
</contents>
</form>
</contents>
</body>
</contents>
</document>
</contents>
<provider>
<data name="treeData">
<method class="view.CreateTreeData" method="getTreeData"/>
</data>
</provider>
</dataScope>
</content>
<handlers>
<event name="*">
<method class="view.BetDetailsAction" method="doHGridEvent"/>
</event>
</handlers>
</page>
2. CreateTreeData class:
It has a static method getTreeData() that returns a DataObject containing the tree nodes. This methode is mentiond in <provider> node in UIX/XML.
package view;
import java.util.Enumeration;
import model.*;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.ServletConstants;
import oracle.cabo.servlet.ui.BajaRenderingContext;
import oracle.cabo.ui.RenderingContext;
import oracle.cabo.ui.UIConstants;
import oracle.cabo.ui.data.DataObject;
import oracle.cabo.ui.data.servlet.HttpSessionDataObject;
import oracle.cabo.ui.data.tree.SimpleTreeData;
import oracle.jbo.ApplicationModule;
import oracle.jbo.ViewObject;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
//import oracle.jbo.common.Configuration;
import javax.servlet.http.HttpSession;
import oracle.jbo.client.Configuration;
public class CreateTreeData
public CreateTreeData()
public static DataObject getTreeData(RenderingContext context, String namespace, String name)
// create root node
SimpleTreeData root = new SimpleTreeData();
int BetID = 0;
// get the parameter from url
BajaContext bContext = (BajaContext) context.getProperty(ServletConstants.BAJA_NAMESPACE,
BajaRenderingContext.BAJA_CONTEXT_PROPERTY);
HttpSession session = bContext.getServletRequest().getSession(true);
try
//BetID = new Integer(( bContext.getServletRequest( ) ).getParameter( "BetID" )).intValue();
String s = ( bContext.getServletRequest( ) ).getQueryString();
BetID = new Integer(s).intValue();
session.setAttribute("BetID", s);
//BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
catch ( Exception ex)
// log the error on the console
BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
//System.out.println( "Parameters cannot be retrieved" );
//System.out.println( ex.getMessage() );
String amDef = "model.AppModule";
String config = "AppModuleLocal";
ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
AppModuleImpl myAm = (AppModuleImpl)am;
root = myAm.createNodesData(BetID);
myAm.remove();
Configuration.releaseRootApplicationModule(am,true);
// return the tree
return root;
3. createNodesData(int Id) is the actual function that creates the data structure containing the nodes.
It is in AppModule. The actual tree is kept in one table and every node knows its parent ID. There is no limitation in depth.
This function is called recursively until the tree is finished and the parameter Id is the Id of the parent node that I want to be listed. Tne top parent nodes has null in ParentID field.
public SimpleTreeData createNodesData(int Id)
SimpleTreeData tData = new SimpleTreeData();
String baseSQL =
"SELECT Bet.ID, Bet.CUST_LOGIN_ID, Bet.BET_CLASS_ID, Bet.PARENT_BET_ID," +
"Bet.CHAMPIONSHIP_ID, Bet.AMOUNT, Bet.WIN_RATE, Bet.IS_WINNER, Bet.BET_DATE, " +
"BetClass.NAME, CustLogin.EMAIL, CustLogin.ID AS CUST_LOGIN_ID " +
"FROM BET Bet, CUST_LOGIN CustLogin, BET_CLASS BetClass " +
"WHERE (Bet.CUST_LOGIN_ID = CustLogin.ID) AND (Bet.BET_CLASS_ID = BetClass.ID) ";
if(Id!=0){
String sqlStmt = baseSQL + " AND (Bet.ID = '"+ Id +"')";
ViewObject betVo = this.createViewObjectFromQueryStmt("betVo", sqlStmt);
betVo.executeQuery();
if(betVo.hasNext())
//SimpleTreeData tData = new SimpleTreeData();
tData.setText(betVo.first().getAttribute("NAME").toString());
if(betVo.first().getAttribute("PARENT_BET_ID")==null)
tData.put("Email", betVo.first().getAttribute("EMAIL").toString());
tData.put("BetDate", betVo.first().getAttribute("BET_DATE").toString());
tData.put("BetID", betVo.first().getAttribute("ID").toString());
tData.put("IsWinner", betVo.first().getAttribute("IS_WINNER").toString());
tData.put("Amount", betVo.first().getAttribute("AMOUNT").toString());
tData.put("Rate", betVo.first().getAttribute("WIN_RATE").toString());
if(Integer.parseInt(betVo.first().getAttribute("BET_CLASS_ID").toString())>1){
tData.setExpandable(UIConstants.EXPANDABLE_EXPANDED);
betVo.remove();
String sqlStmt = baseSQL + " AND (Bet.PARENT_BET_ID = '"+ Id +"')";
ViewObject betVo = this.createViewObjectFromQueryStmt("betVo" + Id, sqlStmt);
betVo.executeQuery();
while(betVo.hasNext()){
tData.addChild(createNodesData(Integer.parseInt(betVo.next().getAttribute("ID").toString())));
betVo.remove();
return tData;
Hope this will help... -
Accessing a XML file located in a remote machine.
I have a XML file located in a remote machine(source machine), and I want to be able to move the data from that file to a remote database (target).
I have a central ODI deployment and a central master and worker repository.
The issue I have is that it seams to me that in order to use an XML file the XML file needs to be local to the ODI client(topology manager, designer etc).
The question what do I need to do in order to access the file located in the remote source machine if that machine does not have an ODI client?
ThanksHi Terence,
why don't you try to put all your JPA stuff (classes, persistence.xml, etc) in a "library" jar file and then deploy it inside your .war (under META-INF/lib) and .ear (under the lib)?
Is it acceptable for your purpose?
Fabio De Santi -
When I download firefox, using recommended setting, or my own, all the sub files/folders like plugins, modules, updater end up on the desktop as well as in the file location. And when I try to put them into the file location, they don't. And when I delete them, FireFox won't open. I tried deleting FireFox and reinstalling it multiple times, and a message pops up sometimes that says FireFox may not have installed correctly, so I follow the steps, but all the extra icons on my desktop don't go away. This has happened every time I have downloaded FireFox. The browser itself works, but I need to know how to get rid of these icons, but still be able to use FireFox. This is on a new computer, with Windows 7.
== I downloaded FireFox. ==
== User Agent ==
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6Managed to solve this myself. Just went to properties > hidden.
-
How to create xml file from Oracle and sending the same xml file to an url
How to create xml file from Oracle and sending the same xml file to an url
SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way. -
how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet
Hello
For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
Also, take a look at FTP Browser.vi, which is available at the Example Finder.
To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
Post your current VI if possible.
Regards
Mondoni -
How to retrieve xml file from BLOB and display on browser with css/xslt
Hi All,
I am new to xml. I am storing my xml file into BLOB in database. Now in my jsp page I want to retrieve this xml file from BLOB and display in HTML/CSS/XSLT form...
Pl. guide me.. any docs..?? Logic...??
Thanks in Advance.
Sandeep OzaHello Sandeep!
I'm not familiar with jsp but logic should be as follows:
-in jsp page instantiate XML parser
-load specified BLOB into parser
Now you may traverse the XML tree or you might load XSL file and use transform method to transform XML according to XSL file.
I have an example where I'm selecting XML straight from relational database and then transform it using XSL into appropriate HTML output, but it's written in PSP.
You can try http://www.w3schools.com/default.asp for basics on XML, CSS, XSL. It's easy to follow with good examples.
Regards!
miki -
I get a message-error opening installationlog file. Verify that the specified lof file location exists and is writeable-when I try to uninstall iTunes and other components. How can I uninstall and reinstall iTunes?
Hey jemerritt,
Thanks for the question. I understand you are experiencing issues with iTunes for Windows. The following resources may help to resolve your issue:
iTunes 11.1.4 for Windows: Unable to install or open
http://support.apple.com/kb/TS5376
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
Thanks,
Matt M. -
To fetch XML files from database AND regarding barcodes
Hi !!
I am very new to this forum...this is my first mail to this forum...
1.) Actually I would like to know how to fetch XML files from database and then how to get the datas from that XML files???Right now i am using struts frame work...If u anyone send some sample code for this one,it is Very helpful for me.....
2.)Using java ,how to generate Barcodes?In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....
Thanks in ADVANCE,PonJAVA wrote:
Hi !!
I am very new to this forum...this is my first mail to this forum...
1.) Actually I would like to know how to fetch XML files from databaseStart with a JDBC tutorial. Check out DAO Pattern and Hibernate as well.
and then how to get the datas from that XML files???Google Java & XML (there are many ways to do this
Right now i am using struts frame work...Okay...
If u anyone send some sample code for this one,it is Very helpful for me..... You haven't provided any detail regarding your task so there's no way anyone could post code for you.
2.)Using java ,how to generate Barcodes?Search Google
In database I have Some serial number.While I try to display the serial number in Front end ,I should display with Barcode Corresponding to that number.Plz send some sample codes if u have.....Try a JSP/Servlet tutorial. -
Bpel-config.xml and soa-infra-config.xml file location in SOA 11g Pre-built
Hi frnds,
I have downloaded and started Oracle SOA 11g Pre-built from http://www.oracle.com/technetwork/middleware/soasuite/learnmore/vmsoa-172279.html and trying to configure it according to my requirements to upgrade from SOA 10g to 11g. But I can't find bpel-config.xml and soa-infra-config.xml files in BPEL domain home (i.e. /oracle/fmwhome/user_projects/domains/domain1).
Can you please help me?
BR, LisanNone of those roles are intended to be granted to application users. Those are instead to limit various operational / support responsibilities. For instance, if you have "operators" for your production environment who are responsible for starting & stopping servers vs "Administrators" who are performing configuration changes, etc.
The SOA* versions can be used to separate even further - an "Operator" ( with rights in the WL console ) can be distinct from a "SOAOperator" ( with rights in the SOA /em ), etc.
http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10226/appx_roles_privs.htm#insertedID2
also, here is a bit more on soa-infra roles:
http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10226/appx_users.htm#insertedID4 -
How to edit/update data into an XML file using Flex and Actionscript
I can read an external xml file, please see the code below:
protected function button1_clickHandler(event:MouseEvent):void
var GrowthChartsDataGrid:XML;
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("../GrowthChartsDataGrid.xml");
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete)
function onComplete (event:Event)
var loader:URLLoader = URLLoader(event.target);
GrowthChartsDataGrid = new XML(loader.data);
GrowthChartsDataGrid.GrowthChartGridView += <Month> {txtMonth.text} <Weight> {txtWeight.text} </Weight> </Month>
texttesting.text = GrowthChartsDataGrid.toString();
I can read an XML file and can add an extra node and can display it in a text filed. But I want to update the XML file contents which will come from the txtMonth and txtWeight text boxes.
Please any suggestions???First of all thanks for your quick reply .
I actually want to add another node inthe xml file. Files is at a local location and i can read the file and add an extra node (but I cant store this extra node in the actual XML file). But I want to save XML with the extra node.
For exmaple,
my current xml is:
<?xml version="1.0" encoding="utf-8"?>
<GrowthChartGridView>
<Month> 1
<Weight>3.5</Weight></Month>
<Month> 2
<Weight>3.9</Weight></Month>
<Month> 3
<Weight>4.5</Weight></Month>
</GrowthChartGridView>
and at run time, I can create a new node using the data from two textboxes at button click event.
GrowthChartsDataGrid.GrowthChartGridView += <Month> {txtMonth.text} <Weight> {txtWeight.text} </Weight> </Month>
Now what I want to do is, I want to add this node back in to my XML. Therefore, the result I am looking for is, my local XML should update like this.
<?xml version="1.0" encoding="utf-8"?>
<GrowthChartGridView>
<Month> 1
<Weight>3.5</Weight></Month>
<Month> 2
<Weight>3.9</Weight></Month>
<Month> 3
<Weight>4.5</Weight></Month>
<Month> {txtMonth.text} <Weight> {txtWeight.text} </Weight> </Month> //I can read data from text boxes so its fine but I can not store this in to my original XML
</GrowthChartGridView>
Thanks -
How to refer to the xml file located on unix server
I have a xml file which is located on unix server and have a hard time, reverse engg. it .
if anyone has any knowledge on this , that will be helpful.I have application server where my xml is located.e..g /tmp/xyz.xml
I have designer on my laptop from where i have created a agent which points to my application server.
I am able to create a data server which does say test successful.
In model i tried to create new model and trying to reverse engg. the xml now i get following error .
java.sql.SQLException: Could not generate the DTD because the file could not be created. Verify that you have write permission in the directory.
if you can point me to documentation which has some information on this will be helpful or any hint.. -
ABAP to XML file - Formatting problem and UTF-8 requirement
Hi Everyone,
Could you please guide us on the ABAP coding required to get the proper XML file format. We have prepared the code for downloading SAP transaction data into an XML file format. However, we are stuck with an improper format as per Example 1.
The file format we get is this:
Example 1:
<?xml version="1.0"?><FDXLMDOrd><FXNHdrLp><CrtDtTm>20070613094517</CrtDtTm><MsgID>319304155</MsgID><MsgTyp>850</MsgTyp><MsgSubTyp>SALES_A</MsgSubTyp><Pr
<RcvTP>FSCS</RcvTP><SndSrc>FXN</SndSrc><RcvSrc>EIB</RcvSrc><UsrID>VAR</UsrID></FXNHdrLp><OrdHdrLp><OrdNbr>319304155</OrdNbr><OrdActnCD>9</OrdActnCD><Ord
teCarrReq>FDE</RteCarrReq><RteTptSvcReq>FEIP</RteTptSvcReq></DprtRteLp><SpecInstrLp><SpecInstrTyp>SHIP</SpecInstrTyp><SpecInstr>Example Packing Instruct
les Order</RefDesc></RefLp><RefLp><RefIDQual>CPO</RefIDQual><RefID>test 1 line 1 pc - s</RefID><RefDesc>Customers Customer Purchase Order</RefDesc></Ref
Typ><EntIDQual>91</EntIDQual><EntID>H00092</EntID><EntNm>VLAD BOBES</EntNm><Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA
></AdrLnLp><ConLp><ConTypCD>IC</ConTypCD><ConNm>VLAD BOBES</ConNm><CommLp><CommNbrQual>TE</CommNbrQual><CommNbr>514-731-8361</CommNbr></CommLp></ConLp><
<Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA</CtryISOCD><AddlNmLp><AddlNm1>VLAD BOBES</AddlNm1></AddlNmLp><AdrLnLp><Str
However, the format need to look like this as in Example 2 below.
We also need help in how to get " encoding="UTF-8"?> " as part of the file format.
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<FDXLMDProdRcpt>
<FXNHdrLp>
<CrtDtTm>20070612151817</CrtDtTm>
<SessID>26796</SessID>
<MsgTyp>861</MsgTyp>
<MsgSubTyp>WRE_A</MsgSubTyp>
<PrcsingPrty>5</PrcsingPrty>
<SndTPQualCD>ZZ</SndTPQualCD>
<SndTP>FSCS</SndTP>
<RcvTPQualCD>ZZ</RcvTPQualCD>
<RcvTP>EIB</RcvTP>
<SndSrc>YANTRA</SndSrc>
<RcvSrc>EIB</RcvSrc>
<UsrID>VAR</UsrID>
</FXNHdrLp>
<ProdRcptHdrLp>
<ShpID>VAR20070612NCHIC1</ShpID>
<ShpTyp> </ShpTyp>
<ShpActnCD>00</ShpActnCD>
<InTransMrgTyp> </InTransMrgTyp>
<ShpVolUOM>CI</ShpVolUOM>
<ShpWgtUOM>LB</ShpWgtUOM>
<ShpTotVol>310022.00</ShpTotVol>
<ShpTotWgt>861.00</ShpTotWgt>
<DtTmLp>
<DtTyp>050</DtTyp>
<DtTmQual>501</DtTmQual>
<DtTm>2007-06-12T15:07:41-04:00</DtTm>
</DtTmLp>
<AdrLp>
<EntTyp>RC</EntTyp>
<EntIDQual>93</EntIDQual>
<EntID>NCHIC</EntID>
<EntNm>NCHIC</EntNm>
<AutoCrtTrdPar>0</AutoCrtTrdPar>
<AutoCrtTrdParRole>0</AutoCrtTrdParRole>
<AutoUpdtTrdPar>0</AutoUpdtTrdPar>
</AdrLp>
<ProdRcptTptLp>
<TptIDQual>BOL</TptIDQual>
<TptSCAC> </TptSCAC>
<TptID> </TptID>
Thanks and Best Regards
SitaramanYou could try to use the following coding:
*& Report ZUS_SDN_UC_XML_TO_UTF8_TRANSF
REPORT zus_sdn_uc_xml_to_utf8_transf.
define local data
CONSTANTS:
gc_encoding TYPE string VALUE 'UTF-8'.
DATA:
gd_result type string,
go_ixml TYPE REF TO if_ixml,
go_stream_factory TYPE REF TO if_ixml_stream_factory,
go_encoding TYPE REF TO if_ixml_encoding,
go_resstream TYPE REF TO if_ixml_ostream.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gd_xml TYPE string,
gt_xml TYPE TABLE OF string.
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 10 ROWS
WHERE bukrs = '1000'.
go_ixml = cl_ixml=>create( ).
go_stream_factory = go_ixml->create_stream_factory( ).
go_encoding = go_ixml->create_encoding( character_set = gc_encoding
byte_order = 0 ).
go_resstream =
go_stream_factory->create_ostream_cstring( gd_result ).
CALL METHOD go_resstream->set_encoding
EXPORTING
encoding = go_encoding.
XML Transformieren
CALL TRANSFORMATION id_indent
SOURCE itab = gt_knb1
RESULT XML go_resstream.
APPEND gd_result TO gt_xml.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
BIN_FILESIZE =
filename = 'C:\temp\xml_to_utf8.txt'
FILETYPE = 'ASC'
APPEND = SPACE
WRITE_FIELD_SEPARATOR = SPACE
HEADER = '00'
TRUNC_TRAILING_BLANKS = SPACE
WRITE_LF = 'X'
COL_SELECT = SPACE
COL_SELECT_MASK = SPACE
DAT_MODE = SPACE
CONFIRM_OVERWRITE = SPACE
NO_AUTH_CHECK = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = SPACE
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
CHANGING
data_tab = gt_xml
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END-OF-SELECTION.
However, I like to mention that the file created from out ECC 5.0 (6.40, non-Unicode) contains a special character between the XML header and the data part (when displayed using NotePad Editor):
...xml version="1.0" encoding="utf-8"?>[special character]<asx:abap xmlns:asx="http://www.sap.com/a...
Using a HexEditor the special character (0x0A) is displayed as a dot.
Also Check with FM - TREX_TEXT_TO_UTF8
Reward Points if it is helpful
Thanks
Seshu -
Generate XML file with Elements and attributes from Oracle table
Hi,
I have the following table structure.
CREATE TABLE COIL
COIL_ID NUMBER(10),
COIL_NUMBER VARCHAR2(40),
COIL_PO_OPERATING_UNIT VARCHAR2(20),
COIL_PO_NUMBER VARCHAR2(40),
MILL_NUMBER VARCHAR2(2),
MILL_COIL_STATUS VARCHAR2(15),
ITEM_NUMBER VARCHAR2(40),
COIL_WEIGHT NUMBER(38),
WEIGHT_UOM VARCHAR2(10),
DOCUMENT_NUMBER VARCHAR2(40),
DOCUMENT_DATE DATE,
DOCUMENT_STATUS VARCHAR2(15),
DOCUMENT_TYPE VARCHAR2(20),
DOCUMENT_SOURCE VARCHAR2(20),
TEST_ID NUMBER(38),
VALUE NUMBER,
TEST_UOM VARCHAR2(20),
TEST_STATUS VARCHAR2(70),
TESTER_LOGIN VARCHAR2(20),
EQUIPMENT_CODE VARCHAR2(50),
DOC_STS_MSG VARCHAR2(600)
For each COILID record, there could be multiple records baased on TEST_ID/VALUE/TEST_UOM etc.
And I would like to prepare xml file in the following format by selecting data from COIL?
<?xml version="1.0"?>
-<Coil xsi:noNamespaceSchemaLocation="www.tempel.com/COIL.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb="http://xmlns.oracle.com/xdb">
<CoilId>1419532</CoilId>
<CoilNo>D2221050010A0</CoilNo>
<CoilPOOperatingUnit>Changzhou</CoilPOOperatingUnit>
<CoilPONo>4619</CoilPONo>
<MillNo>86</MillNo>
<MillCoilStatus>Test</MillCoilStatus>
<ItemNo>050FP800 C5</ItemNo>
<Weight>7076</Weight>
<UOM>KILOGRAM</UOM>
<DocumentNo>0</DocumentNo>
<DocumentDate>2013-01-11</DocumentDate>
<DocumentStatus>NonProcessed</DocumentStatus>
<DocumentType>Tests</DocumentType>
<DocumentSource>CHIGMA1</DocumentSource>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4992" TestUnit="mm" Status="NonProcessed" TestId="135"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.0128" TestUnit="mm" Status="NonProcessed" TestId="124"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="12" TestUnit="mm" Status="NonProcessed" TestId="125"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5095" TestUnit="mm" Status="NonProcessed" TestId="127"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5042" TestUnit="mm" Status="NonProcessed" TestId="128"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5058" TestUnit="mm" Status="NonProcessed" TestId="129"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4967" TestUnit="mm" Status="NonProcessed" TestId="130"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.5049" TestUnit="mm" Status="NonProcessed" TestId="131"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4972" TestUnit="mm" Status="NonProcessed" TestId="132"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4960" TestUnit="mm" Status="NonProcessed" TestId="133"/>
<Tests DocStsMsg="0" EquipmentCode="CHIGMA1" TesterLogin="dpkrueger" Value="0.4996" TestUnit="mm" Status="NonProcessed" TestId="134"/>
</Coil>
Can you please guide me how to do it in a single query?
Thanks in advance.Hi Odie,
Thanks for the quick offer.Sure,No problem.I expect the format to be as follows
<Coil xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.tempel.com/COIL.xsd">
<CoilId>97239</CoilId>
<CoilNo>777078</CoilNo>
<CoilPOOperatingUnit>TSUSA</CoilPOOperatingUnit>
<CoilPONo>3407</CoilPONo>
<MillNo>31</MillNo>
<MillCoilStatus>Test</MillCoilStatus>
<ItemNo>0140SP150 C5A</ItemNo>
<Weight>17365</Weight>
<UOM>POUNDS</UOM>
<DocumentNo>0</DocumentNo>
<DocumentDate>2008-10-13</DocumentDate>
<DocumentStatus>Processed</DocumentStatus>
<DocumentType>Tests</DocumentType>
<DocumentSource>MILL</DocumentSource>
<Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="84" TestUnit="15T" Status="Processed" TestId="65"></Tests>
<Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="1.39" TestUnit="W/Lb" Status="Processed" TestId="48"></Tests>
<Tests EquipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="1979" TestUnit="W/Lb" Status="Processed" TestId="49"></Tests>
</Coil>
But instead it came with below format
<Coil xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSch
emaLocation="www.tempel.com/COIL.xsd"><CoilId>97239</CoilId><CoilNo>777078</Co
ilNo><CoilPOOperatingUnit>TSUSA</CoilPOOperatingUnit><CoilPONo>3407</CoilPONo>
<MillNo>31</MillNo><MillCoilStatus>Test</MillCoilStatus><ItemNo>0140SP150 C5A<
/ItemNo><Weight>17365</Weight><UOM>POUNDS</UOM><DocumentNo>0</DocumentNo><Docu
mentDate>2008-10-13</DocumentDate><DocumentStatus>Processed</DocumentStatus><Do
cumentType>Tests</DocumentType><DocumentSource>MILL</DocumentSource><Tests Equ
ipmentCode="MILLEDI" TesterLogin="MILLEDI" Value="84" TestUnit="15T" Status="P
rocessed" TestId="65"></Tests><Tests EquipmentCode="MILLEDI" TesterLogin="MILL
EDI" Value="1.39" TestUnit="W/Lb" St atus="Processed" TestId="48"></Tests><Tes
ts EquipmentCode="MILLEDI" TesterLog in="MILLEDI" Value="1979" TestUnit="W/Lb"
Status="Processed" TestId="49"></Tests></Coil>
The sample insert records are as follows
insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 65, 84, '15T', 'Processed', 'MILLEDI', 'MILLEDI', null);
insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 48, 1.39, 'W/Lb', 'Processed', 'MILLEDI', 'MILLEDI', null);
insert into COIL (coil_id, coil_number, coil_po_operating_unit, coil_po_number, mill_number, mill_coil_status, item_number, coil_weight, weight_uom, document_number, document_date, document_status, document_type, document_source, test_id, value, test_uom, test_status, tester_login, equipment_code, doc_sts_msg)
values (97239, '777078', 'USA', '3407', '31', 'Test', '0140SP150 C5A', 17365, 'POUNDS', '0', to_date('13-10-2008', 'dd-mm-yyyy'), 'Processed', 'Tests', 'MILL', 49, 1979, 'W/Lb', 'Processed', 'MILLEDI', 'MILLEDI', null);
commit;
Thanks in Advance.
Maybe you are looking for
-
File name in Split messages with Message mapping
Hi everyone, I split my incoming message into multiple files based on the Order Numbers. Also I have a particular file naming convention I need to use. Its someething like RTG746932746.63749 Now, I have given the field file name along with my target
-
OPMN SERVER ERROR WHILE INSTALLING BI 11g
Hi Guys, I have been trying to install obiee 11g on a VM machine in which 32 bit Windows XP OS has been installed. I have restarted Microsoft loopback adapter and have tried innumerable number of times but no sucess. I get an OPMN SERVER error while
-
Where Is weblogic.WLST Installed? (Version 10.3)
I've installed Weblogic Server 10.3 (Oracle WebLogic Server 11gR1 (10.3.1) - Package Installer). I want to use weblogic.WLST but it does not seem like it got installed? What am I missing. Thank you
-
Trigger process chain using event
Hi all, Id like to know if someone ever faced this kind of situation. I have a process in R/3 and it must run every day, and when its finished I have to start a process chain in BW. I thought to do this using events. So, I created a Job that execut
-
Create dynamic report or query for piece count
Hi abaper's This is a very straight forward requirement. so please give me code First you have to get the corresponding plant from table T320 for the given warehouse numbers in the selection screen. 1. Get the sum of order qty of sales orders fr