Smartform xml output
Hello Frnds,
Actually I want to store the output of the smartformx xml output in a file.
I am able to see it in spool ... but how to get it into a file ?
How & where to ser port type FILE.
Thanks & Regards
Hi ,
Check this thread, may be it helps you
xml output from smartforms
smartform output
Re: FB_CONVERT_FORM_TO_XML ?
Re: XML OUTPUT
http://help.sap.com/saphelp_nw04/helpdata/en/6c/28923c114011d5b675006094192fe3/frameset.htm
Regards,
Raghav
Message was edited by:
Raghavendra L
Similar Messages
-
Smartform XML output stored in which table?
Hi Folks,
I wanted to know the table where SAP stores the XML output of a Smartform...
If not tables , please let me know where the output is stored....
Thanks
ReddyHello Reddy,
I suppose you are you calling Smartform execution with this kind of call (more or less):
CALL FUNCTION v_fm_name
EXPORTING
ARCHIVE_INDEX = s_archive_index
ARCHIVE_INDEX_TAB = s_archive_index_tab
ARCHIVE_PARAMETERS = s_archive_params
CONTROL_PARAMETERS = s_control_param
MAIL_APPL_OBJ = s_mail_appl_obj
MAIL_RECIPIENT = s_mail_recipient
MAIL_SENDER = s_mail_sender
OUTPUT_OPTIONS = s_output_options
USER_SETTINGS = 'X'
LV_SALES = p_sales
LV_PADDR = v_address_num
LV_ADRNR = v_adrnr
LV_EQUNR = v_equnr
LV_SERNR = v_sernr
IMPORTING
DOCUMENT_OUTPUT_INFO = s_doc_output_info
JOB_OUTPUT_INFO = s_job_output_info
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
You can get the document XML in the IMPORTING parameter JOB_OUTPUT_INFO, for example to download the XML document you can do something like this:
LOOP AT s_job_output_info-xsfdata INTO xsf_line.
l_line = xsf_line.
APPEND l_line TO l_table.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\temp\test.xml'
TABLES
data_tab = l_table.
I am not sure the data is stored internally in any databse table (in addition to be return in the JOB_OUTPUT_INFO parameter). -
Hello,
My requirement is to create xml file from a smartform and iam able to do that fine but iam not sure how to create XSL file to view the xml output.
Thanks for your help.H Friend,
In Smartform, from Form Attributes -> Output Options -> Output Format you can choose either XSF format or XSD formt.
Please press F1 and read documentation.
Hope it will help you.
Regards
Krishnendu -
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. -
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 -
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 -
When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
Does any one knows the answer please advice?Hello,
This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
MHTML and XHTML are more verbose formats than binary .xls.
It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file). This is a known limitation of RTF layout templates.
BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
Bogdan -
How to create a xml output in report 2.5
Hi
Please Anyone using reports 2.5 and trying to
implement XML outputsolutions ?? I have some
oracle reports that need to produce XML output
I know that 6i supports XML output. i dont know
how to do in 2.5. If anyone has done anything similar
to this, I'd be interested in hearing different solutions?
Thanks,
Parthi[ajayubbott],
I am not sure if you should create another folder to house all your servlets when using Java Web Server 2.0.
The servlet invoker of Java Web Server 2.0 looks at the <server_root directory>/servlets/ directory as the root servlet directory by default and any servlets that is housed under this directory is monitored by the custom class loader provided by Java Web Server 2.0.
This custom class loader will automatically reload any serlvet class files that are modified i.e. a newer version of the servlet that is newly compiled e.g. change in functionality. What this means is that you don't have restart the web server to reload any new version of the existing servlets on the web server.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
How to create a errortag in the XML-Output ?
Hey
who can help me creating a error-tag in my XML-output of a PL/SQL procedure ?
Enviroment:
Oracle DB is 8.1.7 with installed XDK-package (in a few
weeks perhaps Oracle 9i). I've no problems to use the dbms_xmlquery-functions and -procedures.
I've to develop a PL/SQL procedure which is called via JDBC from a JAVA program. The procedure execute a Select-Statement. The result is transformed in XML and stored in a CLOB, which is given back to the calling JAVA-program.
There exist 2 possible result-situations.
-1- one or more rows are found
-2- no row is found
Problem:
For each of these situation the XML-Output should have a different structure and my main problem is to integrate the errortag !!!
for -1-
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<error err_code="NoError"/>
<record num="1">
</record>
<record num="2">
</record>
</data>
for -2-
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<error err_code="NoDataFound"/>
</data>
Hope somebody can help me ???
AndreHey Rajat,
thanks for your answer, but the errortag is needed by another department. They use it for their processing.
Have you got any idea, how to integrate the errortag with the functions or procedures of the dbms_xmlquery package ??? I've got only a few days experience with the dbms_xmlquery-package, so some code examples or advices would be great !!!
I've tried the following coding:
out_xmlresult OUT CLOB; -- OUT Parameter of the PLSQL-Proc
c1 CLOB;
queryctx dbms_xmlquery.ctxtype;
-- create XML-context
queryctx:=dbms_xmlquery.newcontext(<selectstatement>);
-- delete the rowsettag (use 'data' later on)
dbms_xmlquery.setrowsettag(queryctx,'');
-- create new tag 'data' which enclose an empty header
-- and the data section
dbms_lob.createTemporary(c1, TRUE );
c1:=EMPTY_CLOB();
dbms_xmlquery.setDataHeader(queryctx,c1,'data');
-- rename rowtag
dbms_xmlquery.setrowtag(queryctx,'record');
-- set encoding tag
dbms_xmlquery.setEncodingTag(queryctx,'ISO-8859-1);
-- create XML-Output
out_xmlresult := dbms_xmlquery.getxml(queryctx);
...but I haven't got any success !!!
Andre -
Report XML output fail to load into .RTF layout [EBS r12]
Hi,
In EBS r12, we have requirement to have a standard report output in excel.
I got the report's xml output to create the xml template (.RTF layout) using BI Publisher.
I created the .RTF layout and it works fine on my laptop using Bi Publisher.. the xml loads into it and i can preview xml data on layout with all format (Excel, PDF...)
I uploaded the layout to EBS, and assigned it to the standard report.
I changed standard report out put to XML
When i go to submit report request, the template is assigned with report and everything seems correct.
[See screen shot: http://img35.imageshack.us/i/xmlt.jpg/]
But after i run the report.
The report is Completed with Warning status.. and output is only XML with Error message :
This XML file does not appear to have any style information associated with it. The document tree is shown below.
The Log file says :
Executing request completion options...
------------- 1) PUBLISH -------------
Beginning post-processing of request 2350601 on node CLONE at 13-APR-2011 09:03:47.
Post-processing of request 2350601 failed at 13-APR-2011 09:03:48 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
------------- 2) PRINT -------------
Not printing the output of this request because post-processing failed.
Finished executing request completion options.
Why this is happening ? i have done this many times with other standard reports and it worked fine.
Please advise.
Standard Report: Supplier Aging Report
EBS : 12.1.1please check the log file and post the output here
How to find OPP log file?
To investigate on XML issues or other publishing problems, often the OPP logfile is needed.
OPP stands for Output Post Processor. Below are the steps to find log file
1. Login to the application as SYSADMIN
2. Responsibility: System Administrator
3. Function: Concurrent --> Manager --> Administration
4. Select the Output Post Processor
5. Click on the Processes button
6. Select the Concurrent Process which was active during the time that the request ran
7. Click on the Manager Log button to open the Output Post Processor log file -
How to generate PDF from XML output without XML publisher
Hi,
I am facing a problem while splitting the rdf generated XML output.
Problem Description:
I have a oracle invoice report which runs once every day (scheduled program). This report fetches me the invoices generated on that day and needs to be Mailed / Faxed to the customers.
So i developed the report in such a way that it generates the output order by customers...since the output generated will be as one .out file in APPLCSF/out directory...the .out file needs to be splitted by customers, for which i have written a cursor which takes the data of the main query and submits that many requests as many as customers are there.....There is a possibility of having 1000 customers per day also. If that is the case then my main program will fire that many requests.
Is there a different approach......any inputs are highly appreciated.
Also, i am generating the output in XML format. Is there a way from which i can directly generate a PDF from that XML output rather using any other tool.
Thanks & Regards,
Lakshmi Kalyan Vara Prasad.Hi,
with Reports Bursting and the defined "distributions" it's possible to have one report splittet to several parts with different receipients. Have a look at http://download-uk.oracle.com/docs/cd/B14504_01/dl/bi/B13673_01/pbr_dist.htm.
With xsl-fo it's possible to create pdf out of xml ... that's what xml publisher is doing.
Regards
Rainer -
Generating and Viewing XML Output without rdf
Howdy,
I have been dev Oracle Forms/Reports for over 10 years. We are now migrating all of our reports to BIP.
To date when I have been developing these reports I have been using the old rdf files to "generate to a file" and thus get a nice, quick and dirty XML output file (what I am calling a “datafile”). Using this makes it substantially easier to then dev the format template. However going forward I/we would like to completely remove the Designer 2000 tool entirely when it comes to report development.
How can we as developers can get our hands on the XML "datafiles" that are generated by the data templates in BIP? Are these stored anywhere on the server for the viewing? Is there another tool I can pop my Data template and SQL into and generate XML ‘with’ the correct groupings, ect.?
Thanks in advance for any assistance/guidance you can provide.
ScottCOr, from the browser see Note:394631.1
1.Using System Administrator responsibility
Nav:Profile->System
query Viewer: Text, set this to Browser and save
2. Using your Receivables responsibility
Run the the XML report that is failing, note the request_id
when it finishes, even with errors do this,
View->Requests
query this request_id
click on Diagnostic button->View XML
save the file to your PC by doing File->Save As
3. Upload this XML data file. -
How to send job postings to multiple third party sites using the XML output
Dear Friends,
We are Implementing Irecruitment for our client, Client requirement is how can we send job postings to multiple third party sites using the XML output from i-Recruitment
With regards
Surya
.Can you be more specific about your Requirement. In General, Please navigate to iRecruitment Recruiter Responisbility.
Then Select, Setup > Recruiting Sites. Here, you can configure your Third Party Websites information and attach stylesheets. The default mode oracle sends the vacancy information is HR-XML Format.
If you would like to select more sites information select "Add Another Row".
Then, you can see this information while "New Vacancy Creation Process".
iRecruiter.
Edited by: iRecruiter on Oct 18, 2009 7:43 AM -
How to calculate number of data records in a XML output file
Hi,
After generating a XML output file from Oracle Reports, I want to calculate number of records in the XML file. Is it possible? Specifically, I want to calculate number of records for a group variable ( organization_id, which I use for bursting).
Thanks for the help.Thanks BIPuser. It is useful for me.
I can use this xsl function within the template. However, I'm also looking to print this in the concurrent request log file. So, outside of rtf template, id there any PL/SQL based XML functions I can use to count the number of records.
Thanks.
Maybe you are looking for
-
Delete songs from itunes library
Hi, Can anyone tell me how to delete songs from the itunes library? The DELETE option is greyed out on the edit tab. Many thanks, Pete
-
'Query not returning string values as expected
Hi Why would this be happening? I have an insert statement that looks like this; UNION ALL SELECT '59','','last','first','','','','WILLIAMTA','BEB92C5B52566E6594707C69729624BE','','','Senior Officer','Town Name','2','','SUSTAINABLE FOREST MANAGEMENT
-
Should Gapless work when I have Shuffle enabled?
Hi- I've been messin' around with the new Gapless feature of iTunes 7 and can't seem to get it to work. After beatin' my head against the wall, I realized I had better make sure I understand correctly how it's supposed to work. I guess what I'm askin
-
Hi, I want to send emails in html-format. However, some clents can't decode html, but includes the message as an attachment. In this case I would like to have a text that tells the reciever to open the attachment. I have tried to laborate with Conten
-
Checkbox as one of the field in the internal table in the list
Hi, I have a requirement of processing the certain records of the internal table for which checkboxes are selected in the list. The selected records need to be updated in the custom table and the unselected records need to be ignored. I have created