본문 바로가기
SAP(공개)/ABAP

인터넷 익스플로러로 새창으로 띄우기

by 스마트업 2022. 5. 27.
반응형

1. 인터넷 익스플로러로 새창으로 띄우기

IF html_control2 IS INITIAL.
    CREATE OBJECT html_control2
             EXPORTING
              parent    = html_container.
    IF sy-subrc NE 0.
      RAISE cntl_error.
    ENDIF.

    DATA: doc_url(80).

    doc_url = 'http://www.naver.com'.

    IF NOT doc_url IS INITIAL.
      CALL METHOD html_control2->show_url_in_browser
        EXPORTING
          url = doc_url.
      IF sy-subrc GE 2.
        RAISE cntl_error.
      ENDIF.
    ENDIF.
  ENDIF.



2. SAP 화면에 띄우기

  IF html_container IS INITIAL.

    CREATE OBJECT html_container
        EXPORTING
            container_name = 'HTML_CONTAINER'
        EXCEPTIONS
            OTHERS = 1.
    CASE sy-subrc.
      WHEN 0.
*
      WHEN OTHERS.
        RAISE cntl_error.
    ENDCASE.
  ENDIF.

  IF html_control IS INITIAL.
    CREATE OBJECT html_control
         EXPORTING
              parent    = html_container.
    IF sy-subrc NE 0.
      RAISE cntl_error.
    ENDIF.

    DATA: doc_url(80).

    doc_url = 'http://www.naver.com'.

    IF NOT doc_url IS INITIAL.
      CALL METHOD html_control->show_url
        EXPORTING
          url                  = doc_url
        EXCEPTIONS
          cnht_error_parameter = 1
          OTHERS               = 2.
      IF sy-subrc GE 2.
        RAISE cntl_error.
      ENDIF.
    ENDIF.
  ENDIF.

반응형

'SAP(공개) > ABAP' 카테고리의 다른 글

CALL TCODE NEW WINDOW  (0) 2022.05.27

댓글