Skip to Content
author's profile photo
Former Member

How to call an URL from ABAP

Hi,

When an user clicks on a document display link in a SAP tranasction(for example FB02),an URL has to be called in the background(by ABAP) and the details of the URL should be displayed in a browser.

What are the possilbe options available in SAP4.7 to meet the above requirement?

Thanks in advance,

Leo

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Oct 05, 2005 at 09:49 AM

    Do as below

    DATA: gd_webaddr TYPE string VALUE 'www.google.co.in'.
    CALL METHOD cl_gui_frontend_services=>execute
     EXPORTING
        document = gd_webaddr
      EXCEPTIONS
        OTHERS   = 1.

    type the url u want to execute.

    Hope this helps.

    Kindly reward points for the answer which helped u.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 05, 2005 at 09:22 AM

    hi,

    you can use call browser function

    data url(200) type c.

    url = 'your_url'.

    CALL FUNCTION 'CALL_BROWSER'

    EXPORTING

    URL = url

    • WINDOW_NAME = ' '

    • NEW_WINDOW = ' '

    • BROWSER_TYPE =

    • CONTEXTSTRING =

    • EXCEPTIONS

    • FRONTEND_NOT_SUPPORTED = 1

    • FRONTEND_ERROR = 2

    • PROG_NOT_FOUND = 3

    • NO_BATCH = 4

    • UNSPECIFIED_ERROR = 5

    • OTHERS = 6

    .

    IF SY-SUBRC <> 0.

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

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

    ENDIF.

    for this you have to enable SSO on your server.

    hope this helps you, else revert back.

    regards,

    Hemendra

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 05, 2005 at 09:41 AM

    Hi Dsouza,

    You can call an URL from ABAP via HTTPS.You can use cl_http_client to achive the same.check out the following weblogs.

    /people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap

    /people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https

    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap

    Or You can check this web log :

    /people/eddy.declercq/blog/2005/06/14/it146s-a-matter-of-trust

    Also check the ABAP web service tutorial under help.sap.com?

    http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm

    reward points if you find the answers usefull.

    Regards,

    Albert

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 05, 2005 at 11:14 AM

    Thanks for all your suggestions.I could locate the

    Create external document(URL) in FB02 transaction application toolbar.

    Thanks,

    Leo

    Add comment
    10|10000 characters needed characters exceeded