<?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: PROBLEM IN SXPG_COMMAND_EXECUTE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318406#M508660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uga,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find my answers below:&lt;/P&gt;&lt;P&gt;Pls reward pts if useful.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1.Is operating system parameter is necessary&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   Host system, in which the command is to be run. OPERATINGSYSTEM is specified in the command definition (Transaction SM69).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.Status parameter is returning 'O' what does it mean.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Returns the final status of the execution of the external command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the include RSXPGDEF is called in your program, there are the following possible values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value 'O': The external command was started and successfully run.&lt;/P&gt;&lt;P&gt;Value 'F': Error; the external command was not executed.&lt;/P&gt;&lt;P&gt;Value 'E': Error, the external command was terminated with an error.&lt;/P&gt;&lt;P&gt;Value 'S': The external command was terminated due to an operating system message.&lt;/P&gt;&lt;P&gt;Value 'C': The external command was terminated in an unknown way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not use RSXPGDEF, only the following values can be delivered back:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value 'O': The external command was started and successfully run.&lt;/P&gt;&lt;P&gt;Value 'E': Error, the external command was not executed&lt;/P&gt;&lt;P&gt;3.&amp;lt;b&amp;gt;What is the use of that EXEC_PROTOCOL = IT_CMD_OUTPUT "Return table(ur gt_log).In this log I find the author name ,date,path,authentication failed ,reading of file is sucess.....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Contains the STDOUT and STDERR output for the external command and output data of the target host system, if TERMINATIONWAIT is active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You can loop across that table and write the errors occured while doing FTP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;4.&amp;lt;b&amp;gt;And one more thing sy-subrc = 0 after running of the function module but when the statement open dataset executes sy-subrc becomes 8 which means file not opened.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be .But you just check the file type.Give as type c .and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 09:31:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T09:31:04Z</dc:date>
    <item>
      <title>PROBLEM IN SXPG_COMMAND_EXECUTE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318403#M508657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to read a file in unix and read that.&lt;/P&gt;&lt;P&gt;For this I am using the below fm and passin the respective parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SXPG_COMMAND_EXECUTE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    commandname                         =  'Z9CRS_NCRF_FTP' //command&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ADDITIONAL_PARAMETERS               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OPERATINGSYSTEM                     = SY-OPSYS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TARGETSYSTEM                        = SY-HOST&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DESTINATION                         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STDOUT                              = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STDERR                              = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TERMINATIONWAIT                     = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TRACE                               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   STATUS                              = gv_comm_status&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXITCODE                            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    exec_protocol                       = gt_log&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NO_PERMISSION                       = 1&lt;/P&gt;&lt;P&gt;   COMMAND_NOT_FOUND                   = 2&lt;/P&gt;&lt;P&gt;   PARAMETERS_TOO_LONG                 = 3&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SECURITY_RISK                       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WRONG_CHECK_CALL_INTERFACE          = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_START_ERROR                 = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_TERMINATION_ERROR           = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_ERROR                             = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARAMETER_EXPECTED                  = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TOO_MANY_PARAMETERS                 = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ILLEGAL_COMMAND                     = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WRONG_ASYNCHRONOUS_PARAMETERS       = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CANT_ENQ_TBTCO_ENTRY                = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOBCOUNT_GENERATION_ERROR           = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                              = 15&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : /'Command to sftp NCRF File FAILED'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this fm I am passing commandline-'Z9CRS_NCRF_FTP' .And inporting parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  STATUS                              = gv_comm_status&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXITCODE                            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    exec_protocol                       = gt_log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever i rum the program  gv_comm_status is being filled with 'o'.&lt;/P&gt;&lt;P&gt;and gt_log is also being filled with some data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to read the file sy-subrc is becoming 8 thats means no file found.&lt;/P&gt;&lt;P&gt;Can anyone tell me what is this exec_protocol = gt_log&lt;/P&gt;&lt;P&gt;And why i am not able to read the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 08:44:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318403#M508657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T08:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN SXPG_COMMAND_EXECUTE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318404#M508658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uga,&lt;/P&gt;&lt;P&gt; exec_protocol = gt_log contains  the output returned from the UNIX.&lt;/P&gt;&lt;P&gt;  Use like this.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SXPG_COMMAND_EXECUTE'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;        COMMANDNAME                   = P_UXCMD   "Unix command&lt;/P&gt;&lt;P&gt;        OPERATINGSYSTEM               = 'AIX'     "Operating system&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         TARGETSYSTEM                  = SY-HOST&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        STDOUT                        = 'X'&lt;/P&gt;&lt;P&gt;        STDERR                        = 'X'&lt;/P&gt;&lt;P&gt;        TERMINATIONWAIT               = 'X'&lt;/P&gt;&lt;P&gt;        TRACE                         = 'X'&lt;/P&gt;&lt;P&gt;      ADDITIONAL_PARAMETERS         = L_UXPARM     "Parameters&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;        STATUS                        = BTCXP3-EXITSTAT&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;        EXEC_PROTOCOL                 = IT_CMD_OUTPUT   "Return table(ur gt_log)&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_PERMISSION                 = 1&lt;/P&gt;&lt;P&gt;        COMMAND_NOT_FOUND             = 2&lt;/P&gt;&lt;P&gt;        PARAMETERS_TOO_LONG           = 3&lt;/P&gt;&lt;P&gt;        SECURITY_RISK                 = 4&lt;/P&gt;&lt;P&gt;        WRONG_CHECK_CALL_INTERFACE    = 5&lt;/P&gt;&lt;P&gt;        PROGRAM_START_ERROR           = 6&lt;/P&gt;&lt;P&gt;        PROGRAM_TERMINATION_ERROR     = 7&lt;/P&gt;&lt;P&gt;        X_ERROR                       = 8&lt;/P&gt;&lt;P&gt;        PARAMETER_EXPECTED            = 9&lt;/P&gt;&lt;P&gt;        TOO_MANY_PARAMETERS           = 10&lt;/P&gt;&lt;P&gt;        ILLEGAL_COMMAND               = 11&lt;/P&gt;&lt;P&gt;        WRONG_ASYNCHRONOUS_PARAMETERS = 12&lt;/P&gt;&lt;P&gt;        CANT_ENQ_TBTCO_ENTRY          = 13&lt;/P&gt;&lt;P&gt;        JOBCOUNT_GENERATION_ERROR     = 14&lt;/P&gt;&lt;P&gt;        OTHERS                        = 15.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 08:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318404#M508658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T08:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN SXPG_COMMAND_EXECUTE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318405#M508659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for quick reply.&lt;/P&gt;&lt;P&gt;1.Is operating system parameter is necessary&lt;/P&gt;&lt;P&gt;2.Status parameter is returning 'O' what does it mean.&lt;/P&gt;&lt;P&gt;3.What is the use of that EXEC_PROTOCOL = IT_CMD_OUTPUT "Return table(ur gt_log).In this log I find the author name ,date,path,authentication failed ,reading of file is sucess.....&lt;/P&gt;&lt;P&gt;4.And one more thing sy-subrc = 0 after running of the function module but when the statement open dataset executes sy-subrc becomes 8 which means file not opened.&lt;/P&gt;&lt;P&gt;Can you please help me to sort above queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uga.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 09:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318405#M508659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T09:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEM IN SXPG_COMMAND_EXECUTE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318406#M508660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uga,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find my answers below:&lt;/P&gt;&lt;P&gt;Pls reward pts if useful.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1.Is operating system parameter is necessary&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   Host system, in which the command is to be run. OPERATINGSYSTEM is specified in the command definition (Transaction SM69).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.Status parameter is returning 'O' what does it mean.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Returns the final status of the execution of the external command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the include RSXPGDEF is called in your program, there are the following possible values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value 'O': The external command was started and successfully run.&lt;/P&gt;&lt;P&gt;Value 'F': Error; the external command was not executed.&lt;/P&gt;&lt;P&gt;Value 'E': Error, the external command was terminated with an error.&lt;/P&gt;&lt;P&gt;Value 'S': The external command was terminated due to an operating system message.&lt;/P&gt;&lt;P&gt;Value 'C': The external command was terminated in an unknown way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not use RSXPGDEF, only the following values can be delivered back:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value 'O': The external command was started and successfully run.&lt;/P&gt;&lt;P&gt;Value 'E': Error, the external command was not executed&lt;/P&gt;&lt;P&gt;3.&amp;lt;b&amp;gt;What is the use of that EXEC_PROTOCOL = IT_CMD_OUTPUT "Return table(ur gt_log).In this log I find the author name ,date,path,authentication failed ,reading of file is sucess.....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Contains the STDOUT and STDERR output for the external command and output data of the target host system, if TERMINATIONWAIT is active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You can loop across that table and write the errors occured while doing FTP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;4.&amp;lt;b&amp;gt;And one more thing sy-subrc = 0 after running of the function module but when the statement open dataset executes sy-subrc becomes 8 which means file not opened.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be .But you just check the file type.Give as type c .and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 09:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-sxpg-command-execute/m-p/2318406#M508660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T09:31:04Z</dc:date>
    </item>
  </channel>
</rss>

