<?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 Leave Transaction ECC 6 error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435618#M1648024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This piece of code was used to refresh alv data automatically for every 3 minutes and it worked perfectly in sap 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But in SAP 6 I am getting runtime error :RPERF_ILLEGAL_STATEMENT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Statement &lt;STRONG&gt;LEAVE TO TRANSACTION&lt;/STRONG&gt; is not allowed in this form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---------------------------------------------------------
FORM f_call_rfc_wait .

  DATA lv_mssg(80).                                         "#EC NEEDED

  CALL FUNCTION 'RFC_PING_AND_WAIT' STARTING NEW TASK '0O1'
    PERFORMING f_task_end ON END OF TASK
    EXPORTING
      seconds               = 180        " Refresh time
      busy_waiting          = space
    EXCEPTIONS
      RESOURCE_FAILURE      = 1
      communication_failure = 2  MESSAGE lv_mssg
      system_failure        = 3  MESSAGE lv_mssg
      OTHERS                = 4.
ENDFORM.                    " f_call_rfc_wait
FORM f_task_end USING taskname.

  DATA lv_mssg(80).                                         "#EC NEEDED

  RECEIVE RESULTS FROM FUNCTION 'RFC_PING_AND_WAIT'
     EXCEPTIONS
      RESOURCE_FAILURE      = 1
      communication_failure = 2  MESSAGE lv_mssg
      system_failure        = 3  MESSAGE lv_mssg
      OTHERS                = 4.

  CHECK sy-subrc EQ 0.

  SET USER-COMMAND '&amp;amp;NTE'.             "Refresh
 LEAVE TO CURRENT TRANSACTION AND SKIP FIRST SCREEN.

ENDFORM.                    " f_task_end

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  user_command1
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
*      --&amp;gt;UCOMM      text
*      --&amp;gt;SELFIELD   text
*      for detailed list and automatic refreshing
*---------------------------------------------------------------------*
FORM area_prod_alv.

  TYPE-POOLS: slis.
  DATA t_fieldalv  TYPE slis_t_fieldcat_alv.
  DATA: ls_slis_fieldcat  TYPE slis_fieldcat_alv.
  PERFORM f_call_rfc_wait.
  PERFORM initial_alv_fieldcat CHANGING t_fieldalv[].
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_bypassing_buffer      = 'X'
      i_buffer_active         = ' '
      i_callback_program      = 'ZMPQ203_SHOP_HONEW'
      i_callback_pf_status_set = 'PF_STATUS'
      i_callback_user_command = 'USER_COMMAND1'
      it_fieldcat             = t_fieldalv[]
      i_save                  = 'X'
      it_events               = gt_event[]
      is_layout               = lo_layout
    TABLES
      t_outtab                = itab3
    EXCEPTIONS
      program_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.

ENDFORM.                    " area_prod_alv
--------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;instead of &lt;STRONG&gt;LEAVE TO CURRENT TRANSACTION AND SKIP FIRST SCREEN.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;i have also tried &lt;STRONG&gt;LEAVE to TRANSACTION TRASACTION_NAME AND SKIP FIRST SCREEN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; also &lt;STRONG&gt;CALL TRANSACTION  TRASACTION_NAME AND SKIP FIRST SCREEN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but i got same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Dec 2011 11:12:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-24T11:12:34Z</dc:date>
    <item>
      <title>Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435618#M1648024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This piece of code was used to refresh alv data automatically for every 3 minutes and it worked perfectly in sap 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But in SAP 6 I am getting runtime error :RPERF_ILLEGAL_STATEMENT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Statement &lt;STRONG&gt;LEAVE TO TRANSACTION&lt;/STRONG&gt; is not allowed in this form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---------------------------------------------------------
FORM f_call_rfc_wait .

  DATA lv_mssg(80).                                         "#EC NEEDED

  CALL FUNCTION 'RFC_PING_AND_WAIT' STARTING NEW TASK '0O1'
    PERFORMING f_task_end ON END OF TASK
    EXPORTING
      seconds               = 180        " Refresh time
      busy_waiting          = space
    EXCEPTIONS
      RESOURCE_FAILURE      = 1
      communication_failure = 2  MESSAGE lv_mssg
      system_failure        = 3  MESSAGE lv_mssg
      OTHERS                = 4.
ENDFORM.                    " f_call_rfc_wait
FORM f_task_end USING taskname.

  DATA lv_mssg(80).                                         "#EC NEEDED

  RECEIVE RESULTS FROM FUNCTION 'RFC_PING_AND_WAIT'
     EXCEPTIONS
      RESOURCE_FAILURE      = 1
      communication_failure = 2  MESSAGE lv_mssg
      system_failure        = 3  MESSAGE lv_mssg
      OTHERS                = 4.

  CHECK sy-subrc EQ 0.

  SET USER-COMMAND '&amp;amp;NTE'.             "Refresh
 LEAVE TO CURRENT TRANSACTION AND SKIP FIRST SCREEN.

ENDFORM.                    " f_task_end

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  user_command1
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
*      --&amp;gt;UCOMM      text
*      --&amp;gt;SELFIELD   text
*      for detailed list and automatic refreshing
*---------------------------------------------------------------------*
FORM area_prod_alv.

  TYPE-POOLS: slis.
  DATA t_fieldalv  TYPE slis_t_fieldcat_alv.
  DATA: ls_slis_fieldcat  TYPE slis_fieldcat_alv.
  PERFORM f_call_rfc_wait.
  PERFORM initial_alv_fieldcat CHANGING t_fieldalv[].
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_bypassing_buffer      = 'X'
      i_buffer_active         = ' '
      i_callback_program      = 'ZMPQ203_SHOP_HONEW'
      i_callback_pf_status_set = 'PF_STATUS'
      i_callback_user_command = 'USER_COMMAND1'
      it_fieldcat             = t_fieldalv[]
      i_save                  = 'X'
      it_events               = gt_event[]
      is_layout               = lo_layout
    TABLES
      t_outtab                = itab3
    EXCEPTIONS
      program_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.

ENDFORM.                    " area_prod_alv
--------------------------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;instead of &lt;STRONG&gt;LEAVE TO CURRENT TRANSACTION AND SKIP FIRST SCREEN.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;i have also tried &lt;STRONG&gt;LEAVE to TRANSACTION TRASACTION_NAME AND SKIP FIRST SCREEN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; also &lt;STRONG&gt;CALL TRANSACTION  TRASACTION_NAME AND SKIP FIRST SCREEN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but i got same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 11:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435618#M1648024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-24T11:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435619#M1648025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are u passing a parameter id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 12:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435619#M1648025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-24T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435620#M1648026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are u passing a parameter id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 12:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435620#M1648026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-24T12:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435621#M1648027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you to use another approach for the autorefresh: use class CL_GUI_TIMER instead of the RFC_PING_AND_WAIT function module. There is an example report (I don't remember its name but it is in the the same package of the class) and there are a few posts in the SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/Snippets/Automatic" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/Snippets/Automatic&lt;/A&gt;&lt;EM&gt;Data&lt;/EM&gt;Refresh&lt;EM&gt;on&lt;/EM&gt;Module&lt;EM&gt;pool&lt;/EM&gt;Screen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 14:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435621#M1648027</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-12-24T14:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435622#M1648028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it may work.&lt;/P&gt;&lt;P&gt;Set Screen (next Screen Number).&lt;/P&gt;&lt;P&gt;Leave screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Dec 2011 21:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435622#M1648028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-25T21:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435623#M1648029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;parameter id is not passed&lt;/P&gt;&lt;P&gt;this is used in a report program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 03:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435623#M1648029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-26T03:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Leave Transaction ECC 6 error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435624#M1648030</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;try with below methods and FM in your object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*call screen 0.&lt;/P&gt;&lt;P&gt;  LEAVE TO CURRENT TRANSACTION AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Usually this command is enough to call PAI/PBO by force&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD CL_GUI_CFW=&amp;gt;SET_NEW_OK_CODE&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    NEW_CODE = 'DUMMY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FUNCTIONCODE                 = '/00'&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FUNCTION_NOT_SUPPORTED       = 1&lt;/P&gt;&lt;P&gt;   OTHERS                       = 2.&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;Implement suitable error handling here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_CFW=&amp;gt;FLUSH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might be your issue will solve the  above solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Syfulla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2011 11:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leave-transaction-ecc-6-error/m-p/8435624#M1648030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-29T11:45:07Z</dc:date>
    </item>
  </channel>
</rss>

