<?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: ABAP Code - Urgent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684569#M301528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR3_FROM is 'Profit Center'&lt;/P&gt;&lt;P&gt;SOUR3_TO is 'Profit Center'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR2_FROM is company code&lt;/P&gt;&lt;P&gt;SOUR2_TO is company code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR1_FROM is controlling area&lt;/P&gt;&lt;P&gt;SOUR1_TO  is controlling area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 17:30:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-06T17:30:25Z</dc:date>
    <item>
      <title>ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684554#M301513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code is not working properly. Say, after first pass through the loop, l_bukrs has value '100', the second pass throught he loop is again taking '100' without going to the next value of l_bukrs.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_T_DATA....     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: l_salesorg, l_dischan, l_matnr, l_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;     INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;     FROM T001K&lt;/P&gt;&lt;P&gt;     INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE TARGET1 TARGET2&lt;/P&gt;&lt;P&gt;    INTO (l_salesorg, l_dischan)&lt;/P&gt;&lt;P&gt;    from ZABC&lt;/P&gt;&lt;P&gt;    where VALID_FROM le sy-datum&lt;/P&gt;&lt;P&gt;      and SOUR2_FROM ge l_bukrs&lt;/P&gt;&lt;P&gt;      and SOUR2_TO le l_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    case sy-subrc.&lt;/P&gt;&lt;P&gt;      when 0.&lt;/P&gt;&lt;P&gt;      WHEN 4.&lt;/P&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP. "I_T_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684554#M301513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T16:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684555#M301514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no WHERE clause in this select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; SELECT SINGLE BUKRS
INTO (l_bukrs)
FROM T001K
INNER JOIN T001W ON T001K~BWKEY = T001W~BWKEY.&lt;/CODE&gt;&lt;/PRE&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684555#M301514</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-06T16:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684556#M301515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE BUKRS
INTO (l_bukrs)
FROM T001K
INNER JOIN T001W ON T001K~BWKEY = T001W~BWKEY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this code, you don't have a WHERE clause, and even you made INNER JOIN. The question is what is your purpose of INNER JOIN since you don't select any fields from T001W. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And because you didn't use WHERE, the SQL statement always selects the first record from T001W table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think about your logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684556#M301515</guid>
      <dc:creator>TuncayKaraca</dc:creator>
      <dc:date>2006-11-06T16:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684557#M301516</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;Thanks guys. The purpose of the 'INNER JOIN' is to retrieve the company codes assigned to a plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the retrieved 'BUKRS' value, we have to look up a Z-table and get values for 'Sales Org' and 'Distribution Channel'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684557#M301516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T16:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684558#M301517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where VALID_FROM le sy-datum
and SOUR2_FROM ge l_bukrs
and SOUR2_TO le l_bukrs.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where VALID_FROM le sy-datum
and SOUR2_TO eq l_bukrs.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;They're logically the same, but the new one will have better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:34:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684558#M301517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684559#M301518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the first 'SELECT' statement to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;     INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;     FROM T001K&lt;/P&gt;&lt;P&gt;     INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY&lt;/P&gt;&lt;P&gt;     WHERE BUKRS is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even now, 'l_salesorg' and 'l_dischan' are not retrieving any values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:38:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684559#M301518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T16:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684560#M301519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U would need to modify your SELECT statement so that you filter it using a WHERE clause otherwise it would always return the same value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have valuation area in your internal table I_T_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;FROM T001K&lt;/P&gt;&lt;P&gt;INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY&lt;/P&gt;&lt;P&gt;WHere t001K~bwkey = i_t_data-bwkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR if you have the plant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;FROM T001K&lt;/P&gt;&lt;P&gt;INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY&lt;/P&gt;&lt;P&gt;where t001w-werks = i_t_data-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:40:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684560#M301519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T16:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684561#M301520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting any result with this modified code too:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;     INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;     FROM T001K&lt;/P&gt;&lt;P&gt;     INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY&lt;/P&gt;&lt;P&gt;     WHERE T001W~WERKS = i_t_data-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE TARGET1 TARGET2&lt;/P&gt;&lt;P&gt;    INTO (l_salesorg, l_dischan)&lt;/P&gt;&lt;P&gt;    from ZABC&lt;/P&gt;&lt;P&gt;    where VALID_FROM le sy-datum&lt;/P&gt;&lt;P&gt;      and SOUR3_FROM ge i_t_data-prctr&lt;/P&gt;&lt;P&gt;      and SOUR3_TO le i_t_data-prctr&lt;/P&gt;&lt;P&gt;      and SOUR2_FROM ge l_bukrs&lt;/P&gt;&lt;P&gt;      and SOUR2_TO le l_bukrs&lt;/P&gt;&lt;P&gt;      and SOUR1_FROM = 'C100'&lt;/P&gt;&lt;P&gt;      and SOUR1_TO = 'C100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684561#M301520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684562#M301521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U mean l_bukrs is blank or has some value ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the data in table T001W and T001K...do the records match as per you inner join ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684562#M301521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684563#M301522</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;But why don't you write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;FROM T001K WHERE BWKEY = i_t_data-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684563#M301522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684564#M301523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_bukrs is returning values. But, when i debugged the code, the second SELECT statement is not getting executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684564#M301523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684565#M301524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOu are looping at Internal Table and in second Select statemnt, always, the value of L_bukrs will be same as it is not in loop.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to check that value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shylesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684565#M301524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684566#M301525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not getting executed or not retrieving data? The code you posted should run the second select regardless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684566#M301525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684567#M301526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how it is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_T_DATA.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: l_salesorg, l_dischan, l_matnr, l_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELECT SINGLE BUKRS&lt;/P&gt;&lt;P&gt;     INTO (l_bukrs)&lt;/P&gt;&lt;P&gt;     FROM T001K&lt;/P&gt;&lt;P&gt;     INNER JOIN T001W ON T001K&lt;SUB&gt;BWKEY = T001W&lt;/SUB&gt;BWKEY&lt;/P&gt;&lt;P&gt;     WHERE T001W~WERKS = i_t_data-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE TARGET1 TARGET2&lt;/P&gt;&lt;P&gt;INTO (l_salesorg, l_dischan)&lt;/P&gt;&lt;P&gt;from ZABC&lt;/P&gt;&lt;P&gt;where VALID_FROM le sy-datum&lt;/P&gt;&lt;P&gt;and SOUR3_FROM ge i_t_data-prctr&lt;/P&gt;&lt;P&gt;and SOUR3_TO le i_t_data-prctr&lt;/P&gt;&lt;P&gt;and SOUR2_FROM ge l_bukrs&lt;/P&gt;&lt;P&gt;and SOUR2_TO le l_bukrs&lt;/P&gt;&lt;P&gt;and SOUR1_FROM = 'C100'&lt;/P&gt;&lt;P&gt;and SOUR1_TO = 'C100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-subrc.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;WHEN 4.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP. "I_T_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first SELECT return values for BUKRS. The second SELECT does not return any values. i.e. l_salesorg and l_dischan are still not getting populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sachin Guptha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684567#M301526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684568#M301527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One question are the fields SOURCE_FROM and SOURCE_TO fields character and why are you comparing it with GE and LE ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please cut-paste the data from ZABC table as for a particular case...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel it is now purely a data issue !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:26:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684568#M301527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684569#M301528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR3_FROM is 'Profit Center'&lt;/P&gt;&lt;P&gt;SOUR3_TO is 'Profit Center'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR2_FROM is company code&lt;/P&gt;&lt;P&gt;SOUR2_TO is company code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOUR1_FROM is controlling area&lt;/P&gt;&lt;P&gt;SOUR1_TO  is controlling area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684569#M301528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684570#M301529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do all your from and to field have data or it can be blank ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am bit confused as why are you comparing it with GE and LE rather than EQ ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:33:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684570#M301529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684571#M301530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps there is no data matching your condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try manually via SE16 to browse table ZABC with entering the same conditions as your coding. Use selection options button (F2) to enter GE or LE condition for a field selection.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684571#M301530</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-11-06T17:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684572#M301531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GE and LE comparions are due to the COPA derivative rules defined in the operating concern.&lt;/P&gt;&lt;P&gt;The Z-table has entries for 'Profit Center', 'Company Code', 'Controlling area'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We do have null data for some of the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 17:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-urgent/m-p/1684572#M301531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T17:38:42Z</dc:date>
    </item>
  </channel>
</rss>

