Skip to Content
author's profile photo Former Member
Former Member

Calling Web Service from SAP

Dear All,

How can we call web service from SAP?

Thanks in Advance,

Ramana

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 12:46 PM

    HI kcr,

    pls see this link

    http://saptechnical.com/Tutorials/Others/ValidateEmailID/Webservice.htm

    write this program

    REPORT zvalidate_email.PARAMETERS: p_mail(100) LOWER CASE. " E-Mail id to be verifiedDATA: 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.START-OF-SELECTION .

    CLEAR w_string .

    CONCATENATE

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

    INTO

    w_string . CALL METHOD cl_http_client=>create_by_url

    EXPORTING

    url = w_string

    IMPORTING

    client = http_client

    EXCEPTIONS

    argument_not_found = 1

    plugin_not_active = 2

    internal_error = 3

    OTHERS = 4. CALL METHOD http_client->send

    EXCEPTIONS

    http_communication_failure = 1

    http_invalid_state = 2. CALL METHOD http_client->receive

    EXCEPTIONS

    http_communication_failure = 1

    http_invalid_state = 2

    http_processing_failed = 3.

    CLEAR w_result .

    w_result = http_client->response->get_cdata( ). REFRESH result_tab .

    SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab . READ TABLE result_tab INTO r_str INDEX 2.

    IF r_str+44(1) = 't'.

    WRITE:/ 'Valid email address'.

    ELSE.

    WRITE:/ 'Invalid email address'.

    ENDIF.Output:

    thanks

    karthik

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 12:45 PM

    To Call a Web service from SAP, try this FM - HTTP_POST

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 12:47 PM

    Hi,

    Just go through following link, it has lot of information about web service form SAP:

    how-to-create-web-service-in-sap

    Hope this will hwlp.

    Regards,

    Nitin.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 01:00 PM

    Enter the tcode DWDM

    click on Use as general WWW browser

    it will displays html controller as a www browser.

    It will work only if net acces is there

    Regards

    jithendra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 04:50 AM

    Hello,

    Check this blog.

    Send SMS to India from ABAP

    Regards

    Farzan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 05:13 AM

    Hi,

    Use the below link which helps you how to create and consume a web service.

    http://help.sap.com/saphelp_NW04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/frameset.htm

    Thanks,

    Naveen Kumar.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.