<?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 Selection help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-help/m-p/8752674#M1675582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a select statement as follows :&lt;/P&gt;&lt;P&gt;In selection Parameter so_coken - is values L1,j1,j2,j3,j4,j5,j6..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT cobk~belnr cobk~kokrs cobk~gjahr cobk~perab cobk~perbi cobk~vrgng coep~sgtxt&lt;BR /&gt;&amp;nbsp; INTO CORRESPONDING FIELDS OF TABLE gt_cobk&lt;BR /&gt;&amp;nbsp; FROM cobk INNER JOIN coep&lt;BR /&gt;&amp;nbsp; ON cobk~kokrs = coep~kokrs AND cobk~belnr = coep~belnr&lt;BR /&gt;&amp;nbsp; WHERE cobk~kokrs IN so_kokrs&lt;BR /&gt;&amp;nbsp; AND cobk~vrgng IN so_vrg&amp;nbsp; AND cobk~gjahr = p_gjahr&lt;BR /&gt;&amp;nbsp; AND cobk~perab = p_period AND cobk~perbi = p_period&lt;BR /&gt;&amp;nbsp; AND cobk~stflg = '' AND cobk~stokz = ''&lt;BR /&gt;&amp;nbsp; AND coep~sgtxt+0(2) IN so_coken.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But now there is a change so that the entries in the field COEP~Sgtxt looks like&lt;/P&gt;&lt;P&gt;L1testsegment&lt;BR /&gt;J1testsegment&lt;BR /&gt;J2testsegment and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need only the first 2 letters from this field.How can i modify my select statement.&lt;BR /&gt;I tried to change it like in the select statement coep~sgtxt+0(2) IN so_coken.But its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2012 11:19:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-05-02T11:19:15Z</dc:date>
    <item>
      <title>Selection help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-help/m-p/8752674#M1675582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a select statement as follows :&lt;/P&gt;&lt;P&gt;In selection Parameter so_coken - is values L1,j1,j2,j3,j4,j5,j6..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT cobk~belnr cobk~kokrs cobk~gjahr cobk~perab cobk~perbi cobk~vrgng coep~sgtxt&lt;BR /&gt;&amp;nbsp; INTO CORRESPONDING FIELDS OF TABLE gt_cobk&lt;BR /&gt;&amp;nbsp; FROM cobk INNER JOIN coep&lt;BR /&gt;&amp;nbsp; ON cobk~kokrs = coep~kokrs AND cobk~belnr = coep~belnr&lt;BR /&gt;&amp;nbsp; WHERE cobk~kokrs IN so_kokrs&lt;BR /&gt;&amp;nbsp; AND cobk~vrgng IN so_vrg&amp;nbsp; AND cobk~gjahr = p_gjahr&lt;BR /&gt;&amp;nbsp; AND cobk~perab = p_period AND cobk~perbi = p_period&lt;BR /&gt;&amp;nbsp; AND cobk~stflg = '' AND cobk~stokz = ''&lt;BR /&gt;&amp;nbsp; AND coep~sgtxt+0(2) IN so_coken.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But now there is a change so that the entries in the field COEP~Sgtxt looks like&lt;/P&gt;&lt;P&gt;L1testsegment&lt;BR /&gt;J1testsegment&lt;BR /&gt;J2testsegment and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need only the first 2 letters from this field.How can i modify my select statement.&lt;BR /&gt;I tried to change it like in the select statement coep~sgtxt+0(2) IN so_coken.But its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 11:19:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-help/m-p/8752674#M1675582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-02T11:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Selection help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-help/m-p/8752675#M1675583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fathima,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe Offset in the Select Query is not possible. You will need to select the data from the table and then apply a loop to filter-out the records based on your need. Maximum, you can tweak the last cond a below &lt;/P&gt;&lt;P&gt;AND coep~sgtxt IN so_coken&lt;/P&gt;&lt;P&gt;And Contents of&amp;nbsp; so_coken as below&lt;/P&gt;&lt;P&gt;L1*&lt;/P&gt;&lt;P&gt;J1*&lt;/P&gt;&lt;P&gt;J2* .. and on..&lt;/P&gt;&lt;P&gt;This will redude the number of entries but still Loop is needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 11:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-help/m-p/8752675#M1675583</guid>
      <dc:creator>former_member209818</dc:creator>
      <dc:date>2012-05-02T11:47:03Z</dc:date>
    </item>
  </channel>
</rss>

