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

Open Data Set Error while trying to read file from non SAP server

Former Member
0 Likes
1,079

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
Read only

Former Member
0 Likes
1,033

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.

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!

7 REPLIES 7
Read only

Former Member
0 Likes
1,033

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

Read only

0 Likes
1,033

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!

Read only

0 Likes
1,033

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

Read only

Former Member
0 Likes
1,033

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

Read only

Former Member
0 Likes
1,035

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.

Read only

0 Likes
1,033

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

Read only

0 Likes
1,033

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