SAP SD价格隐藏.docx

上传人:b****6 文档编号:8015374 上传时间:2023-01-28 格式:DOCX 页数:42 大小:26.82KB
下载 相关 举报
SAP SD价格隐藏.docx_第1页
第1页 / 共42页
SAP SD价格隐藏.docx_第2页
第2页 / 共42页
SAP SD价格隐藏.docx_第3页
第3页 / 共42页
SAP SD价格隐藏.docx_第4页
第4页 / 共42页
SAP SD价格隐藏.docx_第5页
第5页 / 共42页
点击查看更多>>
下载资源
资源描述

SAP SD价格隐藏.docx

《SAP SD价格隐藏.docx》由会员分享,可在线阅读,更多相关《SAP SD价格隐藏.docx(42页珍藏版)》请在冰豆网上搜索。

SAP SD价格隐藏.docx

SAPSD价格隐藏

Tableofcontents

1

Description

根据用户的权限隐藏价格信息。

2Functionality

3TechnicalSpecification

3.1ProgramProcess

FlowChat

3.2Input-OutputParameters

N/A

ParameterName

I/O

Type

Length

3.3InputData

N/A

Filename

Description

Fieldname

Description

Type

Length

3.4OutputData

N/A

Filename

Description

Fieldname

Description

Type

Length

3.5ScreenSelection

Field

Description

I/O

3.6Reports

3.7Objectscreatedfortheprogram

Name

Objecttype

Description

3.8UnitTests

Testcase

Description

Executionnumber

Executiondate

Result

1

2

3.9TransactionsandAuthorizations

Transaction

Description

Authorization

Object

Description

Parameters

N/A

Solution

Youcancreatetwoadditionalauthorizationfields,anewauthorization

objectandusetheuserexits.

oUSEREXIT_FIELD_MODIFICATION,

oUSEREXIT_FIELD_MODIFIC_LEER,

oUSEREXIT_FIELD_MODIFIC_KZWI,and

oUSEREXIT_FIELD_MODIFIC_KOPF

todisplayandmanuallychangeconditionsandtheuserexit

oUSEREXIT_PRICING_CHECK

tocreatenewconditionsasolutionisavailablewhichonlyallows

creation,manualchanginganddisplayofthoseconditionlinesofa

pricingprocedureforwhichtheuserhasanauthorization.For

conditionsandsubtotallinesforwhichtheuserhasnoauthorization

onlytheconditionkeyandthedescriptionareshown,allotherfields

arehidden.

Restrictions

1.Inthisconsultingnote,wedemonstrateinanexamplehowtheSAP

authorizationconceptcanbeusedinpricingandwhichimportant

pointsyouhavetotakeintoaccounthere.Here,especially,

everythingthatdiffersfromthisexamplebelongsintotheareaof

consulting.

2.Youthenhavetoassingaccessauthorizationsforeveryuserforall

pricingproceduresusedandthelevelnumbersusedinthese.Ifyou

donotdothis,thesystemdoesnolongerdisplaytheconditionlines

ornolongerdisplaytheminthesamescopeasyouneedthemforyour

work.Thiscanconsiderablyhinderyourwork.

3.Inthechangemode(forexampleVA02),thedeletionofconditionsor

startingofanewpricingwithinthissolutioncannotbeprevented

(thenecessaryuserexitsaremissingforthis).

4.Ifthecreationofaconditionisnotallowedduetoamissing

authorization,thenthesystemdisplaysanerrormessagewhich

preventsfurtherprocessing.Thislinecanonlybeeliminatedagain

bydeletion.

5.Ontheemptyconditionlines,onlythefieldfortheconditionkeyis

readyforinput.Theconditionratecanbeenteredonlyafteryou

pressedthereturnkeyandasuccessfulauthorizationcheckhasbeen

entered.

Procedureindetail

1.Maintenanceoftheauthorizationfields(TransactionSU20):

UsetransactionSU20tocreatethetwonewauthorizationfields'ZKALSM'and'ZSTUNR'.Todothis,usethedataelements'KALSM'(or'KALSM_D')and'STUNR'.

2.CreateauthorizationobjectZ_KONH_KLS(TransactionSU21):

a)ChooseSD(salesanddistribution)

b)Choosethebutton'Create'

c)Enterthefollowingvalues:

oObject:

Z_KONH_KLS

oShortText:

Condition:

Authorizationcostingprocedureandlevel

number

oClass:

SD(Salesanddistribution)

oIncludethefollowingauthorizationfieldsintheauthorization

object:

-ZKALSM

-ZSTUNR

-ACTVT.

3.Inmessageclass'VH'createamessagewithnumber609withthe

followingtext(TransactionSE91):

"Noauthorizationtocreatethe

condition".

4.CreatetheIncludesZZAUTH01andZZAUTH02inthecustomernamerange

anew(TransactionSE38)asdescribedbelow.Selectthefollowing

attributes:

oType='I'(INCLUDEprogram)

oStatus='K'(Customerproductionprogram)

oApplication='V'(Sales)

oDevelopmentclass='VF'(ApplicationdevelopmentR/3billing).

Astitlechoose

oforZZAUTH01:

'Authorizationcheckfortheconditionscreen',

oforZZAUTH02:

'Authorizationcheckforthecreationofconditions'

5.Changetheuserexits

oUSEREXIT_FIELD_MODIFICATION(lv69afzz,MV45AFZZ),

oUSEREXIT_PRICING_CHECK(lv69afzz),

oUSEREXIT_FIELD_MODIFIC_LEER(lv69afzz),

oUSEREXIT_FIELD_MODIFIC_KZWI(lv69afzz),

oUSEREXIT_FIELD_MODIFIC_KOPF(lv69afzz)

asdescribedbelow(TransactionSE38);check,save,andgenerate.

6.Create(accordingtothepreviousstandard)atleastone

authorizationwhichallowstheaccesstoallpricingproceduresand

conditionlines(TransactionSU03):

oDouble-clickon'Salesanddistribution':

Amongotherthingsthe

systemdisplaystheauthorizationobject'Condition:

Authorization

pricingprocedureandlevelnumber',whichwascreatedinthe

abovesteps.

oDouble-clickonthisauthorizationobject:

thesystemdisplaysa

listoftheauthorizationswhichhavebeencreatedalreadyfor

thisauthorizationobject.

oButton'Create':

AuthorizationCOND_ALL,Text'Authorizationfor

allconditions'

oOneaftertheother,positionthecursoron'Action','Procedure'

and'Levelnumber'andbychoosing'Maintainvalues'enterthe

value'*'(thatisauthorizationforallactions,allpricing

proceduresandlevelnumbers).

oFinallychoose'Activate'.

7.Createatleastonesingleprofile(TransactionSU02):

oChoose'Createworkarea':

thesystemdisplaysalistofall

profilesavailable

oChoosethebutton'Create'andinthedialogboxenter:

-Profile:

ZCOND_ALL

-Text:

'Authorizationforallconditions'

-Profiletype:

'Singleprofiles'

-SelecttheauthorizationobjectZ_KONH_KLScreatedintheabove

steps(Condition:

Authorizationcostingprocedureandstep

number).

-Behindthisenterthepreviouslycreatedauthorization

COND_ALL.

-Saveandactivate.

8.AssigntheprofileZCOND_ALLtotheusers,whoshouldhavethe

unrestrictedauthorizationfortheworkintheconditionscreen.This

ensuresthatinspiteoftheimplementationofanauthorizationcheck

theseuserscancontinueworkingasbefore(however,thechanged

authorizationsonlybecomeeffectivewiththenextlog-inofthe

user).

*&---------------------------------------------------------------------*

*&ObjectREPSZZAUTH01

*&---------------------------------------------------------------------*

*&Thisobjecthasbeengeneratedfromanadvancecorrection*

*&attachedtoaR/3note.*

*&---------------------------------------------------------------------*

...

***INCLUDEZZAUTH01.

*BeimerstenAufrufistKOMVinitial;OLD_KOMKl#schen,

*damitaufjedenFallBerechtigungspr#fungdurchgef#hrtwird.

*Sicherheitshalberzun#chstBerechtigungverweigern.

*ifkomvisinitial.

IFSCREEN-NAME='FCODE'.

CLEAROLD_KOMK.

AUTH_SUBRC=4.

ENDIF.

*Berechtigungspr#fungaufKalkulationsschemaundStufen-Nr.

*BeimWechselderKOMV-ZeileeinmaligeineBerechtigungspr#fung

*durchf#hren

IFKOMK-KALSMNEOLD_KOMK-KALSMORKOMV-STUNRNEOLD_KOMV-STUNR.

AUTHORITY-CHECKOBJECT'Z_KONH_KLS'

ID'ZKALSM'FIELDKOMK-KALSM

ID'ZSTUNR'FIELDKOMV-STUNR

ID'ACTVT'DUMMY.

AUTH_SUBRC=SY-SUBRC.

OLD_KOMK=KOMK.

OLD_KOMV=KOMV.

ENDIF.

IFAUTH_SUBRCNE0AND(SCREEN-NAME='RV61A-SELKZ'

ORSCREEN-NAME='KOMV-KAWRT'

ORSCREEN-NAME='RV61A-AWEIN'

ORSCREEN-NAME='KOMV-KBETR'

ORSCREEN-NAME='RV61A-KOEIN'

ORSCREEN-NAME='KOMV-KPEIN'

ORSCREEN-NAME='KOMV-KMEIN'

ORSCREEN-NAME='KOMV-KWERT').

SCREEN-ACTIVE=0.

ENDIF.

MODIFYSCREEN.

●EndeBerechtigungspr#fung

...

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*&ObjectREPSZZAUTH02

*&---------------------------------------------------------------------*

*&Thisobjecthasbeengeneratedfromanadvancecorrection*

*&attachedtoaR/3note.*

*&---------------------------------------------------------------------*

...

***INCLUDEZZAUTH02.

AUTHORITY-CHECKOBJECT'Z_KONH_KLS'

ID'ZKALSM'FIELDKOMK-KALSM

ID'ZSTUNR'FIELDKOMV-STUNR

ID'ACTVT'DUMMY.

IFSY-SUBRCNE0.

MESSAGEE609(VH).

ENDIF.

*EndeBerechtigungspr#fung

...

*&---------------------------------------------------------------------*

***********************************************

MV45AFZZ

FORMUSEREXIT_FIELD_MODIFICATION.

*{INSERTXZ3K9035472

DATA:

OLD_KOMVLIKEXKOMV,

OLD_KOMKLIKEKOMK.

DATA:

AUTH_SUBRCLIKESY-SUBRC.

*}INSERT

*CASESCREEN-GROUP3.

*WHEN'900'.

*IFVBAK-VBTYPNE'A'.

*SCREEN-ACTIVE=0.

*ENDIF.

*ENDCASE.

*{INSERTXZ3K9035471

*ifkomvisinitial.

IFSY-MANDT='200'.

IFSCREEN-NAME='FCODE'.

CLEAROLD_KOMK.

AUTH_SUBRC=4.

ENDIF.

IFKOMK-KALSMNEOLD_KOMK-KALSMORXKOMV-STUNRNEOLD_KOMV-STUNR.

AUTHORITY-CHECKOBJECT'Z_KONH_KLS'

ID'ZKALSM'FIELDKOMK-KALSM

ID'ZSTUNR'FIELDXKOMV-STUNR

ID'ACTVT'DUMMY.

AUTH_SUBRC=SY-SUBRC.

OLD_KOMK=KOMK.

OLD_KOMV=XKOMV.

ENDIF.

IFAUTH_SUBRCNE0AND(screen-name='VBAP-NETPR'OR

screen-name='KOMV-KBETR').

SCREEN-ACTIVE=0.

MODIFYSCREEN.

ENDIF.

ENDIF.

*

*}INSERT

*CASESCREEN-NAME.

*WHEN'VBAK-VBELN'.

*SCREEN-ACTIVE=0.

*ENDCASE.

ENDFORM.

lv69afzz

*----------------------------------------------------------------------*

***INCLUDELV69AFZZ.

*----------------------------------------------------------------------*

*{INSERTXZ3K9035471

DATA:

OLD_KOMVLIKEKOMV,

OL

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 建筑土木

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1