Sunday, March 9, 2014
When you use RH_INSERT_INFTY/RH_READ_INFTY/RH_UPDATE_INFTY
function module to create/read/update Personnel Development (PD) objects,
System checks whether the person accessing object has structural authorization.
If the user does not have access and need to access object, system will throw
authorization errors.
1.
Use RH_AUTHORITY_CHECK_OFF function module to
switch off structural authorization.
2.
Use RH_AUTHORITY_CHECK_ON function module to
switch on structural authorization.
" Switch off Standard authorization CALL FUNCTION 'RH_AUTHORITY_CHECK_OFF'. " Insert new row into Infotype 1000 for position with new name CALL FUNCTION 'RH_INSERT_INFTY' EXPORTING * FCODE = 'INSE' VTASK = 'S' * ORDER_FLG = 'X' * COMMIT_FLG = 'X' * AUTHY = 'X' * PPPAR_IMP = * OLD_TABNR = ' ' * REPID = ' ' * FORM = ' ' * KEEP_LUPD = * WORKF_ACTV = 'X' TABLES INNNN = X1000 * ILFCODE = * EXCEPTIONS * NO_AUTHORIZATION = 1 * ERROR_DURING_INSERT = 2 * REPID_FORM_INITIAL = 3 * CORR_EXIT = 4 * BEGDA_GREATER_ENDDA = 5 * OTHERS = 6 . IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. COMMIT WORK. "Switch on Standard Authorization CALL FUNCTION 'RH_AUTHORITY_CHECK_ON' .
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.