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: 

Call Encryption Software from SAP

Former Member
0 Kudos

There is an encryption software installed in the user's PC.

Some files are being downloaded in to the user's PC from SAP using a report.

Is it possible to call this encryption software in the user's PC to encrypt all the downloaded files from SAP ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Yes, there are many ways to call the executable program <br>

1) Call by OLE <br>

You can call by OLE technique only if your encryption program provides OLE objects to be exposed for other applications. For example, call Excel or Word OLE objects from ABAP. You can search on SAP for OLE demonstration<br>

2) Call directly executable program <br>

You can call executable program in your front end station from your abap source code by using fct. module GUI_RUN . This call works only in foreground since the executable program is in your front end station and you have to know the parameters that your external program can accept (ie. you have to read your encryption manual).If you do not know the parameters to be sent to you encryption program then you coud crate a batch file in Windows and run the batch file from ABAP. <br>

Example:<br>

CALL FUNCTION 'GUI_RUN'<br>

EXPORTING<br>

COMMAND = 'NOTEPAD.EXE'<br>

PARAMETER = 'c:\TEST.TXT'.<br>

3) Call by DDE (Data dynamic Exchange)

This one, I forget how to do this since done about 5 years ago, Return to you later if you really need this technique

3 REPLIES 3

Former Member
0 Kudos

Hi,

Yes, there are many ways to call the executable program <br>

1) Call by OLE <br>

You can call by OLE technique only if your encryption program provides OLE objects to be exposed for other applications. For example, call Excel or Word OLE objects from ABAP. You can search on SAP for OLE demonstration<br>

2) Call directly executable program <br>

You can call executable program in your front end station from your abap source code by using fct. module GUI_RUN . This call works only in foreground since the executable program is in your front end station and you have to know the parameters that your external program can accept (ie. you have to read your encryption manual).If you do not know the parameters to be sent to you encryption program then you coud crate a batch file in Windows and run the batch file from ABAP. <br>

Example:<br>

CALL FUNCTION 'GUI_RUN'<br>

EXPORTING<br>

COMMAND = 'NOTEPAD.EXE'<br>

PARAMETER = 'c:\TEST.TXT'.<br>

3) Call by DDE (Data dynamic Exchange)

This one, I forget how to do this since done about 5 years ago, Return to you later if you really need this technique

former_member156446
Active Contributor
0 Kudos

You can use this code to execute any(.exe .txt .doc etc) file on the presentation server, lv_string need to have the path of the file including the file name.

*  DATA: lv_string TYPE string.
*  lv_string = p_path.
*
*  CALL METHOD cl_gui_frontend_services=>execute
*    EXPORTING
*      document               = lv_string
*      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.
*    WRITE:/ 'no message'.
*  ENDIF.

Former Member
0 Kudos

hari,

just for an addition to the above solutions... I think, these solutions will work only when it runs in foreground.

so make sue your program runs in foreground if ou are using these methods..