Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read html page content.

ipravir
Active Contributor
0 Likes
1,201

Hi,

I have a require. Let me explain with example.

html Page:

Code Page:

<html>
<body>
<p id="p1">Hello World!</p>
<input type="text" name="firstname">
<input type="button" value="1" name="no" onclick="moveNumbers()">
<script>
function moveNumbers()
{
document.getElementById("p1").innerHTML = document.getElementById("p1").value;
}
</script>
</body>
</html>

Through interface "IF_HTTP_CLIENT" i am able to read code page,

but my requirement is read "123456" information from html body.

Is any class or method exist in SAP, please suggest.

Regards.

Praveer.

4 REPLIES 4
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,020

Hi,

Is that HTML presented to the user from a web server ?

regards.

Read only

0 Likes
1,020

Hi,

Actually page format is same as i have provided in screen, only using Label at the place of Text Box.

And call some java script functionality and finally chaging the lable text.

this all process i have written in onLoad command of html body.

and it's a service base page, which is configured under SICF->SAP->BC.

Created a  handler class and through IF_HTTP_CLIENT interface able to read Page code, but i want to read the value which has been set after execution of JavaScript Function.

Hope, i am able to exaplain you my scenario.

Regards.

Praveer.

Read only

0 Likes
1,020

Hi,

I am not familiar what can be done with SICF . can you post the page back to SAP ?

IMHO you need to post the data to a web server .

In Java world this can be done using "Java servlet" http://en.wikipedia.org/wiki/Java_servlet

In the servlet you can use "SAP Java Connector" to call RFC function in SAP to put the data into

SAP .

regards .

Read only

Former Member
0 Likes
1,020

Hi Praveer,

Unless abap able to call JS function. seems can not.

And i think this action is very dangerous to any web application. See, a web application running, your code could get the element value which is user typing, without any interaction with this web server, if it`s passwrod?

regards,

Archer