Application Development 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: 

open adobe acrobat reader from ALV

former_member182371
Active Contributor
0 Kudos

Hi,

in my ALV i´ve added a button to display the list with Adobe acrobat reader.

Most of the users access SAP throuh citrix but we developers access SAP locally.

depending on the user´s access to SAP the path to store the pdf must be C:list.pdf for local access or P:list-pdf for access throuh citrix.

How can i determine if a user has had access to SAP locally or via citrix in order to send the spool to C: or P: respectively?

Best regards.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi calsadillo,

try this code and you get the directory.

REPORT ZGRO_TEST.

*

DATA: SAPGUI_DIR TYPE STRING.

*

START-OF-SELECTION.

*

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_SAPGUI_DIRECTORY

CHANGING

SAPGUI_DIRECTORY = SAPGUI_DIR.

*

CALL METHOD CL_GUI_CFW=>FLUSH.

*

IF SY-SUBRC <> 0.

WRITE: / 'ERROR'.

ELSE.

WRITE: / SAPGUI_DIR.

ENDIF.

*

END-OF-SELECTION.

Regards, Dieter

1 REPLY 1

Former Member
0 Kudos

Hi calsadillo,

try this code and you get the directory.

REPORT ZGRO_TEST.

*

DATA: SAPGUI_DIR TYPE STRING.

*

START-OF-SELECTION.

*

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_SAPGUI_DIRECTORY

CHANGING

SAPGUI_DIRECTORY = SAPGUI_DIR.

*

CALL METHOD CL_GUI_CFW=>FLUSH.

*

IF SY-SUBRC <> 0.

WRITE: / 'ERROR'.

ELSE.

WRITE: / SAPGUI_DIR.

ENDIF.

*

END-OF-SELECTION.

Regards, Dieter