<?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 How can I write this SQL? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474575#M556885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the statement have the question:&lt;/P&gt;&lt;P&gt;     stxh-tdname  length 70&lt;/P&gt;&lt;P&gt;     itab-vbeln       length 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select tdobject into table it_stxh&lt;/P&gt;&lt;P&gt;    from stxh&lt;/P&gt;&lt;P&gt;    for all entries in  itab&lt;/P&gt;&lt;P&gt;    where ( tdid = 'Z006' and tdspras = 'E'      and tdname+0(10) = itab-vbeln and tdobject = 'VBBK' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tdname+0(10) = itab-vbeln  ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2007 07:50:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-02T07:50:06Z</dc:date>
    <item>
      <title>How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474575#M556885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the statement have the question:&lt;/P&gt;&lt;P&gt;     stxh-tdname  length 70&lt;/P&gt;&lt;P&gt;     itab-vbeln       length 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select tdobject into table it_stxh&lt;/P&gt;&lt;P&gt;    from stxh&lt;/P&gt;&lt;P&gt;    for all entries in  itab&lt;/P&gt;&lt;P&gt;    where ( tdid = 'Z006' and tdspras = 'E'      and tdname+0(10) = itab-vbeln and tdobject = 'VBBK' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tdname+0(10) = itab-vbeln  ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:50:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474575#M556885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474576#M556886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the code checks if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first ten char in tdname match the field itab-vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474576#M556886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474577#M556887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any variable of char/string type can be accessed char wise..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;char_variable+x(w)&lt;/P&gt;&lt;P&gt;this means we are refering to w characters from the xth character&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if char_variable = 'APARNA'&lt;/P&gt;&lt;P&gt; then char_variable+0(3) = 'APA'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 07:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474577#M556887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T07:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474578#M556888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you define the first Internal Table ITAB, define vbeln as the same type of stxh-tdname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;          vbeln like STXH-TDNAME,&lt;/P&gt;&lt;P&gt;          erdat like vbak-erdat,&lt;/P&gt;&lt;P&gt;          end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;Select VBELN &lt;/P&gt;&lt;P&gt;          ERDAT&lt;/P&gt;&lt;P&gt;  from vbak&lt;/P&gt;&lt;P&gt;  into CORRSPONDING FIELDS of table itab.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Then you can directly use  this ITAB in the next query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select tdobject into table it_stxh&lt;/P&gt;&lt;P&gt;  from stxh&lt;/P&gt;&lt;P&gt;  for all entries in itab&lt;/P&gt;&lt;P&gt;  where ( tdid = 'Z006' and tdspras = 'E' and tdname = itab-vbeln&lt;/P&gt;&lt;P&gt;  and tdobject = 'VBBK' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward it if it is useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474578#M556888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474579#M556889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This selcts works when the First 10 charecters of the field TDANME should be equals to the VBELN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474579#M556889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474580#M556890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont think it is possible with for all entries ... you can do like this..&lt;/P&gt;&lt;P&gt;data : vtdname(11).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;concatenate itab-vbeln '%' into vtdname.&lt;/P&gt;&lt;P&gt;select single tdobject into it_stxh&lt;/P&gt;&lt;P&gt;from stxh&lt;/P&gt;&lt;P&gt;where ( tdid = 'Z006' and tdspras = 'E' and tdname like vtdname and tdobject = 'VBBK' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append it_stxh.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474580#M556890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474581#M556891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very thanks to every one,thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 08:32:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474581#M556891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T08:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I write this SQL?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474582#M556892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please reward with points if the answer was helpful in solving your quesry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 09:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-write-this-sql/m-p/2474582#M556892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T09:55:10Z</dc:date>
    </item>
  </channel>
</rss>

