简体   繁体   中英

Authority-check with ACTVT = 01 or 02

I need to check if ACTVT is 01 or 02, WERKS from selection screen, DIRCT – Y and VD from range A, B, C, K, R, O. The code below didn't check for this letters, in test i could select any, not only selected into lv_values as it was expected. Any advice where to look at, or may be there's another solution?

CALL FUNCTION 'Z_GET_PARAMS'
      EXPORTING
        iv_repid        = 'ZMM_LIM'
        iv_param        = 'VD'
     IMPORTING
       et_values       = lt_values.

    LOOP AT lt_values ASSIGNING FIELD-SYMBOL(<lf_values>).

* Проверка прав
      AUTHORITY-CHECK OBJECT 'ZMM_LIMIT'
             ID 'ACTVT' FIELD '01'
             ID 'ACTVT' FIELD '02'
             ID 'WERKS' FIELD s_werks
             ID 'DIRCT' FIELD 'Y'
             ID 'VD' FIELD <lf_values>-low

As far as I know, you can't have the same field multiple times in a single AUTHORITY-CHECK statement - you'll have to do the OR for yourself. I wouldn't be surprised if you got sy-subrc = 24 , indicating a programming error rather than a missing authority.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM