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

WS_EXECUTE - new fn Module

Former Member
0 Likes
452

Hi,

When I use WS_EXECUTE, abap says this Fn module is obsolete. Can somebody help me with the new version of WS_EXECUTE?

Thanks,

Sheel

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
411

Yes, use this class/method.

CALL METHOD cl_gui_frontend_services=>execute
*  EXPORTING
*    document               =
*    application            =
*    parameter              =
*    default_directory      =
*    maximized              =
*    minimized              =
*    synchronous            =
*    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
        .
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

0 Likes
411

Hi,

Thanks for all your help.

What all options can we give in operation - the default is OPEN, but actually I want just to check whether the URL is valid or not, if file or URL not found , give an error message. Can you please give me other options to OPERATION.

Let me know if u know any clarifications......

Thanks,

Sheel