<?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: Copy select option into range with inline declaration, divides one record into two in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795828#M2024607</link>
    <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;hagit&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I've modified it a little, and it's working fine now.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: bkpf.&lt;BR /&gt;SELECTION-SCREEN BEGIN OF BLOCK blk1.&lt;BR /&gt;  SELECT-OPTIONS: s_postdy FOR bkpf-budat OBLIGATORY.&lt;BR /&gt;SELECTION-SCREEN END OF BLOCK blk1.&lt;BR /&gt;&lt;BR /&gt;TYPES: lrngty_yr_of_posting_dy TYPE RANGE OF bkpf-gjahr.&lt;BR /&gt;&lt;BR /&gt;DATA(lrng_yr_of_posting_dy) = VALUE lrngty_yr_of_posting_dy(&lt;BR /&gt;                              FOR ls_postdy IN s_postdy[]&lt;BR /&gt;                              LET lv_low_yr = ls_postdy-low(4)&lt;BR /&gt;                              lv_high_yr = ls_postdy-high(4)&lt;BR /&gt;                              IN ( low = lv_low_yr&lt;BR /&gt;                                   high = lv_high_yr&lt;BR /&gt;                                   sign = ls_postdy-sign&lt;BR /&gt;                                   option = ls_postdy-option )&lt;BR /&gt;                                                               ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 02 Jul 2023 16:57:28 GMT</pubDate>
    <dc:creator>adityaIngale66</dc:creator>
    <dc:date>2023-07-02T16:57:28Z</dc:date>
    <item>
      <title>Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795827#M2024606</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt; 
  &lt;P&gt;I have a SELECT-OPTION.&lt;/P&gt; 
  &lt;P&gt;I want to fetch the first 4 character of the low &amp;amp; high values to a range .&lt;/P&gt; 
  &lt;P&gt;The code is:&lt;/P&gt; 
  &lt;P&gt;TABLES: bkpf.&lt;BR /&gt; SELECTION-SCREEN BEGIN OF BLOCK blk1.&lt;BR /&gt; SELECT-OPTIONS: s_postdy FOR bkpf-budat OBLIGATORY.&lt;BR /&gt; SELECTION-SCREEN END OF BLOCK blk1.&lt;BR /&gt; &lt;BR /&gt; TYPES: lrngty_yr_of_posting_dy TYPE RANGE OF bkpf-gjahr.&lt;BR /&gt; &lt;BR /&gt; DATA(lrng_yr_of_posting_dy) =&lt;BR /&gt; VALUE lrngty_yr_of_posting_dy(&lt;BR /&gt; FOR ls_postdy IN s_postdy[]&lt;BR /&gt; LET lv_low_yr = ls_postdy-low(4)&lt;BR /&gt; lv_high_yr = ls_postdy-high(4)&lt;BR /&gt; IN low = lv_low_yr&lt;BR /&gt; high = lv_high_yr&lt;BR /&gt; ( sign = ls_postdy-sign )&lt;BR /&gt; ( option = ls_postdy-option )&lt;BR /&gt; ).&lt;/P&gt; 
  &lt;P&gt; &lt;/P&gt; 
  &lt;P&gt;The problem is that one row in the select option is divided into two.&lt;/P&gt; 
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2182007-image.png" /&gt;&lt;/P&gt; 
  &lt;P&gt; &lt;/P&gt; 
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2182008-image.png" /&gt;&lt;/P&gt; 
  &lt;P&gt;My ABAP's version is 740.7&lt;/P&gt; 
  &lt;P&gt; &lt;/P&gt; 
  &lt;P&gt;Thankyou in advanced&lt;/P&gt; 
  &lt;P&gt;Hagit &lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 09:47:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795827#M2024606</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2023-07-02T09:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795828#M2024607</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;hagit&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I've modified it a little, and it's working fine now.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: bkpf.&lt;BR /&gt;SELECTION-SCREEN BEGIN OF BLOCK blk1.&lt;BR /&gt;  SELECT-OPTIONS: s_postdy FOR bkpf-budat OBLIGATORY.&lt;BR /&gt;SELECTION-SCREEN END OF BLOCK blk1.&lt;BR /&gt;&lt;BR /&gt;TYPES: lrngty_yr_of_posting_dy TYPE RANGE OF bkpf-gjahr.&lt;BR /&gt;&lt;BR /&gt;DATA(lrng_yr_of_posting_dy) = VALUE lrngty_yr_of_posting_dy(&lt;BR /&gt;                              FOR ls_postdy IN s_postdy[]&lt;BR /&gt;                              LET lv_low_yr = ls_postdy-low(4)&lt;BR /&gt;                              lv_high_yr = ls_postdy-high(4)&lt;BR /&gt;                              IN ( low = lv_low_yr&lt;BR /&gt;                                   high = lv_high_yr&lt;BR /&gt;                                   sign = ls_postdy-sign&lt;BR /&gt;                                   option = ls_postdy-option )&lt;BR /&gt;                                                               ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Jul 2023 16:57:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795828#M2024607</guid>
      <dc:creator>adityaIngale66</dc:creator>
      <dc:date>2023-07-02T16:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795829#M2024608</link>
      <description>&lt;P&gt;Or you can achieve this without using LET IN.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(lrng_yr_of_posting_dy) = VALUE lrngty_yr_of_posting_dy(&lt;BR /&gt;                              FOR ls_postdy IN s_postdy[]&lt;BR /&gt;                              ( low = ls_postdy-low(4)&lt;BR /&gt;                                high = ls_postdy-high(4)&lt;BR /&gt;                                sign = ls_postdy-sign&lt;BR /&gt;                                option = ls_postdy-option ) ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Jul 2023 17:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795829#M2024608</guid>
      <dc:creator>adityaIngale66</dc:creator>
      <dc:date>2023-07-02T17:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795830#M2024609</link>
      <description>&lt;P&gt; Please edit your question (Actions&amp;gt;Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks! &lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 18:03:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795830#M2024609</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-07-02T18:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795831#M2024610</link>
      <description>&lt;P&gt;Each pair of brackets means one line. So, if you indicate two pairs of brackets, that will make two rows.&lt;/P&gt;&lt;P&gt;The values before the brackets are factorized to be used by each pair of brackets.&lt;/P&gt;&lt;P&gt;In your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(lrng_yr_of_posting_dy) = VALUE lrngty_yr_of_posting_dy(
                              FOR ls_postdy IN s_postdy[]
                              LET lv_low_yr = ls_postdy-low(4)
                                  lv_high_yr = ls_postdy-high(4)
                              IN 
                              low = lv_low_yr
                              high = lv_high_yr
                              ( sign = ls_postdy-sign )
                              ( option = ls_postdy-option )
                              ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The first line will contain LOW, HIGH and SIGN.&lt;/P&gt;&lt;P&gt;The second line will contain LOW, HIGH and OPTION.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 18:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795831#M2024610</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-07-02T18:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795832#M2024611</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; Thank
you for your answer. It solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You and
Aditya Ingale have the same solution ,so I do not know which answer to mark as
the best one.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 06:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795832#M2024611</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2023-07-03T06:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795833#M2024612</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;aditya.ingale&lt;/SPAN&gt; Thank you for
your answer. It solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You and Sandra
Rossi have the same solution ,so I do not know which answer to mark as the best
one.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 06:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795833#M2024612</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2023-07-03T06:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Copy select option into range with inline declaration, divides one record into two</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795834#M2024613</link>
      <description>&lt;P&gt;The huge difference is the textual explanation. Providing code without explanation is usually not very good... Maybe you don't read, you already knew that or you don't mind understanding how ABAP works, I don't know&lt;/P&gt;&lt;P&gt;(LOL)&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 08:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-select-option-into-range-with-inline-declaration-divides-one-record/m-p/12795834#M2024613</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-07-03T08:28:44Z</dc:date>
    </item>
  </channel>
</rss>

