Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg:Authorisation checking

Hi all,

How to perform authorisation checking on a particular field.

for ex: In my requirement,

If the field Plant is not entered on the selection-screen, the authorisation check on the field EKPO-WERKS should be performed after the PO-document was selected.

Tags:
replied

Hi

U need to insert the Authorization-check statament in the selection-screen and in the select and then decide which control has to be arranged:

SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.

PARAMETERS: P_WERKS TYPE T001W-WERKS.

AT SELECTION-SCREEN.

  IF NOT P_WERKS IS INITIAL.
    AUTHORITY-CHECK OBJECT <AUTH OBJECT>
        ID WERKS FIELD P_WERKS.
    IF SY-SUBRC <> 0.
----> error message
    ENDIF.      
  ENDIF.

START-OF-SELECTION.

  SELECT * FROM EKPO WHERE ....
    AUTHORITY-CHECK OBJECT <AUTH OBJECT>
        ID WERKS FIELD EKPO-WERKS.
    IF SY-SUBRC = 0.
      APPEND EKPO TO ITAB.
    ENDIF. 
  ENDSELECT.

Max

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question