<?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 Select Field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254532#M777228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abap Gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  COUNT( * ) as count&lt;/P&gt;&lt;P&gt;        RJVNAM&lt;/P&gt;&lt;P&gt;        RECVIND&lt;/P&gt;&lt;P&gt;        RACCT&lt;/P&gt;&lt;P&gt;        CCWBS&lt;/P&gt;&lt;P&gt;        JIBCL&lt;/P&gt;&lt;P&gt;        JIBSB&lt;/P&gt;&lt;P&gt;        SUM( hsl01 ) as HSL01&lt;/P&gt;&lt;P&gt;        SUM( hsl02 ) as HSL02&lt;/P&gt;&lt;P&gt;        SUM( hsl03 ) as HSL03&lt;/P&gt;&lt;P&gt;        SUM( hsl04 ) as HSL04&lt;/P&gt;&lt;P&gt;        SUM( hsl05 ) as HSL05&lt;/P&gt;&lt;P&gt;        SUM( hsl06 ) as HSL06&lt;/P&gt;&lt;P&gt;        SUM( hsl07 ) as HSL07&lt;/P&gt;&lt;P&gt;        SUM( hsl08 ) as HSL08&lt;/P&gt;&lt;P&gt;        SUM( hsl09 ) as HSL09&lt;/P&gt;&lt;P&gt;        SUM( hsl10 ) as HSL10&lt;/P&gt;&lt;P&gt;        SUM( hsl11 ) as HSL11&lt;/P&gt;&lt;P&gt;        SUM( hsl12 ) as HSL12 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above is the part of internal table which contain the selected fields and field HSL01 to HSL12 representing the consecutive month. I have senario if user select month 6 (June) which represent field HSL06 what is the best way in the abap script that I&amp;#146;m able to select field from HSL01 to HSL06. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2008 06:41:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-14T06:41:48Z</dc:date>
    <item>
      <title>Select Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254532#M777228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Abap Gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  COUNT( * ) as count&lt;/P&gt;&lt;P&gt;        RJVNAM&lt;/P&gt;&lt;P&gt;        RECVIND&lt;/P&gt;&lt;P&gt;        RACCT&lt;/P&gt;&lt;P&gt;        CCWBS&lt;/P&gt;&lt;P&gt;        JIBCL&lt;/P&gt;&lt;P&gt;        JIBSB&lt;/P&gt;&lt;P&gt;        SUM( hsl01 ) as HSL01&lt;/P&gt;&lt;P&gt;        SUM( hsl02 ) as HSL02&lt;/P&gt;&lt;P&gt;        SUM( hsl03 ) as HSL03&lt;/P&gt;&lt;P&gt;        SUM( hsl04 ) as HSL04&lt;/P&gt;&lt;P&gt;        SUM( hsl05 ) as HSL05&lt;/P&gt;&lt;P&gt;        SUM( hsl06 ) as HSL06&lt;/P&gt;&lt;P&gt;        SUM( hsl07 ) as HSL07&lt;/P&gt;&lt;P&gt;        SUM( hsl08 ) as HSL08&lt;/P&gt;&lt;P&gt;        SUM( hsl09 ) as HSL09&lt;/P&gt;&lt;P&gt;        SUM( hsl10 ) as HSL10&lt;/P&gt;&lt;P&gt;        SUM( hsl11 ) as HSL11&lt;/P&gt;&lt;P&gt;        SUM( hsl12 ) as HSL12 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above is the part of internal table which contain the selected fields and field HSL01 to HSL12 representing the consecutive month. I have senario if user select month 6 (June) which represent field HSL06 what is the best way in the abap script that I&amp;#146;m able to select field from HSL01 to HSL06. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 06:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254532#M777228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T06:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254533#M777229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;take one common variable for that month which user selects,and then write condition according to that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can write like suppose user has selected 6 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select upto n rows(where n = no selected by user).&lt;/P&gt;&lt;P&gt;or put a loop and select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 06:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254533#M777229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T06:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254534#M777230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use Do---- varying--&lt;DEL&gt;-from&lt;/DEL&gt;-- next command as given below with some restriction of counter on the basis of ur period. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  bukrs   " Company Code&lt;/P&gt;&lt;P&gt;              ryear   " Fiscal Year&lt;/P&gt;&lt;P&gt;              racct   " Account No.&lt;/P&gt;&lt;P&gt;              hslvt   " Balance carried forward&lt;/P&gt;&lt;P&gt;              hsl01   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl02   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl03   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl04   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl05   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl06   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl07   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl08   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl09   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl10   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl11   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl12   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl13   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl14   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl15   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              hsl16   " Total Transactions in the period&lt;/P&gt;&lt;P&gt;              FROM glt0&lt;/P&gt;&lt;P&gt;              INTO TABLE it_glt0&lt;/P&gt;&lt;P&gt;              WHERE bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;              AND  ryear EQ g_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ  c_zero.&lt;/P&gt;&lt;P&gt;        SORT it_glt0 BY bukrs racct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        LOOP AT it_glt0 INTO wa_glt0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          DATA l_counter TYPE i VALUE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  For Horizontal movement in a work area as we need to add the amount&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        from hsl01 to hslXX where XX is the period&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          DO VARYING l_amount1 FROM wa_glt0-hslvt NEXT wa_glt0-hsl01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            wa_glt0-amount = wa_glt0-amount + l_amount1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           l_counter = l_counter + 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            CLEAR l_amount1.&lt;/P&gt;&lt;P&gt;            IF l_counter NE c_zero.&lt;/P&gt;&lt;P&gt;              IF l_counter EQ g_period+1(2).&lt;/P&gt;&lt;P&gt;                EXIT.&lt;/P&gt;&lt;P&gt;              ENDIF.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;            l_counter = l_counter + 1.&lt;/P&gt;&lt;P&gt;          ENDDO.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 07:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254534#M777230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T07:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254535#M777231</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;You can try with options like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select (V_FIELDS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where you variable V_FIELDS will be populated based on the conditions. You should also give your fixed fields in this variable ... You can get more information by checking Dynamic Selects from SAP Help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 07:06:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254535#M777231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-14T07:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254536#M777232</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;use select-options for the month field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options : s_month for ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select teh data from db table into table itab where month in s_month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now what ever the user gives the values in s_month,,accordingly u will get the data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2008 07:11:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field/m-p/3254536#M777232</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-01-14T07:11:02Z</dc:date>
    </item>
  </channel>
</rss>

