Advertisement
CDLG_TGR

Action selon ENV et PARAM USER

May 22nd, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.07 KB | None | 0 0
  1. form _bypass using iv_name type syst_uname changing ev_bypass type xfeld.
  2. * Si on est en DEV lis le paramètre ZEEB_BYPASS pour éviter les contrôles
  3.   data :  lv_logsys type logsys,
  4.           lt_usrpar type ustyp_t_parameters.
  5.   field-symbols <ls_usrpar> like line of lt_usrpar.
  6.   call function 'OWN_LOGICAL_SYSTEM_GET'
  7.     importing
  8.       own_logical_system             = lv_logsys
  9.     exceptions
  10.       own_logical_system_not_defined = 1
  11.       others                         = 2.
  12.   if lv_logsys eq cv_sys_dev.
  13.     call function 'SUSR_USER_PARAMETERS_GET'
  14.       exporting
  15.         user_name           = iv_name
  16.       tables
  17.         user_parameters     = lt_usrpar
  18.       exceptions
  19.         user_name_not_exist = 1
  20.         others              = 2.
  21.     if sy-subrc <> 0.
  22.     endif.
  23.     read table lt_usrpar with key parid = cv_param_bypass assigning <ls_usrpar>.
  24.     if <ls_usrpar> is assigned.
  25.       if <ls_usrpar>-parva = abap_true.
  26.         ev_bypass = abap_true.
  27.         message i022 with cv_param_bypass.
  28.         return.
  29.       endif.
  30.     endif.
  31.   endif.
  32. endform.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement