Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call Java From ABAP

Former Member
0 Likes
398

Can I do it...??? How...???

My release is 46C.

Thanks for the heroes..!!!

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
327

Yes, I do believe that you can. I've never done it myself, but if you use a .bat file and execute that .bat file from your ABAP using CL_GUI_FRONTEND_SERVICES method EXECUTE, then yes, I could be possible.

  call method cl_gui_frontend_services=>execute
    EXPORTING
      DOCUMENT               = 'C:calljava.bat'.
*      APPLICATION            =
*      PARAMETER              =
*      DEFAULT_DIRECTORY      =
*      MAXIMIZED              =
*      MINIMIZED              =
*      SYNCHRONOUS            =
*    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
*      others                 = 8
          .
  if sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

Regards,

Rich Heilman

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
327

Oh, and check out this link. This is probably more of what you want rather than my previous post.

/community [original link is broken]

Regards,

Rich Heilman