06-20-2010 11:12 AM
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
06-20-2010 11:23 AM
Do you mean opening the homepage of google? like --> http://www.google.com
06-20-2010 11:45 AM
> 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
06-25-2010 11:41 AM
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
06-25-2010 3:40 PM
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
06-21-2010 10:16 AM
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