<?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 Re: Dataset operations in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480311#M1418815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi above mentioned FM: SXPG_COMMAND_EXECUTE is used to execute the external commands in SAP, but the command should &lt;/P&gt;&lt;P&gt;be listed under tcode:SM69-Maintain External OS Commands.  So first check whether u have any command like that or not other&lt;/P&gt;&lt;P&gt;wise what u can do is:&lt;/P&gt;&lt;P&gt;1. read the existing file into an internal table and then write(transfer) this into new file.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;2. Create ur own command(u can refer any custom commands (if u have) in SM69) for moving the file and then run this&lt;/P&gt;&lt;P&gt;   command through the FM mentioned above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Dec 2009 07:49:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-22T07:49:44Z</dc:date>
    <item>
      <title>Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480308#M1418812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends. I need some help with dataset operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-How can I move a file using dataset? Is possible do first copying file to target and after "delete dataset filename"?&lt;/P&gt;&lt;P&gt;2-How can I list directory files from unix directory? In windows I was using method "cl_gui_frontend_services=&amp;gt;directory_list_files" but I don't  find anything for Unix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 17:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480308#M1418812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-21T17:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480309#M1418813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Yes, of course. There are the ABAP commands OPEN DATASET, CLOSE DATASET, READ DATASET, DELETE DATASET and TRANSFER. Have a look at ABAP documentation.&lt;/P&gt;&lt;P&gt;2) cl_gui_frontend_services=&amp;gt;directory_list_files works on every platform. I guess that you struggle to list files on application server. There are some function modules from SAP which can be used to get a list of files on application server. Have a look here on SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 00:41:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480309#M1418813</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2009-12-22T00:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480310#M1418814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fulvio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt; to move your file, e.g. "mv" command in Unix. Refer to that FM Documentation which is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use function module &lt;STRONG&gt;EPS_GET_DIRECTORY_LISTING&lt;/STRONG&gt; to get a list of files in your Operating System directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 01:30:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480310#M1418814</guid>
      <dc:creator>SureshRa</dc:creator>
      <dc:date>2009-12-22T01:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480311#M1418815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi above mentioned FM: SXPG_COMMAND_EXECUTE is used to execute the external commands in SAP, but the command should &lt;/P&gt;&lt;P&gt;be listed under tcode:SM69-Maintain External OS Commands.  So first check whether u have any command like that or not other&lt;/P&gt;&lt;P&gt;wise what u can do is:&lt;/P&gt;&lt;P&gt;1. read the existing file into an internal table and then write(transfer) this into new file.&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;2. Create ur own command(u can refer any custom commands (if u have) in SM69) for moving the file and then run this&lt;/P&gt;&lt;P&gt;   command through the FM mentioned above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 07:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480311#M1418815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-22T07:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480312#M1418816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for helpful answers friends. I tried method and function but don't works for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In method I done like this, but don't return anything...:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dir = '/usr/sap/PSD/interfaces/synchro/'

    CALL METHOD cl_gui_frontend_services=&amp;gt;directory_list_files
      EXPORTING
        directory                   = dir
        filter                      = '*.TXT'
        files_only                  = 'X'
      CHANGING
        file_table                  = it_file_table
        count                       = count
      EXCEPTIONS
        cntl_error                  = 1
        directory_list_files_failed = 2
        wrong_parameter             = 3
        error_no_gui                = 4
        not_supported_by_gui        = 5
        OTHERS                      = 6.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In function EPS_GET_DIRECTORY_LISTING I'm tested it on SE37, but returns  READ_DIRECTORY_FAILED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some permission to list files in a Unix directory? In this directory I can write, because my program save a file in it using dataset...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks friends!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 10:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480312#M1418816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-22T10:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480313#M1418817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;obviously cl_gui_frontend_services=&amp;gt;directory_list_files does not work for your folder because your folder is on application server, not on your desktop. I wrote that it does not depend on OS but it still has to be on user's desktop. So it works for Java GUI on LInux as well SAP Gui for Windows. YOu can debug EPS_GET_DIRECTORY_LISTING in SE37 to see why it's failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 21:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480313#M1418817</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2009-12-22T21:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset operations</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480314#M1418818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply friends. I don't know why, but this FM don't work here. To try solve this, I search for others FM in SDN and SE37 and I found FM 'F4_DXFILENAME_TOPRECURSION'. This FM is used for search help, but I debugued it to see how its show the directory struture of server. I copy code and it works. I solved the problem, but I still unkwnowing why this FM doesn't worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 12:18:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dataset-operations/m-p/6480314#M1418818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T12:18:48Z</dc:date>
    </item>
  </channel>
</rss>

