Authorization Check:Hide Price in the sales order or outbound delivery
July 3rd, 2010 by jackingyuSometimes ,we need to control the price display in the subscreen of sales order va02,we need to do some enhancement,there is a sap note about this,below is the detail about abaop,we need to write our code into the
user exit to finish this.
LV69AFZZ userexit_field_modific_leer
Up to now you cannot exclude certain condition types and subtotal lines from being
KG3K_ZJp.~m5M2D4J3^0processed or displayed in the condition screen by restricting the authorizations.ITPUB个人空间 g/rc�O5BZ8@
ITPUB个人空间*U$^�ng%Z0Y C
ITPUB个人空间t.bCeG7J
Additional key words
@ ~q5]v+S+O0VH609ITPUB个人空间 c5gR apGB#n
ITPUB个人空间:k$~&gQ9r5u]
1v_~+s%h4FBCk,H’n0Cause and preconditionsITPUB个人空间,i;Lf2Pr
This was not programmed.ITPUB个人空间 H2U5x”TZX8oc9QKLE
ITPUB个人空间;V`([)L twm'F
{!WU3k6z+G'}b0Solution
6TT C-Ki0A solution is only possible by means of a modification. Concerning themaintenanceITPUB个人空间4S4Ii+V7F)a m
responsibility, refer to Note 170183 and 381348. The following text describes aITPUB个人空间4yHq2S1B
solution option based on a modification. Inquiries and problem messages concerningITPUB个人空间 \R+sx(lU s0?([@
this subject are not covered by support but only by Remote Consulting subject to
LVv+d"S`o$v%}h0costs.ITPUB个人空间&mlxB@r m)}
f/|'c0hJOT0
+T\ts ?+]UW0By creating two additional authorization fields and a new authorization object andITPUB个人空间,a]_ G,GJ/SHy(O6u,W
by using user exits
X2Oji?c(t6V~0ITPUB个人空间BR;X!h]q%C2g:a:J
USEREXIT_FIELD_MODIFICATION,ITPUB个人空间[:J)UL r�I
USEREXIT_FIELD_MODIFIC_LEER,ITPUB个人空间 rH'j?sHQeB
USEREXIT_FIELD_MODIFIC_KZWI, andITPUB个人空间 S4?lk)[m:Ns@
USEREXIT_FIELD_MODIFIC_KOPF
d/M,O+?Xk(Ju0ITPUB个人空间IX.U2xW]v
to display and manually change conditions and user exitITPUB个人空间BK%I~}{_#Rs
)c4~1V%HE4^0USEREXIT_PRICING_CHECKITPUB个人空间Df)iW\/l9^
:m&v8EL4@;V%l3q0to create new conditions, a solution is available which only allows creation, manualITPUB个人空间0^x9u0e J”pip
change and display of those condition lines of a pricing procedure for which the
bSS7Xcn2P0user has an authorization.For conditions and subtotal lines for which the user has
4N8p)A{x7YIG0no authorization, only the condition key and the description are dsplayed, all otherITPUB个人空间2m�};i ^:B1] K
fields are hidden.
V7@ M0YO/t6c’H0ITPUB个人空间�F vT?M!V
:?7h/G+nT:pn}0Restrictions
(O5fT4i$s01. This consulting note contains an example of how the SAP authorization concept can
W:TCr^t(f!MV0be used in pricing and which important points you have to take into
_7Pa F%]0account.Everything that differs from this example belongs to the consulting area.
w)VZ9s0dLc+kiQ02. You then have to assign access authorizations for every user for all pricingITPUB个人空间q){�c8xP/q ehl
procedures used and the level numbers used in these pricing procedures.If you do notITPUB个人空间Fe8T!Yg~2f f
do this, the system no longer displays the condition lines or no longer displays
(hH5Dvb9\9f0them in the same scope as you need them for your work.ITPUB个人空间2k%~5nt$pO)O
3. In the change mode (for example VA02), the deletion of conditions or the starting
o B\/V*^[n0of a new pricing within this solution cannot be prevented (the user exits required
7v d _%o1b,h8V6E7P0for this are missing).ITPUB个人空间 m[ }Y�]&umQ
4. If the creation of a condition is not allowed due to a missing authorization, the
^V4r7[ v0system displays an error message which prevents further processing.This line canITPUB个人空间0A c'N%j+v9u|H
only be eliminated by deletion.
fN(?&G/gg)|(z#O%xb_05. On the empty condition lines, only the field for the condition key is ready forITPUB个人空间#K"DVJ2F*ZY8`
input.The condition rate can be entered only after you pressed ENTER and after aITPUB个人空间$j#fN+ao1E3t:fS8d
successful authorization check.
!Bw V"Q)G p%S4v0ITPUB个人空间!GpCvi Amjl*SfU$je
Procedure in detailITPUB个人空间Y%j7I2\U O
1. Maintenance of authorization fields
s/e,o XK f0a) If table ZAUTHCUST does not yet exist in your system, start transaction SE11 asITPUB个人空间1Z _}s6{?@6B
of Release 4.6A to create it.ITPUB个人空间*t�WZ5wiW
In releases up to and including 4.5B, you can callITPUB个人空间4?.c M I%{|j
Transaction SU20 as a direct access (then you must choose 'Customer' on the initialITPUB个人空间nip$Yl'o^
screen), and the system generates the table becomes automatically if it does not yetITPUB个人空间`6|m'X j:G�v3_+R(bqg
exist.ITPUB个人空间;zR6@wr[~1}2y?)[
ITPUB个人空间9W:T!W M5`y!^6J w)?/v
Then proceed as follows:
j1R5X\C.{RL0
S8X6\6Naw$Em(Choose 'Create'ITPUB个人空间!UgcGt;X.rvN^K
Enter the following values:
2gp)h;aS0Short text: 'Authorization fields'
@3p?&V5dK0Delivery class 'C' (Customizing table, maintenance only by customer, no SAP import)ITPUB个人空间5oRi*H9mtV*k]\F
Development class:Use a user-defined development class (in the following referred toITPUB个人空间%G ro8[B-` N}
as ZAUT).
3}H!Mm"}5R0ITPUB个人空间*Y(f!l.r|S z
Enter the following variables:
hAL9t!z0ZKALSM with data element KALSM (or KALSM_D as of Release 4.0A)ITPUB个人空间.HLW;V~2w*p.r$I,F
ZSTUNR with data element STUNR
RmUG[ C}0Select ZKALSM as a key field.
'fP[Y9G7N)i*I0ITPUB个人空间 q-Z;Q'fM+W
Make the following entries under 'Technical settings':ITPUB个人空间z cN$U6a6XBs IZ
Data class USER (customer data class)ITPUB个人空间|(IPK%m~!{
Size category '0' (expected data records: 0 to 68,000)
8v _ ws})D'Z_ }p0 Finally check, save and activate table ZAUTHCUST.ITPUB个人空间+bD(K7a eI
ITPUB个人空间8@'s�e q)k'o
ITPUB个人空间fG;EN9Q5I$|r
a) If table ZAUTHCUST has been created in the system via Transaction SE11 inITPUB个人空间L"Wk�v#F-he$fL0K o N'h
releases as of 4.6A, you must create the two new authorization fields ZKALSM and
*CgML!I0ZSTUNR in Transaction SU20. To do this, use data elements KALSM (or KALSM_D) and
p&}Z'}I6G9U�w5{N0STUNR as for table ZAUTHCUST. Enter table name ZAUTHCUST.
@x[:z&x*e+z ]‘L8](JS0 In releases up to and including 4.5B, you directly reach
b/M] H�g\’fq0the ‘Add authorization field’ input mask in Transaction SU20 in this case, you onlyITPUB个人空间vfDiG5D[
have to enter the corresponding field names and data elements here.
-N�T-a#o|giITPUB个人空间)x#tdD^6Xa2N
1. Create authorization object Z_KONH_KLS (Transaction SU21):ITPUB个人空间NqD}0O)LhY
a) Choose 'SD' (Sales & Distribution)ITPUB个人空间�c7L,s@Pn6@"Z�Cc+~
b) Choose 'Create'
i} i*[gCJg0c) Enter the following values:ITPUB个人空间8wW/@h.lpix H
Object: Z_KONH_KLS
O t"XM pX%d ? f)R-~0Text: 'Condition: Authorization pricing procedure and level no.'ITPUB个人空间`)}RTG.A yW%}
Class: SD (Sales and distribution)ITPUB个人空间}9IM upL
Include the following authorization fields in the authorization object:
;}(L$q:p;\�s4}0ZKALSM
3K2M&r.kYS+f0ZSTUNR
-b'K0];_.?-\q”ko0ACTVT.
5Ial%?3T$K6Nc02. In Transaction SE91, create message 609 in message class VH with the followingITPUB个人空间*q_n6K3BjEXp
text: “No authorization to create the condition”.
@~r A/S3s6^\O0xa03. In Transaction SE38, create the new Includes ZZAUTH01 and ZZAUTH02 in the
idRj)Q;Ag;Z!j0customer name range as described below.Select the following attributes:ITPUB个人空间$b|,Ia1l,`
Type = ‘I’ (Include program)ITPUB个人空间kI|?\w
Status = ‘K’ (Customer production program)ITPUB个人空间CR lD kE
Application = ‘V’ (Sales)ITPUB个人空间#D};ol8X/A
Development class = ‘VF’ (Application development R/3 billing).ITPUB个人空间&?OH+qCKC
Choose the following titles
A/dq VT�m @ |!l6|0ITPUB个人空间’HZq.Yc[])q#x
for ZZAUTH01: ‘Authorization check for the condition screen’,
1J�uAK S y0for ZZAUTH02: ‘Authorization check for the creation of conditions’
jg.oV:P6_-k(R:dN01. Change user exits
.T#Zk9D$T%q0USEREXIT_FIELD_MODIFICATION,
%C~/Z”p$r@^/S1JW0USEREXIT_PRICING_CHECKITPUB个人空间j}1c”u5p
USEREXIT_FIELD_MODIFIC_LEER,
)z’DmVaR0USEREXIT_FIELD_MODIFIC_KZWIITPUB个人空间 J(\pAU)g&S|e
USEREXIT_FIELD_MODIFIC_KOPFITPUB个人空间c)^$X5Y9^t1_C
as described below (Transaction SE38); check, save and generate.
(y”HKais m7|0
k.sKIV,V01. Create (according to the previous standard) at least one authorization whichITPUB个人空间v*oSx(Y!ZE
allows the access to all pricing procedures and condition lines (Transaction SU03):ITPUB个人空间0d”^Y*@5pZn(R
Double-click ‘Sales & Distribution’:Among other things, the system displays theITPUB个人空间}5l3mr$h~cV+bi
authorization object ‘Condition:Authorization pricing procedure and level number’
p1Ywd+kF!}d”j0which was created in the above steps.
dcki�Wa0Double-click this authorization object:the system displays a list of the
N$MG%U@0authorizations that have already been created for this authorization object.
z({b5b*vp0‘Create’ button:authorization COND_ALL, text ‘Authorization for all conditions’ITPUB个人空间+X]!pz1VO\gL
One after the other, position the cursor on ‘Action’, ‘Procedure’ and ‘Level number’ITPUB个人空间p:r.e2RUs-\m6_
and, by choosing ‘Maintain values’, enter the value ‘*’ (that is, authorization for
9i7tudI wcN0all actions, pricing procedures and level numbers).
*lg)G,bpka7M0Finally choose ‘Activate’.ITPUB个人空间Le#iZ6I,x G�[7G\h
2. Use Transaction SU02 to create at least one single profile:
pDt[8|8r0Choose 'Generate work area':the system displays a list of all existing profiles
ua i)sG0Choose 'Create' and enter in the dialog box:ITPUB个人空间)sN]2[rm;_
Profile: ZCOND_ALLITPUB个人空间]%im.u P5m\z
Text: ‘Authorization for all conditions’ITPUB个人空间/?”bTTzF ~Ti.T
Profile type: ‘Single profiles’ITPUB个人空间w1o6?S.xL|
Select authorization object Z_KONH_KLS created in the above steps (Condition:
R8]”Pd&M)Lhbe,C&DO0Authorization pricing procedure and level no.).by double-click.ITPUB个人空间]D7Snu
Behind this, enter the previously created authorization COND_ALL.ITPUB个人空间^&KW-kUzmAh
Save and activate.ITPUB个人空间Py%A?.y1m3@PMz
3. Assign profile ZCOND_ALL to those users who should have the unrestrictedITPUB个人空间2}i,q!w’{QH_+f
authorization for the work in the condition screen.This ensures that these users can
%}Mq|b$P_8S{0continue working as before despite the implementation of an authorization checkITPUB个人空间KmF7G%afy9bd
(however, the changed authorizations do not become effective until the next logon of
t \Zw�z�zM0the user).
‘~’p8F$P?0
)z!s+NPa0Application example
Za;m RY4?I0User 0815 should only be allowed to work with standard pricing procedure RVAA01.TheITPUB个人空间a}O4s)|_%Y
user should only be allowed to see and edit all price and discount conditions, but
`%n.R2P”|M0not the costs and profit margin information.ITPUB个人空间0Ef1p0mRGX
ITPUB个人空间3xY)PfoC
In pricing procedure RVAA01,
:U0]8zX;ds0ITPUB个人空间NLR;}DB?
the actual costs are on level number 8 (na),
‘SA”D)m%S?O0prices with surcharges and discounts are on level number 11 (PR00) to 908 (net valueITPUB个人空间 T[RU5A"S2y�R
3) (a),ITPUB个人空间(^)Y [2f'_^h
prices for intercompany billing are on level number 909 and 910 (na),
h'u&Th:w0cash discount, tax and other various information are on level number 914 to 935 (a),ITPUB个人空间hD ?.u,]r/A9|]?i
costs and profit margin are on level number 940 to 950 (na),
vc.T T”f,C[#u*M%q0expected customer prices (EDI1 and EDI2) are entered on level number 970 and 971 (a).ITPUB个人空间"w:IR�nc]0^f$Z
l1g,VMV0(a) means ‘User is authorized’ and (na) means ‘User is not authorized’ to displayITPUB个人空间FzS%Q+_Ov2z1E*Q p
and change the respective information.ITPUB个人空间1`D&g9Ur7tW&B fZW-w@6B
DCc,KR-zIw.P01. Use Transaction SU03 to create an authorization with the following values: Double-ITPUB个人空间POH”mVb{ R
click ‘Sales & Distribution’.Select authorization object ‘Condition:AuthorizationITPUB个人空间�VPQ;^y)Cw
pricing procedure and level no.’ by double-click.Create the new authorizationITPUB个人空间fGq-_Bs
COND_STD with the text ‘Standard authorization for conditions’. Maintain theITPUB个人空间0xA!Bi]*z|JWJt
following values:ITPUB个人空间k&~k`iQK`X0Yp
a) Action = ‘*’ITPUB个人空间ao-I6Jh&r.u{Hw ]
b) Procedure = ‘RVAA01′
&z{*z J7×0c) Level numbers:
%o*DQ5xK0‘011′ to ‘908′
y&E C3L!}(b6`0‘914′ to ‘935′
!Og w9f0].Dw(`0‘970′ to ‘971′.ITPUB个人空间rF)k8^+q
You must enter three-digit level numbers because three-digit
8D6S*@3E7L#uV0strings are transferred during the parameter transfer to the authorization object
IC_z1pUI3r&o0(if you do not enter a three-digit level number, the authorization check alwaysITPUB个人空间7esN&m;uI.X
fails).ITPUB个人空间/ago(n!k1L4r/WL
ITPUB个人空间y-]w:qyTrW)Q
a) Save and activate this new authorization.ITPUB个人空间eH%I3E;J Z:e
1. Use Transaction SU02 to create at least one single profile:ITPUB个人空间}!y,?n*ur2uK
a) ‘Generate work area’ITPUB个人空间Gc�nj ? [
b) Create profile: ZCOND_STD; Text:’Standard authorization for conditions’; Single
)M5rd’^|d0profileITPUB个人空间x”T0hbHIj’gc
c) As described above, select authorization object Z_KONH_KLS and assignITPUB个人空间1F’t1j6YMlQ4zYt
authorization COND_STD to it; save and activate.ITPUB个人空间”[!\+bJ S$Xk
2. In Transaction SU01, assign the single profile ZCOND_STD to your user 0815 andITPUB个人空间7Daj”A5|m”N q!`}M
save;the new authorization becomes effective with the next logon of user 0815.
Posted in abap | No Comments »