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

copying single file in Application server

Former Member
0 Likes
423

Hi,

I  am using FM "SXPG_COMMAND_EXECUTE" to run the UNIX Command in ABAP. I need to copy a  current single file  at a time in SAP application server  to another system. I tried but it copies all filles which is available in the folder in Application server. I want to copy only single file during one execution. Please help me.

OPEN DATASET..

LOOP AT ITAB.

TRANSFER ITAB TO P_FILE.

ENDLOOP.

CLOSE DATASET.

V_DIR_INPUT = 'D:\USR\RUN.BAT'.

CALL FUNCTION "SXPG_COMMAND_EXECUTE"

EXPORTING

COMMANDMODE = ZCOMMAND

ADDITIONAL_PARAMETERS = V_DIR_INPUT

OPERATINGSYSTEM =  'UNIX'

  

Hi,

I  am using FM "SXPG_COMMAND_EXECUTE" to run the UNIX Command in ABAP. I need to copy a  current single file  at a time in SAP application server  to another system. I tried but it copies all filles which is available in the folder in Application server. I want to copy only single file during one execution. Please help me.

OPEN DATASET..

LOOP AT ITAB.

TRANSFER ITAB TO P_FILE.

ENDLOOP.

CLOSE DATASET.

V_DIR_INPUT = 'D:\USR\RUN.BAT'.

CALL FUNCTION "SXPG_COMMAND_EXECUTE"

EXPORTING

COMMANDMODE = ZCOMMAND

ADDITIONAL_PARAMETERS = V_DIR_INPUT

OPERATINGSYSTEM =  'UNIX'

  

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
375

Your "ZCOMMAND" has only the directory as an entry parameter, so I suppose it will copy the whole directory, try to build another command via SM49.

Regards,
Raymond