<?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>Question Re: Lookup in FOX using REFDATA in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105588#M4092568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm trying to loop reference data in the 2nd loop, not the current package. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2015 17:21:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-05-19T17:21:23Z</dc:date>
    <item>
      <title>Lookup in FOX using REFDATA</title>
      <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaq-p/11105586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm trying to do a look up in FOX to read Prices from another DSO. In my case, I won't be able to use "|" method as I need to loop Reference Data to apply some conditions. Prices DSO has the data at granularity customer &amp;amp; material, validity dates, price type. Filter was restricted to Plan DSO. Pricing DSO is already part of MP and Agg Level. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see my code is working... even in debugging XF_REF_DATA internal table has Plan Data, not reference data. Am i missing something? I can see reference data for "|" method. Please let me know if you need more information. Thanks a lot for all your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code: &lt;/P&gt;&lt;P&gt;CURDATE = VARV( 0DAT ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOREACH MATERIAL, CUSTOMER.&lt;/P&gt;&lt;P&gt;FOREACH MATERIAL_REF, CUSTOMER_REF,CALDAY_REF, CALDAY_FR, CALDAY_TO, CURRENCY, KNART IN REFDATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF MATERIAL_REF = MATERIAL AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNART = 'ZNLP' AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURDATE &amp;gt;= CALDAY_FR AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURDATE &amp;lt;= CALDAY_TO.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L_LPRC = { 0KNVAL, CALDAY_REF, #, CUSTOMER_REF,CURRENCY,KNART, MATERIAL_REF, CALDAY_FR, CALDAY_TO }.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;ENDFOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; { 0PRICELIST, #, USD, CUSTOMER, #, #, MATERIAL, #, # } = L_LPRC.&lt;/P&gt;&lt;P&gt;ENDFOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Benarji.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 15:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaq-p/11105586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-14T15:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in FOX using REFDATA</title>
      <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105587#M4092567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Benarji,&lt;/P&gt;&lt;P&gt;your loops don´t work, becasue with the&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;FOREACH MATERIAL, CUSTOMER&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;you are within one combination of material and customer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;within this you can not do another loop for the same char.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Cornelia&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 21:06:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105587#M4092567</guid>
      <dc:creator>cornelia_lezoch</dc:creator>
      <dc:date>2015-05-14T21:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in FOX using REFDATA</title>
      <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105588#M4092568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm trying to loop reference data in the 2nd loop, not the current package. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 17:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105588#M4092568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-19T17:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in FOX using REFDATA</title>
      <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105589#M4092569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well, but as you experienced it - it is not working the way you defined the loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code you have to change as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) take the material out of the fields to be changed, because of the &lt;SPAN style="color: #333333; font-size: 12px;"&gt;IF MATERIAL_REF = MATERIAL&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;2) do the loops as below:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;FOREACH CUSTOMER_REF, CALDAY_REF, CALDAY_FR, CALDAY_TO, CURRENCY, KNART IN REFDATA.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; IF&amp;nbsp; KNART = 'ZNLP' AND&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;change the logic here, you used the terms in wrong direction:&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;CALDAY_FR &amp;lt;= &lt;/SPAN&gt;CURDATE&amp;nbsp; AND&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;CALDAY&lt;SPAN style="color: #333333; font-size: 12px;"&gt;_TO &amp;gt;=&lt;/SPAN&gt;&lt;/SPAN&gt; CURDATE.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L_LPRC = { 0KNVAL, CALDAY_REF, #, CUSTOMER_REF,CURRENCY,KNART, CALDAY_FR, CALDAY_TO }.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;ENDFOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;foreach customer.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; { 0PRICELIST, #, USD, CUSTOMER, #, #,&amp;nbsp; #, # } = L_LPRC.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;ENDFOR.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;what is still strange, if there are more than one data redord foun within the reference data, the last one will win ...&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;regards&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Cornelia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 10:20:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105589#M4092569</guid>
      <dc:creator>cornelia_lezoch</dc:creator>
      <dc:date>2015-05-21T10:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup in FOX using REFDATA</title>
      <link>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105590#M4092570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Benarji,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can seperate the 2 loops.You can try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;FOREACH &lt;SPAN style="color: #333333; font-size: 12px;"&gt;MATERIAL, CUSTOMER,&lt;/SPAN&gt;MATERIAL_REF, CUSTOMER_REF,CALDAY_REF, CALDAY_FR, CALDAY_TO, CURRENCY, KNART IN REFDATA.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; IF MATERIAL_REF = MATERIAL AND&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNART = 'ZNLP' AND&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURDATE &amp;gt;= CALDAY_FR AND&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURDATE &amp;lt;= CALDAY_TO.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L_LPRC = { 0KNVAL, CALDAY_REF, #, CUSTOMER_REF,CURRENCY,KNART, MATERIAL_REF, CALDAY_FR, CALDAY_TO }.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;**pass the value here&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;{ 0PRICELIST, #, USD, CUSTOMER, #, #, MATERIAL, #, # } = L_LPRC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;ENDFOR.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;BR /&gt;this should work. Also make sure that whatever characteristics you have used after FOREACH is selected as characteristics to be changed .&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Let me know the result..after trying this..&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Tharun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 06:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lookup-in-fox-using-refdata/qaa-p/11105590#M4092570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-09T06:41:23Z</dc:date>
    </item>
  </channel>
</rss>

