How to read url
Dear experts,
My application URL is
http://<my url : my port>/sap(bD1lbiZjPTIwMCZkPW1pbg==)/bc/bsp/sap/zhrrcf_mde_app/application.do
i'm calling this application with additional parameters like
http://<my url : my port>/sap(bD1lbiZjPTIwMCZkPW1pbg==)/bc/bsp/sap/zhrrcf_mde_app/application.do/?usr=P41005563
in my application i want to read this second url with this parameter "usr".....how do i do this ?
Thanks & Regards,
Deepak,
9890662966
Hello,
it depends on how you structure your development. If you´re using pages with logic, you can declare parameter USR in the page attributes and click on checkbox auto. In that way, when you call the page the system pulls the value in the URL automatically and you can use it in your page.
Check also [this link|;
Similar Messages
-
How to read URL parameters of one wdp component into other WDP component?
Dear Experts,
Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
My requirement is i have one standard WDP component with 3 URL parameters and i needto
read that URL parameters along with their values in my Z-WDP component.
Thanks
SKHi Santosh,
You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
data: lt_parameter type tihttpnvp,
ls_parameter type ihttpnvp.
lo_api_controller ?= wd_this->wd_get_api( ).
call method lo_api_controller->get_message_manager
receiving
message_manager = lo_message_manager.
clear : ls_parameter.
refresh : lt_parameter[].
* Read all URL parameters
wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
if not lt_parameter[] is initial.
clear : ls_parameter.
read table lt_parameter into ls_parameter index 1.
if ls_parameter-name = 'ACTION' and
ls_parameter-value is initial.
lv_flag = 'X'.
clear : lo_msg.
lo_msg = 'Action Parameter Missing in URL Link !'.
* report message
call method lo_message_manager->report_error_message
exporting
message_text = lo_msg.
else.
endif.
Best Regards
Priyesh Shah -
Hi All,
How to read URL parameters in another WDA.
Thanks in advancehere is the sample code.
you can write this code in HANDLEDEFAULT method of Default Window of Application being called.
DATA:
wa_url TYPE LINE OF tihttpnvp,
int_url TYPE tihttpnvp.
wdevent->get_data(
EXPORTING
name = if_wd_application=>all_url_parameters
IMPORTING
value = int_url ). -
How to read URL Parameters in ABAP WebDynpro ?
Hi,
How and where (which class, method) in ABAP WebDynpro we can read URL Parameters ? I found answers for WebDynpro JAVA but nothing for ABAP.
Thanks
MeenalHi Meenal,
Please see a post by Sanjay Agarwal titled 'Sequencing Problem in Web Dynpro ABAP'. I believe you will find your answer there.
Cheers,
Rich -
HTTP Sender - how to read URL Parameter USER id into Mapping
Hi,
My scenario is HTTP - XI - ABAP Proxy.
I wanted to capture USER id of the person who posted(HTTP) into XI(Mapping). How to read/evaluate the value of sap-user from querystring of URL ?
http://HOST:8008/sap/xi/adapter_plain?namespace=http%3A//abc.com/sales_oa&interface=MI_sales_OA&service=DEV_D&party=&agency=&scheme=&QOS=EO&<b>sap-user=SM9999</b>&sap-password=xxxxx&sap-client=001&sap-language=EN
please help.Mallik,
Try URL Parameters in HTTP sender communication channel.
In the sender communication channel set Adapter Specific Message Attributes. Click on Apply URL Parameters. In Parameter1 put sap-user (U can query any URL parameter by giving its name as in the HTTP URL).
Now in SXMB_MONI, in inbound payload SOAP Header, under Dynamic configuration u can see the value of the user. Query the same in Mapping using Dynamic Configuration using keyName as UrlParamOne.
Regards,
Sudharshan N A
Message was edited by:
Sudharshan Aravamudan -
How to read url variable javascript problem
How to read the variable of latitude 1.22 and longitude 103.56.
This is my website: 127.0.0.1/1/map2.htm?latitude=1.22&longitude=103.56
function getUrl_Map()
//Get the variables in the URL
var vars = [], hash;
var latitude = getUrlVars()["latitude"];
//To get the second parameter
var longitude= getUrlVars()["longitude"];
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
alert('DEBUG: hashes= ' + hashes);
// read the file http://127.0.0.1/1/map2.htm
// read the file http://127.0.0.1/1/map2.htm? -->hashes
for(var i = 0; i < hashes.length; i++)
hash = hashes.split('=');
//alert('DEBUG: i= ' + i);
//i=0
alert('DEBUG: i= ' + i + 'hash = ' + hash );
vars.push(hash [0]);
vars[hash [0]] = hash [1];by the way you know that 127.0.0.1 is the address you use to get to your own computer right? It's the loopback address. so posting it doesn't really help anybody see the page, if that was what you were hoping.
-
How to read url parameters from a decoded string
Hi,
Normally if I pass on a url string
test.cfm?name=abc&num=8, I can do url.name and url.num
to get the url parameters. But what if the url string is decoded by
javascript escape() function? The above url string becomes
test.cfm%3Fname%3Dabc%26num%3D8
How can I read url.name and url.num from this string?
Thanks!
MinEscape is not really meant for urls because it encodes the
delimiters: ? &
http://www.w3schools.com/jsref/jsref_encodeURI.asp
http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp -
How to read URL by button action event
Hi,
Can some one please show me how to add a ...... I call it URL reader to the action of a button of another class?
Lets say I have a url reader class and the following code
public void uRLReader() throws Exception {
// URL concatenation
String url1 = "http://";
String url2 = "";
String url3 = ".google.com";
URL google = new URL(url1+url2+url3);
BufferedReader in = new BufferedReader(
new InputStreamReader(
google.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}Now I also got another class in the same package "class2", it has a button. Similarly, another class which has a JTextField. Now when some one writes 1 and hit the button I want "1" to get inserted into url in "url2" position. In other words any thing that is entered in the JTextField should be inserted into "url2" position.
I am not very much familiar with java so this is all I could write. I used a string concatenation to break the url. Can some please show me how do I add this to the button of another class and the button to JTextFiled of another class?
Thank youFirst of all, change your method so that url2 is an argument of the method:
public void uRLReader(String url2) throws Exception {and remove the declaration of url2 from the body of the method.
Then, write and ActionListener class (it could be an anonymous inner class) to read the textfield you want, then invoke uRLReader, passing that text as an argument.
That's basically it. -
Hello,
In my program I read images from a url...I'm wondering how many images I can get with ImageIO.read(url) per second..
Hereby is the code that I'm using:
import java.awt.*; //Contains all of the classes for creating user interfaces and for painting graphics and images
import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
import java.awt.image.*;//Provides classes for creating and modifying images
import java.io.*;//Provides for system input and output through data streams, serialization and the file system
import java.net.URL;
import javax.imageio.*;//The main package of the Java Image I/O API.
import javax.swing.*;//Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
import java.text.*;
import java.text.SimpleDateFormat;
import java.util.Date;
public class getPic extends Component{
private BufferedImage img;
static int n=0;
private URL url;
private DateFormat dateFormat;
private Date date;
private String s;
private String str1= ".jpeg";
private String str2="C:\\Users\\";
private String str3;
private String str4;
public getPic() {
try {
url = new URL("http://"); //a url that gives a real-time image
img = ImageIO.read(url);
} catch (IOException e) {
System.err.println("Unable to read file");
public void savePic(){
try{
n++;
str3=str2.concat(Integer.toString(n-1));
str4=str3.concat(str1);
ImageIO.write(img, "jpeg" , new File(str4));
} catch(IOException e) {
System.err.println("Unable to output results");
@Override
public Dimension getPreferredSize() {
if (img == null) {
return new Dimension(100,100);
} else {
return new Dimension(img.getWidth(), img.getHeight());
@Override
public void paint(Graphics g) { //http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Paint.html
g.drawImage(img, 10, 10, null);//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Graphics.html
public static void main(String[] args) throws IOException {
JFrame f = new JFrame(" Image without processing!!");
f.addWindowListener(new WindowAdapter(){//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/WindowListener.html
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
int i=0;
for( ; ; ){
i++;
getPic pi = new getPic();
pi.savePic();
f.add(pi);
f.pack(); //Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
f.setVisible(true);
try
Thread.sleep(1000);
}catch (InterruptedException ie)
System.out.println(ie.getMessage());
}Thank you in advance for your answers
JoanFinally I solved my problem(getting as many images as possible from a url infinitely) using the above code:
import java.net.*;
import java.io.*;
public class UserApplication {
private static int n=0;
String url;
public void UserApplication(){
public static void main(String[] args) throws Exception {
UserApplication app= new UserApplication();
for(;;){
app.urlStr();
private void urlStr(){
try{
url= "http://mplamplampla/frame.php/";
HttpURLConnection con=(HttpURLConnection) ((new URL(url).openConnection()));
BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream("C:\\Users\\mpla\\Desktop\\" + n + ".jpeg"));
con.setDoInput(true);
con.setDoOutput(false);
con.setRequestMethod("GET");
BufferedInputStream in = new BufferedInputStream(con.getInputStream());
int bt = 0;
byte[] buffer = new byte[4096];
while ((bt = in.read(buffer, 0, 4096)) > -1) {
out.write(buffer, 0, bt);
in.close();
out.close();
System.out.println("Image " + n + " saved");
n++;
} catch (Exception e) {e.printStackTrace();}
} -
How to read XML file kept on NON-SAP server using the Http URL ?
Dear Experts,
I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
All i have with me is the http URL that points to the location of the file.
I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
Please help me as its an urgent issue .
Points will be rewarded for sure.
Please help.
Thanks in advance,
Suchita.
p.s. : the http url to the file location is like -->
http://SomeServerDomain/SomeDirectory/file.xmlhi,
interesting task.
to request the file by a http call you need to create an if_http_client object.
More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
have fun,
anton -
How to Read/Update GOS URL
Good day Gurus,
I created a program to create URL in GOS. My scenarios are these.
1. Check the contract in RE80 if URL Title "Testing" is already attached. If not, create the URL. Please help how to check if such URL title is already attached.
2. If its already attached, I need to update the URL link. I've check FM SO_OBJECT_UPDATE but it needs the Folder ID and Object ID. How will I get these parameters?
Thank you in advance.see the following example to Read URL form GOS
REPORT ZGOS_READ_URL.
tables:
srgbtbrel. "Relationships in GOS Environment
parameters:
p_objkey like borident-objkey
default '0000101774',
p_objtyp like borident-objtype
default 'KNA1'.
start-of-selection.
perform display_attachment.
*& Form display_attachment
form display_attachment.
data:
l_objkey type swo_typeid,
lo_gos_service type ref to cl_gos_document_service,
ls_srgbtbrel type srgbtbrel,
lt_srgbtbrel type srgbtbrel occurs 10.
*" Get a list of the links and choose one:
select *
into corresponding fields of table lt_srgbtbrel
from srgbtbrel
where instid_a = p_objkey
and typeid_a = p_objtyp
* and reltype = 'URL'.
and reltype = 'ATTA'.
*" Exit if no attachments found
if lines( lt_srgbtbrel ) is initial.
exit.
endif.
*" Choose first one and set up the ident for the BOR
sort lt_srgbtbrel by utctime. "put oldest top for this demo
read table lt_srgbtbrel into ls_srgbtbrel index 1.
l_objkey = ls_srgbtbrel-instid_b. "i.e. the Note's ID
create object lo_gos_service.
* call method lo_gos_service->display_note
* call method lo_gos_service->DISPLAY_URL
call method lo_gos_service->DISPLAY_ATTACHMENT
exporting
ip_ATTACHMENT = l_objkey.
* ip_URL = l_objkey.
break developer. -
How to read excel file in document library and store excel content in sql table
Hello,
Can anyone help me how to read the excel file present in document library and store the content inside excel into sql table?
Please let me know the ways to acheive this. Feel free to give your suggestions.
Thanks,
Cool DeveloperHi!
this code i have written becuase i donot find any soltions on net for this , u can try with this . :)
System.Data.OleDb.
OleDbConnection ExcelConnection = null;
FileMode fileMode;
string filePath = ConfigurationManager.AppSettings["TempLoaction"] + "\\" + fileName;
using (SPSite _site = new SPSite(SPContext.Current.Web.Url))
using (SPWeb _web = _site.OpenWeb())
string docLibrary = ConfigurationManager.AppSettings["DocumentLibrary"];
SPFile _file = _web.GetFile("/" + docLibrary + "/" + fileName);
fileMode =
FileMode.Create;
byte[] byteArray = _file.OpenBinary();
MemoryStream dataStream = new MemoryStream(byteArray);
Stream stream = dataStream;
using (FileStream fs = File.Open(filePath, fileMode))
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
fs.Write(buffer, 0, bytesRead);
fs.Close();
//Create the Connection String
try
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source ='"
+ filePath + "'; Extended Properties=Excel 5.0";
//Create the connection
ExcelConnection =
new System.Data.OleDb.OleDbConnection(ConnectionString);
//create a string for the query
string ExcelQuery;
//Sheet1 is the sheet name
//create the query:
//read columns from the Excel file
ExcelQuery =
"Select * from [Sheet1$]"; // from Sheet1";
//use "Select * ... " to select the entire sheet
//create the command
System.Data.OleDb.
OleDbCommand ExcelCommand = new System.Data.OleDb.OleDbCommand(ExcelQuery, ExcelConnection);
//Open the connection
ExcelConnection.Open();
//Create a reader
System.Data.OleDb.
OleDbDataReader ExcelReader;
ExcelReader = ExcelCommand.ExecuteReader();
//For each row after the first
while (ExcelReader.Read())
thanks,
kshitij -
How to read Excel file in flex
Hi,
I am new to Adobe flex and i dont know how to read Excel in flex and i need coding for that. So anybody help me...
thanks in advance...Hi
You can read and parse XLS files (only works with xls-files) with urlloader and a ZIP-lib that can read zip-files.
public function loadXLS(url:String):void
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.addEventListener(Event.COMPLETE, onLoadComplete);
urlLoader.load(new URLRequest(url));
private function onLoadComplete(even:Event):void
urlLoader.removeEventListener(Event.COMPLETE, onLoadComplete);
model.sheetsDict = new Dictionary();
var zipFile:ZipFile = new ZipFile(urlLoader.data);
for(var i:int = 0; i < zipFile.entries.length; i++)
var entry:ZipEntry = zipFile.entries[i];
var data:ByteArray = zipFile.getInput(entry);
if(useFile(entry.name, "/sheet([^$]+)"))
model.sheetsDict[entry.name.split("xl/")[1]] = new XML(data.toString());
else if( useFile(entry.name, "/sharedStrings.xml") )
model.sharedStrings = new XML(data.toString());
else if( useFile(entry.name, "/workbook.xml$") )
model.workbook = new XML(data.toString());
else if( useFile(entry.name, "/workbook.xml.rels") )
model.rels = new XML(data.toString());
trace(model.sharedStrings)
to read the xml properly you have to use namespaces in the reader-class
namespace ns1 = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
use namespace ns1;
namespace ns2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
use namespace ns2;
namespace ns3 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
use namespace ns3;
namespace ns4 = "urn:schemas-microsoft-com:mac:vml";
use namespace ns4;
namespace ns5 = "http://schemas.openxmlformats.org/package/2006/relationships";
use namespace ns5;
//Olof -
How to read accdb and mdb files using JDBC or File Adapter
Hi,
How to read and extract the .accdb and .mdb files from FTP server and parsing into xml by using FTP or JDBC Adapter in SAP PI7.11 With linx Os.
Regards
UpendraHi,
As per SAP note:1681420 i have to install the below driver from Microsoft
Our SAP PI installed under Unxi OS ,how to install the driver (.exe file) .
Driver name :AccessDatabaseEngine_x64.exe
Url:Download Microsoft Access Database Engine 2010 Redistributable from Official Microsoft Download Center
1681420 - PI : Where to locate the JDBC Driver for Microsoft Access
Regards
Upendra -
How to delete URL Maintenance in peoplesoft
how to delete URL Maintenance in peoplesoft , Please any one suggest to me how to delete identifier.
Navigation : Main menu -->Peopletools --> Utilities --> Administration --> URL
in this url page have URL maintenance.I added one identifier .
URL Identifier:
*Description:
*URL:
Comments:
Regards,
lokeswarMain Menu>PeopleTools>Portal>Structure and Content>Traverse to the URL by clicking on the links(Peopletools --> Utilities --> Administration --> URL)>Click on Edit Link
Check the box for "Hide...."
Maybe you are looking for
-
Is there a solution to extreme congestion?
At our office building, there are approximately 150 businesses, all of them small, the majority of which are using wireless for their internet access, and I would venture to guess that a majority of those are using airports. My company was using an A
-
How do I get my Phone to reconcile again?
Per another post - yesterday I updated to the new software and had a Fatal error. The upload stopped and left the phone dead. I eventually had to put on an older version (still 4.5 but not the newest) just to get it to work. It wiped out everything a
-
Why does my Ipod keep freezing up during playback,
Why does my Ipod 3 keep freezing up? I have reset it as discribed in the online help 4 different times and it still freezes. I at first thought it was due to the song was an MP3 but it has since froze on ACC and CDA audio. This would tell me it isn't
-
I have so many charges that just came in this morning, I have tried multiple times to get in touch w/ Apple by chat, online and phone with absolutely NO LUCK. I purchased a stupid game for my 5 year old, but somehow I have $300 in charges this morni
-
What is the order of OS updates needed-?
What is the order of OS updates needed to get to the most current OS? I currently am running 10.7.5 Also, I've tried looking for the OS updates, but only seem to find updates and not the whole OS i.e.: 10.8 and 10.9 Thanks!