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 Data Set Error while trying to read file from non SAP server

Former Member
0 Kudos

Hi all,

is it possible to read data from non-SAP application Sever?

I'm using OPEN DATASET p_filin FOR INPUT IN LEGACY TEXT MODE CODE PAGE '1504',

Where p_filin is other Windows server.Our applicition server is under Unix.Is it a problem?

I make test to read file from SAP application server and it was ok.So how to call other server?

Thanks!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Borislava,

I guess you can achieve this using the SAP standard Function Modules FTP_CONNECT and FTP_COMMAND. Please refer program RSFTP003 for more details on this.

Let me know if you need more information.

Regards

Sabu.

7 REPLIES 7

Former Member
0 Kudos

Hi

U can do it if the other server can be seen by SAP server: in this case both servers will belong to Application sever and u can use OPEN DATASET statament.

But if the other server can be reached by server SAP, it'll be Presentation sever and u need to use fm like GUI_UPLOAD

Max

0 Kudos

Thanks Max,

but i can not use Gui_upload because, i want to make my program run as background job.So do you have any idea how to make SAP server to see other non - SAP server.

Thanks!

0 Kudos

Hi

U should ask a little help to your basis: this is a network problem.

Your basis could make the other server or that particular path of the other server available for SAP: so u can use unix stataments.

Or you can try to reach the other sever by ftp command

Or that file has to be transfered to server SAP

Max

Former Member
0 Kudos

Hi,

Yes it is possible to read data from a non SAP server through the statement OPEN DATASET.

The important thing to check is that the SAP Server got enough access to the non SAP server so it can perform a reading/writing process depending on your needs.

You should contact your network administrator and BASIS to help you check the permissions. This can be pretty tricky, specially if the servers are in different domains.

Regards,

Gilberto Li

Former Member
0 Kudos

Hello Borislava,

I guess you can achieve this using the SAP standard Function Modules FTP_CONNECT and FTP_COMMAND. Please refer program RSFTP003 for more details on this.

Let me know if you need more information.

Regards

Sabu.

0 Kudos

Hi Sabu,

thank you for your suggestion.I think that i can do the following scenario:

Take the file from FTP Server with frp_conect and ftp_command i guess

and then took the file in our application server where i can read the data with open dataset.

Am i wrong?

Please provide me more information for frp_conect.What i have to do - first make frc destination( through sm59) and then call ftp_connect in my program.

Thanks,

Borislava

Edited by: Borislava Bahchevanska on Jun 3, 2009 12:24 PM

0 Kudos

Hello,

No need to create any RFC destinations.

Use the destination SAPFTP for foreground and SAPFTPA for background programs.

There are several programs starting in RSFTP which have different examples