Application Development 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: 

Logon to google from SAP

Former Member
0 Kudos

Hi,

Is it possible to logon to google from SAP (via. ABAP program or any other way). Please share something if anybody has some idea.

Rgds

Sudhanshu Sharma

5 REPLIES 5

Former Member
0 Kudos

Do you mean opening the homepage of google? like --> http://www.google.com

0 Kudos

> DATA: BEGIN OF URL_WEB OCCURS 0,

> L(30),

> END OF URL_WEB.

> URL_WEB-L = 'http://www.google.com'.

> APPEND URL_WEB.

> LOOP AT URL_WEB.

> SKIP. FORMAT INTENSIFIED OFF.

> WRITE: / 'Single click on '.

> FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.

> WRITE: URL_WEB. HIDE URL_WEB.

> FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.

> ENDLOOP.

>CLEAR URL_WEB.

> AT LINE-SELECTION.

> IF NOT URL_WEB IS INITIAL.

> CALL FUNCTION 'WS_EXECUTE'

> EXPORTING

> program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'

> commandline = URL_WEB

> INFORM = ' '

> EXCEPTIONS

> PROG_NOT_FOUND = 1.

> IF SY-SUBRC 0.

> WRITE:/ 'Cannot find program to open Internet'.

> ENDIF.

> ENDIF.

Best Regards, AlMaReD

Edited by: AlMaReD on Jun 20, 2010 1:58 PM

0 Kudos

Hi,

Thank for your reply in this. What i was looking for is to logon to my gmail account by using my credentials. Is it feasible using ABAP program or function module.

Rgds

Sudhanhsu Sharma

0 Kudos

Hello friend,

yes it is possible. Please refer to following codes:

you can also refer to this blog:

/people/vivek.pandey2/blog/2009/08/27/twitter-as-a-potential-notification-tool-for-sap

DATA:
http_client TYPE REF TO if_http_client,
request TYPE string,
message TYPE string,
username TYPE string,
password TYPE string.

cl_http_client=>create_by_url( EXPORTING url = 'http://www.twitter.com'
IMPORTING client = http_client ).

http_client->authenticate( username = username
password = password ).

http_client->request->set_method( 'POST' ).

http_client->request->set_header_field( name = '~REQUEST_URI'
value = '/statuses/update.xml' ).

http_client->request->set_form_field( name = 'status'
value = message ).

http_client->send( ).

Best Regards,

Jerry

Former Member
0 Kudos

Hi ,

T-code : DWDM. Here you can find workbench examples.

Here in workbench demos --> controls ---> HTML control --> Use as general WWW browser

This is the program for logging into any url.

Regards