Internal operating table

1: Remove the inner loop, and take the field in the table no.

    DATA lt_allowed_team_types TYPE crms4t_service_team_type.
    DATA ls_rsm_s_team_type_range TYPE rsm_s_team_type_range.
    FIELD-SYMBOLS <fs2> TYPE any.

    IF sy-subrc = 0.
      ls_process_type = <fs_generic_range>-low.
    ENDIF.

    lt_allowed_team_types = cl_crms4_orgman_helper=>get_team_types_by_proc_type( iv_process_type = ls_process_type ).

*    lt_allowed_team_types = VALUE #( ( 'SRV_FS' )
*                                    ( 'SALES' ) ).

    IF lt_team_type_range IS INITIAL.
      LOOP AT lt_allowed_team_types ASSIGNING <fs2>.  "循环取出内表中的值。
        ls_rsm_s_team_type_range-low = <fs2>.
        ls_rsm_s_team_type_range-sign = 'I'.
        ls_rsm_s_team_type_range-option = 'EQ'.
        APPEND ls_rsm_s_team_type_range TO lt_team_type_range.
      ENDLOOP.
    ELSE.
      READ TABLE lt_allowed_team_types WITH KEY TABLE_LINE = lt_team_type_range[ 1] -low NO TRANSPORTING the FIELDS . When "no inner Field, 1 * 1 type, as with TABLE_LINE Field
       the IF SY-SUBRC NE 0 . 
        the RETURN. 
      endif. 
    ENDIF .
When the field is not in the table, of the type 1 * 1, as a field with TABLE_LINE

Guess you like

Origin www.cnblogs.com/liyafei/p/11578413.html