FPCOMP_CREATE_PDF_FROM_SPOOL - PartNum
Hi Friends,
I need to display a spool which was in PDF format.
I used FM FPCOMP_CREATE_PDF_FROM_SPOOL which takes spool number and part number as input. The spool has 4 pages but it just displays one page.
I need to know the significance of part number parameter.
When given 1 - Displays first page in Xstring.
When given 2 - Gives path of a file with coa extension.
When given 3 - Displays the first page in Xstring.
Please let me know, what role Partnum plays in displaying the pages of spool. I need to display all the four page for the spool.
Your Inputs and suggestions are awaited.
Sumeet
Hello Sumeet,
We have the same question. Can you tell us the solution for the export of multiple pages.
With regards
Dennis
Similar Messages
-
Unable to capture field values in Master agreement Line Items
I am trying to get the field values from master agreement line items page. I have written the following code to get the line item details which is working fine to capture part number and quantity->
agreementBean = doc.getRootParentIBean();
lineItemCollection = agreementBean.getLineItems();
collectionsize = lineItemCollection.size();
for(i=0;i<collectionsize;i++){
collectionbean = lineItemCollection.get(i);
partNum = ""+collectionbean.getPartNumber() ;
Quantity = ""+collectionbean.getQuantity();
throw doc.createApplicationException(null,partNum + " , " + Quantity );
Now, my problem is that I am unable to capture the following field item values in the master agreement > line items page.
1. Price Unit
2. Unit Price
3. Product Category
4. Plant
Please help me to find the values.
Thankx in Advance.
Su
Edited by: subrataindra on Aug 10, 2010 11:11 AMThis will return the name of the plant.
.getExtensionField("PLANT").get().getDisplayName(session);
Check if this returns the product category
collectionbean.getExtensionField("ITEM_CAT").get().getDisplayName();
This will Return the Price
collectionbean.getExtensionField("PRICE").get().getPrice();
(return type :BigDecimal)
This will return the currency
collectionbean.getExtensionField("PRICE").get().getCurrency;
(Return type:String)
Similarly to retrieve other fields for which there are no standard functions, use .getExtensionField("Field ID")
Hope this helps
Regards,
Immanuel -
Hello
I will explain the scenario:
In our java web page, we are using three text boxes to enter "Part number,Description and Aircraft type". Every time the user no need to enter all these data. The person can enter any combination of data or only one text box. Actually the output data corresponding to this input entries is from five Oracle table. If we are using a single query to take data from all the five tables, the database will hang. So I written a procedure "SEARCH1",this will accept any combination of values (for empty values we need to pass NULL to this procedure) and output data from all the five tables. When I executing this procedure in SQL editor, the execution is very fast and giving exact result. I used "dbms_output.put_line" clause for outputing multiple records in my procedure. The output variables are "Serial No, part Number, Description, Aircraft type,Part No1,Part No2,Part No3,Part No4". I want to use the same procedure "SEARCH1" for outputing data in java web page.The passing argument I can take from the text box provided in java web page. I am using jdbc thin driver to connect our java web page to Oracle 9i database.
Note1 : If any combination of search item not available, in procedure itself I am outputing a message like "Part Number not found". Here I am using four words ("Part" is the first word,"Number" is the second,"Not" s the third, and "found" is the fourth) for outputing this message.Is it necessary to equalise number of words I am using here to the record outputing eight variable?
Our current development work is stopped because of this issue. So any one familier in this field,plese help me to solve our issue by giving the sample code for the same scenario.
My Email-id is : [email protected]
I will expect yor early mail.
With thanks
Pramod kumar.Hello Avi,
I am trying to solve this issue by using objects. But the following part of code also throwing some warning like "PLS-00302: component must be declared". Plese cross check my code and help me to solve this issue.
drop type rectab;
create or replace type rectype as object(PartNo varchar2(30),Description varchar2(150),AIrcraft_type varchar2(15),status_IPC varchar2(30),status_ELOG varchar2(30),status_SUPCAT varchar2(30),status_AIRODWH varchar2(30));
create or replace type rectab as table of rectype;
create or replace package ioStructArray as
procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab);
end ioStructArray;
create or replace package body ioStructArray as
procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab) is
mdescription varchar2(150);
mpartnum varchar2(30);
mpno varchar2(30);
mdes varchar2(150);
mair varchar2(15);
mstat varchar2(1);
cursor c1 is select partnum,description,aircraft_type from master_catalog where partnum=mpno and aircraft_type=mair and description like ltrim(rtrim(mdes))||'%';
cursor c2 is select partnum from ipc_master where partnum=mpartnum;
cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
cursor c4 is select partnum from superparts where partnum=mpartnum;
cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
mpno1 varchar2(30);
mpno2 varchar2(30);
mpno3 varchar2(30);
mpno4 varchar2(30);
mpno5 varchar2(30);
maircraft_type varchar2(15);
mstat1 varchar2(30);
mstat2 varchar2(30);
mstat3 varchar2(30);
mstat4 varchar2(30);
begin
mstat:='N';
mpno:=pno;
mdes:=pdes;
mair:=air;
if mpno is not null and mdes is not null and mair is not null then
begin
mstat:='N';
mpno:=pno;
mdes:=pdes;
mair:=air;
for i in c1 loop
mstat:='N';
mstat1:='N';
mstat2:='N';
mstat3:='N';
mstat4:='N';
mpno1:=i.partnum;
mpartnum:=i.partnum;
mdescription:=i.description;
maircraft_type:=i.aircraft_type;
for j in c2 loop
mpno2:=j.partnum;
end loop;
for k in c3 loop
mpno3:=k.partnum;
end loop;
for l in c4 loop
mpno4:=l.partnum;
end loop;
for m in c5 loop
mpno5:=m.part_no;
end loop;
if mpno2=mpartnum then
mstat1:=mpno2;
end if;
if mpno3=mpartnum then
mstat2:=mpno3;
end if;
if mpno4=mpartnum then
mstat3:=mpno4;
end if;
if mpno5=mpartnum then
mstat4:=mpno5;
end if;
if mpno1=mpartnum then
mstat:='Y';
orec.PartNo:=mpno1;
orec.Description:=mdescription;
orec.AIrcraft_type:=maircraft_type;
orec.status_IPC:=mstat1;
orec.status_ELOG:=mstat2;
orec.status_SUPCAT:=mstat3;
orec.STATUS_AIRODWH:=status_AIRODWH;
end if;
end loop;
end;
end if;
end testsch2;
end ioStructArray;
Expecting your early reply.
With thanks
Pramod kumar. -
Getting ORA-22805 when trying to load XML file using SQLLDR
I'm trying to learn the basics of XML since we'll be getting XML files in the near future. I'm using one of the sample schemas that comes with XMLSPY. I loaded this schema into an 11g Oracle DB using XMLSPY:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.0 NT beta 1 build Jun 13 2001 (http://www.xmlspy.com) by Alexander Falk (Altova, Inc.) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ipo="http://www.altova.com/IPO" targetNamespace="http://www.altova.com/IPO" elementFormDefault="unqualified" attributeFormDefault="unqualified">
<annotation>
<documentation>
International Purchase order schema for Example.com
Copyright 2000 Example.com. All rights reserved.
</documentation>
</annotation>
<!-- include address constructs -->
<include schemaLocation="address.xsd"/>
<element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
<element name="comment" type="string"/>
<complexType name="PurchaseOrderType">
<sequence>
<element name="shipTo" type="ipo:Address"/>
<element name="billTo" type="ipo:Address"/>
<element ref="ipo:comment" minOccurs="0"/>
<element name="Items" type="ipo:Items"/>
</sequence>
<attribute name="orderDate" type="date"/>
</complexType>
<complexType name="Items">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="productName" type="string"/>
<element name="quantity">
<simpleType>
<restriction base="positiveInteger">
<maxExclusive value="100"/>
</restriction>
</simpleType>
</element>
<element name="price" type="decimal"/>
<element ref="ipo:comment" minOccurs="0"/>
<element name="shipDate" type="date" minOccurs="0"/>
</sequence>
<attribute name="partNum" type="ipo:Sku"/>
</complexType>
</element>
</sequence>
</complexType>
<simpleType name="Sku">
<restriction base="string">
<pattern value="\d{3}-[A-Z]{2}"/>
</restriction>
</simpleType>
</schema>
Then I created an XMLType table:
CREATE TABLE purchaseOrder OF XMLType
XMLSCHEMA "ipo.xsd" ELEMENT "purchaseOrder"
I'm trying to load the sample XML file ipo.xml into purchaseOrder using SQLLDR. This is ipo.xml:
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Mr. Nobody (Altova GmbH) -->
<ipo:purchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipo="http://www.altova.com/IPO" orderDate="1999-12-01" xsi:schemaLocation="http://www.altova.com/IPO
ipo.xsd">
<shipTo export-code="1" xsi:type="ipo:EU-Address">
<ipo:name>Helen Zoe</ipo:name>
<ipo:street>47 Eden Street</ipo:street>
<ipo:city>Cambridge</ipo:city>
<ipo:postcode>126</ipo:postcode>
</shipTo>
<billTo xsi:type="ipo:US-Address">
<ipo:name>Robert Smith</ipo:name>
<ipo:street>8 Oak Avenue</ipo:street>
<ipo:city>Old Town</ipo:city>
<ipo:state>AK</ipo:state>
<ipo:zip>95819</ipo:zip>
</billTo>
<Items>
<item partNum="833-AA">
<productName>Lapis necklace</productName>
<quantity>2</quantity>
<price>99.95</price>
<ipo:comment>Need this for the holidays!</ipo:comment>
<shipDate>1999-12-05</shipDate>
</item>
<item partNum="748-OT">
<productName>Diamond heart</productName>
<quantity>1</quantity>
<price>248.90</price>
<ipo:comment>Valentine's day packaging.</ipo:comment>
<shipDate>2000-02-14</shipDate>
</item>
<item partNum="783-KL">
<productName>Uncut diamond</productName>
<quantity>7</quantity>
<price>79.90</price>
<shipDate>2000-01-07</shipDate>
</item>
<item partNum="238-KK">
<productName>Amber ring</productName>
<quantity>3</quantity>
<price>89.90</price>
<ipo:comment>With no inclusions, please.</ipo:comment>
<shipDate>2000-01-07</shipDate>
</item>
<item partNum="229-OB">
<productName>Pearl necklace</productName>
<quantity>1</quantity>
<price>4879.00</price>
<shipDate>1999-12-05</shipDate>
</item>
<item partNum="128-UL">
<productName>Jade earring</productName>
<quantity>5</quantity>
<price>179.90</price>
<shipDate>2000-02-14</shipDate>
</item>
</Items>
</ipo:purchaseOrder>
This is what's in the control file:
LOAD DATA
INFILE *
INTO TABLE purchaseOrder TRUNCATE
xmltype(xmldata)
FIELDS
xmldata LOBFILE (CONSTANT ipo.xml)
BEGINDATA
0
The load fails with:
Record 1: Rejected - Error on table PURCHASEORDER.
ORA-22805: cannot insert NULL object into object tables or nested tables
Another question I have is, how do we know how many records (0's) to specify in the control file? In this case there's only one but when real files are used we won't know how many are in the file.
Thanks for your help!The concept was "Don't use SQL*Loader to parse XML".
You can use SQL*Loader to load an entire XML document into the DB. That is fine. You can do the same via BFILENAME to read in files from disk as well.
If you want to parse XML, do that from within Oracle via PL/SQL and/or SQL. The solution depends upon your version of Oracle and what is good enough for you in terms of performance.
So the basics are
a) How am I getting the information?
b) How am I getting in into Oracle?
c) How do I want to parse it?
As I see the schema, it only allows for one ipo:purchaseOrder node in the document, since that is the root node. If you have multiple in the incoming file, you no longer have valid XML, both per the schema and because you have no single root node. You have an XML fragment, which must be treated different.
Just trying to understand the question since I now realize it does not agree with what the schema in your initial example shows. -
Re: Satellite A300: How to dedicate video memory
hi i was checking methods on how to make my graphics card work a little harder and people kept telling me to dedicate some memory to my video.
these are my settings right now:
total graphics memory: 358 mb
*dedicated video memory: 0 mb*
system video memory: 128
shared system memory: 230
so i was looking for a solution on how to do that and i found this :
[http://www.youtube.com/watch?v=rgRBDNDvMwU]
but i cannot get to this menu,
please help,
Nathan
ps. do u think this graphic card is good enough to play new games? (eg. cod5, far cry 2, etc.)http://ftp.toshiba.ca/support/TechSupport/quickspecs/quickspecs.asp?id=Quick%20Specs%20Chart&family=sat ellite&partnum=PSAJ0C-SH308C
It says:
Mobile Intel GMA X3100. Up to 358MB of shared video memory
Unfortunately the Intel Graphics solutions are not designed to have great 3D performance.
You need an ATI(AMD) or nVidia graphics chip for decent performance.
If you want to play the latest games, you will need to lower the resolution and use low graphics settings.
Note that many games need special DirectX/OpenGL features to run, which the Intel chip may not have.
I imagine older games like FarCry1 will run ok -
Read PDF Formatted Spool and write PDF File to Application Server
Hi Experts,
After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
PARAMETERS : p_spono LIKE tsp01-rqident.
DATA: pdf_data type FPCONTENT.
types: lt_pdf_table(1000) type x.
data: l_pdf_data type standard table of lt_pdf_table,
l_pdf_line type lt_pdf_table,
l_offset type i,
l_len type i,
p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
*Read the spool content
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = p_spono
i_partnum = '1'
IMPORTING
e_pdf = pdf_data
* e_pdf_file = file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
* Modify the spool contents to prepare internal table
l_len = xstrlen( pdf_data ).
while l_len >= 1000.
l_pdf_line = pdf_data+l_offset(1000).
append l_pdf_line to l_pdf_data.
add 1000 to l_offset.
subtract 1000 from l_len.
endwhile.
if l_len > 0.
l_pdf_line = pdf_data+l_offset(l_len).
append l_pdf_line to l_pdf_data.
endif.
* GUI DOWNLOAD Works Fine
* Now pdf contents is ready , lets store in local PC
*CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
* filename = 'C:\Documents and Settings\Desktop\shital.pdf'
* filetype = 'BIN'
* TABLES
* data_tab = l_pdf_data.
OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error opening file:'(Z03) p_file.
ENDIF.
LOOP AT l_pdf_data INTO l_pdf_line.
TRANSFER l_pdf_line TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
IF sy-subrc <> 0.
MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
' Error closing file:'(Z04) p_file.
ENDIF.
Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
Let me know if you require further details about the issue.
Regards
Shital
Edited by: shital phadake on Apr 8, 2009 9:39 PMThanks Selçuk for your reply and taking time for understanding the Issue,
I went thru Functionality of the program you suggested but dont think it matches my requirement.
Regards
Shital -
How can i deal with java.security.AccessControlException?
Hi all, I need to implement JavaMail using Servlet and deploy throught J2EE deployment tool. But when i test out the servlet i will always encounter this exception thrown. How can i solve this?
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
This is the servlet i am testing. Please advise. Thanks in advance!
* @(#)JavaMailServlet.java 1.3 99/12/06
* Copyright 1998, 1999 Sun Microsystems, Inc. All Rights Reserved.
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
import java.io.*;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
* This is a servlet that demonstrates the use of JavaMail APIs
* in a 3-tier application. It allows the user to login to an
* IMAP store, list all the messages in the INBOX folder, view
* selected messages, compose and send a message, and logout.
* <p>
* Please note: This is NOT an example of how to write servlets!
* This is simply to show that JavaMail can be used in a servlet.
* <p>
* For more information on this servlet, see the
* JavaMailServlet.README.txt file.
* <p>
* For more information on servlets, see
* * http://java.sun.com/products/java-server/servlets/index.html
* @author Max Spivak
public class JavaMailServlet extends HttpServlet implements SingleThreadModel {
String protocol = "POP3";
String mbox = "INBOX";
* This method handles the "POST" submission from two forms: the
* login form and the message compose form. The login form has the
* following parameters: <code>hostname</code>, <code>username</code>,
* and <code>password</code>. The <code>send</code> parameter denotes
* that the method is processing the compose form submission.
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
// get the session
HttpSession ssn = req.getSession(true);
String send = req.getParameter("send");
String host = req.getParameter("hostname");
String user = req.getParameter("username");
String passwd = req.getParameter("password");
URLName url = new URLName(protocol, host, -1, mbox, user, passwd);
ServletOutputStream out = res.getOutputStream();
res.setContentType("text/html");
out.println("<html><body bgcolor=\"#CCCCFF\">");
if (send != null) {
// process message sending
send(req, res, out, ssn);
} else {
// initial login
// create
MailUserData mud = new MailUserData(url);
ssn.putValue("javamailservlet", mud);
try {
Properties props = System.getProperties();
System.out.println("url");
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props, null);
session.setDebug(false);
Store store = session.getStore(url);
store.connect();
Folder folder = store.getDefaultFolder();
if (folder == null)
throw new MessagingException("No default folder");
folder = folder.getFolder(mbox);
if (folder == null)
throw new MessagingException("Invalid folder");
folder.open(Folder.READ_WRITE);
int totalMessages = folder.getMessageCount();
Message[] msgs = folder.getMessages();
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
folder.fetch(msgs, fp);
// track who logged in
System.out.println("Login from: " + store.getURLName());
// save stuff into MUD
mud.setSession(session);
mud.setStore(store);
mud.setFolder(folder);
// splash
out.print("<center>");
out.print("<font face=\"Arial,Helvetica\" font size=+3>");
out.println("<b>Welcome to JavaMail!</b></font></center><p>");
// folder table
out.println("<table width=\"50%\" border=0 align=center>");
// folder name column header
out.print("<tr><td width=\"75%\" bgcolor=\"#ffffcc\">");
out.print("<font face=\"Arial,Helvetica\" font size=-1>");
out.println("<b>FolderName</b></font></td><br>");
// msg count column header
out.print("<td width=\"25%\" bgcolor=\"#ffffcc\">");
out.print("<font face=\"Arial,Helvetica\" font size=-1>");
out.println("<b>Messages</b></font></td><br>");
out.println("</tr>");
// folder name
out.print("<tr><td width=\"75%\" bgcolor=\"#ffffff\">");
out.print("<a href=\"" + HttpUtils.getRequestURL(req) + "\">" +
"Inbox" + "</a></td><br>");
// msg count
out.println("<td width=\"25%\" bgcolor=\"#ffffff\">" +
totalMessages + "</td>");
out.println("</tr>");
out.println("</table");
} catch (Exception ex) {
out.println(ex.toString());
} finally {
out.println("</body></html>");
out.close();
* This method handles the GET requests for the client.
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
HttpSession ses = req.getSession(false); // before we write to out
ServletOutputStream out = res.getOutputStream();
MailUserData mud = getMUD(ses);
if (mud == null) {
res.setContentType("text/html");
out.println("<html><body>Please Login (no session)</body></html>");
out.close();
return;
if (!mud.getStore().isConnected()) {
res.setContentType("text/html");
out.println("<html><body>Not Connected To Store</body></html>");
out.close();
return;
// mux that takes a GET request, based on parameters figures
// out what it should do, and routes it to the
// appropriate method
// get url parameters
String msgStr = req.getParameter("message");
String logout = req.getParameter("logout");
String compose = req.getParameter("compose");
String part = req.getParameter("part");
int msgNum = -1;
int partNum = -1;
// process url params
if (msgStr != null) {
// operate on message "msgStr"
msgNum = Integer.parseInt(msgStr);
if (part == null) {
// display message "msgStr"
res.setContentType("text/html");
displayMessage(mud, req, out, msgNum);
} else if (part != null) {
// display part "part" in message "msgStr"
partNum = Integer.parseInt(part);
displayPart(mud, msgNum, partNum, out, res);
} else if (compose != null) {
// display compose form
compose(mud, res, out);
} else if (logout != null) {
// process logout
try {
mud.getFolder().close(false);
mud.getStore().close();
ses.invalidate();
out.println("<html><body>Logged out OK</body></html>");
} catch (MessagingException mex) {
out.println(mex.toString());
} else {
// display headers
displayHeaders(mud, req, out);
/* main method to display messages */
private void displayMessage(MailUserData mud, HttpServletRequest req,
ServletOutputStream out, int msgNum)
throws IOException {
out.println("<html>");
out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
out.println("<BODY bgcolor=\"#ccccff\">");
out.print("<center><font face=\"Arial,Helvetica\" ");
out.println("font size=\"+3\"><b>");
out.println("Message " + (msgNum+1) + " in folder " +
mud.getStore().getURLName() +
"/INBOX</b></font></center><p>");
try {
Message msg = mud.getFolder().getMessage(msgNum);
// first, display this message's headers
displayMessageHeaders(mud, msg, out);
// and now, handle the content
Object o = msg.getContent();
//if (o instanceof String) {
if (msg.isMimeType("text/plain")) {
out.println("<pre>");
out.println((String)o);
out.println("</pre>");
//} else if (o instanceof Multipart){
} else if (msg.isMimeType("multipart/*")) {
Multipart mp = (Multipart)o;
int cnt = mp.getCount();
for (int i = 0; i < cnt; i++) {
displayPart(mud, msgNum, mp.getBodyPart(i), i, req, out);
} else {
out.println(msg.getContentType());
} catch (MessagingException mex) {
out.println(mex.toString());
out.println("</BODY></html>");
out.close();
* This method displays a message part. <code>text/plain</code>
* content parts are displayed inline. For all other parts,
* a URL is generated and displayed; clicking on the URL
* brings up the part in a separate page.
private void displayPart(MailUserData mud, int msgNum, Part part,
int partNum, HttpServletRequest req,
ServletOutputStream out)
throws IOException {
if (partNum != 0)
out.println("<p><hr>");
try {
String sct = part.getContentType();
if (sct == null) {
out.println("invalid part");
return;
ContentType ct = new ContentType(sct);
if (partNum != 0)
out.println("<b>Attachment Type:</b> " +
ct.getBaseType() + "<br>");
if (ct.match("text/plain")) {
// display text/plain inline
out.println("<pre>");
out.println((String)part.getContent());
out.println("</pre>");
} else {
// generate a url for this part
String s;
if ((s = part.getFileName()) != null)
out.println("<b>Filename:</b> " + s + "<br>");
s = null;
if ((s = part.getDescription()) != null)
out.println("<b>Description:</b> " + s + "<br>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?message=" +
msgNum + "&part=" +
partNum + "\">Display Attachment</a>");
} catch (MessagingException mex) {
out.println(mex.toString());
* This method gets the stream from for a given msg part and
* pushes it out to the browser with the correct content type.
* Used to display attachments and relies on the browser's
* content handling capabilities.
private void displayPart(MailUserData mud, int msgNum,
int partNum, ServletOutputStream out,
HttpServletResponse res)
throws IOException {
Part part = null;
try {
Message msg = mud.getFolder().getMessage(msgNum);
Multipart mp = (Multipart)msg.getContent();
part = mp.getBodyPart(partNum);
String sct = part.getContentType();
if (sct == null) {
out.println("invalid part");
return;
ContentType ct = new ContentType(sct);
res.setContentType(ct.getBaseType());
InputStream is = part.getInputStream();
int i;
while ((i = is.read()) != -1)
out.write(i);
out.flush();
out.close();
} catch (MessagingException mex) {
out.println(mex.toString());
* This is a utility message that pretty-prints the message
* headers for message that is being displayed.
private void displayMessageHeaders(MailUserData mud, Message msg,
ServletOutputStream out)
throws IOException {
try {
out.println("<b>Date:</b> " + msg.getSentDate() + "<br>");
Address[] fr = msg.getFrom();
if (fr != null) {
boolean tf = true;
out.print("<b>From:</b> ");
for (int i = 0; i < fr.length; i++) {
out.print(((tf) ? " " : ", ") + getDisplayAddress(fr));
tf = false;
out.println("<br>");
Address[] to = msg.getRecipients(Message.RecipientType.TO);
if (to != null) {
boolean tf = true;
out.print("<b>To:</b> ");
for (int i = 0; i < to.length; i++) {
out.print(((tf) ? " " : ", ") + getDisplayAddress(to[i]));
tf = false;
out.println("<br>");
Address[] cc = msg.getRecipients(Message.RecipientType.CC);
if (cc != null) {
boolean cf = true;
out.print("<b>CC:</b> ");
for (int i = 0; i < cc.length; i++) {
out.print(((cf) ? " " : ", ") + getDisplayAddress(cc[i]));
cf = false;
out.println("<br>");
out.print("<b>Subject:</b> " +
((msg.getSubject() !=null) ? msg.getSubject() : "") +
"<br>");
} catch (MessagingException mex) {
out.println(msg.toString());
* This method displays the URL's for the available commands and the
* INBOX headerlist
private void displayHeaders(MailUserData mud,
HttpServletRequest req,
ServletOutputStream out)
throws IOException {
SimpleDateFormat df = new SimpleDateFormat("EE M/d/yy");
out.println("<html>");
out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
out.println("<BODY bgcolor=\"#ccccff\"><hr>");
out.print("<center><font face=\"Arial,Helvetica\" font size=\"+3\">");
out.println("<b>Folder " + mud.getStore().getURLName() +
"/INBOX</b></font></center><p>");
// URL's for the commands that are available
out.println("<font face=\"Arial,Helvetica\" font size=\"+3\"><b>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?logout=true\">Logout</a>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?compose=true\" target=\"compose\">Compose</a>");
out.println("</b></font>");
out.println("<hr>");
// List headers in a table
out.print("<table cellpadding=1 cellspacing=1 "); // table
out.println("width=\"100%\" border=1>"); // settings
// sender column header
out.println("<tr><td width=\"25%\" bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Sender</b></font></td>");
// date column header
out.println("<td width=\"15%\" bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Date</b></font></td>");
// subject column header
out.println("<td bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Subject</b></font></td></tr>");
try {
Folder f = mud.getFolder();
int msgCount = f.getMessageCount();
Message m = null;
// for each message, show its headers
for (int i = 1; i <= msgCount; i++) {
m = f.getMessage(i);
// if message has the DELETED flag set, don't display it
if (m.isSet(Flags.Flag.DELETED))
continue;
// from
out.println("<tr valigh=middle>");
out.print("<td width=\"25%\" bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
((m.getFrom() != null) ?
m.getFrom()[0].toString() :
"" ) +
"</font></td>");
// date
out.print("<td nowrap width=\"15%\" bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
df.format((m.getSentDate()!=null) ?
m.getSentDate() : m.getReceivedDate()) +
"</font></td>");
// subject & link
out.print("<td bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
"<a href=\"" +
HttpUtils.getRequestURL(req) +
"?message=" +
i + "\">" +
((m.getSubject() != null) ?
m.getSubject() :
"<i>No Subject</i>") +
"</a>" +
"</font></td>");
out.println("</tr>");
} catch (MessagingException mex) {
out.println("<tr><td>" + mex.toString() + "</td></tr>");
mex.printStackTrace();
out.println("</table>");
out.println("</BODY></html>");
out.flush();
out.close();
* This method handles the request when the user hits the
* <i>Compose</i> link. It send the compose form to the browser.
private void compose(MailUserData mud, HttpServletResponse res,
ServletOutputStream out)
throws IOException {
res.setContentType("text/html");
out.println(composeForm);
out.close();
* This method processes the send request from the compose form
private void send(HttpServletRequest req, HttpServletResponse res,
ServletOutputStream out, HttpSession ssn)
throws IOException {
String to = req.getParameter("to");
String cc = req.getParameter("cc");
String subj = req.getParameter("subject");
String text = req.getParameter("text");
try {
MailUserData mud = getMUD(ssn);
if (mud == null)
throw new Exception("trying to send, but not logged in");
Message msg = new MimeMessage(mud.getSession());
InternetAddress[] toAddrs = null, ccAddrs = null;
if (to != null) {
toAddrs = InternetAddress.parse(to, false);
msg.setRecipients(Message.RecipientType.TO, toAddrs);
} else
throw new MessagingException("No \"To\" address specified");
if (cc != null) {
ccAddrs = InternetAddress.parse(cc, false);
msg.setRecipients(Message.RecipientType.CC, ccAddrs);
if (subj != null)
msg.setSubject(subj);
URLName u = mud.getURLName();
msg.setFrom(new InternetAddress(u.getUsername() + "@" +
u.getHost()));
if (text != null)
msg.setText(text);
Transport.send(msg);
out.println("<h1>Message sent successfully</h1></body></html>");
out.close();
} catch (Exception mex) {
out.println("<h1>Error sending message.</h1>");
out.println(mex.toString());
out.println("<br></body></html>");
// utility method; returns a string suitable for msg header display
private String getDisplayAddress(Address a) {
String pers = null;
String addr = null;
if (a instanceof InternetAddress &&
((pers = ((InternetAddress)a).getPersonal()) != null)) {
addr = pers + " "+"<"+((InternetAddress)a).getAddress()+">";
} else
addr = a.toString();
return addr;
// utility method; retrieve the MailUserData
// from the HttpSession and return it
private MailUserData getMUD(HttpSession ses) throws IOException {
MailUserData mud = null;
if (ses == null) {
return null;
} else {
if ((mud = (MailUserData)ses.getValue("javamailservlet")) == null){
return null;
return mud;
public String getServletInfo() {
return "A mail reader servlet";
* This is the HTML code for the compose form. Another option would
* have been to use a separate html page.
private static String composeForm = "<HTML><HEAD><TITLE>JavaMail Compose</TITLE></HEAD><BODY BGCOLOR=\"#CCCCFF\"><FORM ACTION=\"/servlet/JavaMailServlet\" METHOD=\"POST\"><input type=\"hidden\" name=\"send\" value=\"send\"><P ALIGN=\"CENTER\"><B><FONT SIZE=\"4\" FACE=\"Verdana, Arial, Helvetica\">JavaMail Compose Message</FONT></B><P><TABLE BORDER=\"0\" WIDTH=\"100%\"><TR><TD WIDTH=\"16%\" HEIGHT=\"22\"> <P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">To:</FONT></B></TD><TD WIDTH=\"84%\" HEIGHT=\"22\"><INPUT TYPE=\"TEXT\" NAME=\"to\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">CC:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"cc\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">Subject:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"subject\" SIZE=\"55\"></TD></TR><TR><TD WIDTH=\"16%\"> </TD><TD WIDTH=\"84%\"><TEXTAREA NAME=\"text\" ROWS=\"15\" COLS=\"53\"></TEXTAREA></TD></TR><TR><TD WIDTH=\"16%\" HEIGHT=\"32\"> </TD><TD WIDTH=\"84%\" HEIGHT=\"32\"><INPUT TYPE=\"SUBMIT\" NAME=\"Send\" VALUE=\"Send\"><INPUT TYPE=\"RESET\" NAME=\"Reset\" VALUE=\"Reset\"></TD></TR></TABLE></FORM></BODY></HTML>";
* This class is used to store session data for each user's session. It
* is stored in the HttpSession.
class MailUserData {
URLName url;
Session session;
Store store;
Folder folder;
public MailUserData(URLName urlname) {
url = urlname;
public URLName getURLName() {
return url;
public Session getSession() {
return session;
public void setSession(Session s) {
session = s;
public Store getStore() {
return store;
public void setStore(Store s) {
store = s;
public Folder getFolder() {
return folder;
public void setFolder(Folder f) {
folder = f;You posted a thousand lines of badly-formatted code and didn't have the sense to say which one had the exception.
My guess is that it was this one:Session session = Session.getDefaultInstance(props, null);because that happened to me. I fixed it by calling getInstance instead of getDefaultInstance.
However if that isn't the problem, how about spending a few seconds to post a less useless question? -
Merge Different Spools containing a Single PDF page into a Single PDF file.
Greetings,
I am developing a custom object where in i need to read PDF file from many different Spools(Range given on Input Screen), where each spool has a single PDF page in it. I need to combine all these PDF Pages into a single PDF file & either create a new Spool or save it on an Application Server.
At present i have developed the code where in i am able to read the PDF files from different spools & convert them into Binary but i am not able to generate it back to PDF file.
Kindly find my code for your reference.
CODE:-
START-OF-SELECTION.
PERFORM f_get_spool_1000 .
PERFORM g_conv_pdf_to_bin_2000 .
*& Form F_GET_SPOOL_1000
text
FORM f_get_spool_1000 .
SELECT * FROM tsp01
INTO TABLE gt_tsp01
WHERE rqident IN s_spool
ORDER BY rqcretime DESCENDING.
IF sy-subrc = 0.
SORT gt_tsp01 BY rqident .
ENDIF.
ENDFORM.
*& Form G_CONV_PDF_TO_OTF_2000
text
DATA: lv_filename_out TYPE string,
lv_len TYPE i,
lt_tab TYPE tsfixml .
DATA: lwa_print_parms LIKE pri_params,
lv_valid(1) TYPE c .
DATA: lv_linsz LIKE sy-linsz VALUE 132, " Line size
lv_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
DATA : lt_tsp01 TYPE STANDARD TABLE OF tsp01 ,
lwa_tsp01 TYPE tsp01 .
CLEAR : gv_pdf, gwa_tsp01, gv_renderpagecount .
LOOP AT gt_tsp01 INTO gwa_tsp01.
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = gwa_tsp01-rqident
i_partnum = 1
IMPORTING
e_pdf = gv_pdf
e_renderpagecount = gv_renderpagecount
e_pdf_file = gv_pdf_file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR lv_len .
REFRESH gt_bin .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = gv_pdf
IMPORTING
output_length = lv_len
TABLES
binary_tab = gt_bin.
CLEAR gwa_bin .
LOOP AT gt_bin INTO gwa_bin.
APPEND gwa_bin TO gt_listout.
CLEAR gwa_bin .
ENDLOOP.
ENDLOOP.
Get FP reference
DATA: lo_fp TYPE REF TO if_fp VALUE IS INITIAL,
lo_pdfobj TYPE REF TO if_fp_pdf_object VALUE IS INITIAL,
lo_exc TYPE REF TO cx_root,
lv_xslt_message TYPE string .
lo_fp = cl_fp=>get_reference( ).
For handling exceptions
DATA: lo_fpex TYPE REF TO cx_fp_runtime VALUE IS INITIAL.
TRY.
lo_pdfobj = lo_fp->create_pdf_object( connection = 'ADS' ).
Set document
lo_pdfobj->set_document(
EXPORTING
pdfdata = gt_listout ).
Tell PDF object to extract data
lo_pdfobj->set_extractdata( ).
Execute the call to ADS
lo_pdfobj->execute( ).
CATCH cx_root INTO lo_exc.
lv_xslt_message = lo_exc->get_text( ).
ENDTRY.
Your quick reply would be of great help.
Regards.Thank Your for your concern, there are many replies & posts but all of them points only to Try what they have said. As being said that trying to convert PDF to binary & appending many PDF similarly would not let you generate a single PDF again.
Your Kind guidance would be really appreciable.
Regards. -
Error in using one's collection values in other collection
hi,
I want to fetch cursor s values based upon cursor r part_no column to populate childbkp table.but i m getting eror .plz help me to resolve.in code it might b many mistakes also.
declare
TYPE PartNum IS TABLE OF parent.part_num%TYPE
INDEX BY BINARY_INTEGER;
pnum_t PartNum;
TYPE PartName IS TABLE OF parent.part_name%TYPE
INDEX BY BINARY_INTEGER;
pnam_t PartName;
CURSOR r IS
SELECT part_num, part_name
FROM parent;
type r_part_num_arry IS TABLE OF r%rowtype;
r_part_num r_part_num_arry;
r_pnum_t parent.PART_NO%type;
CURSOR s IS
SELECT part_num, part_name
FROM parent p where rownum=1 and p.PART_NO = r_pnum_t ;
BEGIN
OPEN r;
LOOP
FETCH r BULK COLLECT INTO pnum_t, pnam_t LIMIT 1000;
FORALL i IN pnum_t.FIRST .. pnum_t.LAST
INSERT INTO child
(part_num, part_name)
VALUES
(pnum_t(i), pnam_t(i));
COMMIT;
begin
OPEN s;
LOOP
r_pnum_t := pnum_t(i);
FETCH s BULK COLLECT INTO pnum_t, pnam_t LIMIT 1000;
FORALL i IN pnum_t.FIRST .. pnum_t.LAST
INSERT INTO child_bkp
(part_num, part_name)
VALUES
(pnum_t(i), pnam_t(i));
COMMIT;
EXIT WHEN s%NOTFOUND;
END LOOP;
COMMIT;
CLOSE s;
end;
EXIT WHEN r%NOTFOUND;
END LOOP;
COMMIT;
CLOSE r;
END ;i need to run 1st qry based upoin below senerio.i need to do this work in collection case also.how to do it by collection.
declare
CURSOR r IS
SELECT part_num, part_name
FROM parent;
r_pnum_t parent.PART_Num%type;
pnum_t parent.PART_Num%type;
pnam_t parent.PART_Name%type;
CURSOR s IS
SELECT part_num, part_name
FROM parent p where rownum=1 and p.PART_Num = r_pnum_t ;
BEGIN
OPEN r;
LOOP
FETCH r INTO pnum_t, pnam_t ;
INSERT INTO child(part_num, part_name)
VALUES(pnum_t, pnam_t);
begin
OPEN s;
LOOP
r_pnum_t := pnum_t ;
FETCH s INTO pnum_t, pnam_t ;
INSERT INTO child_bkp(part_num, part_name)
VALUES(pnum_t, pnam_t);
COMMIT;
EXIT WHEN s%NOTFOUND;
END LOOP;
COMMIT;
CLOSE s;
end;
EXIT WHEN r%NOTFOUND;
END LOOP;
COMMIT;
CLOSE r;
END -
Error while importing .xml file in Datatype
Hi SDN,
I am getting this error while importing .xml file in Datatype.
Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8
Actually I have created datatype in my development box..
but my client doesn't want to develop in development box.
so i have exported that datatype as xsd from datatype editor.
and while importing into sandbox datatype editor i am getting this error..
Any help please......Hi Rajeev,
now i have an .xml file its not importing into datatype...
error is
Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8))
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema targetNamespace="http://abc.com/xa" xmlns="http://abc.com/xa" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="DT_PLANNINGSCHEDULE">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">3c6ae480f2f111dbc7ac0002556ad065</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="PlanningSchedule_Output">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">c65d41c0f15b11dbb29f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PlanningScheduleHeader">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">c65d41c1f15b11dbb6ef00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ScheduleID" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">6c804600f15d11dbc02400123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ScheduleIssueDate" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d0f15d11db8dd800123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="SchedulePurpose">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d1f15d11dbac4100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Purpose">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd50f15e11db9eb600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PurposeCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd51f15e11dbc47a00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ScheduleTypeCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d2f15d11dbbc3900123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ScheduleTypeCodedOther" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d3f15d11dba00200123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="QuantityQualifierCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d4f15d11dbc7e000123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ScheduleParty">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d5f15d11db969a00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BuyerParty">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec100f16411dba2e900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Party">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec101f16411db997a00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec102f16411dbb75900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec103f16411db8fa500123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec104f16411dba93f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">449ec105f16411dba20f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">0de2f450f16511dbaa4700123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfIdentifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d0f16711dbbdd800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d1f16711dbcd2600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d2f16711db82f800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d3f16711dbcf6e00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">9a25b6d4f16711dbcb6200123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SellerParty">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">e0422b80f16711dba8c100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Party">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb80f16811db82e800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb81f16811dba6ab00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb82f16811db8b4e00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb83f16811dbc0ff00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb84f16811dbb8f700123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb85f16811dba46200123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfIdentifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb86f16811db98c000123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb87f16811dbb25200123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1c2fb88f16811dbc7d100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">e99ffa30f16811dba27100123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d30f16a11dbb29f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ShipFromParty">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">e0422b81f16711dbbfce00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Party">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d31f16a11db9adf00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d32f16a11dbbef100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d33f16a11db9e5600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d34f16a11dbba6d00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d35f16a11db855400123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">7c7c4d36f16a11db877300123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ShipToParty">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">e0422b82f16711db84ec00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Party">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac0f16b11dba49600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac1f16b11db80c700123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac2f16b11db8ea300123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac3f16b11dbb5bb00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac4f16b11dbb7bc00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">275ecac5f16b11db92a300123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Language">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a370c1d6f15d11db9f9a00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LanguageCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">b1b4fd52f15e11dbc06300123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfLocationGroupedPlanningDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">c65d41c2f15b11dba9fd00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LocationGroupedPlanningDetail" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">89515130f17f11db98e400123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Location">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">de832980f17f11db8d4600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LocationIdentifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d0f18011db8ce800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LocID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d1f18011db839900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Identifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d2f18011dba45300123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Agency">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d3f18011db9ac700123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d4f18011dbc4ab00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Ident" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">f95b26d5f18011dbcd4400123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfLocationPlanningItemDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">de832981f17f11db856100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LocationPlanningItemDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257410f18111db8b6f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BasePlanningDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257411f18111db839c00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LineItemNum">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257412f18111db847f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BuyerLineItemNum" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257413f18111dbcf7200123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ItemIdentifiers">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257414f18111dba6f100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartNumbers">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257415f18111db968700123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BuyerPartNumber">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257416f18111db9f9100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartNum">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257417f18111dbc32500123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartID" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">d8257418f18111dbcfa900123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="StandardPartNumber">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">50b67960f18211db839c00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductIdentifierCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">50b67961f18211dbc78900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductIdentifierQualifierCoded" type="xsd:integer">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">50b67962f18211dbae6e00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ProductIdentifier" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">83815570f18411dbb4e800123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ItemDescription" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">83815571f18411db876f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfItemReferences">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef0f18711dbbafe00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ListOfReferenceCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef1f18711db8a7600123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ReferenceCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef2f18711db935200123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ReferenceTypeCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef3f18711dba69c00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ReferenceTypeCodedOther" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef4f18711db942b00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="PrimaryReference">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef5f18711db93a800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Reference">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef6f18711dbcebc00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RefNum" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef7f18711dbce6300123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ForecastFrequencyCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef8f18711db937b00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListOfScheduleDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aef9f18711dba61400123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ScheduleDetail">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefaf18711db9d4800123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CommitmentLevelCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefbf18711dba59800123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ScheduleDates">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefcf18711db947900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ListOfDateCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefdf18711dbc43e00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="DateCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefef18711dbaa5000123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Date">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59aefff18711dbcde600123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="DateQualifier">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af00f18711db87f100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="DateQualifierCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af01f18711dbc9cf00123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ScheduleQuantities">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af02f18711dbc24100123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ListOfQuantityCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af03f18711db842900123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="QuantityCoded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af04f18711dbb59400123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="QuantityValue" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">2e59af05f18711dba6d900123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="UnitOfMeasurement">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a87e2580f18711dbc66f00123fbbc71c</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="UOMCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a87e2581f18711db89a000123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="QuantityQualifierCoded" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">a87e2582f18711db9a1500123fbbc71c</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> -
After Downloading, Error while opening PDF : PDF has no pages
After Downloading, Error while opening PDF : PDF has no pages
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = L_SPOOLNO
NO_DIALOG = SPACE
DST_DEVICE = MSTR_PRINT_PARMS-PDEST
IMPORTING
PDF_BYTECOUNT = MI_BYTECOUNT
TABLES
PDF = MTAB_PDF
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
Thanks in advance
Monika
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12.
Transfer the 132-long strings to 255-long strings
LOOP AT MTAB_PDF.
TRANSLATE MTAB_PDF USING '~'.
CONCATENATE WA_BUFFER MTAB_PDF INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
it_attach = WA_BUFFER.
APPEND it_attach.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
****GET THE FILE NAME TO STORE....................
v_path = 'C:\PD Form\' .
CONCATENATE v_path p_pernr-low '.pdf' into v_name.
create object v_guiobj.
call method v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
if v_uact = v_guiobj->action_cancel.
leave to current transaction.
endif.
..................................DOWNLOAD AS FILE....................
move v_fullpath to v_filename.
call function 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = MI_BYTECOUNT
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_ATTACH
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.My Generated Spool request is PDF Spool. It contains Adobe Forms data. To Download Adobe form
Spool (PDF Spool) into PDF format,
First,
A) Read PDF Spool data by using u2018FPCOMP_CREATE_PDF_FROM_SPOOLu2019 Function module.
B) Assign the Output Data to XSTRING format
C) Convert that XSTRING data to Binary Format using 'SCMS_XSTRING_TO_BINARY' Function module.
D) Save File on Application server using OPEN DATASET , TRANSFER , CLOSE DATASET.You can see your
downloaded file in Transaction AL11 in specified directory.
You can save your file on Presentation server also using GUI_DOWNLOAD.
First three steps are necessary if your spool is PDF Spool.
Basically we need this when we are downloading Adodbe forms ( which is not a SAPScript or smartforms)
Example :
DATA :
e_pdf1 TYPE fpcontent,
e_renderpagecount1 TYPE i.
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = l_spoolno
i_partnum = '1'
IMPORTING
e_pdf = e_pdf1
e_renderpagecount = e_renderpagecount1
* E_PDF_FILE = E_PDF_FILE1
* EXCEPTIONS
* ADS_ERROR = 1
* USAGE_ERROR = 2
* SYSTEM_ERROR = 3
* INTERNAL_ERROR = 4
* OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA : buffer TYPE xstring,
append_to_table TYPE c.
DATA : output_length TYPE i.
TYPES : BEGIN OF ty_binary,
binary_field(1000) TYPE c,
END OF ty_binary.
DATA : lt_binary TYPE TABLE OF ty_binary WITH HEADER LINE.
DATA : lv_xstring TYPE xstring.
lv_xstring = e_pdf1.
* Convert xstring to binary.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_xstring
append_to_table = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
binary_tab = lt_binary.
DATA : wa_binary LIKE lt_binary.
DATA: BEGIN OF itab OCCURS 0,
field(256),
END OF itab.
DATA: dsn(50000) VALUE '/usr/sap/tmp/',
length LIKE sy-tabix,
lengthn LIKE sy-tabix.
CONCATENATE '/usr/sap/tmp/' lv_pernr '.pdf' INTO dsn.
******* Save file on Application server
OPEN DATASET dsn FOR OUTPUT IN BINARY MODE.
LOOP AT lt_binary.
TRANSFER lt_binary-binary_field TO dsn.
ENDLOOP.
CLOSE DATASET dsn.
CLEAR lt_binary.
REFRESH lt_binary.
cheers -
How to get the right file name in an attachment
I have design a program to get the attach file from an attachment. But when I click the link to save the file, the default name of the file is 'attach' whenever I get different files. Who know what is the problem, please tell me the truth.
Here are some codes of the program.
download.jsp
<%="test.doc"%>
web.xml
<servlet-mapping>
<servlet-name>AttachmentServlet</servlet-name>
<url-pattern>attachment</url-pattern>
</servlet-mapping>
AttachmentServlet.java
public void doGet
Message msg = folder.getMessage(msgNum);
// the message I get is right and the name of the file in
// the attach in this message is right too.(I have printed)
Multipart multipart = (Multipart)msg.getContent();
Part part = multipart.getBodyPart(partNum);
ContentType ct = new ContentType(sct);
response.setContentType(ct.getBaseType());
InputStream is = part.getInputStream();
int i;
while ((i = is.read()) != -1) {
out.write(i);
out.flush();
out.close();The trick that I used is to append the URL with the name of the file. So if your url is "http://domain.com/attach", use "http://domain.com/attach/filename.doc". IE and Netscape parse the URL to determine what the filename is, so by placing this text at the end, you essentially let the browsers know what the filename is. :)
I have design a program to get the attach file from an
attachment. But when I click the link to save the
file, the default name of the file is 'attach'
whenever I get different files. Who know what is the
problem, please tell me the truth.
Here are some codes of the program.<< snip >> -
Refresh Runtime Error in TCODE DB02
Hello Experts!
Was just trying to refresh the statistics that I have for my DB Spaces in DB02, but I suddenly come up with this error. Can anyone tell me what this means and why this is suddenly happening (As I had no problems using this functionality just last week). Thanks!
ST22 Error Log:
Runtime Errors DBIF_DSQL2_SQL_ERROR
Exception CX_SY_NATIVE_SQL_ERROR
Occurred on 03/30/2009 at 11:11:51
SQL error "-727" occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "DEFAULT".
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_NATIVE_SQL_ERROR', was not
caught, which
led to a runtime error. The reason for this exception is:
How to correct the error
Database error text........: "INF-727: Invalid or NULL TBLspace number given to
dbinfo(dbspace)."
Triggering SQL statement...: "FETCH NEXT "
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"DBIF_DSQL2_SQL_ERROR" CX_SY_NATIVE_SQL_ERRORC
"RSINFTD1 " or "RSINFTD1 "
"START-OF-SELECTION"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
SM21 Error Log:
BY2 Database error -727 at FET
BY0 > INF-727: Invalid or NULL TBLspace number given to
BY0 > dbinfo(dbspace).
R68 Perform rollback
AB0 Run-time error "DBIF_DSQL2_SQL_ERROR" occurred
AB1 > Short dump "090330 111151 gtbwspd 10002568 " generatedHi.
I already had this issue and I solved by this way:
My issue happened in the following SQL statement:
94 EXEC SQL.
SELECT MAX(A.NEXTSIZE)
96 FROM SYSTABLES A, SYSFRAGMENTS B
97 WHERE DBINFO('DBSPACE',B.PARTN) = :TS_CHECK-DBSNAME
98 AND A.PARTNUM = 0
99 AND A.TABID = B.TABID
100 INTO :MAXEXT
101 ENDEXEC.
1) Please run the following sql query:
select fragtype, tabid, partn from sysfragments where partn = 0
2) Figure out which table it is:
select tabname from systables where tabid =<tabid>
3) Check the indexes of that table with oncheck -cI.
4) If you found indexes DISABLED, then you should enable them again.
5) To solve the problem you can:
-enable dropped indexes:
set indexes,constraints for <table> enabled;
-rebuild the indexes
Afterwards this operation should be corrected.
I hope I could be helpful.
Thanks,
Walter Oliveira. -
Converting Schema attributes to elements
I have trouble registering a schema into Oracle. The problem seems to be that the schema defines Attributes and Oracle does not like Attributes.
Does someone have a XSL to convert schema attributes into elements?
I am able to convert the attributes in the XML data file to elements.
Any help will be appreciated
Thanks
SPThe following xml schema is from the Oracle XML guide. It has attributes in it.
I've used XMLSpy to validate my xsd before, and it indicated they where valid when indeed it was not. That is why I now use the link I sent previously.
The purchase-order XML schema is contained in file po.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
<xsd:complexType name="USAddress">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="zip" type="xsd:decimal"/>
</xsd:sequence>
<xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/>
</xsd:complexType>
<xsd:complexType name="Items">
<xsd:sequence>
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="productName" type="xsd:string"/>
<xsd:element name="quantity">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="USPrice" type="xsd:decimal"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="partNum" type="SKU" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType> -
XML to ABAP Conversion Error - CX_SY_CONVERSION_DATA_LOSS
REPORT y_rpt_test .
TYPE-POOLS sscr.
DATA: restrict TYPE sscr_restrict,
opt_list TYPE sscr_opt_list,
*** TYPE sscr_***.
DATA: options TYPE STANDARD TABLE OF rfc_db_opt ,
fields TYPE STANDARD TABLE OF rfc_db_fld ,
meta TYPE STANDARD TABLE OF ywas_metadata ,
xml_out TYPE string .
data: xml_out_x type xstring.
DATA: wa_options LIKE LINE OF options,
wa_fields LIKE LINE OF fields ,
wa_meta LIKE LINE OF meta .
FIELD-SYMBOLS: <outtab> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
DATA: new_table TYPE REF TO data.
DATA: new_line TYPE REF TO data.
DATA: xslt_error TYPE REF TO cx_xslt_exception ,
xslt_message TYPE string .
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
TYPES: BEGIN OF s_text,
partnum(18) TYPE c,
LONG_DESC(3000) TYPE c,
END OF s_text.
data: lt_outtab type standard table of s_text,
is_outtab type s_text.
data: it_temp_text(1000) TYPE c OCCURS 0 with header line.
data : l_file TYPE string value 'C:xmlload.xml'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
FILETYPE = 'ASC'
tables
data_tab = it_temp_text.
loop at it_temp_text.
concatenate xml_out it_temp_text into xml_out.
endloop.
IF NOT xml_out IS INITIAL .
TRY .
CALL TRANSFORMATION (`ZTEST1`)
SOURCE XML xml_out
RESULT outtab = lt_outtab.
CATCH cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error->get_text( ).
WRITE:/ xslt_message .
ENDTRY.
ENDIF .
break-point.
write : / 'test'.
==========================================================
I am using above code to convert input XML file into internal table I am getting conversion error. My input XML file looks is as follows. It is throwing this error in call transformation. Appreciate your help in Advance.
<MODIFIED BY MODERATOR - RESPECT THE 2,500 CHAR LIMIT>
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 3:31 PMThanks for quick response.
I think the problem is with special characters in the input XML file. If I don't have special characters in XML file then it works fine.
Anyway here is the XSLT code. This is a generic XSLT code which I used from one of the examples
posted on this site.
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xa="urn:schemas-microsoft-com:xml-analysis:mddataset" xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<xsl:output method="xml" />
<xsl:variable name="fieldNames" select="//asx:abap/asx:values/FIELDCAT" />
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<!--FIELDCAT>
<xsl:apply-templates select="//YWAS_METADATA" />
</FIELDCAT-->
<OUTTAB>
<xsl:apply-templates select="//item" />
</OUTTAB>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="//YWAS_METADATA">
<item>
<xsl:for-each select="*">
<!--column ><xsl:apply-templates/></column-->
<xsl:copy>
<xsl:apply-templates select="@*|*|text()"/>
</xsl:copy>
</xsl:for-each>
</item>
</xsl:template>
<xsl:template match="//item">
<item>
<xsl:for-each select="*">
<!--column ><xsl:apply-templates/></column-->
<xsl:copy>
<xsl:apply-templates select="@*|*|text()"/>
</xsl:copy>
</xsl:for-each>
</item>
</xsl:template>
</xsl:stylesheet>
Maybe you are looking for
-
Boot error 34 with Windows 8.1 on Lenovo Yoga 13
Bought my Yoga 13 with Windows 8 pre-installed and updated it to 8.1. Worked since Oct 2013. Starting yesterday after shutdown and new power on allways get blue screen saying: Recovery Your PC needs to be repaired The Boot Configuration Data file is
-
How to change the text alignment of an adf table column
Hi everyone I have a read only adf table that uses banding. What I want to do is change the text align property of one of it's columns but the task seems not at all trivial. I tried entering a value for the text-align property in the inline style of
-
Some conditional text in text inset showing when text inset is set to condition and hidden
I'm using Frame 8 on XP Pro SP3. I have some text insets that I want to mark to appear or disappear depending on whether the document needs them or not. One is "domestic" and the other is "row". My problem is that within the text inset is a condition
-
How can I use an unlocked Droid Razr M with another company's sim card?
How do you use another company's sim card in an unlocked Droid Razr M? I tried the phone in both Global and GSM mode, but both say unknown sim card, and cannot find a network.
-
How to validate password using LDAP using client script JSOM
Hi All, I have a requirement in my sharepoint 2013 project. I need to force user to signature digitally by reentering his password so that the system will validate his user name and password. If its validated user can access that document. For this,