Вместо:
READ TABLE lt_stor_loc
ASSIGNING FIELD-SYMBOL(<fs_stor_loc>)
WITH KEY /bic/zplant = SOURCE_FIELDS-/bic/zplant
/bic/zstor_loc = SOURCE_FIELDS-/bic/zstor_loc
BINARY SEARCH.
IF sy-subrc IS INITIAL.
RESULT = <fs_stor_loc>-/bic/zvir_sp.
ENDIF.
Можно:
TRY.
RESULT = lt_stor_loc[
/bic/zplant = SOURCE_FIELDS-/bic/zplant
/bic/zstor_loc = SOURCE_FIELDS-/bic/zstor_loc
]-/bic/zvir_sp.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
READ TABLE lt_stor_loc
ASSIGNING FIELD-SYMBOL(<fs_stor_loc>)
WITH KEY /bic/zplant = SOURCE_FIELDS-/bic/zplant
/bic/zstor_loc = SOURCE_FIELDS-/bic/zstor_loc
BINARY SEARCH.
IF sy-subrc IS INITIAL.
RESULT = <fs_stor_loc>-/bic/zvir_sp.
ENDIF.
Можно:
TRY.
RESULT = lt_stor_loc[
/bic/zplant = SOURCE_FIELDS-/bic/zplant
/bic/zstor_loc = SOURCE_FIELDS-/bic/zstor_loc
]-/bic/zvir_sp.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
Комментариев нет:
Отправить комментарий