XML output as a string
Hello
I am having a XSLT where I am transforming multilevel source XML to a single level target XML. XSLT works fine from XSLTTester utility from SAP.
The same XSLT I reused in XI and its working fine over there too.But the problem is the output XML what it generates is to be passed as a string to target application class.The target application takes entire XML structure as a string.
Can anyone knows how this can be done from XI? In ABAP CALL TRANSFORMATION function takes XML string and returns transformed XML string.
Thanks in advance.
Regards
Rajeev
Hello
My sender is an XML file which users can upload from a web-page i.e. HTTPSender to XI. This file gets transformed to target XML file using XSLT. My receiver system is SAP R/3 where there is a custom built application which already has got XML interface.This interface is a ABAP-class which has a method to parse the XML.
This method accepts XML as a string and then creates necessary objects.What I am doing currently is building an RFC in which I am instantiating this class and trying to use the same method to create its object.
So I want to convert the target XML as one string then my RFC would have only one importing parameter which is string which I could pass to the custom method.
Do let me know if u have idea about this.
Thanks in advance.
Regards
Rajeev
Similar Messages
-
Hello,
I have a requirement to do a MII BLS transaction exposed as Webservice... This WS should return a XML message as a string.
Problem is that the returned string is xml encoded... But I need it as it!
So for example, I did a very small transaction with a string output parameter, just containing "<", result is :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<XacuteResponse xmlns="http://www.sap.com/xMII">
<Rowset>
<Row>
<e>&lt;</e>
</Row>
</Rowset>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
is there a way to avoid this ? And receive <e><</e> ?
Thanks
Olivier
Edited by: Olivier Thiry on May 13, 2011 3:27 PM
Edited by: Olivier Thiry on May 13, 2011 3:28 PMI do it exactly like you say : link xml to string, no encode/decode. In MII Workbench, no problem, it's pure string, but if you consume the WS from any other tool (we tried from SOAP UI, Webdynpro, .Net, or even running the transaction in browser user the SOAPRunner), the result is a XML encoded string.
If you look at the exemple I provided, you see the response with e = "<" in my MII transaction...
I think it's more related to SOAP transport, which doesn't allow to have xml inside a xml field... -
Hi All,
Is there any function module in ABAP to generate an xml structure?
I want to generate an xml output in a string for the input structure (internal table)
Thanks
RickyHi ricky,
1. itab --- > xml
xml ---> itab.
2. This program will do both.
(just copy paste in new program)
3.
REPORT abc.
DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
FIRST PHASE
FIRST PHASE
FIRST PHASE
Fetch Data
SELECT * FROM t001 INTO TABLE t001.
XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
EXPORTING
TEXT = xml_out
IMPORTING
LENGTH =
TABLES
FTEXT_TAB = itab.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:\xx.xml'
TABLES
data_tab = itab.
SECOND PHASE
SECOND PHASE
SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:\XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
regards,
amit m. -
How to get XML output from a stored procedure
I have a very simple question:
I would like to write a stored procedure (SP) that will return results in XML format (as a string). My tables in database are not of XML TYPE. But I need XML output.
ie, SP will run like a typical SP but the only difference will be its output in XML.
1) is it possible?
2) if possible, how?
Please, help
Omer KoksalThank you Peter, it was a great problem for me !
Omer Koksal -
How to get the WHOLE xml document inside a string using XSLT mapping
Hi folks,
I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
I'm trying to use Michal's method in this blog
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
However, I can't get it to deliver the entire structure instead of just specific elements.
Any help is greatly appreciated,
Thanks,
GuyAshok,
I was able to work it out for my case.
This XSL......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<inside>
<namestring>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="outside/name/*"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</namestring>
</inside>
</xsl:template>
</xsl:stylesheet>
...will transform this input....
<?xml version="1.0" encoding="UTF-8"?>
<outside>
<name>
<nameone>name1</nameone>
<nametwo>name2</nametwo>
<namethree>name3</namethree>
</name>
</outside>
...and put the whole lot into the CDATA element.
Hope this helps you,
Guy -
XML Output - Issue with multiple field labels.
Dear Users,
I am trying to create an XML sheet as output for my program, and am struck at a point where I don't need field labels appearing on the XML output.
The code looks as below:
l_element_order = l_document->create_simple_element(
name = 'Order'
parent = l_element_ordertype ).
l_value = it_order-aufnr.
l_rc = l_element_order->set_attribute( name = 'AUFNR' value = l_value ).
On my output though, both the field labels 'Order' and 'AUFNR' appear side by side. I would ideally only want the 'Order' label to appear.
Is there a method through which I can suppress the labels?!
I am using the following classes as a part of the code:
DATA: l_ostream TYPE REF TO if_ixml_ostream,
l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_renderer TYPE REF TO if_ixml_renderer,
l_document TYPE REF TO if_ixml_document,
l_value TYPE string.
Would be much appreciated if someone could help me with this please. Thanks!
VijayHi,
recipent list is filled once,there are no loops in the program, and the SOST shows two same items with some have same time stamp and some have difference of a second.
Regards
Govind -
Hi All,
I have an XML output with 4 columns and 1 row. I would like my output to look like individual fields placed one below the other (as opposed to a tabular XML format). Can somebody tell me the different options I got? Appreciate it.
Regards,
V M.
Edited by: V M on Jul 21, 2008 9:50 PMHi,
You can also create your report as an HTML page.
In HTML format however you want to display your report you can do.
You can use BLS to write to the file and/or append to a string that builds up your HTML content. You create a "sub transactions" that take an xMII recordset and convert it to an HTML table in your main transaction.
Thanks,
Manisha -
Write CLOB XML output to a file on UNIX box (file size 32 K)
All,
Can someone give me a sample code of how to write a CLOB output in a CLOB variable (holds XML output generated from DBMS_XMLQUERY) to a text file on UNIX box?
I found on ask tom a technique which only write upto 32K length. My CLOB output is more than 32K.
from ASK TOM:
create or replace
procedure clob_to_file( p_dir in varchar2,
p_file in varchar2,
p_clob in clob )
as
l_output utl_file.file_type;
l_amt number default 32000;
l_offset number default 1;
l_length number default
nvl(dbms_lob.getlength(p_clob),0);
BEGIN
l_output := utl_file.fopen(p_dir, p_file, 'w', 32760);
while ( l_offset < l_length )
loop
utl_file.put(l_output,
dbms_lob.substr(p_clob,l_amt,l_offset) );
utl_file.fflush(l_output);
l_offset := l_offset + l_amt;
end loop;
utl_file.new_line(l_output);
utl_file.fclose(l_output);
end;
ThanksFortran and C strings are different. When passing a string to Fortran from C, you have to know the Fortran string's length, and pad the trailing part of the string with blanks (spaces). Modern C functions never write a string without a NUL terminator, so you cannot write directly to the Fortran string unless you ensure there is at least one extra character. My guess is that your output strings contain embedded NUL characters, which somehow causes problems in the file I/O routines, but not to stdout.
According to your C fread() calls, I am assuming that you use hard-wired lengths of len(nis)==15 and len(sys)==32.Here is an example that may work, (without the #includes). It is similar to yours, but blanks-pads the result starting from the first control or NUL character. It is also a subroutine (void result) because 'bit' was just returned uninitialized in your code. Like yours, there is no error checking, but NIS should end up all blanks if there is an error.
#define NIS_LEN 15
void operating_sys(char nis[NIS_LEN]) {
int i;
FILE *stream;
nis[0]=0;
stream=popen("/bin/nisdomainname","r");
fgets(string,sizeof(string),stream);
fread(nis,1,NIS_LEN,stream);
pclose(stream);
for (i=0;i<NIS_LEN;i++) {
if (nis<' ') {
memset(&nis[i],' ',NIS_LEN-i);
break; -
How to save xml output of fm into sap as xml
how to save xml output of fm into sap as xml
thank you,
regards,
Jagrut bharatkumar shuklaHi Jagrut
The XML document can be stored in an ABAP variable rxml of the type STRING or XSTRING, or in an internal standard table sxml of the elementary line type C. Hence, I believe, your issue with the lenght can be resovled with this types.
For rxml, you specify an interface reference variable of the type IF_IXML_OSTREAM that points to an IXML output stream.
For rxml, you specify an interface reference variable of the type IF_IXML_DOCUMENT that points to an IXML document.
With the stream factory you have several options. Before you call your CALL TRANSFORMATION, you setup your stream factory for these different options.
1. You want to write the file to the application server file system. You want to create your OSTREAM as a binary string. In this example b_xml is an empty binary string. OSTEAM will be the reference variable of tyep IF_IXML_OSTREAM.
ostream =
streamfactory->create_ostream_xstring( b_xml ).
You get the output lenght with the following:
ressize = ostream->get_num_written_raw( ).
You can then send the entire string to the file system with the following:
transfer b_xml to filename1 length ressize.
Also refer to this weblog:
/people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
Regards
Ravish Garg
<b>
*Remember reward points is the best way to say thank you :)</b> -
PLSQL - Output a long string to screen
I am trying to create an XML file, but I don't have FTP access on the server, only read rights.
So I need to output a long string on the screen.
By using the
DBMS_OUTPUT.PUT_LINE ('<Environment> ' || long_string_01 || long_string_02 || '</Environment>');
I get the 255 buffer error.
Whats the easiest way around it?
Thanks in advance everyone!
Edited by: 866635 on Aug 5, 2011 5:16 AMHi,
I agree with Mr Robertson.
SQL> SET SERVEROUTPUT ON SIZE 1000000
SQL> SET LONG 1000000000 LONGC 1000000000
SQL> set pagesize 200
SQL> select TO_CLOB('When I use a LONG setting smaller than the length of the TEXT column,
2 I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
3 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
4 When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
5 TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
6 result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
7 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
8 When I use a LONG setting smaller than the length of the TEXT column,
9 I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
10 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
11 When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
12 TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
13 result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
14 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
15 When I use a LONG setting smaller than the length of the TEXT column,
16 I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
17 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
18 When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
19 TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
20 result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
21 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
22 When I use a LONG setting smaller than the length of the TEXT column,
23 I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the
length of the TEXT column, I got it wrapped. When both are huge, it seems I am getting the expectin
g result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
24 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
25 When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the length of the
26 TEXT column, I got it wrapped. When both are huge, it seems I am getting the expecting
27 result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.sql ?
28 When I use a LONG setting smaller than the length of the TEXT column, I got it truncated.
29 When I use a LONG setting smaller than the length of the TEXT column,
30 I got it truncated. When I use a huge LONG setting but a setting smallerthe length of the TEXT
column, I got it wrapped. When both are huge, it seems I am getting ') from dual
31 /
TO_CLOB('WHENIUSEALONGSETTINGSMALLERTHANTHELENGTHOFTHETEXTCOLUMN,IGOTITTRUNCATED
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a LONGCHUNKSIZE setting s
maller than the length of the TEXT column, I got it wrapped. When both are huge,
it seems I am getting the expecting result. So why not setting SET LONG 2000000
000 LONGC 2000000000 in your login.sql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a huge LONG setting but a LONGCHUNKSIZE setting smaller than the leng
th of the
TEXT column, I got it wrapped. When both are huge, it seems I am getting the ex
pecting
result. So why not setting SET LONG 2000000000 LONGC 2000000000 in your login.s
ql ?
When I use a LONG setting smaller than the length of the TEXT column, I got it t
runcated.
When I use a LONG setting smaller than the length of the TEXT column,
I got it truncated. When I use a huge LONG setting but a setting smallerthe len
gth of the TEXT column, I got it wrapped. When both are huge, it seems I am gett
ing
SQL> -
R12 Check Printing Need XML output for seeded data definition--urgent
Hi--
I really need to get ahold of the XML output from the checks running off the data definition called "Oracle Payments Funds Disbursement Payment Instruction Extract 1.0" in Oracle R12 quickly--particulary the XML tag that holds the MICR string (should be the concatenation of Check Number, Routing and Acct number).
I found an entry here in the forums about running a query of:
SELECT XMLType.getClobVal(instruction)
FROM IBY_XML_FD_INS_1_0_V
WHERE rownum =1 ;
to get the entire XML output. I have an open SR but haven't really gotten anywhere with it yet.
However, all we get back is an error about datatype. Could someone please help out with this--it is quite urgent as I need to finish this last piece of the checks and work with the bank on formatting this week.
Thanks--I'd really appreciate any assistance!
KateSELECT XMLType.getClobVal(instruction)
INTO x_extract_doc
FROM iby_xml_fd_ins_1_0_v
WHERE payment_instruction_id = p_payment_instruction_id;
or you can use
SELECT document FROM iby_trxn_documents order by creation_date desc;
provided that the last run was urs. -
Hello all,
I have generated an XML output through Smartforms. Now I need to load this file into DMS . Please let me know how I can achieve this.
Thanks,
Kalyancheck this code and use it...
REPORT Z_RMTIWARI_XML_TO_ABAP_46C .
Load iXML Lib.
type-pools: ixml.
class cl_ixml definition load.
data: G_IXML type ref to if_ixml.
data: STREAMFACTORY type ref to if_ixml_stream_factory.
data: ISTREAM type ref to if_ixml_istream.
data: DOCUMENT type ref to if_ixml_document.
data: PARSER type ref to if_ixml_parser.
data: LV_FILE_URL type rlgrap-filename.
You should provide the parameter for file name
LV_FILE_URL = 'C:input_xml.xml'.
types: begin of XML_LINE,
DATA(256) type x,
end of XML_LINE.
types: begin of TY_HEADER,
CUST_NAME(20) type c,
CARD_NO(20) type c,
TAX_AMOUNT(10) type c,
TOTAL_AMOUNT(10) type c,
end of TY_HEADER.
types: begin of TY_ITEM,
ITEM_NO(4) type n,
ITEM_ID(20) type c,
ITEM_TITLE(50) type c,
ITEM_QTY(10) type c,
ITEM_UPRICE(10) type c,
end of TY_ITEM.
data: GV_HEADER type TY_HEADER.
data: GT_ITEM type standard table of TY_ITEM with header line.
data: XML_TABLE type table of XML_LINE,
XML_TABLE_SIZE type i.
The next step is creating the main factory for the iXML library:
G_IXML = cl_ixml=>create( ).
Now Create Stream Factory
STREAMFACTORY = G_IXML->create_stream_factory( ).
upload a file from the client's workstation
call function 'WS_UPLOAD'
exporting
filename = LV_FILE_URL
filetype = 'BIN'
importing
filelength = XML_TABLE_SIZE
tables
data_tab = XML_TABLE
exceptions
others = 11.
wrap the table containing the file into a stream
ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
size = XML_TABLE_SIZE )
Get the file data as Stream
*istream = streamfactory->create_istream_uri( public_id = lv_file_url
system_id = lv_file_url ).
Create XML Document instance
DOCUMENT = G_IXML->create_document( ).
Create parser Object
PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
ISTREAM = istream
DOCUMENT = document ).
Parse an XML document into a DOM tree
*parser->parse( ).
Parsing Error Processing
if PARSER->parse( ) ne 0.
if PARSER->num_errors( ) ne 0.
data: PARSEERROR type ref to if_ixml_parse_error,
STR type STRING,
I type i,
COUNT type I,
INDEX type i.
COUNT = PARSER->num_errors( ).
write: COUNT, ' parse errors have occured:'.
INDEX = 0.
while INDEX < COUNT.
PARSEERROR = PARSER->get_error( INDEX = index ).
I = PARSEERROR->get_line( ).
write: 'line: ', i.
I = PARSEERROR->get_column( ).
write: 'column: ', i.
STR = PARSEERROR->get_reason( ).
write: STR.
INDEX = index + 1.
endwhile.
endif.
endif.
Close the stream since it �s not needed anymore
call method ISTREAM->close( ).
clear ISTREAM.
Now try to make it look good
data : lv_size type sytabix,
lv_ret_code type sysubrc.
data: lo_xml_document type ref to cl_xml_document.
field-symbols: <fs_xml_data> type any table.
lo_xml_document = document.
call method lo_xml_document->get_as_table
importing
table = <fs_xml_data>
size = lv_size
retcode = lv_ret_code
*data: items type ref to if_ixml_node_collection.
*items = document->get_elements_by_tag_name( name = 'Item' ).
*data: iterator type ref to if_ixml_node_iterator,
node type ref to if_ixml_node.
*iterator = document->create_iterator( ).
*node = iterator->get_next( ).
*while not node is initial.
do something with the node
node = iterator->get_next( ).
*endwhile.
DATA : GV_NODE type ref to if_ixml_node.
DATA : GV_NODETEXT type STRING.
data: GV_FIRST_TIME.
GV_FIRST_TIME = 'X'.
GV_NODE = DOCUMENT.
GT_ITEM-item_no = 1.
perform GET_DATA tables GT_ITEM
using GV_NODE
changing GV_HEADER.
Last item is still not added.
append GT_ITEM.
write : GV_HEADER-cust_name,
GV_HEADER-card_no,
GV_HEADER-tax_amount,
GV_HEADER-total_amount.
loop at GT_ITEM.
write /:.
write : GT_ITEM-item_no,
GT_ITEM-item_id,
GT_ITEM-item_title,
GT_ITEM-item_qty,
GT_ITEM-item_uprice.
endloop.
FORM Get_data *
form get_data tables YT_ITEM structure GT_ITEM
using value(x_node) type ref to if_ixml_node
changing Y_HEADER type TY_HEADER.
data: INDENT type i.
data: PTEXT type ref to if_ixml_text.
data: STRING type string.
data: TEMP_STRING(100).
case X_NODE->get_type( ).
when if_ixml_node=>co_node_element.
STRING = X_NODE->get_name( ).
GV_NODETEXT = STRING.
when if_ixml_node=>co_node_text.
PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
if PTEXT->ws_only( ) is initial.
STRING = X_NODE->get_value( ).
case GV_NODETEXT.
when 'Customer'.
clear GV_HEADER.
when 'Name'.
move STRING to GV_HEADER-cust_name.
when 'Cardnum'.
move STRING to GV_HEADER-card_no.
when 'Tax'.
move STRING to GV_HEADER-tax_amount.
when 'Total'.
move STRING to GV_HEADER-total_amount.
Iteam details
when 'ID'.
move STRING to GT_ITEM-item_id.
when 'Title'.
move STRING to TEMP_STRING.
move TEMP_STRING to GT_ITEM-item_title.
when 'Quantity'.
move STRING to GT_ITEM-item_qty.
when 'UnitPrice'.
move STRING to GT_ITEM-item_uprice.
endcase.
endif.
endcase.
if GV_NODETEXT = 'Customer'.
clear GV_HEADER.
elseif GV_NODETEXT = 'Item'.
if GV_FIRST_TIME ne 'X'.
append GT_ITEM.
clear : gt_item.
GT_ITEM-item_no = gt_item-item_no + 1.
endif.
GV_FIRST_TIME = ' '.
endif.
Get the next child
X_NODE = x_node->get_first_child( ).
Recurse
while not X_NODE is initial.
perform GET_DATA tables GT_ITEM
using X_NODE
changing GV_HEADER.
X_NODE = x_node->get_next( ).
endwhile.
endform. -
Assigning a node value from an XML variable to a String type in Weblogic Process Integrator
Hi,
Is there any way to assign a node value from an XML variable to a String variable
in Weblogic Process Integrator...
Thanx.
Narendra.Nerendra
Are you talking about using Xpath on the XML document and assigning to a
variable, it is unclear what you are asking
Tony
"Narendra" <[email protected]> wrote in message
news:3bba1215$[email protected]..
>
Hi,
Is there any way to assign a node value from an XML variable to a Stringvariable
in Weblogic Process Integrator...
Thanx.
Narendra. -
Easiest and/or best methods for generating XML output (not with a report)
Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
Thanks for your feedback,
RyanWhat I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above? -
Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf
Hi,
I have a requirement to display output from a particular table in XL format. Out of all the known possible options, I am planning to use the XML publisher to generate XL output.
For the data source, instead of using the conventional way of creating XML data using rdf,I am planning to use DBMS_XMLGEN.getxmltype pl/sql procedure to generate the XML output. And from the output, call the template to generate the required Excel output.
Now, I am using the following code to generate XML output but am not sure how to proceed from here. I need to first print the XML data in the FND Output file after which I was planning to call the 'XML Report Publisher' (XDOREPPB) program and use the current request id to get the excel output but I am not able to find the way to print the XML data in the output file as:
fnd_file.put_line (fnd_file.output, l_xml_type); - is throwing an error as l_xml_type is an XML data output.
PROCEDURE xml_main (
errbuf OUT VARCHAR2
,retcode OUT VARCHAR2
,p_project_from IN VARCHAR2
,p_project_to IN VARCHAR2
AS
l_xml_type XMLTYPE;
BEGIN
SELECT DBMS_XMLGEN.getxmltype
('SELECT fnd_global.conc_request_id
,TO_CHAR (segment1)
,to_char(start_date,''MM/DD/RRRR'')
,to_char(xxmcc_project_details_pkg.current_profit_projection
(project_id),''999,999,990.90'')
,to_char(xxmcc_project_details_pkg.cost_to_date (project_id),''999,999,990.90'')
,''1''
FROM pa_projects_all
WHERE segment1 BETWEEN NVL (p_project_from, segment1)
AND NVL (p_project_to, segment1)')
INTO l_xml_type
FROM DUAL;
fnd_file.put_line (fnd_file.output, l_xml_type);
END xml_main;
Can anyone point me as to how to publish XML output using a PL/SQL procedure (DBMS_XMLGEN.getxmltype)
Thanks.Pl see if the example included in this presentation helps http://www.oracle.com/technology/products/applications/Events/OOW-2006/EBS/S281401_Sridhar_Bogelli.pdf
Also, you do not need to explicitly call XDOREPPB in later versions of XML Publisher. If you set up everything correctly (as described in the presentation above and the link below) the Output Post Processor is called automatically after the XML file is generated successfully.
Another excellent tutorial is at http://www.oracle.com/technology/obe/fusion_middleware/fusion/bi/xmlp_ebiz/index.html
HTH
Srini
Maybe you are looking for
-
I am not having any success in importing my videos from Sony Handycam DCR-DVD 650 to my mac book. I am using the USB connection. The macbook is not recognizing the camera. The macbook is running OSX 10.6.8. Any ideas on what the problem could be?
-
[svn:fx-trunk] 10943: Fix to dragging from List with multiple-selection
Revision: 10943 Author: [email protected] Date: 2009-10-08 15:46:27 -0700 (Thu, 08 Oct 2009) Log Message: Fix to dragging from List with multiple-selection - The fix is to postpone the selection commit until we make sure the user has not starte
-
Purchase order item text version management is not creating.
Dear sap professionals, I have an issue in item text as per customer need I created item text type as drawing number, the problem is when ever an user change drawing number review in text area system should create new version number, but in present
-
HT1338 can i upgrade my mac os by downloading on the internet?
CAN I UPGRADE MY MAC OS BY DOWNLOADING ON THE INTERNET?
-
PS 6 subscription vs. CC PS subscription
I have a PS 6 subscription. What I should do in order to upgrade it to Creative Cloud Photo Shop subscription? Actually I thought these are the same things but when I downloaded last version of Photo Shop Version 13.1.2x64 I did not find there "Shak