SAP ABAP程式碼中開啟瀏覽器跳轉訪問URL

AbaperMarcy發表於2020-10-17

SAP ABAP程式碼中開啟瀏覽器跳轉訪問URL(支援超長URL)

程式碼:

DATA: LV_OPENURL TYPE C LENGTH 500,
      LV_TEMPURL TYPE string.

  LV_TEMPURL = 'https://'.
  CONCATENATE LV_OPENURL LV_TEMPURL INTO LV_OPENURL.

  LV_TEMPURL = |baike.baidu.com/item/SAP/40878|.
  CONCATENATE LV_OPENURL LV_TEMPURL INTO LV_OPENURL.

call function 'CALL_BROWSER'
 EXPORTING
   URL                          = LV_OPENURL
*   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.
* Implement suitable error handling here
endif.

執行效果

1-1

1-2

相關文章