Convert Arbortext XML files to RoboHelp
We are converting XML files from Arbortext to RoboHelp. Does anyone know how to conver the files? We would like to import or convert the files and remove the XML code Arbortext automatically adds to the files.
Thanks! Sandy
Are you talking about the XML comment Arbortext puts into the top of the document or the Processing Instructions?
If the first, Arbortext does insert an XML Comment at the top of the file. XML Comments do not affect the XML content and this should not affect your processing. For example, if you import DITA files created in Arbortext into TCS 4 or 5, they open and process just fine. I've had no problems importing Arbortext XML into TCS4 and exporting files via RoboHelp.
If you're talking about the processing instructions, they are unnecessary to retain and very easy to remove via a setting in Tools Preferences. The instructions to turn off Processing Instructions are here: http://blog.single-sourcing.com/2010/08/pesky-pis/
Similar Messages
-
Steps in converting a xml file with an rtf template to a pdf
Hey all,
What are the steps in converting a xml file with an rtf template to a pdf using XML Publisher from command line.
Thanks
RaviI don't have any code to do exactly what you wish, but it shouldn't be too difficult and http://www.dadhi.com/2007/06/generate-and-store-pdf-file-in-same.html is a good starting point.
Paul -
Does anyone know how to convert an XML file to a readable file?
All,
I have been using an APP called "SMS Backup & Restore" to backup my message conversations to my Laptop PC. It works fine BUT the backup file, once in my PC, has an XML extent such as "filename.XML"
I would like to read and/or print and/or save the text message file so does anyone know how to convert the XML file to something else so it shows all the messages without all the formatting instructions.
When I try to see the XML file it shows all the formatting. If I replace the .XML with .TXT that too shows all the formatting mixed in with the text message narrative.
When I look at the XML file in SMS Backup & Restore in the Charge phone it looks great showing all the messages just as they were on the phones display. The problem with this is that there is no way to print or read or save the messages as they appear in the file from the phone itself. I tried screen capture but if you have, let's say, a 28 message conversation you have to do 7 or 8 screen captures to get them all.
If only I could convert the XML in my PC to something that is printable or savable or readable that would be the "cats meow."
Anyone know how???
JerryF
PS, You might take a look at my related post.
https://community.verizonwireless.com/message/809832#809832Ann154,
You were correct again. I deleted everything I had done to date and re-did the entire SMS backup of my 28 message conversation again and YES I was able to open it using IE-8. It looks great and it prints great and life is good! I am going to go make a donation.
Thanks again for the help. I marked this thread as answered by you.
JerryF -
HOW TO CONVERT A XML FILE TO HTML FILE FORMAT IN WINDOWS APPLICATION
Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
file. Now i stucked how to write the code for converting to html format.
Thanks and Regards,
Dileep.Hi iam a fresher iam working on a project in that i should convert the data in xml file to html file. I dont have any idea regarding this can anyone help me how to convert the xml file to a html file format. I just written the code till how to read the xml
file. Now i stucked how to write the code for converting to html format.
Thanks and Regards,
Dileep.
Hello,
For converting xml file to html, we could refer to the way shared in the following thread which uses an XSLT stylesheet to transform the XML into another format using the
XslTransform class.
http://www.codeproject.com/Articles/12047/How-to-Convert-XML-Files-to-HTML
Regards.
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Can't convert stack XML file using report RPT_MOPZ_COPY_STACK for upgrade
Hello Colleagues/ SAP Experts,
Here is a background. 2 weeks ago, we have generated an XML stack file using MOPZ in solman 7.1 for the following systems (P6D which is DEV,
P6Q which is quality, P6R which is regression and P1P which is production). We were at our technical cutover rehearsal phase and the system that we were rehearsing was P6R. But AFTER our technical cutover, a new java component, which is seeburger as2 adapter, was installed in P1P, PRODUCTION. Thus, the landscape of P1P has changed as a new component was introduced and we believe that the generated XML file 2 weeks ago will no longer be valid for P1P. Instead of generating another xml file thru mopz for P1P, we would like to use report RPT_MOPZ_COPY_STACK_XML to convert the XML file OF P6R to map it toP1P. I have uploaded P6R XML and the target is P1P. So as you can see, P6R XML (source) --> P1P target.
Actions already done are the following:
1) Fulfilled and followed the resolution in note: 1711612
RPT_MOPZ_COPY_STACK_XML Report Troubleshooting
2) SAP-OSS is working in SM59
Basically, program RPT_MOPZ_COPY_STACK does not convert the Regression system's xml to the target, which is production. Kindly see attached screenshot. *the screenshot shows only 1 component in error but upon clicking the 'next difference' button, it will still show other components. I have checked my lmdb settings, will there be workaround for the issue?
Regards,
MeinardHello Divyanshu Srivastava / Reagan Benjamin ,
Thank you for your replies. Yes I noticed that a new higher patch for one java component was already present when I have regenerated recently for production using mopz. Anyways, SAP has returned a message wherein they edited the xml file themselves. Most of errors were eliminated only error was kernel versions was not matched. We need to upgrade kernel of our production and test if it works. Hopefully it will. Thanks though at first we did not edit the xml as according to one sap note I read it will not be supported by SAP. Closing this thread now -
My "itunes library" folder is empty. My libray music (prior to upgrading itunes) is now in an .xml file in my itunes location under my music. How do I extract/convert this .xml file to a Itunes database and restore my Itunes music library??? Thanks, Tom
Empty/corrupt library after upgrade/crash
Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
When you get it all working make a backup!
tt2 -
Converting an XML file to a DAT pipe delimited file
Hi
I'm trying to create an SSIS Package which converts an XML file into a dat file which is pipe delimited.
I want the package to be generic so that once that minimal modification is needed when using for different files.
I've so far had no luck with this and need some help/assistance.
All help fully appreciated.
Thank you
Umar JavedThe XML file can vary from fixed to variable.
for Fixed, i've done the same thing as you've suggested and parametrized the flat file connection manager.
For The XML source is there any way we can parametrize the location of the XML or XSD files?
For Variable, unfortunately due to restrictions we can not create an intermediate table and then export.
is there any other way?
Thanks
Umar Javed
XSD path can be made dynamic as below
http://picnicerror.net/development/sql-server/define-xsd-file-for-ssis-xml-source-using-expression-2012-04-21/
For variable you can even add them to configurations and then pass them from a file using xml configuration option.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to convert from xml file to html using java code
How to convert from xml file to html file using java code
Get yourself Apache Xalan or Saxon or some XSLT processor
String styleSheet = "/YourXSLTStylesheet.xsl";
String dataSource = "/YourXMLDocument.xml";
InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
OutputStream transformedOut = new FileOutputStream("filename.html");
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
http://www.w3schools.com/xsl/ -
Convert the XML file into XSD format?
Hello All,
I got XML file and i need to convert into XSD format and import it into PI system, so no need to create the structure.
Please let me know how to convert XML format into XSD format.
Regards,
chinnaHi ,
You can use Altova XML Spy software. There just open the xml file and goto Menu bar DTD/Schema there you have an option like Genrate DTD/Schema click on it and press ok, Then it will ask you for location to store xsd select Desktop or some folder.
.xsd will be created. and you can import that.
Thanks. -
Indesign document convert to .xml file
could anyone help me. i want to convert to indesign document to .xml file. i want to save all indesign document page into separate page . if i have 10
page i want to save like 1.xml to 10.xml.What are you trying to achieve specifically. Did you look into IDML to see if suits your needs?
Manan Joshi
- Efficient InDesign Solutions -
MetaDesign Solutions
http://metadesignsolutions.com/services/indesign-development.php -
Hi Experts,
I want to know one thing ,i have an xml data which will be
displayed in textArea
the same data i want to save in a file ,which will be an xml
file, me attaching the code for this application ,the data that is
displayed in text area should be saved to a file,how should i do
it? Please help me its urgent
Thanks in advance.
Namala.Pass the xml to the server. Your choice of server-side
platforms and RPC protocols.
You understand that Flex cannot save to the client file
system, correct?
Tracy -
I am getting error while converting the xml file to pdf
Hi all,
I am getting the error
"Runtime exception when processing target-field mapping /ns0:MT_payment_rec/payment_rec/companycode; root message: Exception:[ExceptionConverter: java.io.IOException: The document has no pages.] in class com.sap.xi.tf._MM_Payment_Advice_ method calculate[a, com.sap.aii.mappingtool.tf7.rt.Context@2e0d7679]"
I followed below blog for converting xml to pdf
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1940
in this blog they mentioned source & target path, but I read the values directly Through sender communication channel with out giving the source and target path in udf(calling the java code from imported archive, and excuted for converting xml to pdf file),
but i am getting above error,
Is there any possibility to return the converted pdf values to target field through udf
Pls help me.Hi
Can u tell us what is the function of the UDF in your case ?
Apart from Converting the given input xml to pdf output, I dont see there is any other functionality within the UDF .. and the XMLTOPDF Class requires the two inputs to be passed when it is instantiated in the code
and now if you don't pass those parameters, it's going to throw an IO exception
Regards
Krishna -
How to convert an XML file (input data) into a SOAP message?
Hi there,
I recently wrote a dummy program to retrieve data from a web service. The program simply read from an input file (the xml content) and send it to the web service, the return result is store in a file (xml). I wish to 'upgrade' this approach of reading and writing from/to a file and have it done by SOAP. For some reason, I'm unable to do so.
The data on the xml input file that I sent is this:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<Upgrade xmlns="http://tempuri.org/">
<upgrade>
<User>John</User>
<Password>javalava</Password>
<EmployeeId>77384</EmployeeId>
<Rank>Q6</Rank>
</upgrade>
</Upgrade>
</soap12:Body>
</soap12:Envelope>
When trying to upgrade to SOAPEnvelope it fails.
Thanks for any pointers!!!I was trying (unsuccessfully) g to write something like this
* sorry I don't know what are the tags for <code></code>
<code>
public static SOAPMessage prepareMessage(String username, String password, String emplID) throws SOAPException
SOAPMessage soapMsg = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createMessage();
// SOAP body
String prefix = "tns";
String uri = "http://tempuri.org/Upgrade";
SOAPEnvelope envelope = soapMsg.getSOAPPart().getEnvelope();
SOAPBody body = envelope.getBody();
SOAPBodyElement service = body.addBodyElement(envelope.createName("Upgrade", prefix, uri)); //there are 2 Upgrade in the XML (Upgrade and another upgrade, but I couldn't figure out how to that here)
SOAPElement symbol = service.addChildElement(envelope.createName("User", prefix, uri));
symbol.addTextNode(username);
symbol = service.addChildElement(envelope.createName("Password", prefix, uri));
symbol.addTextNode(password);
symbol = service.addChildElement(envelope.createName("EmployeeId", prefix, uri));
symbol.addTextNode(emplID);
return soapMsg;
</code> -
Convert an xml file into separate html files
hi,
i've a problem. i have an xml database. i want to create an html file from that database. but the condition is ,after reading a specified number of nodes say(100) it must write the rest in a new html file. how could i do this.
please help.DOM in explorer or java dom will help u i n that
-
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
Maybe you are looking for
-
Sharepoint 2013 onedrive for business Ipad App
Hi We have an on-premise sharepoint 2013 installation and we would like to achieve access to the private library/onedrive using some of our ipads. We have installed One drive for business connected to a VPN. We have put in the url of the site, whic
-
Can we change the category name in oim 11g
Hi All, Can we change Category name of default categories present in OIM 11.1.1.5 User Attribute Form.For Eg:- Provisioning Dates to Important Dates. We looked for it and found one link :-http://docs.oracle.com/cd/E21764_01/doc.1111/e14308/conf_mangm
-
Service Limits in Purchase Requisitions: Where to Insert Custom Code?
The issue is related to finding a place in SAP logic where a BADI, or, an enhancement can be implemented when inside transaction ME52N for a Service Limits type Purchase Requisition where K is the Account Assignment and B is the Item Category for a S
-
3.1.2 update problem
After recently updating my 3gs to 3.1.2 a few hours later my phone would no longer load any apps that i personally added since i had the phone as soon as i attempt to open any app it pops open and then closes right away as if i pressed the home butto
-
Multiple Result Set Using Nested Table
Package declaration------------ CREATE or REPLACE PACKAGE dummy AS TYPE CResValues IS TABLE OF VARCHAR2(2000); FUNCTION GetValue(p_user IN VARCHAR2, p_owner IN VARCHAR2, p_resource IN VARCHAR2, ResValues OUT CResValues) RETURN INTEGER; END dummy; Pac