<?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 VALUE iterator for range, get low and high? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-iterator-for-range-get-low-and-high/m-p/459639#M14325</link>
    <description>&lt;P&gt;Trying to use VALUE iterator to create a table from a range of type vbeln. When option = 'BT', how can I add the low AND high values to the expression? The below code gets the low, and I tried using COND inside the VALUE to act on 'BT', but there I'm still only able to pass one argument, so I can't get the high value. Any help is appreciated!&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lrt_so TYPE RANGE OF vbak-vbeln,
      lr_so LIKE LINE OF lrt_so.
SELECT-OPTIONS o_so FOR lr_so.
---
  TYPES: BEGIN OF ty_result,
           so       TYPE vbak-vbeln,
           shipment TYPE vttk-tknum,
           invoice  TYPE vbrk-vbeln,
         END OF ty_result,
         ty_results_t TYPE TABLE OF ty_result WITH DEFAULT KEY.
---
DATA(lt_results) = VALUE ty_results_t(
  FOR ls_so IN o_so
  ( so = COND vbeln(
    WHEN ls_so-option = 'EQ' THEN ls_so-low
    ELSE ls_so-high )
  )
).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Jun 2017 16:35:14 GMT</pubDate>
    <dc:creator>former_member463181</dc:creator>
    <dc:date>2017-06-21T16:35:14Z</dc:date>
    <item>
      <title>VALUE iterator for range, get low and high?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-iterator-for-range-get-low-and-high/m-p/459639#M14325</link>
      <description>&lt;P&gt;Trying to use VALUE iterator to create a table from a range of type vbeln. When option = 'BT', how can I add the low AND high values to the expression? The below code gets the low, and I tried using COND inside the VALUE to act on 'BT', but there I'm still only able to pass one argument, so I can't get the high value. Any help is appreciated!&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lrt_so TYPE RANGE OF vbak-vbeln,
      lr_so LIKE LINE OF lrt_so.
SELECT-OPTIONS o_so FOR lr_so.
---
  TYPES: BEGIN OF ty_result,
           so       TYPE vbak-vbeln,
           shipment TYPE vttk-tknum,
           invoice  TYPE vbrk-vbeln,
         END OF ty_result,
         ty_results_t TYPE TABLE OF ty_result WITH DEFAULT KEY.
---
DATA(lt_results) = VALUE ty_results_t(
  FOR ls_so IN o_so
  ( so = COND vbeln(
    WHEN ls_so-option = 'EQ' THEN ls_so-low
    ELSE ls_so-high )
  )
).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Jun 2017 16:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-iterator-for-range-get-low-and-high/m-p/459639#M14325</guid>
      <dc:creator>former_member463181</dc:creator>
      <dc:date>2017-06-21T16:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: VALUE iterator for range, get low and high?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-iterator-for-range-get-low-and-high/m-p/459640#M14326</link>
      <description>&lt;P&gt;Another VALUE operator behind ELSE to construct what you want there? Or a LET expression at an appropriate position.&lt;/P&gt;&lt;P&gt;Not easy to answer, since it is not clear what you want to achieve, but I´m sure it´s possible. Think how you would do it with statements and translate to nested expressions.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 16:49:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-iterator-for-range-get-low-and-high/m-p/459640#M14326</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-06-21T16:49:41Z</dc:date>
    </item>
  </channel>
</rss>

