‎2013 Sep 06 12:26 PM
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.
‎2013 Sep 06 12:49 PM
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
‎2013 Sep 06 12:34 PM
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
‎2013 Sep 06 12:47 PM
Hi Ashish,
Can you please elaborate in terms of example .
Best Regards,
Pushkar Dhale
‎2013 Sep 06 12:59 PM
Hi,
Ronaldo has provided the code below, check it out.
regards,
Ashish Rawat
‎2013 Sep 06 12:49 PM
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
‎2013 Sep 06 1:01 PM
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
‎2013 Sep 06 1:35 PM
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
‎2013 Sep 07 6:15 AM
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 .
‎2013 Sep 06 1:34 PM
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