14 июня 2022

ФМ VIEW_MAINTENANCE_CALL

Вызов ракурса ведения с помощью ФМ VIEW_MAINTENANCE_CALL с фильтром значений.

  data(lt_sellist) = value geft_vimsellist(
    ( viewfield = 'BUKRS' operator = 'EQ' value = '0001' ) ).
  
  " Задать интервал: с 0001 по 1000
  lt_sellist = value geft_vimsellist(
    ( viewfield = 'BUKRS' operator = 'GE' value = '0001' and_or = 'AND' )
    ( viewfield = 'BUKRS' operator = 'LE' value = '1000' ) ).
  
  " Несколько интервалов: с 0001 по 1000 или с 2000 по 3000
  lt_sellist = value geft_vimsellist(
    ( viewfield = 'BUKRS' operator = 'GE' value = '0001' and_or = 'AND' )
    ( viewfield = 'BUKRS' operator = 'LE' value = '1000' and_or = 'OR' )
    ( viewfield = 'BUKRS' operator = 'GE' value = '2000' and_or = 'AND' )
    ( viewfield = 'BUKRS' operator = 'LE' value = '3000' ) ).

  call function 'VIEW_MAINTENANCE_CALL'
    exporting
      action                               = 'U'
*     corr_number                          = '          '
*     generate_maint_tool_if_missing       = ' '
*     show_selection_popup                 = ' '
      view_name                            = 'ZTEST_TAB'
*     no_warning_for_clientindep           = ' '
*     rfc_destination_for_upgrade          = ' '
*     client_for_upgrade                   = ' '
*     variant_for_selection                = ' '
*     complex_selconds_used                = ' '
*     check_ddic_mainflag                  = ' '
*     suppress_wa_popup                    = ' '
    tables
      dba_sellist                          = lt_sellist
*     excl_cua_funct                       = 
    exceptions
      others                               = 1.

  if sy-subrc <> 0.
    " ToDo
  endif.

Если ввести данные, не удовлетворяющие заданному фильтру, то будет ошибка.

Комментариев нет:

Отправить комментарий