cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement FM for WS_EXECUTE

Former Member
0 Kudos

Hi Guys,

I need Replacement function Module for "WS_EXECUTE".

EX:

CALL FUNCTION 'WS_EXECUTE'

EXPORTING

<b> INFORM = 'X'</b>

PROGRAM = 'CALC'

COMMANDLINE = 'C:\WINDOWS\SYSTEM32\CALC.EXE'.

write : 'Hi'.

When i run this code , write statement is triggered only after closing CALCULATOR.

But when i use "DSVAS_DOC_WS_EXECUTE_50" Function Module

write Satement is triggred before closing CALCULATOR.

Thanks,

Vickram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this method,

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

Regards,

kalyani A

Answers (6)

Answers (6)

Former Member
0 Kudos

hi Vickram,

<b>you can replace WS_UPLOAD with method CL_GUI_FRONTEND_SERVICES=>EXECUTE</b>

Please see the sample code below:



  L_APPL    = RS38T_1-GRAPHAPPL.
  L_COMMAND = RS38T_1-GRAPHCMMD.
  CL_GUI_FRONTEND_SERVICES=>EXECUTE(
    exporting
      APPLICATION            = L_APPL
      PARAMETER              = L_COMMAND
    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 ). 

hope this helps,

Sajan Joseph.

Former Member
0 Kudos

hi,

Try this FM :

<b>

SAP_CONVERT_TO_XLS_FORMAT</b>:

This FM converts data to Microsoft Excel format.

Hope this helps you.

Regards.

Former Member
0 Kudos

try this

<b>DSVAS_DOC_WS_EXECUTE_50</b>

Former Member
0 Kudos

Hi...

Try the FM <b>GUI_RUN</b>

Reward points if useful......

Suresh......

Former Member
0 Kudos

Hi vickram,

1. Either u can use GUI_RUN

2. or in the same FM,

do not pass INFORM = 'X'.

regards,

amit m.

Former Member
0 Kudos

use.... <b>GUI_RUN</b>

Also check...

Message was edited by:

Ramesh Babu Chirumamilla