<?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 Query Selection Criterion for two Reference Fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-selection-criterion-for-two-reference-fields/m-p/11428167#M1927211</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;I have developed a query wherein I need to create a Selection Criterion (of type date) but with two reference fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here goes the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Standard Reports, we have a transaction code IW39 (Maintenance Order List) I am creating a query in somewhat similar manner with certain calculation Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This transaction has a field called "Period" which checks the value of Maintenance Order Start Date and End Date both simultaneously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am creating the Selection Criterion, it certainly takes only one field as Reference and that too the field must be from table within the Functional Area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, my issue here is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Since my table AFKO is not in my Functional Area I am not able to select GLTRP or GSTRP as reference fields (I have not taken this table in Join as I dont want multiple records for each piece of Equipment)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I want the calculation to be made for both GLTRP and GSTRP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Creating the Period as Additional field, I am unable to get the FROM and TO value of this field in infoset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do provide the you valuable inputs for the same.&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;&lt;/P&gt;&lt;P&gt;Chin2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 09:47:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-11-06T09:47:16Z</dc:date>
    <item>
      <title>Query Selection Criterion for two Reference Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-selection-criterion-for-two-reference-fields/m-p/11428167#M1927211</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;I have developed a query wherein I need to create a Selection Criterion (of type date) but with two reference fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here goes the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Standard Reports, we have a transaction code IW39 (Maintenance Order List) I am creating a query in somewhat similar manner with certain calculation Fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This transaction has a field called "Period" which checks the value of Maintenance Order Start Date and End Date both simultaneously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am creating the Selection Criterion, it certainly takes only one field as Reference and that too the field must be from table within the Functional Area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, my issue here is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Since my table AFKO is not in my Functional Area I am not able to select GLTRP or GSTRP as reference fields (I have not taken this table in Join as I dont want multiple records for each piece of Equipment)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I want the calculation to be made for both GLTRP and GSTRP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Creating the Period as Additional field, I am unable to get the FROM and TO value of this field in infoset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do provide the you valuable inputs for the same.&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;&lt;/P&gt;&lt;P&gt;Chin2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 09:47:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-selection-criterion-for-two-reference-fields/m-p/11428167#M1927211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-06T09:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Query Selection Criterion for two Reference Fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-selection-criterion-for-two-reference-fields/m-p/11428168#M1927212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: justify;"&gt;1. First I never tried to understand the logic behind the &lt;EM&gt;Period &lt;/EM&gt;selection in standard programs. Also I never try to replicate this field in my programs (even in ABAP).&lt;/P&gt;&lt;P style="text-align: justify;"&gt;2. So, we need to know the logic for &lt;EM&gt;Period &lt;/EM&gt;fields of IW39 selection screen. Means which date represents the From field and which the To field&amp;nbsp; .&lt;/P&gt;&lt;P style="text-align: justify;"&gt;3. Create &lt;EM&gt;Period-low&lt;/EM&gt; and &lt;EM&gt;Period-high&lt;/EM&gt; Local fields in SQ01 and give the formula for each accordingly (based on the above point) in the &lt;EM&gt;Conditions &lt;/EM&gt;area (as a function of existing fields).&lt;/P&gt;&lt;P style="text-align: justify;"&gt;4. &lt;EM&gt;Period &lt;/EM&gt;as additional field and taking into selections in SQ02 is ruled out.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Alternatively, you could build your Infoset on Logical Database &lt;STRONG&gt;&lt;EM&gt;AFI&lt;/EM&gt; &lt;/STRONG&gt;where you get standard selections.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Good luck&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN lang="EN-IN" style="font-size: 14.0pt; font-family: Mistral; color: #548235;"&gt;KJogeswaraRao&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 10:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-selection-criterion-for-two-reference-fields/m-p/11428168#M1927212</guid>
      <dc:creator>jogeswararao_kavala</dc:creator>
      <dc:date>2015-11-06T10:31:57Z</dc:date>
    </item>
  </channel>
</rss>

