Very Urgent - reading google api weather
I am new to xml.
I would like to read this xml http://www.google.com/ig/api?weather=Milano with a single sql query in a 10.2 oracle installation.
Could you help me?
I don't want to develop pl-sql, only a single sql statement.
In particular I would like to read current_condition/condition data & temp_c data.
Thanks a lot.
Well, there's no real difference between this and what you posted recently : {message:id=10143724}
Try to invest some time in understanding XMLTable syntax, and maybe you won't need to post such a "very urgent" request in the future and figure the answer by yourself.
The documentation is here for your version :
http://docs.oracle.com/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#sthref1705
select *
from xmltable(
'/xml_api_reply/weather/current_conditions'
passing httpuritype('http://www.google.com/ig/api?weather=Milano').getXML()
columns condition varchar2(100) path 'condition/@data'
, temp_c number path 'temp_c/@data'
;
Similar Messages
-
Very urgent reading google api
I am new to xml.
I would like to read this xml http://www.google.com/ig/api?weather=Milano with a single sql query in a 10.2 oracle installation.
Could you help me?
I don't want to develop pl-sql, only a single sql statement.
In particular I would like to read current_condition/condition data & temp_c data.
Thanks a lot.No need to duplicate...
{thread:id=2352525} -
( very urgent ) read data from bw to live cache
hi,
i am very mew to APO LIVE CACHE. i need to read the data from BW to LIVE CACHE for forecasting. i now the transaction lc10 and lc11. but the problem is i need to know where i have to give the BW cubes or BW information into LIVECACHE.
WOULD APPRECIATE UR HELP.
RGS,
SUGUNA.STry TCode/SAPAPO/TSCUBE or Program /SAPAPO/RTSINPUT_CUBE
Regards
Krishna Chaitanya.P -
Hi ; I want to delete unique record interms of lt_outlt-tabname eq 'SZTU' .
for example
date tabname
12022006 stzu
13022006 stzu
13022006 stzu
I want to delete 12022006 stzu record.
LOOP AT lt_outlt WHERE tabname EQ 'STZU'.
LOOP AT lt_outlt2 WHERE tabname EQ 'STZU'
AND udate EQ lt_outlt-udate
AND utime EQ lt_outlt-utime.
flag8 = 'X'.
ENDLOOP.
IF flag8 EQ 'X' .
DELETE lt_outlt.
CLEAR FLAG8.
ENDIF.
ENDLOOP.Hi,
Please try this.
LOOP AT lt_outlt WHERE tabname EQ 'STZU'.
READ TABLE lt_outlt2 WITH KEY tabname EQ 'STZU'
udate EQ lt_outlt-udate
utime EQ lt_outlt-utime.
IF SY-SUBRC = 0.
DELETE lt_outlt.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
Regards,
Ferry Lianto -
OTN TEAM Please respond-matrix reports row limitation(very urgent)
Hi ,
using with matrix reports for delimited reports what's the maxmimum row limitation for text and excel?
thanks in advance.
please advice asap.
thx in advance.See response in OTN TEAM Please respond-matrix reports row limitation(very urgent)
-
Read textfile in JSP (Very urgent� Pls Help)
Hi to all,
I have a very urgent problem. I need a JSP to read a textfile (c:\abc.txt).and display in it to a space <in a body tag> in a HTML page. Does anyone have any idea? Thanks in advance.
This is my HTML page.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Display</title>
</head>
<body>
<p>Text to display:</p>
</body>
</html>Usually, I would prefer to put the jsp code scriplets at the beginning if its purpose is to generate a string....
<%@ page contentType="text/html"
import="java.io.*, java.util.*" %>
<%
String fileName = "c:\\abc.txt" ;
BufferedReader br = new BufferedReader(new FileReader(fileName));
String line = br.readLine() ;
while ( line != null )
out.write(line + "<br>");
line = br.readLine() ;
br.close();
%>
<html>
<head><title>JSP Page</title></head>
<body>
<p>
<%= line%>
</p>
</body>
</html> -
Hi All,
I am developeing some self service application thru Oracle Application Framework(OAF). There I am fetching 5 attributes from the database and displaying those attributes in my main page Table Region. Now my requirement is i want to edit that exising values & again i want to store it in the databse while clicking the update button. so first i have created one VO for fetching the values from the database & i make one Table Region in my main page along with 5 MessageTextInput field.. & i mapped that VO's attributes to my textbox.Now i can able to fetch & display the values inside the text box while rendering the page.
But I dont know how to update the values in the database. Caz in my VO I have only select query. So anyone plz send me the code for update. And also plz let me know where to insert that code..whether (CO or AM or EO)..it is very urgent.
Thanks
sriniDavid,
Note that the default JavaBean datacontrol does not allow create/remove and transaction operations. These apis are not implemented for the JavaBean datacontrol.
You may re-initialize the rowsetiterator, by calling ((oracle.adf.model.generic.DCRowSetIteratorImpl)iteratorBinding.getRowSetIterator()).clearCurrentData().
This will force the RSI to refresh it's data via the named-accessor again. -
Hi,
I getting this error press on upload button , its working in google chrome and firefox
Error Page protection violation:
This may be caused by submitting a page that had not yet finished loading or by manual alteration of protected page items.For further assistance, please contact theapplication administrator.Contact your application administrator.
Please help me any oneFirst, please don't post questions/issues and start with "Very Urgent". If you have an "urgent" issue I recommend you contact Oracle Support. Second, if your issue is so urgent, I further recommend that you read this (url below) before going any further. Posting questions without including product names, versions, and related information like platform, configuration and so on, will make it almost impossible for anyone to help you.
http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
Finally, I am going to guess and say that you are having problems with Oracle Apex version 4.2. If I am correct, I will tell you that this forum space is for Oracle Forms. APEX questions should be posted here (below). However, if you plan to post the same issue there, please consider reading the blog I mentioned above and follow its recommendations before posting anywhere else.
https://community.oracle.com/community/developer/english/oracle_database/application_express -
Error while opening a module. plz help me, very urgent.
when i try to open a module, the following error message appears on my screen.
" no j2ee component found in d:\krisp\programs\servlets".
i've installed bea in c: drive and my servlet program is in d: drive.
plz help me, it's very urgent.Can you provide some more information? What were you doing when this happened?
Can you post the entire error message?
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
How to write code for this logic in a routine, very urgent --help me
hi all,
i want to apply this logic into one subroutin ZABC.
here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
4.1 Read the company code number BSEG-BUKRS from document line item.
4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
4.4 If business area match is found, go to step 3.9. Else continue.
4.5 If BKPF-BLART IN set ZVS_POSDT OR BKPF-XBLNR starts with I0*, execute steps below. Else, go to Step 3.6.
i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
i. Insert WA_ZFIBUE INTO ZFIBUE.
ii. Send email notification to the user (if it is not already sent to user on the same posting date).
Use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail.
Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
iii. Increment the running serial number and update ZFICO with new serial number.
a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
b. Update ZFICO Set value1 = GV_SERIALNO
Where PARAMTYPE = "BPM030307" AND
SUBTYPE = "ZFIBUE" AND
KEY1 = "SERIALNO".
iv Move VDFT to BSEG-GSBER.
v. Exit routine.
4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
4.7 If SY-BATCH = INITIAL AND GV_MTART <> ROH, issue the error message - Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>. Else, go to step 3.8.
4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ROH, issue the error message - Maintain product hierarchy on article master. Go to step 3.10.
4.9 Move GV_GSBER TO BSEG-GSBER.
4.10 Exit Routine
plz give me reply asap --this is very urgent
thanks in advance
swathiHi Swathi,
If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop. -
How do I use doGoogleSearch to connect to Google API
Hello all,
I am trying to do my final year project and I am currently having trouble connecting to the Google API using doGoogleSearch. I dont know how to use http://api.google.com/GoogleSearch.wsdl to fill in the parameters for the doGoogleSearch and then I have to use the http://api.google.com/search/beta2 to connect to Google and perform the test. Any help would be appreciated or code or links
Thanks in advance rgds,
Tony
Here is my code so far...................................
package tony_buckley_project;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.net.URI;
import java.net.URLConnection;
import java.util.*;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import com.google.soap.search.GoogleSearch;
import com.google.soap.search.GoogleSearchResult;
import com.google.soap.search.GoogleSearchFault;
import com.google.soap.search.GoogleSearchResultElement;
import com.google.soap.search.*;
import javax.xml.soap.*;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.w3c.dom.*;
import java.io.FileInputStream;
import javax.xml.transform.stream.StreamSource;
import javax.xml.messaging.URLEndpoint;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.*;
* <p>Title: Mr. Tony Buckley</p>
* <p>Description: </p>
* <p>Copyright: Copyright Tony Buckley (c) 2004</p>
* <p>Company: Cork Institute of Technology </p>
* @[email protected]
* @version 1.0
public class Applet2 extends Frame implements WindowListener , ActionListener
TextField searchField;
Button search , quit;
Canvas0 canvas;
public Applet2()
super();
//Set up basic window
setTitle("Tony Buckley Final Year Project");
setBackground(Color.white);
setSize(500 , 400);
addWindowListener(this);
//Set up area with buttons
//Search button
Panel p1 = new Panel();
p1.setLayout(new FlowLayout());
searchField = new TextField("" , 15);
p1.add(searchField);
search = new Button("Search the web for results...");
p1.add(search);
search.addActionListener(this);
//Quit button
Panel p2 = new Panel();
p2.setLayout(new FlowLayout());
Button quit = new Button("Quit");
p2.add(quit);
quit.addActionListener(this);
//Set up search results area
Canvas0 canvas = new Canvas0();
add("Center" , canvas);
Panel p4 = new Panel();
p4.setLayout(new GridLayout(2 , 1));
p4.add(p1);
p4.add(p2);
add("South" , p4);
}//End of constructor method public Applet2()
public void doGoogleSearch()
String key;
String q;
int start;
int maxResults;
boolean filter;
String restrict;
boolean safeSearch;
String lr;
String ie;
String oe;
public static void main(String[] args)
Applet2 app = new Applet2();
app.setVisible(true);
public void actionPerformed(ActionEvent event)
//Deals with "Quit" button
if(event.getSource() == quit)
dispose();
System.exit(0);
else if(event.getSource() == search)
/* try
String suggestion = search_internet .doSpellingSuggestion(spellingRequest);
if(suggestion == null)
System.out.println("There is no spelling suggestion in the database");
else
System.out.println(suggestion);
int startResult = 100;
search_internet.setStartResult(startResult);
int maxResult = 5;
search_internet.setMaxResults(maxResult);
GoogleSearchResult result_search_internet = search_internet.doSearch();
GoogleSearchResultElement[] resultElements = result_search_internet.getResultElements();
int startIndex = result_search_internet.getStartIndex() - 1 - startResult;
int endIndex = result_search_internet.getEndIndex() - 1 - startResult;
for(int i = startIndex ; i <= endIndex; i ++)
GoogleSearchResultElement resultElement = resultElements[(i)];
String title = resultElement.getTitle();
String URL = resultElement.getURL();
System.out.println(title);
System.out.println(URL);
System.out.println("");
System.out.println("Start Index = " + result_search_internet.getStartIndex());
System.out.println("End Index = " + result_search_internet.getEndIndex());
System.out.println(result_search_internet.toString());
int numResults = result_search_internet.getEstimatedTotalResultsCount();
if(result_search_internet.getEstimateIsExact())
System.out.println("Number of results: " +numResults);
else
System.out.println("Estimated number of results: " +numResults);
//catch(GoogleSearchFault gsf)
// System.out.println("Google Search Fault: " +gsf.getMessage());
try
String myKey = "0RK+HoNQFHJlcbNPfxgBpcjESUWV96aO";
String wsdl = "http://api.google.com/GoogleSearch.wsdl";
String url = "http://api.google.com/search/beta2";
String ns1 = "urn:GoogleSearch";
String searchTerm;
searchTerm = "science fiction";
String spellingRequest = searchTerm;
//First create the connection
SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnFactory.createConnection();
//Create the actual message
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
//Create objects for the message parts
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
//Populate the message
SOAPElement bodyElement = body.addChildElement(envelope.createName("doGoogleSearch" , "ns1", ns1));
GoogleSearch search = new GoogleSearch();
search.setKey(myKey);
search.setQueryString(searchTerm);
//Save the message
message.saveChanges();
//Send the message and get a reply
//Set the destination
URLEndpoint destination = new URLEndpoint(url);
//Send the message
SOAPMessage reply = connection.call(message, destination);
SOAPPart sp = reply.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
Source sourceContent = reply.getSOAPPart().getContent();
StreamResult result = new StreamResult(System.out);
transformer.transform(sourceContent, result);
//Close the connection
connection.close();
catch(Exception e)
System.out.println(e.getMessage());
}//End of method actionPerformed
public void windowClosing(WindowEvent event)
//Deals with the window closing
dispose();
System.exit(0);
}//End of method windowClosing
public void windowOpened(WindowEvent event)
public void windowIconified(WindowEvent event)
public void windowDeiconified(WindowEvent event)
public void windowClosed(WindowEvent event)
public void windowActivated(WindowEvent event)
public void windowDeactivated(WindowEvent event)
}//End of class Applet2
class Canvas0 extends Canvas
public Canvas0()
super();
public void paint(Graphics g)
Dimension d = getSize();
Font f1 = new Font("TimesRoman" , Font.PLAIN , 14);
Font f2 = new Font("TimesRoman" , Font.ITALIC , 14);
FontMetrics fm1 = g.getFontMetrics(f1);
FontMetrics fm2 = g.getFontMetrics(f2);
String s1 = "Hello , ";
String s2 = "World";
int w1 =fm1.stringWidth(s1);
int w2 =fm1.stringWidth(s2);
g.setColor(Color.GREEN);import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.net.URI;
import java.net.URLConnection;
import java.util.*;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import com.google.soap.search.GoogleSearch;
import com.google.soap.search.GoogleSearchResult;
import com.google.soap.search.GoogleSearchFault;
import com.google.soap.search.GoogleSearchResultElement;
import com.google.soap.search.*;
import javax.xml.soap.*;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import org.apache.soap.util.xml.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.w3c.dom.*;
import java.io.FileInputStream;
import javax.xml.transform.stream.StreamSource;
import javax.xml.messaging.URLEndpoint;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.*;
Title: Mr. Tony Buckley
Description:
Copyright: Copyright Tony Buckley (c) 2004
Company: Cork Institute of Technology
* @[email protected]
http://beingaplayer.x314.co.uk
* @version 1.0
public class Applet2 extends Frame implements WindowListener , ActionListener
TextField searchField;
Button search , quit;
Canvas0 canvas;
public Applet2()
super();
//Set up basic window
setTitle("Tony Buckley Final Year Project");
setBackground(Color.white);
setSize(500 , 400);
addWindowListener(this);
//Set up area with buttons
//Search button
Panel p1 = new Panel();
p1.setLayout(new FlowLayout());
searchField = new TextField("" , 15);
p1.add(searchField);
search = new Button("Search the web for results...");
p1.add(search);
search.addActionListener(this);
//Quit button
Panel p2 = new Panel();
p2.setLayout(new FlowLayout());
Button quit = new Button("Quit");
p2.add(quit);
quit.addActionListener(this);
//Set up search results area
Canvas0 canvas = new Canvas0();
add("Center" , canvas);
Panel p4 = new Panel();
p4.setLayout(new GridLayout(2 , 1));
p4.add(p1);
p4.add(p2);
add("South" , p4);
}//End of constructor method public Applet2()
public void doGoogleSearch()
String key;
String q;
int start;
int maxResults;
boolean filter;
String restrict;
boolean safeSearch;
String lr;
String ie;
String oe;
public static void main(String[] args)
Applet2 app = new Applet2();
app.setVisible(true);
public void actionPerformed(ActionEvent event)
//Deals with "Quit" button
if(event.getSource() == quit)
dispose();
System.exit(0);
else if(event.getSource() == search)
/* try
String suggestion = search_internet .doSpellingSuggestion(spellingRequest);
if(suggestion == null)
System.out.println("There is no spelling suggestion in the database");
else
System.out.println(suggestion);
int startResult = 100;
search_internet.setStartResult(startResult);
int maxResult = 5;
search_internet.setMaxResults(maxResult);
GoogleSearchResult result_search_internet = search_internet.doSearch();
GoogleSearchResultElement[] resultElements = result_search_internet.getResultElements();
int startIndex = result_search_internet.getStartIndex() - 1 - startResult;
int endIndex = result_search_internet.getEndIndex() - 1 - startResult;
for(int i = startIndex ; i <= endIndex; i ++)
GoogleSearchResultElement resultElement = resultElements[(i)];
String title = resultElement.getTitle();
String URL = resultElement.getURL();
System.out.println(title);
System.out.println(URL);
System.out.println("");
System.out.println("Start Index = " + result_search_internet.getStartIndex());
System.out.println("End Index = " + result_search_internet.getEndIndex());
System.out.println(result_search_internet.toString());
int numResults = result_search_internet.getEstimatedTotalResultsCount();
if(result_search_internet.getEstimateIsExact())
System.out.println("Number of results: " +numResults);
else
System.out.println("Estimated number of results: " +numResults);
//catch(GoogleSearchFault gsf)
// System.out.println("Google Search Fault: " +gsf.getMessage());
try
String myKey = "0RK+HoNQFHJlcbNPfxgBpcjESUWV96aO";
String wsdl = "http://api.google.com/GoogleSearch.wsdl";
String url = "http://api.google.com/search/beta2";
String ns1 = "urn:GoogleSearch";
String searchTerm;
searchTerm = "science fiction";
String spellingRequest = searchTerm;
//First create the connection
SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnFactory.createConnection();
//Create the actual message
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
//Create objects for the message parts
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
//Populate the message
SOAPElement bodyElement = body.addChildElement(envelope.createName("doGoogleSearch" , "ns1", ns1));
GoogleSearch search = new GoogleSearch();
search.setKey(myKey);
search.setQueryString(searchTerm);
//Save the message
message.saveChanges();
//Send the message and get a reply
//Set the destination
URLEndpoint destination = new URLEndpoint(url);
//Send the message
SOAPMessage reply = connection.call(message, destination);
SOAPPart sp = reply.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPBody sb = se.getBody();
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
Source sourceContent = reply.getSOAPPart().getContent();
StreamResult result = new StreamResult(System.out);
transformer.transform(sourceContent, result);
//Close the connection
connection.close();
catch(Exception e)
System.out.println(e.getMessage());
}//End of method actionPerformed
public void windowClosing(WindowEvent event)
//Deals with the window closing
dispose();
System.exit(0);
}//End of method windowClosing
public void windowOpened(WindowEvent event)
public void windowIconified(WindowEvent event)
public void windowDeiconified(WindowEvent event)
public void windowClosed(WindowEvent event)
public void windowActivated(WindowEvent event)
public void windowDeactivated(WindowEvent event)
}//End of class Applet2
class Canvas0 extends Canvas
public Canvas0()
super();
public void paint(Graphics g)
Dimension d = getSize();
Font f1 = new Font("TimesRoman" , Font.PLAIN , 14);
Font f2 = new Font("TimesRoman" , Font.ITALIC , 14);
FontMetrics fm1 = g.getFontMetrics(f1);
FontMetrics fm2 = g.getFontMetrics(f2);
String s1 = "Hello , ";
String s2 = "World";
int w1 =fm1.stringWidth(s1);
int w2 =fm1.stringWidth(s2);
g.setColor(Color.GREEN); -
Searching for the fields of a table(very very urgent)
Hi all,
i am in graet trouble now.i am searching for the fields like
1)country of origin where the finished good is created.
2) customer sales order number
3)customer sales order line number
i am writing a report for delivery order.in this report i have to refer customer PO & customer SO .
i mean, my company has a customer ( seagate) & seagate has a customer (let maxtor).initially maxtor will give a PO to seagate then seagate will raise a SO againest maxtor.
Then seagate will send PO number(of maxtor), PO line number,SO number(seagate), SO line number(seagate) to our company.
Then i have to write a report for sales order & delivery order.in these reports i have to refer seagate PO number & seagate SO number for reference.
i got PO number as vbkd-bstkd but not getting any field for reference Sales order.plz advice me on this. it is very very urgent.
ur idea is highly appreaciated.
Thank u very much.
Regards
pabitracheck out tables VBAK(sales order header), VBAP(sales items)
-
How to write code for this logic, plz help me very urgent
Hi All,
i am new to sap-abap, i got this work and i m working on this can any body help me in writing code, plz help me, this is very very urgent.
here i m giving my logic, can anybody send me the code related to this logic.
this is very urgent .
this program o/p should be in ALV format and need to create one commond 'SAVE" on this o/t list if user clicks save processedon and processedby fields in ZFIBUE should be updated automatically.
i am creating one custom table zfibue having fields: (serialno, bukrs, matnr,prdha,hkont,gsber,wrbtr,budat, credate, cretime,processed, processedon, processedby,mapped)
fields of zfibue:
serailno = numc
bukrs = char
matnr = char
prdha = char
hkont = char
gsber = char
wrbtr = char
budat = date
credate = date
cretime = time
processed= char
processedon = date
processedby = char
mapped = char are belongs to above type data types
and seelct-optionfields: s_bukrs for bseg-bukrs
s_hkont for bseg-hkont,
s_budat for bkpf-budat,
s_processed for zfibue-processed,
s_processedon for zfibue-processedon,
s_mapped. for zfibue-mapped
parameters: p_chk1 as checkbox,
p_chk2 as checkbox.
p_filepath type rlgrap-filename.
1.1 Validate the user inputs (S_BUKRS and S_HKONT) against respective check tables (T001 and SKB1). If the validation fails, provide respective error message. Eg: Invalid input for Company Code.
1.2 Fetch SERIALNO, BUKRS, MATNR, PRDHA, HKONT, GSBER, WRBTR, BUDAT, CREDATE, CRETIME, PROCESSED, PROCESSEDON, PROCESSEDBY, MAPPED from table ZFIBUE into internal table GT_ZFIBUE where BUKRS IN S_BUKRS, HKONT IN S_HKONT, BUDAT IN S_BUDAT, PROCESSED IN S_PROCESSED, PROCESSEDON IN S_PROCESSEDON, and MAPPED IN S_MAPPED.
1.3 If P_CHK2 = X, go to step 1.11. Else continue.
1.4 If P_CHK1 = X, continue. Else go to step 1.9
1.5 Fetch MATNR, PRDHA from MARA into GT_MARA for all entries in GT_ZFIBUE where MATNR = GT_ZFIBUE-MATNR.
1.6 Sort and delete adjacent duplicates from GT_MARA based on MATNR.
1.7 Loop through GT_ZFIBUE where PRDHA = blank.
Read Table GT_MARA based on MATNR = GT_ZFIBUE-MATNR.
IF sy-subrc = 0.
Move GT_MARA-PRDHA to GT_ZFIBUE-PRDHA.
Modify Table GT_ZFIBUE. Update Product Hierarchy
Endif.
Fetch PRDHA, GSBER from ZFIBU into GT_ZFIBU for all entries in GT_ZFIBUE where PRDHA = GT_ZFIBUE-PRDHA.
Read Table GT_ZFIBU based on PRDHA = GT_ZFIBUE-PRDHA.
IF sy-subrc = 0.
Move GT_ZFIBU-GSBER to GT_ZFIBUE-GSBER.
Move X to GT_ZFIBUE-MAPPED.
Modify Table GT_ZFIBUE.
Endif.
Endloop.
1.8 Modify database table ZFIBUE from GT_ZFIBUE.
1.9 Fill the field catalog table GT_FIELDCAT using the details of output fields listed in section Inputs/Outputs (above).
Eg: LWA_ FIELDCAT -SELTEXT_L = 'Serial Number.
LWA_ FIELDCAT -DATATYPE = NUMC.
LWA_ FIELDCAT -OUTPUTLEN = 9.
LWA_ FIELDCAT -TABNAME = 'GT_ZFIBUE'.
LWA_ FIELDCAT-FIELDNAME = 'SERIALNO'.
Append LWA_FIELDCAT to GT_FIELDCAT
Note: a) The output field GT_ZFIBUE-PROCESSED will be editable marking INPUT = X in field catalog (GT_FIELDCAT).
b) The standard ALV functionality will be used to give the user option for selecting all or blocks of entries at a time.
c) The PF-STATUS STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN will be copied to the program and modified to include a SAVE button.
1.10 Call the function module REUSE_ALV_GRID_DISPLAY passing output table GT_ZFIBUE and field catalog GT_FIELDCAT. Additional parameters like I_CALLBACK_PF_STATUS_SET (= ZFIBUESTAT) and I_CALLBACK_USER_COMMAND (=HANDLE_USER_ACTION) will also be passed to handle user events. Go to 2.14.
1.11 Download the file to P_FILEPATH using function module GUI_DOWNLOAD passing GT_ZFIBUE.
1.12 Exit Program.
Logic to be implemented in routine Handle_User_Action
This routine will have the following interface:
FORM Handle_User_Action USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
ENDFORM.
Following logic will be implemented in this routine:
1. If r_ucomm = SAVE, continue. Else exit.
2. Loop through GT_ZFIBUE where SEL_ROW = X. Row is selected
a. IF GT_ZFIBUE-PROCESSED = X.
i. GT_ZFIBUE-PROCESSEDON = SY-DATUM.
ii. GT_ZFIBUE-PROCESSEDBY = SY-UNAME.
iii. MODIFY ZFIBUE FROM work area GT_ZFIBUE.
Endif.
Endloop.Hi Swathi,
If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop. -
Plz help me TEXTPOOL PROBLEM(VERY URGENT)
hi experts,
plz help in resolving this issue this is very urgent.
error is
The line type of "RPOOL" must be compatible with one of the types
"TEXTPOOL".
and its coming in :
FORM GET_SELSCREEN_TITLE TABLES P_SCREENS STRUCTURE DYNNR.
DATA: BEGIN OF RPOOL OCCURS 20,
ID(1),
NAME(8),
TEXT(80),
END OF RPOOL.
READ TEXTPOOL RSVAR-REPORT LANGUAGE SY-LANGU INTO RPOOL.
plz help me.Hi !
Try this :
DATA RPOOL LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
Reward if usefull,
Regards,
Stéphane. -
Experts plz help its very urgent
hi expert
plz help- me
previously i was getting dump in this statement
TRANSFER v_tab TO p_file.
FYI:
here v_tab is a table which hav som records
and p_file contains the path of a file like c:\new\ggg.txt
DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
TYPES: BEGIN OF t_line,
pspid(9) TYPE c,
tab1 TYPE x,
post1 TYPE proj-post1,
tab2 TYPE x,
vernr TYPE prps-vernr,
tab3 TYPE x,
END OF t_line.
DUMP I WAS GETTIN :
For the statement
"TRANSFER f TO ..."
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type "T_LINE". The
current program is a Unicode program. In the Unicode context, the type
'X' or structures containing not only character-type components are
regarded as non-character-type.
to avoid this dump i used feild symbol
assign V_TAB to <IN> casting.
p_file = <in>.
unassign <IN>.
nw there is no dump
but problem is p_file contains the contents of v_tab not the file path .
plz help me its very urgent
thanx in advanceHey, no probs,
after your initial declaration, do this.
TYPES: BEGIN OF n_line,
pspid(9) TYPE c,
tab1(15) TYPE c, "check the length you want
post1 TYPE proj-post1,
tab2(15) TYPE c, "check the length you want
vernr TYPE prps-vernr,
tab3(15) TYPE c, "check the length you want
END OF t_line.
DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
now after you fetch data into v_tab,
move it to n_tab.
using a loop at v_tab and move corresponding fields to n_tab's work area
append to n_tab.
once you have populated n_tab and are ready to TRANSFER.
OPEN your file using
open dataset <file> for output in text mode encoding default.
now
loop at n_tab.
TRANSFER n_tab to p_file.
endloop.
CLOSE DATASET.
Maybe you are looking for
-
Trying to play from an external drive created unexpected results
I have a Firelight drive that was full of music from another computer so I plugged it into my iMac then held down the option key while opening itunes.\ Choose Library didn't work so I clicked on Create a new Library in itunes. I wanted to just play a
-
Problems setting up dual monitors
I am having problems setting up dual monitors on a band new HP envy 700 using windows 8. I just bought this computer and bought DVI to via adapters to use. Everything is hooked up but nothing is happening on the 2nd monitor. Help!
-
CRM2011/3: Outlook CRM Cient Issues with Dual Domain (trusted forest)
We currently have CRM2011 but are about to migrate to CRM2013 and then to CRM2015. We have a configuration issue that we not sure is supported and seek clarification from the community please. Our CRM deployment is working fine with the browser and O
-
Remote desktop not working with dot1x authenticated machines
Hi, we are using machine and user authentication , when machine at logoff the machine is authenticated so users can RDP to it but after logging in the remote desktop session goes down because after user authentication the machine gets a new ip ad
-
Display menu items on mouseover
Hi, I want to display menu item on mouseover. Now the items get displayed only after we 'click' on the main menu. Is there any default property to set, to achieve this? Thanks