Skip to Content

QueryExchangeRateIn_V1 web service pulls wrong exchange rates

Hi experts,

I am developing an application that updates the exchange rates of the system using two web services: QueryExchangeRateIn_V1 and ManageExchangeRateIn. The former supposed to get the list of rates from the system and the latter supposed to update the system list.

Ideally, for a demo system I have a small list of 4 exchange rates as follow:

From understanding of QueryExchangeRateIn_V1 I have create the request:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soap:Header/>
   <soap:Body>
      <glob:ExchangeRateByElementsQuery_sync> <ExchangeRateSelectionByElements>
         <SelectionByTypeCode>
               <InclusionExclusionCode>I</InclusionExclusionCode>
               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>                
               <LowerBoundaryTypeCode>001</LowerBoundaryTypeCode>
            </SelectionByTypeCode>
            <SelectionByValidFromDateTime>
               <InclusionExclusionCode>I</InclusionExclusionCode>
               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
               <LowerBoundaryDateTime>2019-07-04T00:00:00.0000000Z</LowerBoundaryDateTime>
            </SelectionByValidFromDateTime>
            <SelectionByValidToDateTime> 
               <InclusionExclusionCode>I</InclusionExclusionCode>
               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
               <LowerBoundaryDateTime>2019-07-04T00:00:00.0000000Z</LowerBoundaryDateTime>
            </SelectionByValidToDateTime>
         </ExchangeRateSelectionByElements>  
         <ProcessingConditions>
            <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
         </ProcessingConditions>
      </glob:ExchangeRateByElementsQuery_sync>
   </soap:Body>
</soap:Envelope>

where I am targeting on the default system list with ID 001 and with a from and to the interval of the first hour of this day. but it gives me a lot more than what I expect.

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Header/>
   <env:Body>
      <n0:ExchangeRateByElementsResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LDM:/1SAI/TAS4DF38F7FEDD07574F1A4:804">
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>AED</SourceCurrencyCode>
            <TargetCurrencyCode>USD</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0b-51b5-1ed9-9ec2-188756e69d4e</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0b-51b5-1ed9-9ec2-188756e67d4e</MidExchangeRateUUID>
            <AskExchangeRateUUID>00163e0b-51b5-1ed9-9ec2-188756e65d4e</AskExchangeRateUUID>
            <BidRate>1.0</BidRate>
            <MidRate>1.0</MidRate>
            <AskRate>1.0</AskRate>
            <ValidFromDateTime>2019-05-19T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-05-19T08:33:24Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae62a4b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae65c4b9</MidExchangeRateUUID>
            <BidRate>0.8898</BidRate>
            <MidRate>0.8898</MidRate>
            <ValidFromDateTime>2019-01-02T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e02dfc51185a</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e02dfc51385a</MidExchangeRateUUID>
            <BidRate>0.8898</BidRate>
            <MidRate>0.8898</MidRate>
            <ValidFromDateTime>2019-01-02T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:28:27Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6264b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae65a4b9</MidExchangeRateUUID>
            <BidRate>0.8913</BidRate>
            <MidRate>0.8913</MidRate>
            <ValidFromDateTime>2019-01-03T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e15b36c7985a</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e15b36c7b85a</MidExchangeRateUUID>
            <BidRate>0.8913</BidRate>
            <MidRate>0.8913</MidRate>
            <ValidFromDateTime>2019-01-03T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:28:43Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6224b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6584b9</MidExchangeRateUUID>
            <BidRate>0.8884</BidRate>
            <MidRate>0.8884</MidRate>
            <ValidFromDateTime>2019-01-04T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e2489bd9d85b</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e2489bd9f85b</MidExchangeRateUUID>
            <BidRate>0.8884</BidRate>
            <MidRate>0.8884</MidRate>
            <ValidFromDateTime>2019-01-04T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:28:55Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae61e4b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6564b9</MidExchangeRateUUID>
            <BidRate>0.8907</BidRate>
            <MidRate>0.8907</MidRate>
            <ValidFromDateTime>2019-01-07T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e1b21666185b</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e1b21666385b</MidExchangeRateUUID>
            <BidRate>0.8907</BidRate>
            <MidRate>0.8907</MidRate>
            <ValidFromDateTime>2019-01-07T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:28:48Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae61a4b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6544b9</MidExchangeRateUUID>
            <BidRate>0.8903</BidRate>
            <MidRate>0.8903</MidRate>
            <ValidFromDateTime>2019-01-08T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e2ccdb41985b</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e2ccdb41b85b</MidExchangeRateUUID>
            <BidRate>0.8903</BidRate>
            <MidRate>0.8903</MidRate>
            <ValidFromDateTime>2019-01-08T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:29:02Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6164b9</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e2c-7f32-1ee9-8aaa-9291ae6524b9</MidExchangeRateUUID>
            <BidRate>0.8905</BidRate>
            <MidRate>0.8905</MidRate>
            <ValidFromDateTime>2019-01-09T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-05T14:44:46Z</RegisterDateTime>
         </ExchangeRate>
         <ExchangeRate>
            <TypeCode>001</TypeCode>
            <SourceCurrencyCode>CHF</SourceCurrencyCode>
            <TargetCurrencyCode>EUR</TargetCurrencyCode>
            <BidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e325586f585c</BidExchangeRateUUID>
            <MidExchangeRateUUID>00163e0d-da84-1ee9-8bba-e325586f785c</MidExchangeRateUUID>
            <BidRate>0.8905</BidRate>
            <MidRate>0.8905</MidRate>
            <ValidFromDateTime>2019-01-09T00:00:00Z</ValidFromDateTime>
            <RegisterDateTime>2019-02-11T08:29:07Z</RegisterDateTime>
            <DeletedIndicatorCode>true</DeletedIndicatorCode>
         </ExchangeRate>
         <ProcessingConditions>
            <ReturnedQueryHitsNumberValue>51</ReturnedQueryHitsNumberValue>
            <MoreHitsAvailableIndicator>true</MoreHitsAvailableIndicator>
            <LastReturnedObjectID>00163E2C7F321EE98AAA9291AE65A4B9</LastReturnedObjectID>
         </ProcessingConditions>
         <Log>
            <MaximumLogItemSeverityCode>2</MaximumLogItemSeverityCode>
            <Item>
               <TypeID>008(/CM_CER_TECH/)</TypeID>
               <SeverityCode>2</SeverityCode>
               <Note>Query QUERY_BY_CURRENCY_PAIR, BO Node ROOT, attribute VALID_TO_DATE_TIME, option EQ replaced by less or equal</Note>
            </Item>
         </Log>
      </n0:ExchangeRateByElementsResponse_sync>
   </env:Body>
</env:Envelope>

What is the solution to get only the default list of 4 rates? Even when I tired to delete them from the code by looping for DeletedIndicatorCode I end up with 11 rates.

Note: there are 51 rates in original, but the post didn't fit them all.

Thanks in advance,

Mousa

xrates.jpg (68.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.