*&

---------------------------------------------------------------------*
*&
Form SCHECK_ATHU_PLANT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
FORM scheck_athu_plant .
DATA : v_bname TYPE xubname.
SELECT werks FROM t001w INTO va_werks WHERE werks IN i_werks.
AUTHORITY-CHECK OBJECT 'ZSRWERKS'
ID 'WERKS' FIELD va_werks.
IF sy-subrc = 0.
ELSE.
MESSAGE e000(zmsg_sr).
LEAVE LIST-PROCESSING.
ENDIF.
ENDSELECT.
IF p_cogs = 'X'.
SELECT SINGLE bname FROM usr02 INTO (v_bname) WHERE bname = sy-uname.
IF sy-subrc = 0.
AUTHORITY-CHECK OBJECT 'ZBNAME'
ID 'ZBNAME' FIELD v_bname.
IF sy-subrc = 0.
ELSE.
MESSAGE e000(zmsg_sr).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ENDIF.

ENDFORM.
1047461200

" SCHECK_ATHU_PLANT

Sign up to vote on this title
UsefulNot useful