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 DATASET Server Specific.

pushkar_dhale
Participant
0 Likes
2,573

Hi,

We have multiple servers in production in SM51 like

KECCAP1P_GNP_51

KECCAP2P_GNP_52

KECCAP3P_GNP_53

KECCAP4P_GNP_54

KECCAP5P_GNP_55

KECCCIP_GNP_50

Can you tell me how to use OEPN DATASET statement for particular server for eg.

for KECCAP3P_GNP_53.

Best Regards,

Pushkar Dhale.

1 ACCEPTED SOLUTION
Read only

ronaldo_aparecido
Contributor
0 Likes
1,809

Hi you need know the path correct from server and use in command open data set for transfer files.

Example.

CONCATENATE  p_dir t_header-codigo sy-datum t_header-numseq

                     INTO   w_arquivo.

here w_arquivo have my path to server .

  OPEN DATASET w_arquivo FOR OUTPUT IN TEXT MODE MESSAGE w_msg.

  IF sy-subrc <> 0.

    MESSAGE e054 WITH w_arquivo.

  ENDIF.

  TRANSFER  t_header  TO  w_arquivo.

Please read the document:http://help.sap.com/saphelp_470/helpdata/pt/fc/eb3cc0358411d1829f0000e829fbfe/content.htm

8 REPLIES 8
Read only

Former Member
0 Likes
1,809

Hi,

Setup a different DSN ( destination ) for each server.

Use particular DSN ( destination ) along with the statement OPEN DATASET for the server you want to access.

regards,

Ashish Rawat

Read only

0 Likes
1,809

Hi Ashish,

Can you please elaborate in terms of example .

Best Regards,

Pushkar Dhale

Read only

0 Likes
1,809

Hi,

Ronaldo has provided the code below, check it out.

regards,

Ashish Rawat

Read only

ronaldo_aparecido
Contributor
0 Likes
1,810

Hi you need know the path correct from server and use in command open data set for transfer files.

Example.

CONCATENATE  p_dir t_header-codigo sy-datum t_header-numseq

                     INTO   w_arquivo.

here w_arquivo have my path to server .

  OPEN DATASET w_arquivo FOR OUTPUT IN TEXT MODE MESSAGE w_msg.

  IF sy-subrc <> 0.

    MESSAGE e054 WITH w_arquivo.

  ENDIF.

  TRANSFER  t_header  TO  w_arquivo.

Please read the document:http://help.sap.com/saphelp_470/helpdata/pt/fc/eb3cc0358411d1829f0000e829fbfe/content.htm

Read only

0 Likes
1,809

Hi Ronaldo,

As I said we have multiple application server as I said above

I want to create a file on particular server

eg: on KECCAP3P_GNP_53 (app server)  XYZ(File)

and read it again from this specific server.

Best Regards,

Pushkar Dhale

 

Read only

0 Likes
1,809

I'm not aware that OPEN DATASET would allow this directly. I guess you need to look for a workaround to have the file handling process run on the desired app server. One way could be to schedule a job, as JOB_CLOSE allows you to specifiy the application server for the batch job.

There might be (unreleased) function modules that allow switching the current app server, maybe have a look at function group THFB and related.

Thomas

Read only

0 Likes
1,809

Hello experts,

I solve this issue with help of all suggestions given by you and thank you very much.

In my case I am using function module 'TH_REMOTE_TRANSACTION' to call my transaction on particular App. Server and using OPEN DATASET statement in that program code .

Best Regards,

Pushkar Dhale .

Read only

Former Member
0 Likes
1,809

Hi Pushkar,

there is a concept called directory mapping which the basis guy will be able to help you with.

Like when we have a folder which needs access from all servers it is created in 1 of them and the same path is mapped in all servers.

Have a word with the basis guy he should be able to help you.

Regards