<?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: Question reg. Select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861852#M363785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are querying on database table KNMT with the combinatio of VKORG,VTWEG nd KUNNR where a you are querying only with the value of KUNNR at your datatable level through SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SE11, it will search for only those KUNNR value of 0000019900. You can interpret this as the below query.&lt;/P&gt;&lt;P&gt;SELECT single vkorg vtweg kunnr&lt;/P&gt;&lt;P&gt;FROM knmt&lt;/P&gt;&lt;P&gt;INTO str_knmt&lt;/P&gt;&lt;P&gt;WHERE kunnr = p_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your SELECT query it will search will blank values for VKORG and VTWEG. So you are unable to get an entry to this internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Plz mark all helpfuls answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jan 2007 21:19:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-05T21:19:09Z</dc:date>
    <item>
      <title>Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861846#M363779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question reg. select statement:&lt;/P&gt;&lt;P&gt;data: str_knmt type knmt.&lt;/P&gt;&lt;P&gt;   SELECT single vkorg vtweg kunnr&lt;/P&gt;&lt;P&gt;   FROM knmt&lt;/P&gt;&lt;P&gt;   INTO  str_knmt&lt;/P&gt;&lt;P&gt;        WHERE vkorg = p_vkorg&lt;/P&gt;&lt;P&gt;          AND vtweg = p_vtweg&lt;/P&gt;&lt;P&gt;          AND kunnr = p_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now on the selection screen, I entred only value for p_kunnr (i.e 0000019900) and pressed F8. Now in debugging mode, I see no entries in str_knmt even though there is an entry existing in knmt table with the kunnr value i entered. (the entry in the structure str_knmt is expected as &lt;/P&gt;&lt;P&gt;B280 for vkorg&lt;/P&gt;&lt;P&gt;10 for vtweg&lt;/P&gt;&lt;P&gt;0000019900 for kunnr).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why that record is not coming into the structure? Please give your input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861846#M363779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861847#M363780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no record in KNMT where vkorg is blank, vtweg is blank, and kunnr = 0000019900.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:13:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861847#M363780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861848#M363781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you didn't enter values in p_vkorg or p_vtweg, the select is looking for entries where these are blank as well. Remember, parameters are not select options and behave differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861848#M363781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861849#M363782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;P&gt;Yes, i know. so, how to get that record even though i keep them blank or sometimes i may enter them..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:16:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861849#M363782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861850#M363783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could be because the you havenet entered anything in the selection screen for p_vtweg. This is causing a blank value to be fed into the select statement and the statement is failing for this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your p_vtweg is a optional field then you declare it as a select option with no intervals and extension. This will appear as a parameter in the screen and will serve your perpose. Dont forget to alter the select statement to accomodate the select option instead of the parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Guru&lt;/P&gt;&lt;P&gt;Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861850#M363783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861851#M363784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Rob suggested, use Select-Options instead of Parameters and use IN in your select statement instead of =.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:17:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861851#M363784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861852#M363785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are querying on database table KNMT with the combinatio of VKORG,VTWEG nd KUNNR where a you are querying only with the value of KUNNR at your datatable level through SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SE11, it will search for only those KUNNR value of 0000019900. You can interpret this as the below query.&lt;/P&gt;&lt;P&gt;SELECT single vkorg vtweg kunnr&lt;/P&gt;&lt;P&gt;FROM knmt&lt;/P&gt;&lt;P&gt;INTO str_knmt&lt;/P&gt;&lt;P&gt;WHERE kunnr = p_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your SELECT query it will search will blank values for VKORG and VTWEG. So you are unable to get an entry to this internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Plz mark all helpfuls answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861852#M363785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861853#M363786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: KNMT.
                                                                        
SELECT-OPTIONS: S_VKORG FOR KNMT-VKORG,
                S_VTWEG FOR KNMT-VTWEG.
                                                                        
PARAMETERS: P_KUNNR LIKE KNMT-KUNNR.
                                                                        
DATA: BEGIN OF STR_KNMT,
        VKORG LIKE KNMT-VKORG,
        VTWEG LIKE KNMT-VTWEG,
        KUNNR LIKE KNMT-KUNNR.
DATA: END OF STR_KNMT.
                                                                        
SELECT SINGLE VKORG VTWEG KUNNR
FROM KNMT
INTO STR_KNMT
WHERE VKORG IN S_VKORG
  AND VTWEG IN S_VTWEG
  AND KUNNR EQ P_KUNNR.
                                                                        
WRITE: / STR_KNMT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861853#M363786</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-01-05T21:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861854#M363787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are going to use select-option then make sure vkorg and vtweg is not initial otherwise it will search for all the rows in the table and may cause performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861854#M363787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861855#M363788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest .

TABLES: knmt.

SELECT-OPTIONS: s_vkorg FOR knmt-vkorg,
                s_vtweg FOR knmt-vtweg.
PARAMETERS: p_kunnr LIKE knmt-kunnr.

DATA: str_knmt TYPE knmt.

SELECT SINGLE vkorg vtweg kunnr
  FROM knmt
  INTO CORRESPONDING FIELDS OF str_knmt
  WHERE vkorg IN s_vkorg
    AND vtweg IN s_vtweg
    AND kunnr =  p_kunnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added "INTO CORRESPONDING FIELDS OF..."&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:25:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861855#M363788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861856#M363789</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;You can also  add NO-EXTENSION NO INTERVALS to allow enter only one value in the select-option..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ztest .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TABLES: knmt.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_vkorg FOR knmt-vkorg &amp;lt;b&amp;gt;NO-EXTENSION NO INTERVALS&amp;lt;/b&amp;gt;,&lt;/P&gt;&lt;P&gt;                s_vtweg FOR knmt-vtweg &amp;lt;b&amp;gt;NO-EXTENSION NO INTERVALS&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_kunnr LIKE knmt-kunnr.&lt;/P&gt;&lt;P&gt;&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861856#M363789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861857#M363790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your Select query the problem might be for the value of KUNNR&lt;/P&gt;&lt;P&gt;Check the conversion exit for this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like kunnr is having conversion exit ALPHA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;             INPUT      = p_kunnr&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;             OUTPUT  = p_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These things you have to do before select statement and then write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single vkorg vtweg kunnr&lt;/P&gt;&lt;P&gt;FROM knmt&lt;/P&gt;&lt;P&gt;INTO str_knmt&lt;/P&gt;&lt;P&gt;WHERE vkorg = p_vkorg&lt;/P&gt;&lt;P&gt;AND vtweg = p_vtweg&lt;/P&gt;&lt;P&gt;AND kunnr = p_kunnr.&lt;/P&gt;&lt;P&gt;&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;Aman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 21:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/1861857#M363790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T21:56:25Z</dc:date>
    </item>
  </channel>
</rss>

