<?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: wrong select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610124#M869563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes there exists an according value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 08:35:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-20T08:35:14Z</dc:date>
    <item>
      <title>wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610117#M869556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following code is a part of a function module. My problem is that the field language is still empty, although there is an according value.&lt;/P&gt;&lt;P&gt;What is wrong with this code? Please hlep me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;DATA: language TYPE sylangu,&lt;/P&gt;&lt;P&gt;           cv_language TYPE sylangu,&lt;/P&gt;&lt;P&gt;           ls_orderadm_h TYPE crmt_orderadm_h_wrkt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: STXH, CRMD_ORDERADM_H.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT a~tdspras INTO language&lt;/P&gt;&lt;P&gt;    FROM STXH as a&lt;/P&gt;&lt;P&gt;    INNER JOIN CRMD_ORDERADM_H as b&lt;/P&gt;&lt;P&gt;    ON a&lt;SUB&gt;tdname = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt;    WHERE b~object_id EQ ls_orderadm_h-object_id.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF language IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    cv_language = language.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    cv_language = sy-langu.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 07:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610117#M869556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T07:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610118#M869557</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;do this way ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if not ls_orderadm_h[] is initial.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; SELECT a~tdspras INTO language&lt;/P&gt;&lt;P&gt;FROM STXH as a&lt;/P&gt;&lt;P&gt;INNER JOIN CRMD_ORDERADM_H as b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;tdname = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for all entries in  ls_orderadm_h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;WHERE b~object_id EQ ls_orderadm_h-object_id.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:03:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610118#M869557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610119#M869558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try seperating the selections, The join statement disterb you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 possible solutions:&lt;/P&gt;&lt;P&gt;1.Select all records from first table and than loop  &lt;/P&gt;&lt;P&gt;   at this internal table and select from second &lt;/P&gt;&lt;P&gt;   table.&lt;/P&gt;&lt;P&gt;2. Use left outer join if it's OK with your &lt;/P&gt;&lt;P&gt;    functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helpfull..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rebeka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610119#M869558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610120#M869559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your code don´t work.&lt;/P&gt;&lt;P&gt;The field language is still empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610120#M869559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610121#M869560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philipp, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyways u r not processing selected value inside select / endselect...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also , u r not using all key fields from both table...so language field can not be single...&lt;/P&gt;&lt;P&gt;it is better to use...select...into table it_lang...it'll definitely  improve the performance also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this code may help u...&lt;/P&gt;&lt;P&gt;*===========================================&lt;/P&gt;&lt;P&gt;types : begin of ty_lang,&lt;/P&gt;&lt;P&gt;           language TYPE sy-langu,&lt;/P&gt;&lt;P&gt;           end of ty_lang.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_lang type table of ty_lang,&lt;/P&gt;&lt;P&gt;         wa_lang type ty_lang.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~tdspras INTO it_lang&lt;/P&gt;&lt;P&gt;FROM STXH as a&lt;/P&gt;&lt;P&gt;INNER JOIN CRMD_ORDERADM_H as b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;tdname = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt;WHERE b~object_id EQ ls_orderadm_h-object_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_lang into wa_lang where language is not initial.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;cv_language = wa_lang-language.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;cv_language = sy-langu.&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;Reward points if useful...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:27:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610121#M869560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610122#M869561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you checked whether there is any suitable record in the table satisfying the select condition ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610122#M869561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610123#M869562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_lang is an internal table and is not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:33:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610123#M869562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610124#M869563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes there exists an according value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610124#M869563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610125#M869564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Philip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Remove join and use for all entries statement then.&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;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610125#M869564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610126#M869565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just check both the tables for the record u r looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also use SELECT SINGLE instead of SELECT-ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;S@meer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:55:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610126#M869565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: wrong select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610127#M869566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single  a~tdspras INTO language&lt;/P&gt;&lt;P&gt;FROM STXH as a&lt;/P&gt;&lt;P&gt;INNER JOIN CRMD_ORDERADM_H as b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;tdname = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt;WHERE b~object_id EQ ls_orderadm_h-object_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF language IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;cv_language = language.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;cv_language = sy-langu.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~tdspras INTO language&lt;/P&gt;&lt;P&gt;FROM STXH as a&lt;/P&gt;&lt;P&gt;INNER JOIN CRMD_ORDERADM_H as b&lt;/P&gt;&lt;P&gt;ON a&lt;SUB&gt;tdname = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt;WHERE b~object_id EQ ls_orderadm_h-object_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF language IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;cv_language = language.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;cv_language = sy-langu.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 09:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-select-statement/m-p/3610127#M869566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T09:00:09Z</dc:date>
    </item>
  </channel>
</rss>

