Hi Guys i am doing a authority check for transaction ME51 validating the cost center.
i have created the message in se91 as
No authorization to Create PR with this Cost Center: ",
i want to display the cost center too with this message
like
No authorization to Create PR with this Cost Center:11148048
please advice
Thanks
Quavi
my code:
if l_ebkn-kostl is not initial.
AUTHORITY-CHECK OBJECT 'A_S_KOSTL'
ID 'BUKRS' dummy
ID 'KOSTL' FIELD l_ebkn-kostl.
if sy-subrc <> 0.
l_bapiret2-number = '010' .
l_bapiret2-type = 'E'.
l_BAPIRET2-id = 'ZMSG' ."WITH L_EBKN-KOSTL.
append l_BAPIRET2 to i_BAPIRET2.
endif.