IDOC testing: how to upload sample IDOC xml file while outbound IDOCtesting
Hi experts,
can any one tell me , how to upload a sample XML idoc xml(data) file while Outbound IDOC testing;
in WE19 tcode ( insted of manually entering the sample data, i have to import the sample XML/text file into the idoc fields). say IDOC is MATMAS.
Thanks in advance;
Kumar
Hi Asit Purbey,
can you clearly explain, how to upload the file and how can i genetare the IDOC no?
i have seen that function module IDOC_XML_FROM_FILE, in that it is required a port no, what exactly it is, and what type of port is it?
suppose i am having a XML/TEXT file with IDOC data, how can i upload it into the server and how can convert it into the IDOC and how can i generate the IDOC no for outbound testing?
Thanks,
Anil
Similar Messages
-
How to apply XSLT to XML file while importing XML data using XSU plsql API
I need to load XML file with nested repeating elements into Oracle tables and I am using XSU PLSQL API utility package dbms_xmlSave.insertXML. Can use XMLGen package also!!
I found out through documentation that I need to have XML file with ROWSET/ROW tags around the elements. As I have no control of XML file coming from external source, so I wish to apply XSLT to XML. I found setXSLT/setStylesheet procedures but it's not working as expected.
Can you help me with some sample code for the purpose.
ThanksI'm new at XML and XSL as well, but maybe the following code I built can help:
CREATE OR REPLACE PACKAGE Xml_Pkg AS
/* this record and table type are used for the transformTags procedure */
TYPE TagTransform_t IS RECORD (
old_tag VARCHAR2(255),
new_tag VARCHAR2(255) );
TYPE TagTransformList_t IS TABLE OF TagTransform_t INDEX BY BINARY_INTEGER;
/* use DBMS_OUTPUT to print out a CLOB */
PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB);
/* using a list of old/new tags, transform all old into new in XML2 */
PROCEDURE transformTags(
p_List TagTransformList_t,
p_XML1 IN OUT NOCOPY CLOB,
p_XML2 IN OUT NOCOPY CLOB);
END Xml_Pkg;
CREATE OR REPLACE PACKAGE BODY Xml_Pkg AS
/* print a CLOB using newlines */
PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB) IS
buffer_overflow EXCEPTION;
PRAGMA EXCEPTION_INIT(buffer_overflow,-20000);
l_offset NUMBER;
l_len NUMBER;
l_o_buf VARCHAR2(255);
l_amount NUMBER; --}
l_f_amt NUMBER := 0; --}To hold the amount of data
l_f_amt2 NUMBER; --}to be read or that has been
l_amt2 NUMBER := -1; --}read
l_offset2 NUMBER;
l_amt3 NUMBER;
l_chk NUMBER := 255;
BEGIN
l_len := DBMS_LOB.GETLENGTH(p_clob);
l_offset := 1;
WHILE l_len > 0 LOOP
l_amount := DBMS_LOB.INSTR(p_clob,CHR(10),l_offset,1);
--Amount returned is the count from the start of the file,
--not from the offset.
IF l_amount = 0 THEN
--No more linefeeds so need to read remaining data.
l_amount := l_len;
l_amt2 := l_amount;
ELSE
l_f_amt2 := l_amount; --Store position of next LF
l_amount := l_amount - l_f_amt; --Calc position from last LF
l_f_amt := l_f_amt2; --Store position for next time
l_amt2 := l_amount - 1; --Read up to but not the LF
END IF;
/* divide the read into 255 character chunks for dbms_output */
IF l_amt2 != 0 THEN
l_amt3 := l_amt2;
l_offset2 := l_offset;
WHILE l_amt3 > l_chk LOOP
DBMS_LOB.READ(p_clob,l_chk,l_offset2,l_o_buf);
DBMS_OUTPUT.PUT_LINE(l_o_buf);
l_amt3 := l_amt3 - l_chk;
l_offset2 := l_offset2 + l_chk;
END LOOP;
IF l_amt3 != 0 THEN
DBMS_LOB.READ(p_clob,l_amt3,l_offset2,l_o_buf);
DBMS_OUTPUT.PUT_LINE(l_o_buf);
END IF;
END IF;
l_len := l_len - l_amount;
l_offset := l_offset+l_amount;
END LOOP;
EXCEPTION
WHEN buffer_overflow THEN
RETURN;
END printClobOut;
/* shortcut "writeline" procedure for CLOB buffer writes */
PROCEDURE wr(p_clob IN OUT NOCOPY CLOB, s VARCHAR2) IS
BEGIN
DBMS_LOB.WRITEAPPEND(p_clob,LENGTH(s)+1,s||CHR(10));
END;
/* the standard XSLT should include the identity template or the output XML will be malformed */
PROCEDURE newXsltHeader(p_xsl IN OUT NOCOPY CLOB, p_identity_template BOOLEAN DEFAULT TRUE) IS
BEGIN
DBMS_LOB.TRIM(p_xsl,0);
/* standard XSL header */
wr(p_xsl,'<?xml version="1.0"?>');
/* note that the namespace for the xsl is restricted to the w3 1999/XSL */
wr(p_xsl,'<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">');
IF p_identity_template THEN
/* create identity template (transfers all "other" nodes) */
wr(p_xsl,' <xsl:template match="node()">');
wr(p_xsl,' <xsl:copy>');
wr(p_xsl,' <xsl:apply-templates/>');
wr(p_xsl,' </xsl:copy>');
wr(p_xsl,' </xsl:template>');
END IF;
END newXsltHeader;
PROCEDURE newXsltFooter(p_xsl IN OUT NOCOPY CLOB) IS
BEGIN
/* standard xsl footer */
wr(p_xsl,'</xsl:stylesheet>');
END newXsltFooter;
/* using the stylesheet in p_xsl, transform p_XML1 into p_XML2 */
PROCEDURE transformXML(p_xsl IN OUT NOCOPY CLOB, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
l_parser XMLPARSER.Parser;
l_doc XMLDOM.DOMDocument;
l_xsl_proc XSLPROCESSOR.Processor;
l_xsl_ss XSLPROCESSOR.Stylesheet;
BEGIN
/* parse XSL CLOB */
l_parser := XMLPARSER.newParser;
BEGIN
XMLPARSER.showWarnings(l_parser,TRUE);
XMLPARSER.parseClob(l_parser,p_xsl);
l_doc := XMLPARSER.getDocument(l_parser);
XMLPARSER.freeParser(l_parser);
EXCEPTION
WHEN OTHERS THEN
XMLPARSER.freeParser(l_parser);
RAISE;
END;
/* get Stylesheet from DOMDOC */
l_xsl_ss := XSLPROCESSOR.newStylesheet(l_doc,NULL);
BEGIN
/* parse XML1 CLOB */
l_parser := XMLPARSER.newParser;
BEGIN
XMLPARSER.showWarnings(l_parser,TRUE);
XMLPARSER.parseClob(l_parser,p_xml1);
l_doc := XMLPARSER.getDocument(l_parser);
XMLPARSER.freeParser(l_parser);
EXCEPTION
WHEN OTHERS THEN
XMLPARSER.freeParser(l_parser);
RAISE;
END;
/* process doc to XML2 */
l_xsl_proc := XSLPROCESSOR.newProcessor;
BEGIN
XSLPROCESSOR.processXSL(l_xsl_proc, l_xsl_ss, l_doc, p_xml2);
XSLPROCESSOR.freeProcessor(l_xsl_proc);
EXCEPTION
WHEN OTHERS THEN
XSLPROCESSOR.freeProcessor(l_xsl_proc);
RAISE;
END;
XSLPROCESSOR.freeStylesheet(l_xsl_ss);
EXCEPTION
WHEN OTHERS THEN
XSLPROCESSOR.freeStylesheet(l_xsl_ss);
RAISE;
END;
END transformXML;
/* transform XML1 into XML2 using list p_List of old/new tags */
PROCEDURE transformTags(p_List TagTransformList_t, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
l_xsl CLOB;
BEGIN
/* create XSL CLOB */
DBMS_LOB.CREATETEMPORARY(l_xsl,TRUE);
/* create standard header with identity template */
newXsltHeader(l_xsl,TRUE);
/* create one template for each node translation */
FOR i IN 1..p_List.COUNT LOOP
wr(l_xsl,' <xsl:template match="'||p_List(i).old_tag||'">');
wr(l_xsl,' <'||p_List(i).new_tag||'><xsl:apply-templates/></'||p_List(i).new_tag||'>');
wr(l_xsl,' </xsl:template>');
END LOOP;
/* create standard footer */
newXsltFooter(l_xsl);
-- dbms_output.put_line('l_xsl:');
-- dbms_output.put_line('--------------------');
-- printClobOut(l_xsl);
-- dbms_output.put_line('--------------------');
transformXML(l_xsl, p_XML1, p_XML2);
DBMS_LOB.FREETEMPORARY(l_xsl);
/* -- unit testing
set serveroutput on size 100000
Declare
queryContext DBMS_XMLQUERY.ctxType;
xList XML_PKG.TagTransformList_t;
xmlCLOB CLOB;
xmlCLOB2 CLOB;
Begin
DBMS_LOB.CREATETEMPORARY(xmlCLOB,true);
DBMS_LOB.CREATETEMPORARY(xmlCLOB2,true);
xList(1).old_tag := 'A';
xList(1).new_tag := 'MyTag1';
xList(2).old_tag := 'B';
xList(2).new_tag := 'MyTag2';
queryContext := DBMS_XMLQUERY.newContext('Select * from t');
xmlCLOB := DBMS_XMLQUERY.getXML(queryContext);
DBMS_XMLQuery.closeContext(queryContext);
dbms_output.put_line('xmlCLOB:');
dbms_output.put_line('--------------------');
XML_PKG.printClobOut(xmlCLOB);
dbms_output.put_line('--------------------');
xml_pkg.transformTags(xList,xmlCLOB,xmlCLOB2);
dbms_output.put_line('xml2CLOB:');
dbms_output.put_line('--------------------');
XML_PKG.printClobOut(xmlCLOB2);
dbms_output.put_line('--------------------');
DBMS_LOB.FREETEMPORARY(xmlCLOB);
DBMS_LOB.FREETEMPORARY(xmlCLOB2);
End;
END transformTags;
END Xml_Pkg; -
Hello
Can anyone provide a sample web.xml file with "security-constraint" tag
included in it.
I have the RDBMS Realm set up and it seems to be working fine with
servlets. I need to test with EJBs, dont know how to proceed.
Any help is appretiated.
Thanks
KThis goes in your ejb-jar.xml file
<assembly-descriptor>
<method-permission>
<description></description>
<role-name>yourRole</role-name>
<method>
<ejb-name>YourEJB</ejb-name>
<method-name>findByYourFinder</method-name>
</method>
</method-permission>
</assembly-descriptor>
"Kven" <[email protected]> wrote in message
news:[email protected]..
Hello
Can anyone provide a sample web.xml file with "security-constraint" tag
included in it.
I have the RDBMS Realm set up and it seems to be working fine with
servlets. I need to test with EJBs, dont know how to proceed.
Any help is appretiated.
Thanks
K -
How to deploy the web.xml file when trying to use the JSP SDK from SAP?
I want to use the adduser.jsp which downloaded form SAP SDK samples to add user in BO, but I cannot run it sucessfully. I believe it's caused the web.xml file was not deployed appropriately.
could you please teach how to deploy the web.xml file for the JSP samples ?
Could you show me some sample of web.xml for the SDK jsp files? Thank you very much!Ensure that you have followed below directory structure while deploying your web application.
web_application_name
WEB-INF
lib
classes
web.xml must be placed in WEB-INF. Ensure that you have included all the jar files and other necessary files in your application.
For more information refer to the below link:
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
Regards,
Anuj -
How do I Ftp a XML file with out namespace attribute
Hi All,
How do I FTP an xml file that is validated against a schema on the ftp adapter with out the namespace attribute being added to the first and second element of the XML file.
For example the xml looks like this when I transfer the file.
<XML_Event xmlns="http://xmlns.oracle.com/PlannedEventSTORMRequestProcess/STORM">
<Event_Begin xmlns="">
<XML_File_Header>
<Originating_System>xxx</Originating_System>
<ID>387</ID>
</XML_File_Header>
</Event_Begin>
</XML_Event>
However I want it to be….
<XML_Event>
<Event_Begin>
<XML_File_Header>
<Originating_System>xxx</Originating_System>
<ID>387</ID>
</XML_File_Header>
</Event_Begin>
</XML_Event>
How do i achieve this using the ftp adapter.
CheersHere is an example that will try to reach the given size in steps of 4 in quality.
var saveFile = File(Folder.desktop + "/test");
var fileSize = 70;
try{
tmpFile = File(saveFile+".jpg");
for(var z =100;z>5;z -=4){
SaveForWeb(tmpFile,z);
var chkFile = File(saveFile+".jpg");
//$.writeln(tmpFile + " qual = " + z + " Size = " +(chkFile.length/1024).toFixed(2) + "k" );
if((chkFile.length/1024).toFixed(2) < (fileSize +1)) break;
tmpFile.remove();
if(!tmpFile.exists) SaveForWeb(tmpFile,5);
}catch(e){$.writeln(e + " - " + e.line);}
function SaveForWeb(saveFile,jpegQuality) {
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.JPEG;
sfwOptions.includeProfile = false;
sfwOptions.interlaced = 0;
sfwOptions.optimized = true;
sfwOptions.quality = Number(jpegQuality);
activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions); -
How to retrieve value from xml file
hi all,
can somebody pls tell me how to retrieve value from xml file using SAXParser.
I want to retrieve value of only one tag and have to perform some validation with that value.
it's urgent .
pls help me out
thnx in adv.
rituhi shanu,
the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
pls have a look at the following code snippet.
public class XMLValidator {
static ArrayList strXXX = new ArrayList();
public void validate(){
factory.setValidating(true);
parser = factory.newSAXParser();
//all factory code is here only
parser.parse(xmlURI, new XMLErrorHandler());
public void setXXX(String pstrXXX){
strUpn.add(pstrXXX);
public ArrayList getXXX(){
return strXXX;
class XMLErrorHandler extends DefaultHandler {
String tagName = "";
String tagValue = "";
String applicationRefNo = "";
String XXXValue ="";
String XXXNo = "";
XMLValidator objXmlValidator = new XMLValidator();
public void startElement(String uri, String name, String qName, Attributes atts) {
tagName = qName;
public void characters(char ch[], int start, int length) {
if ("Reference".equals(tagName)) {
tagValue = new String(ch, start, length).trim();
if (tagValue.length() > 0) {
RefNo = new String(ch, start, length);
if ("XXX".equals(tagName)) {
XXXValue = new String(ch, start, length).trim();
if (XXXValue.length() > 0) {
XXXNo = new String(ch, start, length);
public void endElement(String uri, String localName, String qName) throws SAXException {
if(qName.equalsIgnoreCase("XXX")) {
objXmlValidator.setXXX(XXXNo);
thnx & Regards,
ritu -
How I can create a XML file from java Aplication
How I can create a XML file from java Aplication
whith have a the following structure
<users>
<user>
<login>anyName</login>
<password>xxxx</password>
</user>
</users>
the password label must be encripted
accept any suggestionLet us assume you have all the data from the jsp form in an java bean object..
Now you want a xml file. This can be acheived in 2 ways
1. Write it into a file using java.io classes. Say you have a class with name
write("<name>"+obj.getName+</name>);
bingo you have a flat file with the xml
2. Use data binding to do the trick
will recommend JiBx and Castor for the 2nd option
Regards,
Rajagopal -
How to Read and Generate XML file from java code.
hi guys,
how to read the xml file (Condition :we know only DTD or Shema only).
How to Generate the new xml file ?(using Shema )
And one more how directly Generate the xml from DB?
Pleas with code or any URLUsing XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
Then you can create an instance of the Document object and ask it to write itself.
This will create an XML document complient to the schema.
XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
matfud -
How I could generate an XML file from a report in version 4.0B
Good morning,
How could I generate an XML file from a report? Please note that I am using version 4.0B
I don't have access to
Billy VitalHi,
In the Class CL_XML_DOCUMENT,
we have a method EXPORT_TO_FILE to download an XML file. -
How To check validity of XML File
can any one tell me how to find whether an XML file is valid or not before beginning to parse the XML file
Thanks in advanceXerces will do that for qou, if you activate validation (and, of course, a DTD is specified in the file). Read the documentation of Xerces at xml.apache.org
-
How to remove Unicode from XML file
I get following error when unmarshal xml:
[java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
ThanksThese sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.
-
How to parse contents from XML file in Java
Hi All,
I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
How to parse Contents of XML file??
Thanks in advance,
Rajendra.Hi All,
I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
How to parse Contents of XML file??
Thanks in advance,
Rajendra. -
How do I create individual xml files from the parsed data output of a xml file?
I have written a program (DOM Parser) that parses data from a XMl File. I would like to create an individual file with the corresponding name for each set of data parsed from the xml document. If the parsed output is Single, Double, Triple, I would like to create an individual xml file (Single.xml, Double.xml, Triple.xml)with those corresponding names. How do I create the xml files and give each file the name of my parsed data output? Thanks in advance for your help.
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class MyDomParser {
public static void main(String[] args) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse("ENtemplate.xml");
doc.normalize();
NodeList rootNodes = doc.getElementsByTagName("templates");
Node rootNode = rootNodes.item(0);
Element rootElement = (Element) rootNode;
NodeList templateList = rootElement.getElementsByTagName("template");
for(int i=0; i < templateList.getLength(); i++) {
Node theTemplate = templateList.item(i);
Element templateElement = (Element) theTemplate;
System.out.println("Template" + ": " +templateElement.getAttribute("name")+ ".xml");
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
import java.io.IOException;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class MyDomParser {
public static void main(String[] args) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse("ENtemplate.xml");
doc.normalize();
NodeList rootNodes = doc.getElementsByTagName("templates");
Node rootNode = rootNodes.item(0);
Element rootElement = (Element) rootNode;
NodeList templateList = rootElement.getElementsByTagName("template");
for(int i=0; i < templateList.getLength(); i++) {
Node theTemplate = templateList.item(i);
Element templateElement = (Element) theTemplate;
System.out.println(templateElement.getAttribute("name")+ ".xml");
for(int i=0; i < templateList.getLength(); i++) {
Node theTemplate = templateList.item(i);
Element templateElement = (Element) theTemplate;
String fileName = templateElement.getAttribute("name") + ".xml";
Files.createFile(Paths.get(fileName));
System.out.println("File" + ":" + fileName + ".xml created");
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace(); -
How to upload and download a files into AL11 directory in ABAP
Hi,
How to upload and download a files into AL11 directory in ABAP
thanks
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Mar 21, 2011 9:18 AMYou should try one of these forums for an answer to your question:
http://swforum.sun.com/jive/forum.jspa?forumID=116
http://community.java.net/netbeans
http://linux.java.net -
How to config the web.xml file, when I use Richfaces + RI 1.2?
Hi there:
I want to use Richfaces + RI 1.2 to build a project. I don`t know how to config the web.xml file.
By the way, my web server is Tomcat 6.0, my JDK's version is 6u6. I don`t want to use the facelets.
thanks.
lxmjust add this before *</web-app>*
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
Maybe you are looking for
-
Wrong creation of legacy asset in AS91
Hi ALL, I had create an asset using tcode AS91 and the system assigned main asset number 50000001 automatically to it. Later on, we discovered that we do not want this asset migrated to SAP. (Not yet post to asset reconciliation account in GL) Th
-
[SOLVED]bash: assign a command output to a variable
EDIT: Sorry, got the solution - the variable was good, I just forgot a "do" in a "for" loop.... Sorry Hi erveryone. I'm just starting to learn the basics of bash scripting, and I got a problem assigning the output of a command to a variable, and i ke
-
Logical Stanbdy database not working
Dear Friends, I configured a logical standby database in oracle 11g. First i configured the physical standby. Its working fine. Data transfered. Then i convert to logical standby. The commands are working correctly. SCN also changed in logical standb
-
Office 2010 Production Support
Did they ever release working support for the production release of Office/Outlook 2010 in either 32 bit or 64 bit for syncing? All the other 3rd party addins that we utilize where available when the product went production and prior to that. The onl
-
Stored Procedure Only Returns First Character
I am having an issue with ColdFusion MX7 and a MSSQL 2005 DB. I am able to duplicate my development issue with the following simple example -- SQL Code CREATE PROCEDURE myTestProc @myString varchar(36) OUT AS BEGIN set @myString = 'This is my