January 2012
M T W T F S S
« Jul    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

链接表

Blogroll

Search

Authorization Check:Hide Price in the sales order or outbound delivery

July 3rd, 2010 by jackingyu

Sometimes ,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

userexit_field_modific_kzwi
userexit_field_modific_kopf
userexit_field_modification
below is the reference
SymptomITPUB个人空间$m8A8OIY�C@
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 ap GB#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/|'c0hJO T0
+T\ts ?+]UW0By creating two additional authorization fields and a new authorization object andITPUB个人空间,a]_ G,GJ/S Hy(O6u,W
by using user exits
X2O ji?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?sHQ eB
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个人空间D f)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 v T?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!M V0be 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/g g)|(z#O%x b_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+a o1E3t:fS8d
successful authorization check.
!Bw V"Q)G p%S4v0ITPUB个人空间!GpC vi 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个人空间!Ug cGt;X.r vN^K
Enter the following values:
2gp)h;aS0Short text: 'Authorization fields'
@3p?&V5d K0Delivery class 'C' (Customizing table, maintenance only by customer, no SAP import)ITPUB个人空间5oRi*H9m tV*k]\F
Development class:Use a user-defined development class (in the following referred toITPUB个人空间%G r o8[ 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个人空间.H LW;V~2w*p.r$I,F
ZSTUNR with data element STUNR
R mUG[ 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$U6a6X Bs 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#t dD^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*[gCJ g0c) 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(\p AU)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+k F!}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
u a 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�z M0the 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个人空间0E f1p0mRGX
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|J WJt
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
I C_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个人空间G c�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’t1j6YM lQ4zYt
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 »

SAP 汇率的小数位问题

June 21st, 2010 by jackingyu

SAP当然能定义小数位,可以为currencies and unit定义小数位.
1.定义currencies小数位.
T-code:OY04 , Path :Global settings->currencies->set decimal places for currencies
如果在此没有定义,比如RMB就没有,default decimal 是2,
OY04 enter后 发现有JPY没定义小数位,这样在记帐时如果JPY出现小数就会抱错.
比如手工做张凭证doc currency :JPY
Dr:12.5 Cr:12.5是不能save的.必须四`舍五入才到13才可.
但是比如有一PO是JPY下单. 10000个150 JPY.
MIGO收8521个,自动产生的会计凭证会自动取整.
但是如果已经有了数据,改动小数位就会出现大大的异外,具体如何自己测试下就知道

2.定义度量单位小数.
T-code:CUNI Path:Global settings->check unit of measurement.
比如EA想定义3位小数目.
这样就允许create BOM时采用EA做单位的 component material落实到小数点后三位.

 

3.汇率的改动. 我想是可细到四位的
OB08 , 默认的就是5位.
一般记帐exchange rate type 是M . 比如local currency本位币是USD
M : 8.70000 CNY = 1 USD
CNYdocument currency .
Cny 1000 local cur.(USD) 114.94
更改汇率:
M:8.72560 CNY = 1USD .
CNY document currency 记帐
CNY 1000 : local cur. (USD) 114.61

更该汇率是系统是可行的,我想这样在使用外币记帐时,如果currencies的小数定为两位,楼上的混淆了这两概念, 产生汇兑损益易的机会会少些. 

JPY的小数问题.
写一个关于税务的报表,就是从material doc, FI doc和PO抓些字段.
material doc.和FI doc的对应如下:
mat doc tables :Mkpf( header), MSeg(item)
FI doc tables :Bkpf( Header), BSeg( Item)
BKPF-AWKEY(Mat. doc no+公司+fiscal year或mat. no+fiscal year)
对应到MSEG-mblnr(mat. doc. no)
MSEG-ZEILE(itemno)*2-1对应到FI doc item的bseg-buzei(item no)

需要从BSEG带出bseg-waers document curerncy.
bseg-wrbtr (doc currency amount)
bseg-dmbtr (local currency amount)

比如JPY为doc currency.
Dr:12345
Cr:12345
可bseg-wrbtr为123.45, 这样出来的报表就发生错误.

Why?我想SAP默认的所有的currencies的小数都是2位, 这样在record一document时,
不管三七二一,一定将你输入的数字弄两个小数点.

1.USD 2位或OY04没任何动作
Dr: 12345
Cr: 12345
在SAP中bseg-wrbtr为12345.00
Dr: 123.45
Cr:123.45
在SAP中bseg-wrbtr为123.45

显示出来不做任何动作

2. JPY ,OY04定义小数0表示无小数
Dr : 12345 JPY
Cr : 12345 JPY
在SAP中bseg-wrbtr为123.45
Dr : 123.45 JPY
Cr : 123.45 JPY
你不可能做出这样的document

显示出来的数据*100

3.比如TND OY04定义小数为3.
Dr 123456
cr 123456
在SAP中bseg-wrbtr为1234560.00
Dr:123.456
Cr:123.456
在SAP中bseg-wrbtr为1234.56

显示出来的数据/10 .

 
就是所SAP保存数据和显示数据是不同的,保存在数据库中总保留两位小数,所以在做report时间要小心,
显示数据时根据TCURX(就是OY04)里面定义的小数位进行一定计算,
至于关系你看上面6个例子就明白了!

Posted in 未分类 | No Comments »

LSMW:Customer Master Data

June 18th, 2010 by jackingyu

1 Post Code 需要进行检查与国家一致,比如中国为6位,则Post Code必须为6位,否则会有问题,不建议为空,excel里面设置格式邮政编码有助于解决此问题

2国际贸易条件输了条件比如FOB,就必须输入描述

3产生上述问题的主要原因应该在于BDC程序的控制

Posted in 未分类 | No Comments »

Round off in sd price

June 8th, 2010 by jackingyu

We often encounter such requirments,round up or round down.To achieve this,we can apply the cal type

routine 17 or routine 16 in the price procedure.But this is not enough,to make the cal type work,we should matain the table T001R through tcode OB90.The rule of the routine 16 and 17 obeyed follows the rule of  abap floating calculation.

Instruction about Abao float and fixed point arithmetic.

If you mark this checkbox, all calculations in the program will use fixed point arithmetic.

If you do not, packed numbers (ABAP/4 type P, Dictionary types CURR, DEC or QUAN) will be treated as integers when they are used in assignments, comparisons, and calculations, irrespective of the number of decimal places defined. Intermediate results in arithmetic calculations will also be rounded to the next whole number. The number of decimal places defined is only taken into account when you output the answer using the WRITE

Posted in sap, sd | No Comments »

block materail for sale

May 25th, 2010 by jackingyu

To achieve this target,we have serveral methods.

1 Apply sales status.Path:

IMG->Logistics-General->Material Master->Setting for Key Fields->Data Relevant to Sales and Distribution

->Define Sales Status.Here you can set if block the material for sale

In the materail master data,you can choose the value through sales:sales org.1->

X-distr.chain stauts or DChain-spec.status

2 MM06———–Delete Flag for Materials

3Through Materail Group,we also can achieve this.

Posted in sap, sd | No Comments »

« Previous Entries