现在的位置: 首页 > 综合 > 正文

ABAP 调用java 程序

2013年12月05日 ⁄ 综合 ⁄ 共 917字 ⁄ 字号 评论关闭

ABAP调用外部java程序, 网上搜到, 转贴备查.

 

未测试.

 

原文地址: http://zhidao.baidu.com/question/48890437.html

 

---------------以下是转贴内容-------------------------------------------

 

REPORT  zexecute.
*实例 abap调用java文件
DATA para TYPE string.
PARAMETER mytext TYPE objectname.
PARAMETER mytext1 TYPE objectname.

para = 'Test'.        "class name

CONCATENATE para mytext mytext1 INTO para SEPARATED BY space.

CALL METHOD cl_gui_frontend_services=>execute
  EXPORTING
    application              = 'JAVA' "需要执行的语言
    parameter              = para   "参数
    default_directory    = 'D:/'  "路径
    minimized               = 'X'
    synchronous           = 'WAIT'
    operation                = 'OPEN'
  EXCEPTIONS
    cntl_error                = 1
    error_no_gui           = 2
    bad_parameter       = 3
    file_not_found         = 4
    path_not_found      = 5
    file_extension_unknown = 6
    error_execute_failed       = 7
    synchronous_failed         = 8
    not_supported_by_gui   = 9
    OTHERS                           = 10.
*
*
WRITE 'Success'.

抱歉!评论已关闭.