<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic switch between application servers through ABAP program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-application-servers-through-abap-program/m-p/7982471#M1604864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;                    I have a program that executes in background. This program reads data from the application server and continues with further processing. The data is uploaded on application server using transaction CG3Z. Now, we have 5 applicatioin servers. The data is available on one of them. When program executes, it searches for the file on that particular application server. And if it fails to get the data, it does not proceed further. Is there any way where if the file is not found on one application server, the program should check the other application server for the file and read from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sonal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jul 2011 06:00:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-01T06:00:41Z</dc:date>
    <item>
      <title>switch between application servers through ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-application-servers-through-abap-program/m-p/7982471#M1604864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;                    I have a program that executes in background. This program reads data from the application server and continues with further processing. The data is uploaded on application server using transaction CG3Z. Now, we have 5 applicatioin servers. The data is available on one of them. When program executes, it searches for the file on that particular application server. And if it fails to get the data, it does not proceed further. Is there any way where if the file is not found on one application server, the program should check the other application server for the file and read from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sonal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 06:00:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-application-servers-through-abap-program/m-p/7982471#M1604864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-01T06:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: switch between application servers through ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-application-servers-through-abap-program/m-p/7982472#M1604865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sonal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible, but depends on the directory structure on all the 5 app servers, if they are the same, then you could try to open the file as shown below on all the servers. This is just a high level pseudo code, you can use this as a guideline.&lt;/P&gt;&lt;P&gt;Pay attention to the directory structure on the servers, and ensure your logic can support all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function - TH_SERVER_LIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at list_of_servers.&lt;/P&gt;&lt;P&gt;concatenate list_of_servers-servername '\folder\subfolder\filename' into filepath.&lt;/P&gt;&lt;P&gt;open dataset filepath.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;read dataset&lt;/P&gt;&lt;P&gt;file_read_flag = X.&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if file_read_flag = X.&lt;/P&gt;&lt;P&gt; exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: You might also want to explore the logical filepaths options(TCODE: FILE, there is enough documentationon the net) and store the logical filepaths in a Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 09:24:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/switch-between-application-servers-through-abap-program/m-p/7982472#M1604865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-01T09:24:32Z</dc:date>
    </item>
  </channel>
</rss>

