<?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 where condition with different type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809770#M916378</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to fetch data from a Z table based on another table using field vbeln. The corresponding field in Z table is having a different character length. how can i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docno vendrinv cpudt FROM zmdh INTO TABLE gt_zmdh&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN gt_vbrk WHERE vendrinv EQ gt_vbrk-vbeln AND dele_indi NE 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here vendrinv is having a type C &amp;amp; length 15 where as vbeln has type C and length 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to use loop for doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sathar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2008 14:15:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-23T14:15:32Z</dc:date>
    <item>
      <title>where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809770#M916378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to fetch data from a Z table based on another table using field vbeln. The corresponding field in Z table is having a different character length. how can i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docno vendrinv cpudt FROM zmdh INTO TABLE gt_zmdh&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN gt_vbrk WHERE vendrinv EQ gt_vbrk-vbeln AND dele_indi NE 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here vendrinv is having a type C &amp;amp; length 15 where as vbeln has type C and length 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to use loop for doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sathar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 14:15:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809770#M916378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T14:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809771#M916379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works very well. check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of it_data occurs 0,
       vbeln(20),
       matnr type matnr,
      end of it_data.

select vbeln
       matnr
  from vbap
  into table it_data
  up to 3 rows.

  break-point.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 14:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809771#M916379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T14:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809772#M916380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could add a field help_vendrinv to gt_vbrk in length 15 and move the contents of vbeln into that field before you do the "for all entries".&lt;/P&gt;&lt;P&gt;You might even be able to declare gt_vbrk-vbeln in length 15 to start with, no need for a help field then.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 14:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809772#M916380</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-05-23T14:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809773#M916381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried moving all contents of gt_vbrk into a new table with similiar fields but changed the type of vbeln to vendrinv. But the problem here is it added 5 zeroes to vbeln in the new table and the where condition will always go false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 14:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809773#M916381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T14:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809774#M916382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;both fields are type C as you say, so there should not be an issue with leading zeroes unless you add them yourself somehow. Or is vendrinv actually of type N?&lt;/P&gt;&lt;P&gt;Anyway, if you declare GT_VBRK-VBELN same as ZMDH-VENDRINV, you can still select the values from VBRK into it and then use the field to select ZMDH using "for all entries".&lt;/P&gt;&lt;P&gt;Otherwise I have no further idea.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 14:49:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809774#M916382</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-05-23T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: where condition with different type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809775#M916383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I find that when I copy the contents of gt_vbrk to the temporary internal table which has the field vbeln with type same as vendrinv, five characters from next field is getting added to this. ie there is a shift of 5 characters to the left side for all fields after vbeln. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have solved the problem in this way. I dont know whether this is the best method. Anyway it solved my prob for time being.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have declared a temp int table with single field vbeln having data type &amp;amp; length same as vbeln. Now copied vbeln from gt_vbrk to this table. Again declared another int table with single field vbeln having data type &amp;amp; length same as vendrinv and moved the contents from prev temp table to this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks to all for spending your precious time in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sathar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 May 2008 08:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition-with-different-type/m-p/3809775#M916383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-24T08:24:31Z</dc:date>
    </item>
  </channel>
</rss>

