<?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: Select-option in ABAP objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804712#M915121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of ABAP object? I'll show 2 ways to populate into a generic variable VAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember s_option is an internal table with structure:&lt;/P&gt;&lt;P&gt;SIGN&lt;/P&gt;&lt;P&gt;OPTION&lt;/P&gt;&lt;P&gt;LOW&lt;/P&gt;&lt;P&gt;HIGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT-OPTIONS: s_option FOR dbtab-matnr.

READ TABLE s_option INDEX 1.
VAR = s_option-low.

LOOP AT s_option.
  VAR = s_option-low.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 May 2008 15:07:04 GMT</pubDate>
    <dc:creator>valter_oliveira</dc:creator>
    <dc:date>2008-05-16T15:07:04Z</dc:date>
    <item>
      <title>Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804709#M915118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;           I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very important&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 14:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804709#M915118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T14:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804710#M915119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please elaborate a bit when you say you want to pass value to ABAP object ? &lt;/P&gt;&lt;P&gt;Is it that you want to pass the value to some attibutes or method of the ABAP object or what exactly you want to achive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 14:52:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804710#M915119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T14:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804711#M915120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in for select-option , one structure will be created with the name of Select-Option field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that structure, you hav 2 fields:&lt;/P&gt;&lt;P&gt;LOW and HIGH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, when you are creation the object,&lt;/P&gt;&lt;P&gt;Pass these to fields to the CONSTRUCTOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope, you understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandeep Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 15:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804711#M915120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T15:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804712#M915121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of ABAP object? I'll show 2 ways to populate into a generic variable VAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember s_option is an internal table with structure:&lt;/P&gt;&lt;P&gt;SIGN&lt;/P&gt;&lt;P&gt;OPTION&lt;/P&gt;&lt;P&gt;LOW&lt;/P&gt;&lt;P&gt;HIGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT-OPTIONS: s_option FOR dbtab-matnr.

READ TABLE s_option INDEX 1.
VAR = s_option-low.

LOOP AT s_option.
  VAR = s_option-low.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 15:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804712#M915121</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-05-16T15:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804713#M915122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Analyse the code below. After end of method save_kunnr_range the select-option from selection screen will be in object public variable kunnr_range. Note that table creted by statment SELECT-OPTION have a header line and note, that OO-ABAP don't use tables with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z_KUNN_RANGE
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  Z_KUNN_RANGE.

*---------------------------------------------------------------------*
*       CLASS cl_kunnr DEFINITION
*---------------------------------------------------------------------*
CLASS cl_kunnr DEFINITION.

  public section.
    data:
       kunnr_range  type trgr_kunnr.
    methods:
      save_kunnr_range importing kunnr_rg type trgr_kunnr.

ENDCLASS.

*---------------------------------------------------------------------*
*       CLASS cl_kunnr IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS cl_kunnr IMPLEMENTATION.

method save_kunnr_range.
    kunnr_range[] = kunnr_rg[].
endmethod.

ENDCLASS.


*---------------------------------------------------------------------*
*       selection screen
*---------------------------------------------------------------------*
data:
    a_kunnr        type kunnr,
    customers      type ref to cl_kunnr.

selection-screen begin of block bl01 with frame title text-001.
  select-options i_kunnr for a_kunnr.
selection-screen end of block bl01.

start-of-selection.
    create object customers.
    customers-&amp;gt;save_kunnr_range( i_kunnr[] ).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 22:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804713#M915122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select-option in ABAP objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804714#M915123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REPORT ZSELOPT_TO_CLASS .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TABLES: VBRK.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: IT_VBELN TYPE RSELOPTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: X_VBELN TYPE RSDSSELOPT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLASS C1 DEFINITION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PUBLIC SECTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: IT_VBRP TYPE VBRP_TAB,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;X_VBRP LIKE LINE OF IT_VBRP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;METHODS: DISP_DATA.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDCLASS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLASS C1 IMPLEMENTATION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;METHOD GET_DATA.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  *SELECT * FROM VBRP*&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;INTO TABLE IT_VBRP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;WHERE VBELN IN S_VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDMETHOD.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;METHOD DISP_DATA.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;LOOP AT IT_VBRP INTO X_VBRP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;WRITE:/ X_VBRP-VBELN,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;X_VBRP-POSNR.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDMETHOD.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDCLASS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;START-OF-SELECTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA OBJ TYPE REF TO ZCL_SELOPT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CREATE OBJECT OBJ.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT S_VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;MOVE S_VBELN-LOW TO X_VBELN-LOW.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;MOVE S_VBELN-HIGH TO X_VBELN-HIGH.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;MOVE S_VBELN-SIGN TO X_VBELN-SIGN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;MOVE S_VBELN-OPTION TO X_VBELN-OPTION.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;APPEND X_VBELN TO IT_VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CALL METHOD OBJ-&amp;gt;GET_DATA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                    &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                      &lt;STRONG&gt;S_VBELN = IT_VBELN.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CALL METHOD OBJ-&amp;gt;DISP_DATA.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: moazam hai on May 17, 2008 6:17 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: moazam hai on May 17, 2008 6:19 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2008 04:14:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option-in-abap-objects/m-p/3804714#M915123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-17T04:14:12Z</dc:date>
    </item>
  </channel>
</rss>

