cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress/disable the authorization check for HR_INFOTYPE_OPERATION

abhijitzope
Active Participant
0 Kudos

Hello friends,

How to suppress/disable the authorization check while maintaining (INS/DEL/MOD) the Infotype record through function module HR_INFOTYPE_OPERATION.

Regards,

Abhijit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

In ECC 5 & 6, with the new infotype framework in place,

You can use the following code to substitute HR_INFOTYPE_OPERATION

DATA business_logic_461 TYPE REF TO if_hrpa_masterdata_bl.

CALL METHOD business_logic_461->get_infty_container

EXPORTING

tclas = cl_hrpa_tclas=>tclas_employee

pskey = p0461-pskey

  • ITBLD =

message_handler = message_list

IMPORTING

container = infty_container.

*

p0461_container ?= infty_container.

infty_container ?= p0461_container->modify_primary_record( p0461

).

try.

CALL METHOD business_logic_461->insert

EXPORTING

  • UPDATE_MODE =

  • ignore_warnings = if_hrpa_boole_d=>true

  • NO_AUTH_CHECK =

  • NO_RETROCALC_CHECK =

message_handler = message_list

CHANGING

container = infty_container.

shafiq_rehman3
Active Contributor
0 Kudos

When we call this FM, the update takes place using a 'Call dialog' from the module pool infotypes so you cannot suppress the authorization checks. You might need to find some otherway if you really want to do it, like direct database updates. THIS IS NOT RECOMENDED!!!

Former Member
0 Kudos

Hi Abhijit,

Why would you want to do this?

SL

abhijitzope
Active Participant
0 Kudos

Hi Friend,

I am updating custom infotype (9XXX) with data of Job evalution (infotype 1050) through BADI. There is no direct maintainace(Insert/delete/modify) required for this infotype from USER end. everything is taken care in BADI & hence no need to check authorization for this custom infotype.

Regards,

Abhijit

shafiq_rehman3
Active Contributor
0 Kudos

In that case, you do not need to worry about anything. Authorization will not fail if you put code in BADI. So no need to supress the authorization.

Former Member
0 Kudos

Hi,

If U are still facing the authorization issue the U can change the design a bit.

Use the FM inside another program.

Then submit the program from BADi with the Batch job run (Ask an ABAPer to do this).

While submiting the program through batch job mention the background user(Ask Ur Basis) designated for batch job. As this user has SAP All it will not have authorization issue.

But U have to check whether Batch job triggerring authorization is there with the User doing this.

This is just a suggestion..If U are completely stuck then U can have a look at this option.

~BiSu