<?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: Select Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757844#M328178</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 just check whether the value table in the domain VGABE contains the value 'P'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you can also make the second trial by declaring the 'P' as a local variable or a constanst and try passing that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
constants: vgabe value 'P'.


-- 
SELECT vbsegk~ausbk
- 
-- 
- 
AND ekbe~vgabe = VGABE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2006 07:31:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-06T07:31:55Z</dc:date>
    <item>
      <title>Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757843#M328177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Can anybody help me to correct the query.&lt;/P&gt;&lt;P&gt;it is giving me a short dump. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF t_vbsegk OCCURS 0,&lt;/P&gt;&lt;P&gt;        ausbk  TYPE   ausbk,&lt;/P&gt;&lt;P&gt;        belnr  TYPE   belnr_d,&lt;/P&gt;&lt;P&gt;        gjahr  TYPE   gjahr,&lt;/P&gt;&lt;P&gt;        bzkey  TYPE   buzei,&lt;/P&gt;&lt;P&gt;        lifnr  TYPE   lifnr,&lt;/P&gt;&lt;P&gt;        sgtxt  TYPE   sgtxt,&lt;/P&gt;&lt;P&gt;        ebeln  TYPE   ebeln,&lt;/P&gt;&lt;P&gt;        ebelp  TYPE   ebelp,&lt;/P&gt;&lt;P&gt;        buzei  TYPE   mblpo,&lt;/P&gt;&lt;P&gt;        werks  TYPE   werks_d,&lt;/P&gt;&lt;P&gt;       END OF t_vbsegk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT vbsegk~ausbk&lt;/P&gt;&lt;P&gt;         vbsegk~belnr&lt;/P&gt;&lt;P&gt;         vbsegk~gjahr&lt;/P&gt;&lt;P&gt;         vbsegk~bzkey&lt;/P&gt;&lt;P&gt;         vbsegk~lifnr&lt;/P&gt;&lt;P&gt;         vbsegk~sgtxt&lt;/P&gt;&lt;P&gt;         ekbe~ebeln&lt;/P&gt;&lt;P&gt;         ekbe~ebelp&lt;/P&gt;&lt;P&gt;         ekbe~buzei&lt;/P&gt;&lt;P&gt;         ekbe~werks&lt;/P&gt;&lt;P&gt;   FROM  vbsegk&lt;/P&gt;&lt;P&gt;	   JOIN  ekbe&lt;/P&gt;&lt;P&gt;     ON    vbsegk&lt;SUB&gt;gjahr = ekbe&lt;/SUB&gt;gjahr&lt;/P&gt;&lt;P&gt;      AND  vbsegk&lt;SUB&gt;belnr = ekbe&lt;/SUB&gt;belnr&lt;/P&gt;&lt;P&gt;      	INTO   CORRESPONDING FIELDS OF TABLE t_vbsegk&lt;/P&gt;&lt;P&gt;WHERE  vbsegk~ausbk  IN s_ausbk&lt;/P&gt;&lt;P&gt; AND   vbsegk~belnr  IN s_belnr&lt;/P&gt;&lt;P&gt; AND   vbsegk~gjahr  IN s_gjahr&lt;/P&gt;&lt;P&gt; AND   vbsegk~lifnr  IN s_lifnr&lt;/P&gt;&lt;P&gt;   and   ekbe~VGABE = &amp;#145;P&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basicallly i want to extract the data fom the above two tables based on user input in selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Any help will not go unmarked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 07:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757843#M328177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T07:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757844#M328178</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 just check whether the value table in the domain VGABE contains the value 'P'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you can also make the second trial by declaring the 'P' as a local variable or a constanst and try passing that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
constants: vgabe value 'P'.


-- 
SELECT vbsegk~ausbk
- 
-- 
- 
AND ekbe~vgabe = VGABE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 07:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757844#M328178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T07:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757845#M328179</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;It working fine for the following   code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;constants: c_vgabe type vgabe value 'P'.

DATA : BEGIN OF t_vbsegk OCCURS 0,
ausbk TYPE ausbk,
belnr TYPE belnr_d,
gjahr TYPE gjahr,
bzkey TYPE buzei,
lifnr TYPE lifnr,
sgtxt TYPE sgtxt,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
buzei TYPE mblpo,
werks TYPE werks_d,
END OF t_vbsegk.



SELECT vbsegk~ausbk
vbsegk~belnr
vbsegk~gjahr
vbsegk~bzkey
vbsegk~lifnr
vbsegk~sgtxt
ekbe~ebeln
ekbe~ebelp
ekbe~buzei
ekbe~werks
FROM vbsegk
JOIN ekbe
ON vbsegk~gjahr = ekbe~gjahr
AND vbsegk~belnr = ekbe~belnr
INTO  TABLE t_vbsegk
WHERE vbsegk~ausbk IN s_ausbk
AND vbsegk~belnr IN s_belnr
AND vbsegk~gjahr IN s_gjahr
AND vbsegk~lifnr IN s_lifnr
and ekbe~VGABE = c_vgabe.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bhupal Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 07:33:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757845#M328179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T07:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757846#M328180</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;Once check all the data elements in data declaration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 07:36:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757846#M328180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T07:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757847#M328181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed, What exactly does the dump states.....the query seems to be correct Some times if u try to access to many records with out proper primary key then the system might give a dump. But in your context all the primary keys are fine but want to check whether r u passing as data in the select options if not then that might be one reason...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also once check all the data declarations..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swaroop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 07:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1757847#M328181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T07:51:12Z</dc:date>
    </item>
  </channel>
</rss>

