In SAP ABAP, to securely call a transaction while validating user permissions, use CALL TRANSACTION tcode WITH AUTHORITY-CHECK. This ensures the user has authorization for the transaction code (S_TCODE) and any related objects. Without this clause, the system might not check, posing security risks. It is recommended to catch cx_sy_authorization_error to handle failed checks.
SAP ABAP에서 사용자 권한을 확인하면서 트랜잭션을 안전하게 호출하려면 CALL TRAXION tcode WITH AUTION-CHECK를 사용합니다. 이렇게 하면 사용자가 트랜잭션 코드(S_TCODE) 및 관련 객체에 대한 권한을 갖게 됩니다. 이 조항이 없으면 시스템이 확인하지 않아 보안 위험이 발생할 수 있습니다. 실패한 검사를 처리하려면 cx_sy_authorization_error를 잡는 것이 좋습니다.
Standard Syntax for Authorization Check
CALL TRANSACTION 'TCODE' WITH AUTHORITY-CHECK.
Example with Error Handling
TRY.
CALL TRANSACTION 'VA01' WITH AUTHORITY-CHECK.
CATCH cx_sy_authorization_error.
MESSAGE 'You are not authorized for this transaction' TYPE 'E'.
ENDTRY.
Obsolete Code: Using CALL TRANSACTION without WITH/WITHOUT AUTHORITY-CHECK is considered obsolete in newer ABAP versions.Alternative (WITHOUT): To explicitly bypass the check, use WITHOUT AUTHORITY-CHECK, which ignores TCDCOUPLES database entries.Security Risk: As discussed in this guide to call transaction security, not using the authorization check can create serious security gaps, allowing users to run unauthorized T-codes, as explained in this detailed analysis of bypassing authorization checks.Batch Input: In batch input scenarios (BDC), authorization checks may differ, as detailed in SAP Note 3556259.
구식 코드: 최신 ABAP 버전에서는 권한 체크 없이 또는 권한 체크 없이 콜 트랜잭션을 사용하는 것이 구식으로 간주됩니다. 대안(WITHERNATION): 체크를 명시적으로 우회하려면 TCDCouples 데이터베이스 항목을 무시하는 권한 체크 없이 사용하십시오.보안 위험: 이 가이드에서 거래 보안 호출 시 설명한 것처럼, 권한 체크를 사용하지 않으면 심각한 보안 격차가 발생할 수 있으며, 이 권한 체크 우회에 대한 자세한 분석에서 설명한 것처럼 사용자는 무단 T-코드를 실행할 수 있습니다. 일괄 입력: 배치 입력 시나리오(BDC)에서는 SAP Note 3556259에 자세히 설명된 것처럼 권한 체크가 다를 수 있습니다.