Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VF03 and K_PCA no authorisation. Trace file return code = 4

Former Member
0 Kudos

Hi

We are currently on EHP6 with SP5. We are trying to secure transaction VF03 to only allow users to view billing documents from a particular Profit Centre Group using object K_PCA.

The object K_PCA is set too CHECK in SU24 and when we run a trace the return code = 4. The user should therefore not be able to see the billing document.

In this case the function module is ignoring the RC = 4 and the user is able to view all billing documents.

The security role contains the following in RESPAREA.

Actions for CO-OM Authorizatio *

Cost Element                   *

CO-OM Responsibility Area      PHSCGBR499999

The Authority Check is held in function module COTB_AUTHORITY_CHECK_GENERAL

User Trace Below...

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB450013;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB350005;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB250000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB150000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBGB;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB350005;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB250000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB150000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBGB;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB250000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB150000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBGB;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGB150000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBGB;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBGB;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBR403216;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBR350001;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBR203200;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBR150000;KSTAR= ;

K_PCA      RC=4  CO_ACTION=0000;RESPAREA=PHSCGBZGBRESP;KSTAR= ;

4 REPLIES 4

Former Member
0 Kudos

Hi Kevin, can you debug & set a breakpoint at the auth check and see what is happening after the check has failed? It sounds like the subsequent logic after the check isn't doing what it should do.

Cheers

0 Kudos

Hi Alex

The code passes the value RC=4 in the BreakPoint Below. After this it will loop again and then display the Billing Document.

There appears to be nothing in the code to "Stop the execution Endif  and then display a message to the user " no authorisation".

*...set return code....................................................*

 

RC = SY-SUBRC.

I will open a message to SAP and let you know the outcome.

Cheers for reply

0 Kudos

Sounds like a nifty bit of coding.  Good luck!

Cheers

Former Member
0 Kudos

Hi Kevin,

A few things I want to know.

1. If you want users to view Billing Documents for a specific profit centre/res then you can use the Organization Level parameters. Let me know if I got your requirement correctly or not.

2. Are you trying to achieve this via single role or child role?

Thank you,

Nagarajan Viswanathan