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

Process a File by WS_EXECUTE in background

Former Member
0 Likes
903

Hi Experts,

I have one .EXE file which capture data from Non-SAP system and place it into one text (.txt) file.

Now I am executing that file by WS_EXECUTE FM like this way;

CALL FUNCTION 'WS_EXECUTE'

EXPORTING

  • DOCUMENT = ' '

  • CD = ' '

  • COMMANDLINE =

  • INFORM = ' '

PROGRAM = 'C:\fetch.exe'

  • STAT = ' '

  • WINID = ' '

  • OSMAC_SCRIPT = ' '

  • OSMAC_CREATOR = ' '

  • WIN16_EXT = ' '

  • EXEC_RC = ' '

  • IMPORTING

  • RBUFF =

EXCEPTIONS

FRONTEND_ERROR = 1

NO_BATCH = 2

PROG_NOT_FOUND = 3

ILLEGAL_OPTION = 4

GUI_REFUSE_EXECUTE = 5

OTHERS = 6

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

So Is it possible to Execute this file in background ???

Regards & Thanks,

Nishit.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
831

Nope

Hi Experts,

I have one .EXE file which capture data from Non-SAP system and place it into one text (.txt) file.

Now I am executing that file by WS_EXECUTE FM like this way;

CALL FUNCTION 'WS_EXECUTE'

EXPORTING

  • DOCUMENT = ' '

  • CD = ' '

  • COMMANDLINE =

  • INFORM = ' '

PROGRAM = 'C:\fetch.exe'

  • STAT = ' '

  • WINID = ' '

  • OSMAC_SCRIPT = ' '

  • OSMAC_CREATOR = ' '

  • WIN16_EXT = ' '

  • EXEC_RC = ' '

  • IMPORTING

  • RBUFF =

EXCEPTIONS

FRONTEND_ERROR = 1

NO_BATCH = 2

PROG_NOT_FOUND = 3

ILLEGAL_OPTION = 4

GUI_REFUSE_EXECUTE = 5

OTHERS = 6

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

So Is it possible to Execute this file in background ???

Regards & Thanks,

Nishit.

4 REPLIES 4
Read only

Former Member
0 Likes
832

Nope

Read only

0 Likes
831

So Is there any other way to Execute that file ???

Read only

0 Likes
831

If the file is on the presentation server i dont think there is any way to exeute it in the background. If you place it in the application server or through FTP, you may try using SXPG_COMMAND_EXECUTE

Vikranth

Read only

0 Likes
831

But that EXE execute Plant wise so that .txt file might have different data at same.

so its not possible to place it on Application server.

That file must be on presentation server.