Hi Rishi,
We had similar requirement , pls check the reply from tony in the below post
Basically in the ECC system you can copy the BOR object TSTC to ZTSTC and can create your own method like ZEXECUTE.
Here you can write logic similar to below code
dATA:
SALESDOCUMENT TYPE VBAK-VBELN.
TABLES vbak .
SWC_GET_ELEMENT CONTAINER 'SalesDocument' SALESDOCUMENT.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = OBJECT-KEY-CODE
EXCEPTIONS
ok = 0
not_ok = 1
others = 2.
IF sy-subrc NE 0.
MESSAGE s059(eu) WITH OBJECT-KEY-CODE.
* Sie haben keine Berechtigung für die Transaktion &
ELSE.
MOVE salesdocument TO vbak-vbeln.
SELECT SINGLE * FROM vbak WHERE vbeln = vbak-vbeln.
SET PARAMETER ID: 'AUN' FIELD vbak-vbeln.
SET PARAMETER ID 'AGN' FIELD vbak-vbeln.
CALL TRANSACTION OBJECT-KEY-CODE and skip first screen.
ENDIF.