Skip to Content
0
Former Member
Dec 23, 2007 at 05:53 PM

Internet with SAP

411 Views

1.how to connect sap to internet.How to configure that?

parameters:pmail(100) lower case.

data:dummy(100).

data:http_client type ref to if_http_client.

data:w_string type string,

w_result type string,

r_str type string.

data:result_tab type table of string.

data:cl_http_client type ref to cl_abap_char_utilities.

start-of-selection.

clear w_string.

CONCATENATE

'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email='

pmail

INTO

w_string .

CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL

EXPORTING

URL = w_string

  • PROXY_HOST =

  • PROXY_SERVICE =

  • SSL_ID =

IMPORTING

CLIENT = http_client

  • EXCEPTIONS

  • ARGUMENT_NOT_FOUND = 1

  • PLUGIN_NOT_ACTIVE = 2

  • INTERNAL_ERROR = 3

  • others = 4

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL METHOD http_client->SEND

  • EXPORTING

  • TIMEOUT = CO_TIMEOUT_DEFAULT

  • EXCEPTIONS

  • HTTP_COMMUNICATION_FAILURE = 1

  • HTTP_INVALID_STATE = 2

  • HTTP_PROCESSING_FAILED = 3

  • HTTP_INVALID_TIMEOUT = 4

  • others = 5

.

IF SY-SUBRC <> 0.

The above program says a run time error

Exception condition "HTTP_COMMUNICATION_FAILURE" raised.

Note:I have netconnection in another OS ie XP