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: 

How get files that are in Windows directory from a job is running in AS400

Former Member
0 Kudos
144

Hi Experts,

Please help me with this, I have a background job that call FTP_CONNECT for connect to a FTP directory, when i run manually the program this works very good; but when is runing like job it isn't works; SAP is in AS400 and the FTP directory is in Windows, also i tried use the CL_GUI_FRONTEND_SERVICES for access to the directory but it isn't works like job.

The big question is How i can get files that are in the Windows directory from a job that is running in AS400.

Is anyone can help me? Thanks for your kindly support in advance.

Best Regards,

Darwin Panchi

4 REPLIES 4

Former Member
0 Kudos
94

It's impossible to access Windows directories running through job. To do this, the files must be transfered to Unix.

0 Kudos
94

It's impossible to access Windows directories running through job. To do this, the files must be transfered to Unix.

Not true. You can mount a Windows server folder location in the SAP AS400 directory landscape and access it from SAP programs in the foreground or the background. You can also hit a Windows client or server location with FTP as well.

For Darwin, if the Windows location belongs to your domain, have your Basis team map it to your SAP app server folder landscape so you can access it directly or as Este suggested, try the background destination SAPFTPA for the FTP approach.

0 Kudos
94

Good to know! My concepts were outdated...

Thanks.

Former Member
0 Kudos
94

Hi!

In your connection string you should use SAPFTPA (Not SAPFTP)


  CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
      user            = l_user
      password        = l_pwd
      host            = l_host
      rfc_destination =  'SAPFTPA'
    IMPORTING
      handle          = w_hdl
    EXCEPTIONS
      OTHERS          = 1.

Hope it helps!