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

Directory_exits syntax error

Former Member
0 Likes
455

Hi!

I would like to use the method cl_gui_frontend_services=>directory_exist.

Something is not working with the returning parameter, but I don't know why?


DATA: lv_talalt TYPE c.

CLEAR lv_talalt.
CALL METHOD cl_gui_frontend_services=>directory_exist
  EXPORTING
    directory        = lv_directory_string
  RETURNING 
    RESULT           = lv_talalt.

Thanx in adavance

Tamá

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
429
data: lv_talalt type abap_bool.      "<---- Try this

CLEAR lv_talalt.
CALL METHOD cl_gui_frontend_services=>directory_exist
  EXPORTING
    directory        = lv_directory_string
  RETURNING 
    RESULT           = lv_talalt.

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
430
data: lv_talalt type abap_bool.      "<---- Try this

CLEAR lv_talalt.
CALL METHOD cl_gui_frontend_services=>directory_exist
  EXPORTING
    directory        = lv_directory_string
  RETURNING 
    RESULT           = lv_talalt.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
429

Thanx for the answers, found the solution.

CALL METHOD cl_gui_frontend_services=>directory_exist

EXPORTING

directory = lv_directory_string

RECEIVING "<<<---

result = lv_talalt.

Read only

Former Member
0 Likes
429

declare it as type string

DATA: lv_talalt TYPE string.

Read only

0 Likes
429

You can also right it like this in a Netweaver Release, then there would have been no confusion with the RETURN/RECIEVING

lv_talalt = cl_gui_frontend_services=>directory_exist( lv_directory_string ).

Regards,

Rich Heilman