Inputs Required - XML formation
Hi,
We have a specific requirement where we have to generate an XML that should not contain any namespace/xsd reference but contains DTD reference. This XML is sent to our partners through automated workflow.
The partner only understands DTDs and will talk and validate inputs with DTDs only.
Similarly - I need to accept XML containing DTD reference and not XSD reference.
Can I achieve this functionality with XML Beans??
What are the possible alternatives?
Hi,
What are you going to do with that FM. That FM does not need any inputs. If you call the FM directly it will give pop up and when you select any kind of file the FM will fill the tables.
Cheers,
Kothand
Similar Messages
-
Get the required XML format..
Hi Guru's,
I am trying to post the data to the External URL.
The scenario is asynchronous. I have done with the configuration part and able to successfully ping to the External Server.
The issue is the XML format that i am sending to the external server is :
*xml
=
< ?xml version="1.0" encoding="UTF-8"? >\n< ns1:MT_SEND_DATA_URL xmlns:ns1="http:/XXXX/XXXX/X_X_X" >
< REQUEST >
< INVITE_DETAIL >
< MSG_ID >
< /MSG_ID >
< SERVICE >
< /SERVICE >
< MAIL_LINK >
< /MAIL_LINK >
< OPT_MESSAGE > poiuyt poiuy</OPT_MESSAGE >
< RECV_EMAIL >< /RECV_EMAIL >
< SENDER_EMAIL >com< /SENDER_EMAIL >
< SENDER_NAME > < /SENDER_NAME >
< USER_ID >123456< /USER_ID >
< /INVITE_DETAIL >
< META >
< ACTION >qwerty< /ACTION >
< /META >
< /REQUEST >
< /ns1:MT_SEND_DATA_URL >*
while the required Output format should be :
*<?xml version=\"1.0\" encoding=\"UTF-8\"?>
< request >
< meta >
< action>XXXXe</action >
< /meta >
< invite_details >
< user_id>1105288</user_id >
< senders_name><![CDATA[abc]]></senders_name >
< senders_email><![CDATA[ ]]></senders_email >
< user_id><![CDATA[000000]]></user_id >
< emails><![CDATA[ ]]></emails >
< opt_message><![CDATA[]]></opt_message >
< mail_link><![CDATA[http://www.xyz.com]]></mail_link >
< service><![CDATA[abc]]></service >
< msg_id><![CDATA[def]]></msg_id >
< /invite_details >
< /request >*
Please provide the Solution for this.
Thanks,
regards,
akshay ruia.Hi,
If you doesn't have the XSD or WSDL file.
Create a Data type structure as
< meta >
< action>XXXXe</action >
< /meta >
< invite_details >
< user_id>1105288</user_id >
< senders_name><![CDATAabc]></senders_name >
< senders_email><![CDATA ]></senders_email >
< user_id><![CDATA000000]></user_id >
< emails><![CDATA ]></emails >
< opt_message><!CDATA[]></opt_message >
< mail_link><![CDATAhttp://www.xyz.com]></mail_link >
< service><![CDATAabc]></service >
< msg_id><![CDATAdef]></msg_id >
< /invite_details >
Create a messge type as request i.e. message type name should be request and delete the namespace in XML Namespace text box
In Messge Mapping you can check the format of the message -
Help on writing pl/sql stored procedure to accept input in xml format
Hi All,
I need to write a pl.sql stored procedure which would be getting the input as an xml.
The requirement is that xml data recieved in below fashion needs to be inserted to 3 different tables.
The tags under the root node directly needs to be inserted into Table1
The tags under the first element of the root node needs to be inserted into Table2
Can anybody help me on how to write a stored procedure which could take up the below xml as input and insert the data received into 3 different tables.
Any sample code.pointers to achieve this could be of great help.
The structure of the xml would be as follows:
<AssemblyProduct>
<AssemblyHeader>
<Name></Name>
<AssemblyId></AssemblyId>
<ListOfHCSIFFs><HCSIFFHeader><Id></Id> </HCSIFFHeader> </ListOfHCSIFFs>
<ListOfHCSIFFs><HCSIFFHeader><Id></Id> </HCSIFFHeader> </ListOfHCSIFFs>
<ListOfHCSIFFs><HCSIFFHeader><Id></Id> </HCSIFFHeader> </ListOfHCSIFFs>
</AssemblyHeader>
<AssemblyHeader>
<Name></Name>
<AssemblyId></AssemblyId>
</AssemblyHeader>
<AssemblyHeader></AssemblyHeader>
<ApplicationId></ApplicationId>
<ApplicationName></ApplicationName>
<ApplicationValidFrom></ApplicationValidFrom>
<ApplicationValidTo></ApplicationValidTo>
</AssemblyProduct>Well you could write your procedure to accept a parameter of XMLTYPE datatype and then use that value in a query inside the procedure to break the data up as required using something like XMLTABLE e.g.
-- Nested repeating groups example:
WITH t as (select XMLTYPE('
<RECSET>
<REC>
<COUNTRY>1</COUNTRY>
<POINT>1800</POINT>
<USER_INFO>
<USER_ID>1</USER_ID>
<TARGET>28</TARGET>
<STATE>6</STATE>
<TASK>12</TASK>
</USER_INFO>
<USER_INFO>
<USER_ID>5</USER_ID>
<TARGET>19</TARGET>
<STATE>1</STATE>
<TASK>90</TASK>
</USER_INFO>
</REC>
<REC>
<COUNTRY>2</COUNTRY>
<POINT>2400</POINT>
<USER_INFO>
<USER_ID>3</USER_ID>
<TARGET>14</TARGET>
<STATE>7</STATE>
<TASK>5</TASK>
</USER_INFO>
</REC>
</RECSET>') as xml from dual)
-- END OF TEST DATA
select x.country, x.point, y.user_id, y.target, y.state, y.task
from t
,XMLTABLE('/RECSET/REC'
PASSING t.xml
COLUMNS country NUMBER PATH '/REC/COUNTRY'
,point NUMBER PATH '/REC/POINT'
,user_info XMLTYPE PATH '/REC/*'
) x
,XMLTABLE('/USER_INFO'
PASSING x.user_info
COLUMNS user_id NUMBER PATH '/USER_INFO/USER_ID'
,target NUMBER PATH '/USER_INFO/TARGET'
,state NUMBER PATH '/USER_INFO/STATE'
,task NUMBER PATH '/USER_INFO/TASK'
) y
COUNTRY POINT USER_ID TARGET STATE TASK
1 1800 1 28 6 12
1 1800 5 19 1 90
2 2400 3 14 7 5And then you can extract and insert whatever parts you want into whatever tables as part of the procedure. -
Input XML Format needs to be Translated Into CSV String Format
Hi,
I need to translate input xml format to CSV string format in BPEL.
How to use xpath function to do this?
Thanks1. In the partner link of the file adapter you can run the wizard and create a XSD according to your CSV format.
(you just need to create an example of CSV)
The wizard will create a XSD automatically.
2. Assign an invoke activity to that partner link.
3. Use transformation to pass data from your XML input into the invoke variable.
Arik -
XML format for input to BPEL process from client stub
Hi,
I have deployed SyncHelloWorld BPEL process as given in the tutorial in the BPEL Server. It is working fine. Now I am trying to invoke the process by creating a Java client stub . I created a stub using the Web-services wizard by specifying the WSDL of the BPEL. Now I want to know how to pass some string through XML document to the BPEL process.
I am using this code in the main method of the stub., but the value is not being passed to the BPEL nodes correctly. the output I am getting is "Hello "
and not "Hello XYZString". I think I am not able to form the XML document to pass as input correctly. Can anyone help.
Can anyone please help :
public static void main(String[] args)
try
SyncHelloWorldStub stub = new SyncHelloWorldStub();
// Add your own code here.
// Create an empty XML document
XMLDocument doc = new XMLDocument();
// Create an element
Element body = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "SyncHelloWorldProcessRequest");
// Create the inner element
Element ip = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "input");
// Create a text node
Text text = doc.createTextNode("input");
// Set the input parameter
text.setNodeValue("XYZString");
ip.appendChild(text);
body.appendChild(ip);
// Call the process. It returns a vector
Vector v = stub.process(body);
// Code to print the returned xml.
System.out.println("Received " + v.size() + " element");
Enumeration enum = v.elements();
// Walk through the vector and print out contents
while (enum.hasMoreElements())
Object o = enum.nextElement();
System.out.println("Returned a " + o.getClass().getName());
//If it is an element, print it out
if (o instanceof XMLElement)
XMLElement xml = (XMLElement)o;
xml.print(System.out);
else
System.out.println("Returned " + o.toString());
System.out.println("After executing : "+v.toString());
catch(Exception ex)
ex.printStackTrace();
This is the code for WSDL file for the BPEL process.
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="SyncHelloWorld" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/SyncHelloWorld" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/SyncHelloWorld">
- <types>
- <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="SyncHelloWorldProcessRequest">
- <complexType>
- <sequence>
<element name="input" type="string" />
</sequence>
</complexType>
</element>
- <element name="SyncHelloWorldProcessResponse">
- <complexType>
- <sequence>
<element name="result" type="string" />
</sequence>
</complexType>
</element>
</schema>
</types>
- <message name="SyncHelloWorldRequestMessage">
<part name="payload" element="tns:SyncHelloWorldProcessRequest" />
</message>
- <message name="SyncHelloWorldResponseMessage">
<part name="payload" element="tns:SyncHelloWorldProcessResponse" />
</message>
- <portType name="SyncHelloWorld">
- <operation name="process">
<input message="tns:SyncHelloWorldRequestMessage" />
<output message="tns:SyncHelloWorldResponseMessage" />
</operation>
</portType>
- <binding name="SyncHelloWorldBinding" type="tns:SyncHelloWorld">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="process">
<soap:operation style="document" soapAction="process" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="SyncHelloWorld">
- <port name="SyncHelloWorldPort" binding="tns:SyncHelloWorldBinding">
<soap:address location="http://cisoidd001.corporate.ge.com:5843/orabpel/default/SyncHelloWorld/v2006_06_19__40924" />
</port>
</service>
- <plnk:partnerLinkType name="SyncHelloWorld">
- <plnk:role name="SyncHelloWorldProvider">
<plnk:portType name="tns:SyncHelloWorld" />
</plnk:role>
</plnk:partnerLinkType>
</definitions>
Also, while running the BPEL process from console, we can give the input as html or string. Can anyone give the me xml format of the input.
Any help would be highly appreciated.
Thanks,
DebojyotyYour last question shows that you might have solved this by now.
The xml document you are composing in java might not exactly be the xml input bpel excepts. The way to compare is first initiate a process by posting an html message, using the initiate tab for your process in the BPEL console. Check the box "Save as default input" before you send the html request.
Then again do an initiate from the BPEL console and select "XML Source" instead of "HTML Form". You will see the xml message you just have sent as html.
You might also want to test your java program with one of the many free soap clients available on the internet.
HTH,
Ruerd
http://www.numericalexample.com -
Legacy data(mapping to be done by xi (in xml format)) to sap using idoc .
hi all,
I need to work in an object in which requirement is like , the source data is directly extracted from legacy and input file is made. now i need to create an interface program which will be used to create purchase req. in weekly basis. now according to functional specification xi team will map the source data in xml format and then through idoc data is to be pushed into sap. i am confused about the step by step senario from source data to final pr creation . please clarify if somebody had worked on this kind of situation.Hi i encounter like this but in SD side,
from legacy ->XI -> SAP (create SO)
then from created SO via IDOC my requirement is to post delivery then billing.
I think in your case the PR is already created and to be process to PO.. better check and fully understand the flow with your team. -
How to generate Campaign details in XML format for sending to downstream sy
Dear gurus,
we have a requirement to send the Campaign details from CRM to some Downstream system in the XML format through PI interfaces. We want to include the following campaign details in the structure.
<SAPTOAL DATE="03-MAR-2011" TIME="13:25pm">
<CAMPAIGN>
<ID></ID>
<NAME></NAME>
<RUNDATE></RUNDATE>
<RUNTIME></RUNTIME>
<STARTDATE></STARTDATE>
<ENDDATE></ENDDATE>
<RECORDCOUNT></RECORDCOUNT>
</CAMPAIGN>
<TARGETGROUP>
<ID></ID>
<NAME></NAME>
</TARGETGROUP>
<BUSINESSPARTNERS>
<BUSINESSPARTNER>
<ID>001</ID>
<TARGETGROUPID></TARGETGROUPID>
<FIRSTNAME></FIRSTNAME>
<LASTNAME></LASTNAME>
<TITLE></TITLE>
<SUFFIX></SUFFIX>
<EMAIL></EMAIL>
<REPFIRSTNAME></REPFIRSTNAME>
<REPLASTNAME></REPLASTNAME>
<REPPHONE></REPPHONE>
<REPSIGNATUREURL></REPSIGNATUREURL>
<REPPICTUREURL></REPPICTUREURL>
<REPEMAIL></REPEMAIL>
</BUSINESSPARTNER>
<BUSINESSPARTNER>
<ID>002</ID>
<TARGETGROUPID></TARGETGROUPID>
<FIRSTNAME></FIRSTNAME>
<LASTNAME></LASTNAME>
<TITLE></TITLE>
<SUFFIX></SUFFIX>
<EMAIL></EMAIL>
<REPFIRSTNAME></REPFIRSTNAME>
<REPLASTNAME></REPLASTNAME>
<REPPHONE></REPPHONE>
<REPSIGNATUREURL></REPSIGNATUREURL>
<REPPICTUREURL></REPPICTUREURL>
<REPEMAIL></REPEMAIL>
</BUSINESSPARTNER>
</BUSINESSPARTNERS>
</SAPTOAL>
We have already tried the following things in SPRO.
CRM --> Marketing --> Marketing Planning and Campaign Management --> Campaign Execution --> Define File Export Variants
But with this we were not able to get the full XML structure, as required above. We got only this much.
<?xml version="1.0" encoding="utf-8" ?>
<DATA>
<ITEM>
<Field_1>Test Email.</Field_1>
<Field_2>Test Email.</Field_2>
<Field_3>ABC Company.</Field_31>
</ITEM>
</DATA>
Any pointers or help on this will he greatly appreciated.rgrds,
Randhir SoniHi Prabhu,
The program SAPFPAYM generates the payment Medium on the basis of your configuration and background settings, this program does not bydefault give the output in the XML.
Varient creation for the PMW in T. Code OBPM4, use the same program, which i already done it, even without this it is not be possible to create any payment Medium.
Regards,
Rony -
Problem with getting a D2K report in XML format
Hi all,
Could any body give a solution for this problem.
I have a matrix report like following:
Q_Statement_Of_Net_Assets ----> main query
|
G_Cross ----> Cross product
| CS_VALUE
| CS_NET_ASSET
| CF_COSTI
|
| --------------------------------- |
| | G_CTIF | | ------> Like this I have two more groups
| --------------------------------- |
...... |
-----------------------------------------------|
My requirement is i want to print CS_VALUE, CS_NET_ASSET, CF_COSTI values in XML report, these values i am getting in a Normal/RTF format reports.
But i am not getting in XML format report.
thanks in advance.
VasuThanks Schellyc
actually I want to creat a new SOAPMessage for the very beginning like this:
try{
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage msg = mf.createMessage();
SOAPPart sp = msg.getSOAPPart();
//create the header container
SOAPEnvelope se = sp.getEnvelope();
SOAPHeader sh = se.getHeader();
SOAPBody sb = se.getBody();
}catch(Throwable e) {
e.printStackTrace();
}and I want to get the empty header from this newly created SOAPEnvelop and add my own content into the header as well as the empty body.
I wrote the code by following the example from the jaxm api.
can anybody tell me any further information about the NullPointerException? -
How can I convert IDoc in XML format w/DTD into a string?
I want to send by e-mail outbound IDoc in XML format with its document type definition (DTD).
I want to be able to get the same output result into a string than the XML file IDoc port type with DTD activated. I have created a FM (based on SAP "OWN_FUNCTION") assigned to an IDoc port of type ABAP-PI that executes the following processing steps:
1-Extract outbound IDoc information to get the sender & recipient mail addresses (EDP13 / EDIPHONE tables).
2-Convert & Transform IDoc data into XML string using FM IDX_IDOC_TO_XML.
3-Prepare and send e-mail with XML attachement using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
I cand generate the e-mail with the XML file attachement but FM IDX_IDOC_TO_XML does not convert the IDoc with proper formating and DTD.
What should I use to accomplish the IDoc conversion to XML w/DTD into a string?
Should I use XSLT tools ?
How does that work?
Thank you
Carlmuks wrote:
Use decimal string to number
Specifically, you can define a constant with a different datatype on the input on the lower left if you need a different datatype (e.g. U8, I64, DBL, etc) Are all your values integers or do you also need to scan fractional numbers? In this case, you should use "fract/exp string to number" instead.
LabVIEW Champion . Do more with less code and in less time . -
How to get the metadata (in xml format) of all the fileds in SQl query ?
Good day ,
I am using the dbms_xmlgen.getXMLfunction to get the result of any query in xml format.
With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.
I tried to Google it but couldn't find any solution , it's easy to do it in java where I can get the resultset meta data from the resultset but I have to do it in Oracle function since I want the result in xml format and want to use the oracle XML API.
You may think why I need metadata , the reason is the application will later use this information to sort the data contained in these fields according to their data type provided to.
Regards
Sajjad Ahmed ParachaHi,
Please always say which version of Oracle you're using (SELECT * FROM v$version).
With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.It is possible but with a bit of effort.
I would use DBMS_SQL utility to parse the query, extract each column's description and then build a METADATA element with the required information.
Here's an example (11g) :
DECLARE
v_query varchar2(30) := 'select * from scott.emp';
v_cur integer;
v_desc_tab dbms_sql.desc_tab;
v_col_cnt number;
v_col_lst varchar2(4000);
v_xml_query varchar2(32767);
xml_metadata_coll xmlsequencetype := xmlsequencetype();
xml_metadata xmltype;
res clob;
BEGIN
v_cur := dbms_sql.open_cursor;
dbms_sql.parse(v_cur, v_query, dbms_sql.native);
dbms_sql.describe_columns(v_cur, v_col_cnt, v_desc_tab);
dbms_sql.close_cursor(v_cur);
for i in 1 .. v_col_cnt loop
if i > 1 then
v_col_lst := v_col_lst || ', ';
end if;
v_col_lst := v_col_lst || v_desc_tab(i).col_name;
xml_metadata_coll.extend;
select xmlelement("COLUMN"
, xmlattributes(v_desc_tab(i).col_name as "name")
, xmlforest(
case v_desc_tab(i).col_type
when 1 then 'VARCHAR2'
when 2 then 'NUMBER'
when 12 then 'DATE'
when 180 then 'TIMESTAMP'
else 'UNKNOWN'
end as "DATATYPE"
, v_desc_tab(i).col_max_len as "MAX_LENGTH"
, v_desc_tab(i).col_precision as "PRECISION"
, v_desc_tab(i).col_scale as "SCALE"
into xml_metadata_coll(i)
from dual;
end loop;
v_xml_query :=
'SELECT XMLSerialize(document
XMLElement("ROOT"
, :1
, XMLElement("ROWSET"
, XMLAgg(
XMLElement("ROW", XMLForest(' || v_col_lst || '))
) as clob indent
FROM ( ' || v_query || ')';
select xmlelement("METADATA", xmlagg(column_value))
into xml_metadata
from table(xml_metadata_coll)
execute immediate v_xml_query into res using xml_metadata;
dbms_output.put_line(res);
END;
/Ouput :
<ROOT>
<METADATA>
<COLUMN name="EMPNO">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>4</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="ENAME">
<DATATYPE>VARCHAR2</DATATYPE>
<MAX_LENGTH>10</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="JOB">
<DATATYPE>VARCHAR2</DATATYPE>
<MAX_LENGTH>9</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="MGR">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>4</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="HIREDATE">
<DATATYPE>DATE</DATATYPE>
<MAX_LENGTH>7</MAX_LENGTH>
<PRECISION>0</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
<COLUMN name="SAL">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>7</PRECISION>
<SCALE>2</SCALE>
</COLUMN>
<COLUMN name="COMM">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>7</PRECISION>
<SCALE>2</SCALE>
</COLUMN>
<COLUMN name="DEPTNO">
<DATATYPE>NUMBER</DATATYPE>
<MAX_LENGTH>22</MAX_LENGTH>
<PRECISION>2</PRECISION>
<SCALE>0</SCALE>
</COLUMN>
</METADATA>
<ROWSET>
<ROW>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>1980-12-17</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-02-20</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7521</EMPNO>
<ENAME>WARD</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-02-22</HIREDATE>
<SAL>1250</SAL>
<COMM>500</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-04-02</HIREDATE>
<SAL>2975</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7654</EMPNO>
<ENAME>MARTIN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-09-28</HIREDATE>
<SAL>1250</SAL>
<COMM>1400</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7698</EMPNO>
<ENAME>BLAKE</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-05-01</HIREDATE>
<SAL>2850</SAL>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>1981-06-09</HIREDATE>
<SAL>2450</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>1981-11-17</HIREDATE>
<SAL>5000</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7844</EMPNO>
<ENAME>TURNER</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-09-08</HIREDATE>
<SAL>1500</SAL>
<COMM>0</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7900</EMPNO>
<ENAME>JAMES</ENAME>
<JOB>CLERK</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-12-03</HIREDATE>
<SAL>950</SAL>
<DEPTNO>30</DEPTNO>
</ROW>
<ROW>
<EMPNO>7902</EMPNO>
<ENAME>FORD</ENAME>
<JOB>ANALYST</JOB>
<MGR>7566</MGR>
<HIREDATE>1981-12-03</HIREDATE>
<SAL>3000</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>1982-01-23</HIREDATE>
<SAL>1300</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
</ROOT>A couple of comments :
<li> I handle only four datatypes here (VARCHAR2, NUMBER, DATE, TIMESTAMP). Of course you can add more.
The list of Oracle Type Number is available here : http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#i54330
Starting with 11g (not sure which release), DBMS_SQL package also declares these numbers through named constants.
<li> I don't use DBMS_XMLGEN in this example. Instead I rebuild the query using SQL/XML functions and the list of columns that's just been described. -
DME file in XML format in SAP 4.6C
Hi Experts,
For a Belgium client, I have a requirement to generate DME file in XML format for payments made to foreign and domestic vendors. I want to know the following,
1. Can DME file be generated in XML format using classic payment medium programs RFFOBE_E and RFFOBE_I.
2. If not why and what are the other options.
3. I also came to know that there is an options of using Payment medium workbench - through XML format trees BE_BEPDTA and BE_PIBDTA. But since we are in 4.6C, i am not able to create a payment format. Is there any support package or patch that is required.
4. I tried for SEPA_CT - again a XML format tree but was not very successful as that too was not available in SAP 4.6C. Is there any way that I can get this done in 4.6C - any support packages or patches available?
ThanksHi Kaylan,
could you please share that documentation with me too.
Thanks, Regards,
Alex Cardona -
How to Place a file on application server in XML format
Hi,
Our requirement is to place a file from SAP to a folder on application server in XML and vice-versa.
please suggest.
Thanks
NarendraHi,
1. convert your internal table data to XML format using function module SAP_CONVERT_TO_XML_FORMAT.
2. Convert the XML data into Xstring format using Function module SCMS_BINARY_TO_XSTRING. pass the file size got from the step 1 in importing parameter.
3. loop on the internal table got from the step 2 and use OPEN DATASET, TRANSFER AND CLOSE DATASET -
Error in outputting xml formatted data
Hello,
I'm trying to output xml formatted data using apex.
At about 70% into the formatted output I get this in the browser:
<descript>punct= & > < /,() &</descript>
</row>
- <row The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource 'http://apex.oracle.com/pls/otn/f?p=158...
<script language="JavaScript1.1" type="text/javascript">
-^
m">>
<DIVI have a 600 row table (dml below) with identical string in each row of the descript column. (I put in some special characters just to push it through the escape function for html. It is displaying the text correctly.)
The page has one report region (plsql below).
The page template is stripped down.
My local results are identical to the otn hosted workspace.
I did dump the table in xml format and displayed the dump file in browser without a problem, so I'm missing something in the code.
Thank you.
Albert
On OTN webspace, go to http://apex.oracle.com/pls/otn/f?p=15866:1:1291425545573680200:::::
plsql
declare
xdescript varchar2(4000);
begin
-- xml preface is in the page template
-- htp.p('<?xml version="1.0"?>');
htp.p('<rowset>');
begin
for item in
(select descript,cid from receipts order by cid)
loop
htp.p ('<row>');
xdescript := htf.escape_sc(item.descript);
htp.p('<cid>' || item.cid || '</cid>');
htp.p('<descript>'|| xdescript || '</descript>');
htp.p('</row>');
end loop;
end;
htp.p ('</rowset>');
end;
dml
CREATE TABLE "RECEIPTS"
( "CID" NUMBER,
"AMOUNT" NUMBER NOT NULL ENABLE,
"CLEARED" DATE,
"DESCRIPT" VARCHAR2(80),
"DATEENTERED" DATE DEFAULT SYSTIMESTAMP,
"CHECKNBR" NUMBER,
"CLEARSEQ" NUMBER DEFAULT 0,
CONSTRAINT "RECEIPTS_PK" PRIMARY KEY ("CID") ENABLE
CREATE SEQUENCE "RECEIPTS_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999
INCREMENT BY 1 START WITH 4319 CACHE 20 NOORDER NOCYCLE
CREATE OR REPLACE TRIGGER "BI_RECEIPTS"
BEFORE INSERT ON "RECEIPTS"
FOR EACH ROW
BEGIN
SELECT "RECEIPTS_SEQ".NEXTVAL INTO :NEW.CID FROM DUAL;
END;
ALTER TRIGGER "BI_RECEIPTS" ENABLE
/May be it helps you. I use SQL/XML and APEX Application Process to generate XML succesfully
Here is the result:
http://htmldb.oracle.com/pls/otn/f?p=9774:101:0:APPLICATION_PROCESS=RSSNEWEVENTS
and here is the Process Text source:
declare
a clob;
begin
owa_util.mime_header( ccontent_type => 'text/xml', bclose_header => TRUE, ccharset => 'utf-8');
htp.prn('<?xml version="1.0" encoding="UTF-8"?>');
select
XMLTYPE.getStringVal(
XMLElement("rss",
XMLAttributes('2.0' as version),
XMLElement("channel",
XMLConcat(
XMLElement("title",'iActiveLife - novinky'),
XMLElement("link",'http://www.iactivelife.cz/'),
XMLElement("description",'iActiveLife - Zajímavý ivot snadněji'),
XMLElement("language",'cs'),
XMLElement("pubdate",''),
XMLAgg(
XMLElement("item",
XMLConcat(
XMLElement("title",event_name),
XMLElement("link",'http://htmldb.oracle.com/pls/otn/f?p=' || v('APP_ID') || ':37:' || v('SESSION') || '::NO::P37_EVENT_ID:' || event_id),
XMLElement("description",'')
) into a
from (
select event_id,event_name,issue_date, last_update_order
from (
select events.event_id, events.event_name, events.issue_date, rank () over (order by events.issue_date desc) as last_update_order
from events
where exists ( select * from opportunities where events.event_id=opportunities.event_id and opportunities.user_id is not null)
order by events.issue_date desc)
where last_update_order<=10
htp.prn(a);
end; -
!!!URGENT!!!! -- Output Changes supplier details in an XML format
Hi all,
My platform is 11i Apps and 8i Database
I am really new to XML, however I have a requirment to achieve the following:
For updated or new suppliers, I need to output the new information in an XML format.
But, I am not sure how best to achieve this... can anyone offer me a some rough guidline where to begin.
Many thanks in advance
CheersPlease refer to the XSU document at:
http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/xsu/xsu_userguide.html -
Hi,
We have a requirement in Italy to have the document journal output created in XML format. As we all know, SAP does not have such option in this report. Is there anything that we could do to get the outputs in either XML or PDF formats and save the files locally or on the application server so that we could submit it to Italian Government?
Thank you,
Subash KrishnaHi,
above is not fiscal requirement.
If it is fiscal requirement then please provide me a legal documentaion web link.
Reg
Madhu M
Maybe you are looking for
-
Adobe Portfolio creation in Acrobat 9.0 programatically
How do I programatically create a Adobe Portfolio in Acrobat 9.0 I am using VB .NET I have a folder with PDF files only, that I need to add to a Portfolio using VB .NET Thanks a lot in advance for all your suggestions
-
Hello, i have a field which stores IP and Domain data in XML format. The field data type is BLOB. here is the XML data sample stored in the field. <?xml version = '1.0' encoding = 'UTF-8'?> <DOMAIN Name="DOMAIN_NAME HERE"> <IPADDRESS Address="X.X.X.X
-
Problem on JRE 6u13 deployment silently
Hello, I am having an issue when deploying jre-6u13 to my clients silently. If users are logged in and have any IE open, the install prompts them to close the browsers before it will continue. This is the command line I am using to deploy JRE 6u13 si
-
How many instances can access the same queue at the same time ?
Hi, In my application I am cloning a VI n times and these n instances are accessing the same queue. Is there any restriction on this 'n' for successful operation. Regards, Runjhun
-
How do I download music from my iPhone to my iPad
How do I download music from my iPhone to my ipad