Case with a select-options

hi,
How do I use the CASE statement when the variable is a range (so_mes).
so_mes is defined like a select-options.
i have the next code.
case so_mes-low.
             when '01'.
                move dobli-wtp01 to oejer.
              when '02'.
                move dobli-wtp02 to oejer.
              when '03'.
                move dobli-wtp03 to oejer.
              when '04'.
                move dobli-wtp04 to oejer.
              when '05'.
                move dobli-wtp05 to oejer.
              when '06'.
                move dobli-wtp06 to oejer.
              when '07'.
                move dobli-wtp07 to oejer.
              when '08'.
                move dobli-wtp08 to oejer.
              when '09'.
                move dobli-wtp09 to oejer.
              when '10'.
                move dobli-wtp10 to oejer.
              when '11'.
                move dobli-wtp11 to oejer.
              when '12'.
                move dobli-wtp12 to oejer.
in this case only take the low value. How can I asigned the the high value in the statement CASE?.

I would suggest doing something like this.  Allow the user to enter only single values in the select-option, then you can loop at the select-option and process accordingly.
report zrich_0001.
* Type pools
type-pools: slis, sscr.
data: char2(2) type c.
select-options: so_mes for char2.
initialization.
  perform initilization.
start-of-selection.
  loop at so_mes.
    case so_mes-low.
      when '01'.
*move dobli-wtp01 to oejer.
      when '02'.
*move dobli-wtp02 to oejer.
      when '03'.
*move dobli-wtp03 to oejer.
      when '04'.
*move dobli-wtp04 to oejer.
    endcase.
  endloop.
*  INITILIZATION
form initilization.
* Restrict the select options for SO_MES
* to just a date range
  data: selopt   type sscr_***,
        opt_list type sscr_opt_list,
        restrict type sscr_restrict.
  clear opt_list.
  opt_list-name          = 'EQ'.
  opt_list-options-eq    = 'X'.
  append opt_list to restrict-opt_list_tab.
  clear selopt.
  selopt-kind            = 'S'.
  selopt-name            = 'SO_MES'.
  selopt-sg_main         = 'I'.
  selopt-sg_addy         = ' '.
  selopt-op_main         = 'EQ'.
  selopt-op_addy         = 'EQ'.
  append selopt  to restrict-***_tab.
  call function 'SELECT_OPTIONS_RESTRICT'
       exporting
            restriction            = restrict
       exceptions
            too_late               = 1
            repeated               = 2
            selopt_without_options = 5
            selopt_without_signs   = 6
            invalid_sign           = 7
            empty_option_list      = 9
            invalid_kind           = 10
            repeated_kind_a        = 11
            others                 = 12.
endform.
Regards,
Rich Heilman

Similar Messages

  • Can you pass a hidden value along with your select option in the form selec

    Can you pass a hidden value along with your select option in the html form select

    Off topic. Locking.

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • Batch handle with 'Auto Select' option

    Hello Everyone!
    We are trying to find out how the 'Auto Select' button works with batch handle.
    Our customer wants to handle batches by FIFO.
    We need to try if it is possible to 'Auto Select' batches by 'Admission Date'. Even when we found out that it is possible SBO does not do it rightly, because not always get well organized by 'Admission Date'.
    Somebody knows which logic uses the 'Auto Select' option to select batches?
    There is some configuration at SBO to handle batches by 'Admission Date'?
    Thanks a lot!

    The batch auto selection selects the batches according to the ascending alphanumeric order. To issue based on FIFO method, user has to identify the admission date/ manufacturing date of the batch and issue.
    There is No configuration at SBO to handle batches by 'Admission Date'.
    As a workaround you can use the batches to startwith  'Admission Date'.

  • Problem with Multiple selection option

    Hi all,
    I am working on a report, when I execute the report and the selection screen comes up, there I need to enter 5 different employee name so I am trying to use "multiple selection" option but as soon as I hit that "Yellow arrow" in front of employee name field .. I saw the output first and when I go one screen back I get that screen where I can enter the names. So can you please help me with this.
    Thanks,
    Rajeev

    Hi,
    I have written the following code, I guess the problem is in
    GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = GD_REPID
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
          GD_REPID     LIKE SY-REPID.
    FORM DISPLAY_ALV_REPORT .
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = GD_REPID
          I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
          IS_LAYOUT              = GD_LAYOUT
          IT_FIELDCAT            = FIELDCATALOG[]
          I_SAVE                 = 'A'
        TABLES
          T_OUTTAB               = IT_tab
        EXCEPTIONS
          PROGRAM_ERROR          = 1
          OTHERS                 = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORTcode}
    Thanks,
    Rajeev

  • Select-Options in Webdynpro for Abap with onAction

    Hello,
    I need your help. I have a Webdynpro with 6 Select-Options. I used a button to start the selection. Can the Selection be started with return key.
    Thanks.

    I would expect in any case that there is no problem when you transport WDA build from ehp3 to ehp5 (Backward compatibility ).

  • Select options with out intervals and with extension in WebDynpro ABAP

    Hi webdynpro experts,
    I am with working with webdynpro select options.
    Is there any way to hide selection screen intervals with extension same as ABAP?
    Your input is appreicated.
    Thanks
    Rajesh Yadla

    Hi Prabhu,
    I have two radio buttons ex: R1 and R2 and three Fields Ex: Vendor, User Name and Password.
    When I select R1 Vendor field should be Visible and when I select R2 Vendor field should be invisible.
    I created one attribute of type WDUI_VISIBILITY and binded in Visbility property of Vendor field.
    On action of R1 I am setting attribute value as Visible using Set_attribute method and On Action of R2 I am setting BLANK in Set_attribute method. But somehow I am unable get the solution......
    Thanks
    Basu

  • Creating select option with the search help based on other select option

    Hi,
    I have displayed a selection screen with two select options S1 and S2.
    My requirement is that the values in the search help of S2 should get filled based on the values selected in S1.
    Note: User has option to select multiple values in S1.
    Does anybody know how to implement this?
    Thanks,
    Feroz

    >
    Sanjeeva wrote:
    > Hi,
    >
    > With standard f4 you cannot acheive this. You need to write customise with OVS or Simple value selector by reading S1 selected values.
    >
    > Thanks,
    > Sanjeev
    I'm getting fairly tired of seeing this completely incorrect information on this forum.  As stated before and already found out by this poster, you can map input and output values between multiple data dictionary search helps. You do NOT have to resort to using OVS for this option.

  • Can we hide the select-option in a selection screen

    Hi all,
    I have two radio buttons in my selection screen with 1 select-option criteria, now on choosing the other radio button I want that a different select-option criteria should appears.
    Thanks

    hi kunal check the code below.
    TABLES : SSCRFIELDS,MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
    PARAMETERS : R1 RADIOBUTTON GROUP RB1 DEFAULT 'X',
    R2 RADIOBUTTON GROUP RB1,
    R3 RADIOBUTTON GROUP RB1,
    R4 RADIOBUTTON GROUP RB1.
    SELECTION-SCREEN PUSHBUTTON /10(20) FRST USER-COMMAND FRST.
    SELECTION-SCREEN PUSHBUTTON /10(20) SCND USER-COMMAND SCND.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : ACTIVE1 VALUE '1',
    ACTIVE2 VALUE '1'.
    initialization.
    move 'frst' to frst.
    move 'scnd' to scnd.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'R1' OR SCREEN-NAME = 'R2' .
    SCREEN-INVISIBLE = ACTIVE1.
    screen-output = '1'.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-NAME = 'R3' OR SCREEN-NAME = 'R4' .
    SCREEN-INVISIBLE = ACTIVE2.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS-UCOMM.
    WHEN 'FRST'.
    ACTIVE1 = '0'.
    ACTIVE2 = '1'.
    WHEN 'SCND'.
    ACTIVE2 = '0'.
    ACTIVE1 = '1'.
    ENDCASE.

  • Filtering internal table using select-option values

    Hi,
    I got an internal table with select-option values. for eg.  it_perno with the values  I  BT    000160    000170.
    Now i got another second internal table which is have the person number. Now i need to filter this second internal table based on the values from the select option table. my question is
    i can collect all the values from 160 to 170 in a separate table by looping over the select option table. and then based on the values filter the second internal table person number.
    But what would be the case if the select option contains both intervals and multiple options. For eg.
    I BT 000160      000170.
    I EQ 000185.
    So can you suggest any good solution, that based on this select option table i need to filter the second internal table Person number.
    Thanks in advance.
    Regards,
    anbu.

    Hi,
    Can you not use the select-options in the Select query while populating the internal table.
    SELECT pernr FROM pa0000 INTO it_tab WHERE pernr IN s_pernr.
    If you cannot do this and you do not want to delete the unwanted entries, then you can use the WHERE clause in the LOOP statement to process the specific entries required:
    LOOP AT it_tab INTO wa_tab WHERE pernr IN s_pernr.
    Regards,
    Aparna Alashe.

  • Doubt in select options

    Hi frnds,
    Normally select option allowing only 8 charactor in declaration part, but i want to display with morethan 8 charator. i think some text id formet is there, how to do that.
    for ex,
    s_org for vbak-vkorg  .
    for this i want to give sales organisation.
    how to do this.
    plz its urgent.
    Gowri

    SELECTION-SCREEN BEGIN OF LINE.
    [SELECTION-SCREEN POSITION pos [ldb_additions]].
    SELECTION-SCREEN END OF LINE.
    Effect
    The first and last statements define a new line below the existing elements on the selection screen.
    All the screen elements within these statements that are defined with PARAMETERS SELECT-OPTIONS and SELECTION-SCREEN statements are placed in this line one after the other without spaces.
    Several SELECTION-SCREEN POSITION statements can be listed within the definition of a line. The SELECTION-SCREEN POSITION statement can be used to define the output position for the following screen element. The position pos can either be specified directly as a number between 1 and 83 or using pos_low or pos_high expressions. The expression pos_low specifies the position in which the input field for a parameter or the first input field for a selection criterion is displayed as standard. The expression pos_high specifies the position in which the second input field for a selection criterion is to be displayed as standard. If you make a different specification of the position in the statement defining the following element, this is taken into account. The statement SELECTION-SCREEN POSITION is only possible within the definition of a line. If there are conflicts with existing screen elements, the selection screen cannot be generated.
    The additions ldb_additions can only be used in a selection include for a logical database.
    The following applies in the definition of a line:
    Output fields are not created for selection texts for the parameters displayed in these kinds of lines. Instead, these can be created by specifying a SELECTION-SCREEN COMMENT.
    You cannot define other lines with SELECTION-SCREEN BEGIN OF LINE.
    You cannot define blocks or tabstrip controls with SELECTION-SCREEN BEGIN OF [TABBED] BLOCK.
    Within a line, only one selection criteria should be defined with SELECT-OPTIONS whose description can be specified in advance using SELECTION-SCREEN COMMENT. Other combinations, especially definitions of elements according to the selection criteria, can lead to an undefined behaviour.,
    The backslash (/) is not allowed when giving format specifications.
    You can omit the position specification pos in formatting specifications.
    Note
    If a screen element is assigned a position greater than 83 or is positioned outside a block with a frame, the selection screen is not generated. In the case of input and output fields that were positioned beforehand but have a length that extends beyond the end of the line, the visible length is shortened accordingly and the content is displayed in the visible length and can be scrolled. In this case, pushbuttons and horizontal lines are cut off at position 83 or where the frame of the block ends.
    Example
    A pushbutton, an input field, and an output field in a line in the standard selection screen for an executable program.
    SELECTION-SCREEN: BEGIN OF LINE,
                      PUSHBUTTON 2(10) push USER-COMMAND fcode,
                      POSITION 16.
    PARAMETERS para TYPE c LENGTH 20.
    SELECTION-SCREEN: COMMENT 40(40) text,
                      END OF LINE.
    INITIALIZATION.
      push = 'Push'.
      text = '<--- Fill field, then push button!'.

  • Search Help in Select - Options

    Dear experts,
    i use three select options and they work fine.
    In the node of the view i declared the attributes i need and bound a search help (F4 help) to them.
    here is the problem.
    One attribute has the help visible when i start the application, the other two not.
    Can you give me a hint how to solve this ?
    Thanks and best regards
    René

    Hi Rene,
    I had the similar question earlier, later what i have found is like this:
    1. I have a WDC with three Select options to it.
    2. First Select options relates to the first attribute in my context node which takes the Data element as the Data type. For Ex: take BUKRS as the DE. This has pre-defined search help to the DE C_T001.
    3. Second select options relates to the second attribute in my context node which takes the string as the data type. I manually assigned the Search help to that attribute 'C_T001'.
    4. Thirs Select options relate to the third attribute inmy context node which takes the string as the data type. I manually assigned a Search help to it 'H_T002'.
    5. In the WDDOINIT of my view, I have written the code as follows in the bottom of the post.
    6. The observation is the search help assigned to the first attribute will be opened with out any problem or additional code to it.
    7. The search help assigned to the second one at the context level wont be picked in the select-options.
    8. The search help assigned to the third one will be picked if and only if there is manual assignment of the search help at the time of creating a selection field.
    Conclusion: So, the search help assignment assigned to the attribute at context level is ignored. It will be considered only if the DE has that search help in the case of select-options.
    Hope it is clear and appreciate your feebback.
    Regards,
    Shashikanth. D
    First Select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      wd_this->m_handler->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'BUKRS' ).
    add a new field to the selection
      wd_this->m_handler->add_selection_field( i_id = 'BUKRS'
      it_result = lt_range_table i_read_only = read_only ).
    Second select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage1 TYPE REF TO if_wd_component_usage.
      lo_cmp_usage1 =   wd_this->wd_cpuse_use_select1( ).
      IF lo_cmp_usage1->has_active_component( ) IS INITIAL.
        lo_cmp_usage1->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options1 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler1 = wd_this->m_wd_select_options1->init_selection_screen(  ).
      wd_this->m_handler1->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler1->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
      wd_this->m_handler1->add_selection_field( i_id = 'IF1'
      it_result = lt_range_table i_read_only = read_only ).
    Third Select options:
    Instantiating the Used component WDR_SELECT_OPTIONS
    DATA lo_cmp_usage2 TYPE REF TO if_wd_component_usage.
    lo_cmp_usage2 =   wd_this->wd_cpuse_use_select2( ).
    IF lo_cmp_usage2->has_active_component( ) IS INITIAL.
      lo_cmp_usage2->create_component( ).
    ENDIF.
    wd_this->m_wd_select_options2 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler2 = wd_this->m_wd_select_options2->init_selection_screen(  ).
      wd_this->m_handler2->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler2->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
    CALL METHOD wd_this->m_handler2->add_selection_field
      EXPORTING
        i_id                         = 'IF2'
        it_result                    = lt_range_table
        i_value_help_type            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
        i_value_help_id              = 'H_T002'.

  • Multiple select options validation at selection screen

    Hi,
    I have the requirement to create a selection screen with 3 select options. Two of them are cross-dependent. It is mandatory to fill one of them and it is not allowed to fill both. The third one is optional. I tried the validation at selection-screen on block... and I have a problem that search help buttons for select options react like execution buttons, when I press any of them I am getting one of errors instead of search help.
    Any help on this issue would be appreciated.
    Here is my code:
    DATA:
          so_rbkp TYPE rbkp,
          so_mseg TYPE mseg.
    SELECTION-SCREEN BEGIN OF BLOCK blok WITH FRAME.
      SELECT-OPTIONS:
            s_fakt   FOR so_rbkp-belnr,
            s_matdok FOR so_mseg-mblnr,
            s_god FOR so_mseg-gjahr.
    SELECTION-SCREEN END OF BLOCK blok.
    INITIALIZATION.
    SET TITLEBAR '0100'.
    START-OF-SELECTION.
      AT SELECTION-SCREEN on block blok.
          if s_fakt <> space and s_matdok <> space.
            MESSAGE 'Message1' TYPE 'E'.
          elseif s_fakt = space and s_matdok = space.
            MESSAGE 'Message2' TYPE 'E'.
          endif.
        ENDIF.

    Only perform the check when user wants to execute or submit the program, not when pressing F4 or even Enter, but in a selection-screen event, before START-OF-SELECTION which were program would terminate in error :
    TABLES: SSCRFIELDS.
    AT SELECTION-SCREEN OB BLOCK b01.
        IF sscrfields-ucomm EQ 'ONLI'
        OR sscrfields-ucomm EQ 'PRIN'
        OR sscrfields-ucomm EQ 'SJOB'.
          IF s_fakt[] IS NOT INITIAL AND s_matdok IS NOT INITIAL.
            MESSAGE 'Message1' TYPE 'E'.
          ELSEIF s_fakt[] IS INITIAL and s_matdok[] IS INITIAL.
            MESSAGE 'Message2' TYPE 'E'.
          ENDIF.
        ENDIF.
    (You could also always send the message, but using type 'E' for those function code and 'S' status for any other value.)
    Regards,
    Raymond

  • Help on Dynamic values in select options

    Hi All,
    I need help for the following.
    1. I have two select options for fields VBAK-VBELN and VBAK-ERDAT one after the other.
    2. When I select VBELN through F4 in the first select option then the corresponding ERDAT should be displayed in second select option.
    Please let me know how to do this

    Use the below code
    tables: pa0000, pa0001.
    parameters: p_chk1 as checkbox user-command rusr,
    p_chk2 as checkbox user-command rusr,
    p_chk3 as checkbox user-command rusr,
    p_chk4 as checkbox user-command rusr,
    p_chk5 as checkbox user-command rusr.
    selection-screen: begin of block blk1 with frame.
    select-options: s_pernr for pa0000-pernr modif id ABC,
    s_stat2 for pa0000-stat2 modif id DEF,
    s_werks for pa0001-werks modif id GHI,
    s_persg for pa0001-persg modif id JKL,
    s_persk for pa0001-persk modif id MNO.
    selection-screen: end of block blk1.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'ABC'.
    IF p_chk1 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'DEF'.
    IF p_chk2 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'GHI'.
    IF p_chk3 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'JKL'.
    IF p_chk4 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = 'MNO'.
    IF p_chk5 = 'X'.
    SCREEN-ACTIVE = 1.
    ELSE.
    SCREEN-ACTIVE = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    *Note
    *Titles for check boxes and select options
    *P_CHK1 Personal Number
    *P_CHK2 Employment Status
    *P_CHK3 Personnel Area
    *P_CHK4 Employee Group
    *P_CHK5 Employee Sub group
    *S_PERNR Personal Number
    *S_PERSG Employee Group
    *S_PERSK Employee Sub group
    *S_STAT2 Employment Status
    *S_WERKS Personnel Area

  • Select-Options Help

    Hi.
    I have this small program with a select-options s_tran.
    I need to call function Z_UNLOCK for each entry in s_tran.
    How can I make that?
    Thanks
    Best regards
    PARAMETERS: p_warn TYPE ltap-LGNUM.
    SELECT-OPTIONS:  s_tran FOR LTAK-tanum.
    loop at ......................?????
        CALL FUNCTION 'Z_UNLOCK'
          EXPORTING
            iv_warehouse = p_warn
            iv_tanum     = s_tran-tanum
            language     = sy-langu
          IMPORTING
            return       = return.
        IF return-type = ''.
          EXIT.
        ENDIF.
    Endloop.

    hi,
    try to use this code:
    >PARAMETERS: p_warn TYPE ltap-LGNUM.
    >SELECT-OPTIONS: s_tran FOR LTAK-tanum.
    >data: lt_ltak type ltak occurs 0 with header line.
    >start-of-selection.
    >select * from ltak into table lt_ltak where tanum in s_tran.
    >
    >
    >loop at lt_ltak.
    >
    >CALL FUNCTION 'Z_UNLOCK'
    >EXPORTING
    >iv_warehouse = p_warn
    >iv_tanum = lt_ltak-tanum
    >language = sy-langu
    >IMPORTING
    >return = return.
    >
    >IF return-type = ''.
    >EXIT.
    >ENDIF.
    >
    >Endloop.
    bye
    Marco

Maybe you are looking for