<?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: Covert into CASE ENDCASE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983721#M951648</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;I do not see the real advantage of case in the above code. What I notice is a DB select within a loop which can easily be avoided using FOR ALL ENTRIES IN clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what you want to achieve, but the code seems to be DB extensive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 06:27:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T06:27:36Z</dc:date>
    <item>
      <title>Covert into CASE ENDCASE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983719#M951646</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;How to convert into CASE &amp;amp; ENDCASE logic the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT lt_element INTO ls_element.&lt;/P&gt;&lt;P&gt;READ TABLE lt_element_ident INTO ls_element_ident&lt;/P&gt;&lt;P&gt;WITH KEY element_id = ls_element-element_id BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;MOVE ls_element_ident-value TO lv_guid.&lt;/P&gt;&lt;P&gt;SELECT * FROM zcm_valuation_at&lt;/P&gt;&lt;P&gt;APPENDING CORRESPONDING FIELDS OF TABLE lt_caseattributes&lt;/P&gt;&lt;P&gt;WHERE case_guid = lv_guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;LOOP AT lt_caseattributes INTO ls_caseattributes.&lt;/P&gt;&lt;P&gt;IF ls_caseattributes-ext_key IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ext_key&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF ls_caseattributes&lt;/P&gt;&lt;P&gt;FROM scmg_t_case_attr&lt;/P&gt;&lt;P&gt;WHERE case_guid = ls_caseattributes-case_guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To get the Status description of the Case&lt;/P&gt;&lt;P&gt;SELECT SINGLE stat_ordno_descr&lt;/P&gt;&lt;P&gt;INTO ls_caseattributes-status&lt;/P&gt;&lt;P&gt;FROM scmgstatprofst AS a&lt;/P&gt;&lt;P&gt;INNER JOIN scmg_t_case_attr AS b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;profile_id = b&lt;/SUB&gt;profile_id&lt;/P&gt;&lt;P&gt;AND a&lt;SUB&gt;stat_orderno = b&lt;/SUB&gt;stat_orderno&lt;/P&gt;&lt;P&gt;WHERE case_guid = ls_caseattributes-case_guid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY lt_caseattributes FROM ls_caseattributes INDEX sy-tabix TRANSPORTING status ext_key.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE lt_caseattributes INTO ls_caseattributes INDEX 1.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maruti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 07:46:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983719#M951646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T07:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Covert into CASE ENDCASE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983720#M951647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;CASE sy-subrc.
  WHEN  0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 07:54:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983720#M951647</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-06-16T07:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Covert into CASE ENDCASE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983721#M951648</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;I do not see the real advantage of case in the above code. What I notice is a DB select within a loop which can easily be avoided using FOR ALL ENTRIES IN clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what you want to achieve, but the code seems to be DB extensive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 06:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/covert-into-case-endcase/m-p/3983721#M951648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T06:27:36Z</dc:date>
    </item>
  </channel>
</rss>

