<?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 Read row just inserted in table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263292#M779766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy experts, &lt;/P&gt;&lt;P&gt;I've got the following problem with this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM make_out.&lt;/P&gt;&lt;P&gt;  SORT tb_app BY rueck rmzhl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT tb_app ASSIGNING &amp;lt;fs_app&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_ALM_CONF_CANCEL'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        confirmation        = &amp;lt;fs_app&amp;gt;-rueck&lt;/P&gt;&lt;P&gt;        confirmationcounter = &amp;lt;fs_app&amp;gt;-rmzhl&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return              = tb_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        wait   = ca_x&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = tb_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    UNASSIGN &amp;lt;fs_return&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE tb_return ASSIGNING &amp;lt;fs_return&amp;gt;&lt;/P&gt;&lt;P&gt;    WITH KEY type = ca_e.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      wa_result-rueck = &amp;lt;fs_app&amp;gt;-rueck.&lt;/P&gt;&lt;P&gt;      wa_result-rmzhl = &amp;lt;fs_app&amp;gt;-rmzhl.&lt;/P&gt;&lt;P&gt;      wa_result-msg = &amp;lt;fs_return&amp;gt;-message.&lt;/P&gt;&lt;P&gt;      wa_result-ex = icon_red_light .                       "'1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_result TO tb_result.&lt;/P&gt;&lt;P&gt;      CLEAR wa_result.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "make_out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've to read the current row inserted in table tb_return and check the value of field 'message': if this value is 'E' i insert a row in table wa_result with the values described in the code shown. i wanted to know how to set the read table statement correctly, 'cause in the form you see i don't think it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jan 2008 20:14:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-19T20:14:01Z</dc:date>
    <item>
      <title>Read row just inserted in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263292#M779766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy experts, &lt;/P&gt;&lt;P&gt;I've got the following problem with this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM make_out.&lt;/P&gt;&lt;P&gt;  SORT tb_app BY rueck rmzhl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT tb_app ASSIGNING &amp;lt;fs_app&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_ALM_CONF_CANCEL'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        confirmation        = &amp;lt;fs_app&amp;gt;-rueck&lt;/P&gt;&lt;P&gt;        confirmationcounter = &amp;lt;fs_app&amp;gt;-rmzhl&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return              = tb_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        wait   = ca_x&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = tb_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    UNASSIGN &amp;lt;fs_return&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE tb_return ASSIGNING &amp;lt;fs_return&amp;gt;&lt;/P&gt;&lt;P&gt;    WITH KEY type = ca_e.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      wa_result-rueck = &amp;lt;fs_app&amp;gt;-rueck.&lt;/P&gt;&lt;P&gt;      wa_result-rmzhl = &amp;lt;fs_app&amp;gt;-rmzhl.&lt;/P&gt;&lt;P&gt;      wa_result-msg = &amp;lt;fs_return&amp;gt;-message.&lt;/P&gt;&lt;P&gt;      wa_result-ex = icon_red_light .                       "'1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_result TO tb_result.&lt;/P&gt;&lt;P&gt;      CLEAR wa_result.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "make_out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've to read the current row inserted in table tb_return and check the value of field 'message': if this value is 'E' i insert a row in table wa_result with the values described in the code shown. i wanted to know how to set the read table statement correctly, 'cause in the form you see i don't think it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 20:14:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263292#M779766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T20:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read row just inserted in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263293#M779767</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 think that it's happend because u use the same table tb_return in 'BAPI_ALM_CONF_CANCEL' and in 'BAPI_TRANSACTION_COMMIT'. try to use different return or try this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;FORM make_out.&lt;/P&gt;&lt;P&gt;&amp;gt;SORT tb_app BY rueck rmzhl.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;LOOP AT tb_app ASSIGNING &amp;lt;fs_app&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;CALL FUNCTION 'BAPI_ALM_CONF_CANCEL'&lt;/P&gt;&lt;P&gt;&amp;gt;EXPORTING&lt;/P&gt;&lt;P&gt;&amp;gt;confirmation = &amp;lt;fs_app&amp;gt;-rueck&lt;/P&gt;&lt;P&gt;&amp;gt;confirmationcounter = &amp;lt;fs_app&amp;gt;-rmzhl&lt;/P&gt;&lt;P&gt;&amp;gt;IMPORTING&lt;/P&gt;&lt;P&gt;&amp;gt;return = tb_return.&lt;/P&gt;&lt;P&gt;&amp;gt;UNASSIGN &amp;lt;fs_return&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;gt;READ TABLE tb_return ASSIGNING &amp;lt;fs_return&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;WITH KEY type = ca_e.&lt;/P&gt;&lt;P&gt;&amp;gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&amp;gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;&amp;gt;EXPORTING&lt;/P&gt;&lt;P&gt;&amp;gt;wait = ca_x&lt;/P&gt;&lt;P&gt;&amp;gt;IMPORTING&lt;/P&gt;&lt;P&gt;&amp;gt;return = tb_return.&lt;/P&gt;&lt;P&gt;&amp;gt;else.&lt;/P&gt;&lt;P&gt;&amp;gt;CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'&lt;/P&gt;&lt;P&gt;&amp;gt; endif.&lt;/P&gt;&lt;P&gt;&amp;gt;UNASSIGN &amp;lt;fs_return&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;READ TABLE tb_return ASSIGNING &amp;lt;fs_return&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;WITH KEY type = ca_e.&lt;/P&gt;&lt;P&gt;&amp;gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt;wa_result-rueck = &amp;lt;fs_app&amp;gt;-rueck.&lt;/P&gt;&lt;P&gt;&amp;gt;wa_result-rmzhl = &amp;lt;fs_app&amp;gt;-rmzhl.&lt;/P&gt;&lt;P&gt;&amp;gt;wa_result-msg = &amp;lt;fs_return&amp;gt;-message.&lt;/P&gt;&lt;P&gt;&amp;gt;wa_result-ex = icon_red_light . "'1'.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;APPEND wa_result TO tb_result.&lt;/P&gt;&lt;P&gt;&amp;gt;CLEAR wa_result.&lt;/P&gt;&lt;P&gt;&amp;gt;ENDIF.&lt;/P&gt;&lt;P&gt;&amp;gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;gt;ENDFORM. "make_out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the function 'BAPI_TRANSACTION_COMMIT' make sense if the BAPI which was called before it went well otherwise you should call the 'BAPI_TRANSACTION_ROLLBACK'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: nicolai marco on Jan 20, 2008 12:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 23:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263293#M779767</guid>
      <dc:creator>mnicolai_77</dc:creator>
      <dc:date>2008-01-19T23:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read row just inserted in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263294#M779768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, my problem is that through the first bapi i insert one row in the table tb_return, and then i've got to examine the field 'type' of that row because i've to verify if its value is 'E': if the value of the filed eq 'E' then i make the insertio in wa_result. the problem is with the read statement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table tb_return assigning &amp;lt;fs_return&amp;gt; with key type = ca_e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this statement in my opinion doesn't read the row i've just inserted in tb_return, but simply read the first row in the table with type='e', and this isn't what my program must do, it has to examine the row inserted in tb_return, and if the field 'type' ofthat row = 'E' it must insert one row in tb_result. how do i can read the last row inserted into tb_return? could someone tell me how to modify the read statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2008 00:45:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263294#M779768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-20T00:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read row just inserted in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263295#M779769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivano,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-index is the system field for current row position.&lt;/P&gt;&lt;P&gt;Read table &amp;lt;itab&amp;gt; into wa index sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2008 04:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263295#M779769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-20T04:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Read row just inserted in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263296#M779770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thaks it's ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2008 23:26:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-row-just-inserted-in-table/m-p/3263296#M779770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-21T23:26:55Z</dc:date>
    </item>
  </channel>
</rss>

