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 upload.xlsx error22: Invalid arguement error in FTP_Command.

Former Member
0 Kudos
406

Hi All,

I have the requirement to put an excel file from presentation server to another remote system for this i am using the function modules

1) FTP_CONNECT to connect to the sourece as well as the destination systems --- Here i am able to hit the both systems.

2) for sending the data to the target system i am using FTP_COMMAND by passing the 'put' statement along with the soruce and destinations for the command parameter.

See the bellow code

CONCATENATE 'put'(t39) wa_file-pathname

INTO lv_cmd

SEPARATED BY space. " Forming the Command for data Transfer

CALL FUNCTION 'FTP_COMMAND'

EXPORTING

handle = lv_handle " Handle or Instance

command = lv_cmd " ASCII Command

compress = 'N' " No Compress

TABLES

data = gt_data

EXCEPTIONS

tcpip_error = 1

command_error = 2

data_error = 3

OTHERS = 4.

open C:\usr\desktop\upload.xlsx errno 22: Invalid argument

Please let me know how i can resolve this problem and how can I put this file in the destination system.

1 REPLY 1

Arun_Prabhu_K
Active Contributor
0 Kudos
92

Check the function by trying with an excel file of format .xls.