<?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: moving files across folder in application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268182#M1216305</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;why don't you uncomment messages in your program. You don't care about exceptions from FM and you also ignore status and exit code returned by FM. Maybe it will tell you why it failed. And one quick guess, don't you have spaces in the name of the files? If yes, then you give more parameters to that command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Mar 2009 02:28:18 GMT</pubDate>
    <dc:creator>mvoros</dc:creator>
    <dc:date>2009-03-19T02:28:18Z</dc:date>
    <item>
      <title>moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268181#M1216304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to move file between folders in the application server .i'm using the fm sxpg_command_execute . the problem im facing here the file move sometimes and it doesnt move sometimes . what could be the problem..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  process_file_on_server
*&amp;amp;---------------------------------------------------------------------*

form process_file_on_server .

DATA: filename(128) TYPE c.
   DATA: param LIKE sxpgcolist-parameters.

CASE sy-sysid.
  WHEN 'BO1'.
    p_arc = 'k:\\Share\MM_SCUBCode_PDAtxt_Archive'.
  WHEN 'BQ1'.
    p_arc = 'K:\\Share\MM_SCUBCode_PDAtxt_Archive'.
  WHEN OTHERS.
ENDCASE.

  CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
    EXPORTING
      full_name           = p_file
   IMPORTING
     STRIPPED_NAME       = filename
*     FILE_PATH           =
   EXCEPTIONS
     X_ERROR             = 1
     OTHERS              = 2
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
CONCATENATE p_arc filename INTO p_arc SEPARATED BY '\'.
CONCATENATE p_file p_arc INTO param SEPARATED BY space.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
  EXPORTING
    commandname                         = 'ZMOVE'
   ADDITIONAL_PARAMETERS               =  param
*   OPERATINGSYSTEM                     = SY-OPSYS
*   TARGETSYSTEM                        = SY-HOST
*   DESTINATION                         =
*   STDOUT                              = 'X'
*   STDERR                              = 'X'
*   TERMINATIONWAIT                     = 'X'
*   TRACE                               =
*   DIALOG                              =
* IMPORTING
*   STATUS                              =
*   EXITCODE                            =
* TABLES
*   EXEC_PROTOCOL                       =
 EXCEPTIONS
   NO_PERMISSION                       = 1
   COMMAND_NOT_FOUND                   = 2
   PARAMETERS_TOO_LONG                 = 3
   SECURITY_RISK                       = 4
   WRONG_CHECK_CALL_INTERFACE          = 5
   PROGRAM_START_ERROR                 = 6
   PROGRAM_TERMINATION_ERROR           = 7
   X_ERROR                             = 8
   PARAMETER_EXPECTED                  = 9
   TOO_MANY_PARAMETERS                 = 10
   ILLEGAL_COMMAND                     = 11
   WRONG_ASYNCHRONOUS_PARAMETERS       = 12
   CANT_ENQ_TBTCO_ENTRY                = 13
   JOBCOUNT_GENERATION_ERROR           = 14
   OTHERS                              = 15
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear filename .
endform.                    " process_file_on_server&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 02:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268181#M1216304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T02:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268182#M1216305</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;why don't you uncomment messages in your program. You don't care about exceptions from FM and you also ignore status and exit code returned by FM. Maybe it will tell you why it failed. And one quick guess, don't you have spaces in the name of the files? If yes, then you give more parameters to that command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 02:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268182#M1216305</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2009-03-19T02:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268183#M1216306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your help. yes im having difficulty in moving  application server file with space . Please can help me in adding more parameters to the files&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 02:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268183#M1216306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T02:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268184#M1216307</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;PLEASE try this code ---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  process_file_on_server
*&amp;amp;---------------------------------------------------------------------*
 
*form process_file_on_server .
 
DATA: filename(128) TYPE c.
   DATA: param LIKE sxpgcolist-parameters.
 
CASE sy-sysid.
  WHEN 'BO1'.
    p_arc = 'k:\\Share\MM_SCUBCode_PDAtxt_Archive'.
  WHEN 'BQ1'.
    p_arc = 'K:\\Share\MM_SCUBCode_PDAtxt_Archive'.
  WHEN OTHERS.
ENDCASE.                            " CASE SY-SYSID
 DO.                                      " Changed          
  CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
    EXPORTING
      full_name           = p_file
   IMPORTING
     STRIPPED_NAME       = filename
*     FILE_PATH           =
   EXCEPTIONS
     X_ERROR             = 1
     OTHERS              = 2
            .
  IF sy-subrc NE  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.          " IF SY-SUBRC NE 0
CONCATENATE p_arc filename INTO p_arc SEPARATED BY '\'.
CONCATENATE p_file p_arc INTO param SEPARATED BY space.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
  EXPORTING
    commandname                         = 'ZMOVE'
   ADDITIONAL_PARAMETERS               =  param
*   OPERATINGSYSTEM                     = SY-OPSYS
*   TARGETSYSTEM                        = SY-HOST
*   DESTINATION                         =
*   STDOUT                              = 'X'
*   STDERR                              = 'X'
*   TERMINATIONWAIT                     = 'X'
*   TRACE                               =
*   DIALOG                              =
* IMPORTING
*   STATUS                              =
*   EXITCODE                            =
* TABLES
*   EXEC_PROTOCOL                       =
 EXCEPTIONS
   NO_PERMISSION                       = 1
   COMMAND_NOT_FOUND                   = 2
   PARAMETERS_TOO_LONG                 = 3
   SECURITY_RISK                       = 4
   WRONG_CHECK_CALL_INTERFACE          = 5
   PROGRAM_START_ERROR                 = 6
   PROGRAM_TERMINATION_ERROR           = 7
   X_ERROR                             = 8
   PARAMETER_EXPECTED                  = 9
   TOO_MANY_PARAMETERS                 = 10
   ILLEGAL_COMMAND                     = 11
   WRONG_ASYNCHRONOUS_PARAMETERS       = 12
   CANT_ENQ_TBTCO_ENTRY                = 13
   JOBCOUNT_GENERATION_ERROR           = 14
   OTHERS                              = 15
          .
IF sy-subrc = 0.                              " CHANGE
STOP.                                           " CHANGE
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear filename .
endform.                    " process_file_on_server
ENDDO.                    " CHANGE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 03:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268184#M1216307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T03:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268185#M1216308</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;Refer this link, it will definitely help you.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tranfer file between folder in application server&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/community/transfer%252bfile%252bbetween%252bfolder%252bon%252bapplication%252bserver" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/community/transfer%252bfile%252bbetween%252bfolder%252bon%252bapplication%252bserver&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 03:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268185#M1216308</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-19T03:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268186#M1216309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohammed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be due to authorization problem? &lt;/P&gt;&lt;P&gt;We did ever had this problem before in one of the project and we finally found out that the problem is the OS system user ID did have enough authorization those selected folders or directories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lim...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 04:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268186#M1216309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T04:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268187#M1216310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chang.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply it is authorization problem operating system command which we are using in the function module sxpg_command_execute&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 09:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268187#M1216310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T09:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268188#M1216311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have the same requirement here. Is the command name "ZMOVE" used to trigger script?&lt;/P&gt;&lt;P&gt;Is there any other ways to move the file without triggering script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2009 04:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268188#M1216311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-24T04:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: moving files across folder in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268189#M1216312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no zmove is not to trigger script .It is OS command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2009 05:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-files-across-folder-in-application-server/m-p/5268189#M1216312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-24T05:37:54Z</dc:date>
    </item>
  </channel>
</rss>

