Tip

Go to your URL using ABAP

Here is an example of how to go directly to your URL from SAP.


REPORT ZJURL .
*---------------------------------------------------*
* Author : Jaswinder Singh Bhatti
*   bhatti_jassi@hotmail.com
*---------------------------------------------------*

* Type declarations.....................
TYPES pict_line(256) TYPE c.

* Data declarations......................
DATA :init,
      container TYPE REF TO cl_gui_custom_container,
      editor    TYPE REF TO cl_gui_textedit,
      picture   TYPE REF TO cl_gui_picture,
      pict_tab TYPE TABLE OF pict_line,
      document_viewer  TYPE REF TO i_oi_document_viewer.


PARAMETERS: URL(60) OBLIGATORY DEFAULT 'www.sap.ag'.


* In Screen 100, create container with name "PICTURE_CONTAINER"

CALL SCREEN 100.

* Dialog modules......................................
MODULE status_0100 OUTPUT.
 SET PF-STATUS 'SCREEN100'.    
  IF init is initial.
    init = 'X'.

    CREATE OBJECT:
           container  EXPORTING container_name = 'PICTURE_CONTAINER'.

    CALL METHOD C_OI_CONTAINER_CONTROL_CREATOR=>GET_DOCUMENT_VIEWER
              IMPORTING viewer = document_viewer.

    CALL METHOD document_viewer->init_viewer
              EXPORTING parent = container.

  ENDIF.


CALL METHOD document_viewer->view_document_from_url
          EXPORTING document_url = url
                    show_inplace = 'X'.


CALL METHOD document_viewer->destroy_viewer.

CALL METHOD container->free.

FREE: document_viewer, container.

ENDMODULE.

MODULE cancel

    Requires Free Membership to View

INPUT. LEAVE TO SCREEN 0. ENDMODULE.

This was first published in December 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.