Application Development and Automation 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: 
Read only

authorization checking in ABAP program

former_member220801
Participant
0 Likes
495

I have a customed report which shows sales order information, with sales order no., sales. org, distribution channel, division and some others as selection criteria.

How I can limit a user that can view only 1 or 2 specific sales. org. (according to his/her authorization profile) even though he/she hasn't input anything in the sales org. field during selection?

Thanks!

3 REPLIES 3
Read only

Former Member
0 Likes
450

check these,

M_MATE_VKO Material Master: Sales Organization/Distribution Channe

V_KNA1_BRG Customer: Account Authorization for Sales Areas

V_KNA1_VKO Customer: Authorization for Sales Organizations

V_KONH_VKO Condition: Authorization for Sales Organizations

V_VBAK_AAT Sales Document: Authorization for Sales Document Types

V_VBAK_VKO Sales Document: Authorization for Sales Areas

or else

use tcode SU22/Su21.

Regards

Prabhu

Read only

uwe_schieferstein
Active Contributor
0 Likes
450

Hello Gundam

You have to select all sales organisations with the select-option (if it is empty you will get all of them). Then you have to loop over the sales orgs and make the AUTHORITY-CHECK for each sales org.

If an authority-check fails your report could react in two different ways:

(1) Stop executing the report and tell the user to enter a sales org for which he/she is authorized

(2) Remove all sales orgs for which the user is not authorized and run the report with the authorized orgs.

Regards

Uwe

Read only

Former Member
0 Likes
450

Hi Gundam

If the user doesnt input any sales organization then

you can get the list of sales organizations defined from

table TVKO and then check for the authorization using each entry. Prepare a range for all sales organizations

whereby later you can use in extraction process.

Other better way is to make the parameter/select-option

mandatory so the user has to enter the sales organization.

Hope the above info helps you.

Kind Regards

Eswar