对内表进行操作
Posted liyafei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了对内表进行操作相关的知识,希望对你有一定的参考价值。
1: 循环取出内表和取无field的内表。
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 TRANSPORTING NO FIELDS. "内表没有field时,为1*1类型,用TABLE_LINE作为field IF sy-subrc ne 0. RETURN. endif. ENDIF.
内表没有field时,为1*1类型,用TABLE_LINE作为field
以上是关于对内表进行操作的主要内容,如果未能解决你的问题,请参考以下文章