Convert FMB to XML File on Unix
Hello,
I want to convert a FMB-File to XML in my HP-UX-Middletier-Environment.The Script frm2xml.sh is only shipped with IDS.
Can someone upload the frmf2xml.sh from a linux or Solaris IDS-Enviroment?
Robert
So if we were to keep text-based source files, the process would have to be:
- check-out to local working copy
- convert XML to FMB
- make changes using Forms Developer
- convert FMB to XML
- commit to svn
I'm concerned about the side-effects of the conversion process (edge-cases, incompatibilities), and I also expect that even with some automation, the above will be a pretty slow process that will slow the team down. I guess we'll probably stick with fmb.
I guess as a compromise, it may be worthwhile generating the xml or fmt alongside the fmb and committing both. At least we'd then have a text-based file to compare revisions with. So the process then becomes:
- check-out to local working copy
- make changes using Forms Developer
- generate XML from FMB
- commit both to svn
I'm still baffled as to why Oracle has chosen a binary source format, even 15 years ago. This basically precludes a vast number of tools and techniques that are essential to the software craft :(
Similar Messages
-
Convert .fmb and .rdf files to .txt using unix commands
I want to know how to convert .fmb and .rdf files to .txt using unix commands
Example ACCT_ACCOUNTS_ADMIN.fmb ---> ACCT_ACCOUNTS_ADMIN.txt
agent_balances.rdf ---> agent_balances.txt
NOTE: i don't want to use form builder or report builder.
is there anyone who can help me
Regards
HarshThanks it helped and Just to add little bit on it
for i in `ls *.fmb`
do
f60gen module=$i userid=$unpw forms_doc=yes batch=yes
done
Might help someone too.
Thanks -
I am reading XML file from unix using :
FORM read_file USING p_name.
DO.
READ DATASET p_name INTO WXML_LINE LENGTH LENG.
ENDDO.
Then I am using subroutine below where I get a short dump at
case X_NODE->get_type( ).
FORM get_data tables Y_CAPXML structure GV_CAPXML
using value(x_node) type ref to if_ixml_node.
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 'NIIN'.
move STRING to GV_CAPXML-NIIN.
when 'FED_x0020_STOCK_x0020_CLASS'.
move STRING to GV_CAPXML-fed_stock_class.
when 'DODIC'.
move STRING to GV_CAPXML-dodic.
endcase.
The text for the short dump is : STACK_STATE_NO_ROLL_MEMORY
Can someone please explain what is it mean.
Thanks.May be this blog can help:
<a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach for Blog</a>
Sri -
Saving the XML File in Unix Filesystem
Hello,
Please let me know,
1) i have generated a XML File, Is there any Function Module to save the XML file in Unix File System .
2) How to send the XML file to a NON-SAP System using FTP Transfer .
Regards,
jvs
Edited by: jvsvijay on Dec 6, 2011 9:51 AM
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Dec 6, 2011 2:23 PMHi,
What I have done in the past, and seems to work, is execute an Interface or Procedure in simulate mode, choosing the agent that you would like to use in reverse engineering the XML. Then, attempt to reverse engineer the file again. Not sure if this will work, but it has for me at times. You might also try this and restarting ODI to clear out anything 'cached' in the JVM.
It seems ODI is caching the agent that you are using - but I'm not sure how to properly change it.
Regards,
Michael Rainey -
Convert ArrayList into XML file
Hi,
Can anyone tell me how to convert ArrayList to XML file and save that file.
ManojThere is an easy to understand example here:
http://totheriver.com/learn/xml/code/XMLCreatorExample.java.
You only have to replace Book objects from example with objects you need. -
Convert fmb and rdf files to fmt and rpt on unix
Hi,
I have to convert the all the fmb files under the Oracle Apps code tree to fmt.
Also, I have to convert all the rdf files to rpt.
I am doing this exercise to search for a particular string in the code of all forms & reports.
Is there any utility which help to do this conversion.
I am using Oracle E-business Suite installed on Sun Solaris server.
Thanks,
DRThanks it helped and Just to add little bit on it
for i in `ls *.fmb`
do
f60gen module=$i userid=$unpw forms_doc=yes batch=yes
done
Might help someone too.
Thanks -
Hi Guys,
I have a requirement to use an XML File as a data source, and the XML is made available in the Unix server where the agent is running. In ODI on my Windows machine, testing the connection of the XML “Data Server”, I get a successful test connection, and a DTD is created on the working directory (whenever it is missing). This means that, I do have access to write files in the working directory of Unix server.
However, the problem is encountered when I reverse engineer the XML to retrieve the structure of the file (located in Unix server) and make it in a datastore. It seems that during the “Reverse Engineer” process, ODI is using the local agent rather than J2EE agent (Unix server) that I have, thus it can’t “see” file, thus the error message: "ODI-40844: Could not generate the DTD because the file could not be created. Verify that you have write permission in the directory."
Unfortunately, I am not able to customize the Reverse Engineering process to use J2EE agent as there is no out of the box ODI Reverse Knowledge Modules for XMLs. Creating the structure (Datastore) of the XML manually in ODI under XML Technology does not solve the problem either, because ODI still sees the Datastore as a FILE Technology and not an XML Technology (Error: ODI-40426: Url must start with jdbc:snps:dbfile).
Please advise on how to reverse engineer a remote xml file. TIA.Hi,
What I have done in the past, and seems to work, is execute an Interface or Procedure in simulate mode, choosing the agent that you would like to use in reverse engineering the XML. Then, attempt to reverse engineer the file again. Not sure if this will work, but it has for me at times. You might also try this and restarting ODI to clear out anything 'cached' in the JVM.
It seems ODI is caching the agent that you are using - but I'm not sure how to properly change it.
Regards,
Michael Rainey -
Problem converting data in XML file to internal table data
Hi all,
I have a requirement. I need to convert an XML file to internal table data and based on that data do Goods Receipt in SAP.
With the help of this blog /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
I am able to convert the XML file to data in SAP. But this blog will display the output on screen as ELELEMNT = nodename VALUE= value of that node.
But I donu2019t want in that way, I want to store all the data in XML file in an internal table so that I can make use of those values and do Goods Recipt in SAP.
Can some one suggest how should I read the data in an internal table.
Here is my code..what changes should I make?
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
Validation of XML file: Only DTD included in xml document is supported
PARAMETERS: pa_val TYPE char1 AS CHECKBOX.
START-OF-SELECTION.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_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 = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_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.
Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
WRITE: /.
WRITE: /' DOM-TREE'.
WRITE: /.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
WRITE: / 'ATTRIBUTE:'.
WRITE: AT indent name COLOR COL_HEADING INVERSE, '=',
value COLOR COL_TOTAL INVERSE.
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
WRITE: / 'VALUE :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
Any help would be highly apperciated.
regards,
Jessica SamPavel Vera,
With your example i tries doing the following .....
I tried to convert the data of XML file to internal table data. I am collecting the data in internal table to do goos recipt with that data.
Please find my XML file, ABAP pgm and XSLT pgm . I donu2019t know what I am missing I am not getting any output. I donu2019t know what is wrong please help me with this
Below is my XML file, My code and XSLT Program. In the below XML file I need to collect Vendor Number, Order Number, and Date tags which occur only once for one XML file.
I also need to collect the following tags from <Shipmentdetail>
<Shipmentdetail> has following child nodes and I need to collect them
TrackingNumber
Freight
Weight
ShipmentDate
ShipmentMethod
Need to collect to collect the following tags from <ProductInformation>
<ProductInformation> has following child nodes and I need to collect them
LineNumber
SKUNumber
OrderedQuantity
ShippedQuantity
UOM
The <Shipmentdetail> and <ProductInformation> are child nodes of <OrderShipment>
The <Shipmentdetail> occurs only ones but the <ProductInformation> can occur once or many times and will be dynamic and differs depening on the input file.
My XML file is as follows
<?xml version="1.0" encoding="iso-8859-1" ?>
- <ShipmentHeader>
<AccountID />
- <OrderShipment>
<VendorNumber>1000</VendorNumber>
<OrderNumber>P00009238</OrderNumber>
<OrderType>Stock</OrderType>
<Company />
<Division />
<Department />
<Date>20061120</Date>
<CartonCount>2</CartonCount>
<ShipAllProducts>No</ShipAllProducts>
- <ShipmentDetail>
<TrackingNumber>1ZR3W891PG47477811</TrackingNumber>
<Freight>000000010000</Freight>
<ShipmentDate>20061120</ShipmentDate>
<ShipmentMethod>UPS1PS</ShipmentMethod>
</ShipmentDetail>
- <ProductInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000001000000</OrderedQuantity>
<ShippedQuantity>00000001000000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <ProductInformation>
<LineNumber>000000002</LineNumber>
<SKUNumber>938EN</SKUNumber>
<AdvSKUNumber>001 7294</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000000450000</OrderedQuantity>
<ShippedQuantity>00000000450000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
<CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
- </OrderShipment>
</ShipmentHeader>
My Program
TYPE-POOLS abap.
CONSTANTS gs_file TYPE string VALUE 'C:\temp\test.xml'.
* This is the structure for the data from the XML file
TYPES: BEGIN OF ts_shipment,
VendorNumber(10) TYPE n,
OrderNumber(20) TYPE n,
OrderType(8) TYPE c,
Date(8) TYPE c,
END OF ts_shipment.
TYPES: BEGIN OF ts_shipmentdetail,
TrackingNumber(30) TYPE n,
Freight(12) TYPE n,
Weight(14) TYPE n,
ShipmentDate(8) TYPE c,
ShipmentMethod(8) TYPE c,
END OF ts_shipmentdetail.
TYPES: BEGIN OF ts_productinformation,
LineNumber(9) TYPE n,
SKUNumber(20) TYPE c,
OrderedQuantity(14) TYPE n,
ShippedQuantity(14) TYPE n,
UOM(4) TYPE c,
END OF ts_productinformation.
* Table for the XML content
DATA: gt_itab TYPE STANDARD TABLE OF char2048.
* Table and work ares for the data from the XML file
DATA: gt_shipment TYPE STANDARD TABLE OF ts_shipment,
gs_shipment TYPE ts_shipment.
DATA: gt_shipmentdetail TYPE STANDARD TABLE OF ts_shipmentdetail,
gs_shipmentdetail TYPE ts_shipmentdetail.
DATA: gt_productinformation TYPE STANDARD TABLE OF ts_productinformation,
gs_productinformation TYPE ts_productinformation.
* Result table that contains references
* of the internal tables to be filled
DATA: gt_result_xml TYPE abap_trans_resbind_tab,
gs_result_xml TYPE abap_trans_resbind.
* For error handling
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Get the XML file from your client
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = gs_file
CHANGING
data_tab = gt_itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPMENT".
GET REFERENCE OF gt_shipment INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPMENT'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPDET".
GET REFERENCE OF gt_shipmentdetail INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPDET'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "IPRODDET".
GET REFERENCE OF gt_productinformation INTO gs_result_xml-value.
gs_result_xml-name = 'IPRODDET'.
APPEND gs_result_xml TO gt_result_xml.
* Perform the XSLT stylesheet
TRY.
CALL TRANSFORMATION z_xml_to_abap3
SOURCE XML gt_itab
RESULT (gt_result_xml).
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Writing the data from file for gt_shipment
*Collecting the Shipping Data from the XML file to internal table gt_shipment
*and writing the data to the screen
LOOP AT gt_shipment INTO gs_shipment.
WRITE: / 'VendorNumber:', gs_shipment-VendorNumber.
WRITE: / 'OrderNumber :', gs_shipment-OrderNumber.
WRITE: / 'OrderType :', gs_shipment-OrderType.
WRITE: / 'Date :', gs_shipment-Date.
WRITE : /.
ENDLOOP. "gt_shipment.
LOOP AT gt_shipmentdetail INTO gs_shipmentdetail.
WRITE: / 'TrackingNumber:', gs_shipmentdetail-TrackingNumber.
WRITE: / 'Freight :', gs_shipmentdetail-Freight.
WRITE: / 'Weight :', gs_shipmentdetail-Weight.
WRITE: / 'ShipmentDate :', gs_shipmentdetail-ShipmentDate.
* WRITE: / 'ShipmentMethod :' gs_shipmentdetail-ShipmentMethod
WRITE : /.
ENDLOOP. "gt_shipmentdetail.
LOOP AT gt_productinformation INTO gs_productinformation.
WRITE: / 'LineNumber:', gs_productinformation-LineNumber.
WRITE: / 'SKUNumber :', gs_productinformation-SKUNumber.
WRITE: / 'OrderedQuantity :', gs_productinformation-OrderedQuantity.
WRITE: / 'ShippedQuantity :', gs_productinformation-ShippedQuantity.
WRITE: / 'UOM :', gs_productinformation-UOM.
WRITE : /.
ENDLOOP. "gt_productinformation.
XSLT Program
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPMENT>
<xsl:apply-templates select="//OrderShipment"/>
</ISHIPMENT>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="OrderShipment">
<item>
<VENDORNUMBER>
<xsl:value-of select="VendorNumber"/>
</VENDORNUMBER>
<ORDERNUMBER>
<xsl:value-of select="OrderNumber"/>
</ORDERNUMBER>
<ORDERTYPE>
<xsl:value-of select="OrderType"/>
</ORDERTYPE>
<DATE>
<xsl:value-of select="Date"/>
</DATE>
</item>
</xsl:template>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPDET>
<xsl:apply-templates select="//OrderShipment/ShipmentDetail"/>
</ISHIPDET>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="ShipmentDetail">
<item>
<TRACKINGNUMBER>
<xsl:value-of select="TrackingNumber"/>
</TRACKINGNUMBER>
<FREIGHT>
<xsl:value-of select="Freight"/>
</FREIGHT>
<SHIPMENTDATE>
<xsl:value-of select="ShipmentDate"/>
</SHIPMENTDATE>
<SHIPMENTMETHOD>
<xsl:value-of select="ShipmentMethod"/>
</SHIPMENTMETHOD>
</item>
</xsl:template>
</xsl:transform> .
Any help is highly appreciated. If anyone encountered this situation before please let me know where i am going wrong in my XSLT transformation.
Any Help will be highly apppreciated. Thanks in advance
Regards,
Jessica Sam -
Help needed in converting Excel from XML file
Hi Can anyone help me in converting XML in to Excel.
Thanx,
Ananth.well, that still isn't much to go off of. I give it a try though.
I guess you want to parse out the relevent data out of the xml file and then decide on your favorite delimated file format for Excel. Two popular formats are comma delimated:
"info1","info2","info3","info4"
and tab delimeted:
info <tab> info2 <tab> info3 <tab> info4
Excel should be able to unsestand either of these formats. -
Script to convert metadata to xml file - Bridge CS6/InDesign CS6
I need a script that will convert metadata in Bridge to an xml file I can import into InDesign so that when I export long documents the alt text for photos is already included with the images.
Two problems -
1) I need the scripting for dummies version - from step 1 to end. I have zero experience with using scripts, as in - did not know they existed until a few days ago.
2) If the script needs adapted - see #1; there is very little hope that I will have any idea of how to do that without assistance.
I will be grateful for any assistance!! I do want to learn how to do this, if I can.I need a script that will convert metadata in Bridge to an xml file I can import into InDesign so that when I export long documents the alt text for photos is already included with the images.
Two problems -
1) I need the scripting for dummies version - from step 1 to end. I have zero experience with using scripts, as in - did not know they existed until a few days ago.
2) If the script needs adapted - see #1; there is very little hope that I will have any idea of how to do that without assistance.
I will be grateful for any assistance!! I do want to learn how to do this, if I can. -
Regd: Converting Data in XML file
Hi All,
We hav a requirement to convert the data from Internal table into a XML file.
The scenario is we hav developed a program to download the data in XML format,the problem is when the file is converted inot XML format its giving erreor that
<b>The XML page cannot be displayed
End tag 'KUN' does not match the start tag 'KUNNR'. Error processing resource 'file:///C:/TEST.xml'. Line 2, Position 1712
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><IT_XML_OUT><item><VBE...</b>
The code is specified below for understanding.
TBALES DECLARATION
TABLES: VBAK, "Sale Order Header
VBAP, "Sale Order Item Data
VBEP, "Schedule Line Data
KNA1, "General Data in Customer Master
VBRP. "Billing Document Item Data
TYPES DECLARATION
TYPES : BEGIN OF TY_SOSTATUS,
KUNNR LIKE VBAK-KUNNR, "Customer Number
NAME1 LIKE KNA1-NAME1, "Customer Name
BSTNK LIKE VBAK-BSTNK, "Customer P.O.
BSTDK LIKE VBAK-BSTDK, "Customer P.O. Date
VBELN LIKE VBAK-VBELN, "Sale Order Number
ERDAT LIKE VBAK-ERDAT, "Sale Order Date
POSNR LIKE VBAP-POSNR, "Sale Order Line Item
MATNR LIKE VBAP-MATNR, "Material Number
ARKTX LIKE VBAP-ARKTX, "Material Description
KWMENG LIKE VBAP-KWMENG, "Sale Order Quantity
VRKME LIKE VBAP-VRKME, "Unit of Measurement
EDATU LIKE VBEP-EDATU, "Sale Order Schedule Date
FKIMG LIKE VBRP-FKIMG, "Despatch Quantity
GBSTA LIKE VBUP-GBSTA, "Overall Sale Order Status
PNDQTY TYPE I,
END OF TY_SOSTATUS.
TYPES : BEGIN OF TEMP_DISP,
VBELN LIKE VBAK-VBELN,
AUART LIKE VBAK-AUART,
ERDAT LIKE VBAK-ERDAT,
KUNNR LIKE VBAK-KUNNR,
BSTNK LIKE VBAK-BSTNK,
BSTDK LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE VBAP-KWMENG,
VRKME LIKE VBAP-VRKME,
END OF TEMP_DISP.
DATA: XML_OUT TYPE STRING.
INTERNAL TABLE DECLARATION
DATA : IT_SOSTATUS TYPE STANDARD TABLE OF TY_SOSTATUS
WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
DATA : IT_TEMP TYPE STANDARD TABLE OF TEMP_DISP
WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
DATA : BEGIN OF IT_XML_OUT OCCURS 0,
A(1500) TYPE C,
END OF IT_XML_OUT.
SELECTION SCREEN DECLARATION
SELECTION-SCREEN BEGIN OF BLOCK SOBLOCK WITH FRAME.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
S_ERDAT FOR VBAK-ERDAT,
S_AUART FOR VBAK-AUART,
S_WERKS FOR VBAP-WERKS.
SELECTION-SCREEN END OF BLOCK SOBLOCK.
START OF SELECTION
SELECT SVBELN SAUART SERDAT SKUNNR SBSTNK SBSTDK
LPOSNR LMATNR LARKTX LKWMENG L~VRKME FROM VBAK AS S
INNER JOIN VBAP AS L
ON SVBELN = LVBELN
INTO CORRESPONDING FIELDS OF TABLE IT_TEMP
WHERE S~AUART IN S_AUART AND
S~ERDAT IN S_ERDAT AND
L~WERKS IN S_WERKS .
CALL TRANSFORMATION (`ID`) SOURCE IT_XML_OUT = IT_TEMP[] RESULT XML XML_OUT.
CALL FUNCTION 'SOTR_SERV_STRING_TO_TABLE'
EXPORTING
TEXT = XML_OUT
FLAG_NO_LINE_BREAKS = 'X'
LINE_LENGTH = 65000
LANGU = SY-LANGU
TABLES
TEXT_TAB = IT_XML_OUT[].
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'C:\TEST.xml'
TABLES
data_tab = IT_XML_OUT[].
Is there any other way to process this and download in XML format.
Help and Suggestions will be much Appreciated.
Thanks & Regds.
Ramesh.Hi ramesh,
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.
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = 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. -
Hi Guys,
I need to generate the XML from Excel file. The XML file will have the definition like this:
<people_list>
<name>Fred Bloggs</name>
<birthdate>27/11/2008</birthdate>
<gender>Male</gender>
</people_list>
The Excel file will look like this:
A B C
1 Fred Bloggs 10/21/2008 Male
2 ABC 12/23/2008 Female
3 XYZ 07/16/2008 Male
All the values in name,birthdaye,gender will come from the Excel file. I am having 100 rows in the Excel file with the data and I want to parse this excel file and create the XML file with the above template.
Any ideas how to do this?
Thanks,
MaheshHi Mahesh,
there are tons of ways to do what you need. It all depends on how your workflow is organized and how complicated it may become.
Alternative 1:
Export your Excel file as a cvs and convert cvs to XML (which shouldn't be so hard).
Pro: Relative easy transformation.
Con: Every time you want to convert the Excel file to XML you first needs to export it out of Excel by a manual step.
Alternative 2:
Save you Excel file as XML (e. g. the new *.xslx documents) and transform it as you like.
Pro: Very clean way to do this. You can access the single source Excel file directly from Java. No further steps needed.
Con: It's very very hard to program because the Excel xml structure is ridiculously complex.
Alternative 3:
You can create a little Excel VBA Script which generates the XML File.
Pro: Easy programing.
Con: Needs some experience in Visual Basic 6 programming.
Alternative 4:
Use http://jexcelapi.sourceforge.net/ or any other Excel-API to Access the Excel application out of Java.
Pro: Clean way to do it. You need no further manual actions to prepare something. (maybe the most flexible and at the same time easyest way)
Con: Additional license.
Best Wishes
esprimo -
Hi all
I want a sample procedure in which i would to like to fetch data and save the output to a XML File.
Someone please help me in giving me the sample procedure.
Regds
Nirmalsee this link, may be it will help
http://blog.oraclecontractors.com/?p=147
Well that shows you how to extract data on the database as XML, but it doesn't show how to output it to a file.
I'll give a hint. If you have your data as an XMLTYPE you can convert it via CLOB to and XMLDOMDocument type (as in the DBMS_XMLDOM package). Once you have an XMLDOMDocument you can use one of the DBMS_XMLDOM procedures to write out the XML to a file...
DBMS_XMLDOM.WRITETOFILE(
doc IN DOMDOCUMENT,
filename IN VARCHAR2);
;) -
Hi ,
Can anyone help me in converting a JTree to XML file.
The Jtree is build from an xml file, the user can add, delete nodes in JTree and save to the xml file. Is there any way I can update the same xml file.
Suggestions are greatly appreciated.
Thanks,
SS..Hi ,
Can anyone help me in converting a JTree to XML file.
The Jtree is build from an xml file, the user can add, delete nodes in JTree and save to the xml file. Is there any way I can update the same xml file.
Suggestions are greatly appreciated.
Thanks,
SS.. -
Read XML File on Unix from PL SQL
Hi,
How to read XML file placed on Unix Dir .
If file name is yx.xml and file contain below data. Please let me know how to read
column values such as AutomatedTransferOrders uniqueId="11761:234570"
2)Cto Type = CTO
3)Description = Test PIP
<AgileData xsi:schemaLocation="http://www.oracle.com/ http://www.oracle.com/technology/products/applications/xml/aXML.xsd">
<AutomatedTransferOrders uniqueId="11761:234570">
<CoverPage>
<CtoType>CTO</CtoType>
<CtoNumber>CTO00069</CtoNumber>
<Description>Created by subscriber DBA Program Prototype Change Subscriber.</Description>
<Status>Released</Status>
<Workflow>Default CTOs</Workflow>
<Subscriber>DBA Program Prototype Change Subscriber</Subscriber>
<DateOriginated>2012-03-15T00:29:10Z</DateOriginated>
<DateReleased>2012-03-15T00:29:11Z</DateReleased>
</CoverPage>
<SelectedObjects referentId="6000:6243458">
<Type>Program Change Order</Type>
<NameNumber>PG0000038</NameNumber>
<Description>Test PIP</Description>
<LifecycleStatus>Released</LifecycleStatus>
</SelectedObjects>
</AutomatedTransferOrders>
</AgileData>
Appreciate your help.
Thanks and Regards,
Abhisample
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
Connected as apps
SQL>
SQL> with t as
2 (select xmltype('<AgileData>
3 <AutomatedTransferOrders uniqueId="11761:6243470">
4 <CoverPage>
5 <AtoType>ATO</AtoType>
6 <AtoNumber>ATO00069</AtoNumber>
7 <Description>Created by subscriber BDA Program Prototype Change Subscriber.</Description>
8 <Status>Released</Status>
9 <Workflow>Default ATOs</Workflow>
10 <Subscriber>BDA Program Prototype Change Subscriber</Subscriber>
11 <DateOriginated>2012-03-15T00:29:10Z</DateOriginated>
12 <DateReleased>2012-03-15T00:29:11Z</DateReleased>
13 </CoverPage>
14 <SelectedObjects referentId="6000:6243458">
15 <Type>Program Change Order</Type>
16 <NameNumber>PG0000038</NameNumber>
17 <Description>Test PIP</Description>
18 <LifecycleStatus>Released</LifecycleStatus>
19 </SelectedObjects>
20 </AutomatedTransferOrders>
21 <ChangeOrders uniqueId="6000:6243458">
22 <Workflow>
23 <StatusCode>Process is moved forward</StatusCode>
24 <WorkflowStatus>Pending</WorkflowStatus>
25 <Workflow>BDA Program Prototype Workflow</Workflow>
26 <StatusChangedBy>Gay Groce (ggroce)</StatusChangedBy>
27 <LocalClientTime>2012-03-15T00:29:11Z</LocalClientTime>
28 </Workflow>
29 <Workflow>
30 <StatusCode>Process is skipped</StatusCode>
31 <WorkflowStatus>PD Approval</WorkflowStatus>
32 <Workflow>BDA Program Prototype Workflow</Workflow>
33 <StatusChangedBy>Gay Groce (ggroce)</StatusChangedBy>
34 <LocalClientTime>2012-03-15T00:29:11Z</LocalClientTime>
35 </Workflow>
36 <Workflow>
37 <StatusCode>Current Process</StatusCode>
38 <WorkflowStatus>Released</WorkflowStatus>
39 <Workflow>BDA Program Prototype Workflow</Workflow>
40 </Workflow>
41 <Workflow>
42 <StatusCode>Future Process</StatusCode>
43 <WorkflowStatus>Implemented</WorkflowStatus>
44 <Workflow>BDA Program Prototype Workflow</Workflow>
45 </Workflow>
46 </ChangeOrders>
47 </AgileData>') col
48 from dual)
49 --
50 select x.*
51 from t,
52 xmltable('AgileData/ChangeOrders/Workflow'
53 passing t.col
54 columns StatusCode varchar2(100) path 'StatusCode',
55 WorkflowStatus varchar2(100) path 'WorkflowStatus',
56 Workflow varchar2(100) path 'Workflow',
57 StatusChangedBy varchar2(100) path 'StatusChangedBy',
58 LocalClientTime varchar2(100) path 'LocalClientTime') x
59 /
STATUSCODE WORKFLOWSTATUS WORKFLOW STATUSCHANGEDBY LOCALCLIENTTIME
Process is moved forward Pending BDA Program Prototype Workflow Gay Groce (ggroce) 2012-03-15T00:29:11Z
Process is skipped PD Approval BDA Program Prototype Workflow Gay Groce (ggroce) 2012-03-15T00:29:11Z
Current Process Released BDA Program Prototype Workflow
Future Process Implemented BDA Program Prototype Workflow
SQL>
Maybe you are looking for
-
HP Officejet pro 8500 A910 won't print wirelessly
"An error has occurred. (devInfoPage-503)". I've had my Officejet pro 8500 A910 for less than 6 months. It was an easy set up and printed and scanned perfectly for at least 2 months. I use a wireless connection from my laptop which is running Win
-
Is it possible to have two at selection-screen events in a program
Hi all, I have a selection screen wherein i am using i have 5 radiobuttons and 3 select-options and a parameter. I am trying to use two at selection-screen events 1) at selection-screen on radiobutton group rad1. 2) AT SELECTION-SCREEN ON VALUE-
-
Magic Trackpad won't connect to new MacBook Air
I'm running OS X Yosemite 10.10.1 on a new 13-in MacBook Air. My Magic Trackpad shows up under the Bluetooth menu bar but won't connect when I click on connect. When I go to Bluetooth preferences, it doesn't appear in the list of devices and when I
-
Error in Timeline Viewer, Affecting Overall Project
Hello, I'm using the most updated version of FCP 6. Yesterday I encountered a problem in which the audio already placed in a sequence (and subsequently a timeline) does not playback, as if the audio clips are missing (dead silence, even with linked v
-
Xperia M4 Dual auto SIM selection for hands-free calls
When using my hands-free kit in my car to dial a number, I have to select which SIM I want to use from the phone screen, which is dangerous and not really hands-free. How could I configure the phone so it dials from the same SIM when I'm using a Blue