SCM650_EN_Col81_FV_Part_A4 (第3页)

第 101 页 / 共 177 页

SCM650 Lesson: Output Processing

Lesson: Output Processing

Lesson Overview

This lesson describes the basic principles of processing printed output with

SAPscript.

Lesson Objectives

After completingthislesson, youwillbeable to:

• ExplainhowoutputtypesareprocessedintheSAPsystem

• Assessthedegreeofdifficultyinvolvedinadjustingtheexistinglayoutfor

output types to meet your requirements

• Namethestepsneededforintegratingcustomer-specificoutputtypes

Business Example

Changingoutput typestomeetcustomer-specificrequirementsisanimportant

part of many implementation projects.

Theseadjustmentsincludeprovidingadditionalfields,logosandbarcodesaswell

as displaying additional header and itemtexts.

Youmightalsoneedtoaddnew,customer-specificoutputtypes.

Figure 41: Procuring and Preparing Data

Thestructureanddatainthedocumentsthatareprocessedonlinearestoredin

the database.

Totransmitoutput,thesystemprocuresthedatafromthedatabaseandpreparesit

for the required transmission medium.

93

2008/Q1 © 2008 SAP AG. All rights reserved.

第 102 页 / 共 177 页

Unit4: Output SCM650

Figure 42: Printing Data

The system procures and prepares data in two separate steps when printing

documents.

TheprintingcontrolsaredefinedintheSAPscriptform,independentoftheprint

output program.

Theoutputisthentransmittedtoaprinterorotheroutputdevice.

Figure 43: Example: Output BA00 (OrderConfirmation)

94

©2008SAPAG.Allrightsreserved. 2008/Q1

第 103 页 / 共 177 页

SCM650 Lesson: Output Processing

Severalcommunicationstructuresareavailableforprintingdocuments:

• VBDKA(documentheaderviewforinquiry,quotationandorder)

• VBDPA(documentitemviewforinquiry,quotationandorder)

• VBDKL(document headerviewfordeliverynote)

• VBDPL(document itemviewfor deliverynote)

• VBDKR(documentheaderviewforbillingdocument)

• VBDPR(documentitemviewforbillingdocument)

Figure 44: New Fields forPrinting Documents: Case 1

Simple changes that do not need preparation logic or new fields in the

communicationstructurecanbeprocesseddirectlyintheformwithSAPscript.

Aformmodificationis“pure”ifthefollowingprerequisitesaremet:

• Thefieldexistsin the communicationstructure

• The field is NOT contained in the form

• Thefieldcanbeintegratedintotheforminanexistingformat

95

2008/Q1 © 2008 SAP AG. All rights reserved.

第 104 页 / 共 177 页

Unit4: Output SCM650

Figure 45: New Fields forPrinting Documents: Case 2

New fields for printing documents are copied into the following INCLUDES

(structuresintegratedintothecommunicationstructures).

• HeaderdatafororderdocumentsinVBDKAZ(containedinVBDKA)

• ItemdatafororderdocumentsinVBDPAZ(containedinVBDPA)

• HeaderdatafordeliverydocumentsinVBDKLZ(containedinVBDKL)

• ItemdatafordeliverydocumentsinVBDPLZ(containedinVBDPL)

• HeaderdataforbillingdocumentsinVBDKRZ(containedinVBDKR)

• ItemdataforbillingdocumentsinVBDPRZ(containedinVBDPR)

NowthenewfieldcanbeprocessedintheformasinCase1.

Occasionally,thesystemmayneedtoaccesstheprocessingprogram(forexample,

if additional data needs to be read).

96

©2008SAPAG.Allrightsreserved. 2008/Q1

第 105 页 / 共 177 页

SCM650 Lesson: Output Processing

Figure 46: Integrating a New Output Type

Newoutputtypesarenormallybasedonexistingdocumenttypes

Thismeansthatifyouneedtocreateanydocumentdata,youcancopymostofit

from an existing communication structure.

Therealworkstartswhenwritingtheprocessingprogramanditsformdefinition.

This is where you need an ABAP/4 programmer and someone familiar with

SAPscript.

Figure 47: Example: Customer's Material Label ZMAT

97

2008/Q1 © 2008 SAP AG. All rights reserved.

第 106 页 / 共 177 页

Unit4: Output SCM650

Aprocessingprogramhastobewrittenforprocuringthetransmissiondataand

controlling the form output. This program should be given a name from the

customer’sname range (forexample ZZLO650) andbebased on thespecified

communicationstructuresVBDKL(documentheaderviewfordeliverynote)and

VBDPL (documentitemview for deliverynote).

The processing program, together with the relevant SAPscript form in which

therequiredlayoutwasprogrammed(name,forexampleZZ_MAT_LABEL),is

assigned to output typeZMAT in Customizing.

You must add output type ZMAT to the output determination procedure for

deliveriessothatthesystemincludesitduringoutputdetermination.

98

©2008SAPAG.Allrightsreserved. 2008/Q1

第 107 页 / 共 177 页

SCM650 Lesson: Output Processing

Exercise 9: Layout Modification for Output

Types

Exercise Objectives

After completingthisexercise, youwillbeableto:

• UnderstandhowoutputtypesareprocessedintheSAPsystem

Business Example

Duringtheimplementationproject,youmadesomesmallchangesrequestedby

the Customer Service department to the layout of the forms for quotation and

order confirmation:

Thetermsofdelivery(Incoterms)togetherwiththedescriptionshouldbeprinted

in the sales documents.

Furthermore,whencreatingquotations,thequotationheadertextshouldonlybe

printedintheconfirmationdocument. Whenasalesorderiscreatedwithreference

tothisquotation,thisquotationtextshouldnotappearintheorderconfirmation.

Itisyour job tocheckwhetherthesechangeswork.

Task 1:

1. Search for the quotation with the purchase order number ##-2-4.1 and

displaytheprintformattingforthequotationonthescreen.

2. Was the quotation header text output?

__________________________________________________

3. Wasthedescription of the Incoterms output?

__________________________________________________

Task 2:

1. Usethedocumentflowtofindtheorderthatwascreatedwithreferenceto

thisquotationanddisplaytheprintformattingfortheorderonthescreen.

2. Wasthequotationheadertextoutputintheorderconfirmation?

__________________________________________________

99

2008/Q1 © 2008 SAP AG. All rights reserved.

第 108 页 / 共 177 页

Unit4: Output SCM650

Solution 9: Layout Modification for Output

Types

Task 1:

1. Search for the quotation with the purchase order number ##-2-4.1 and

displaytheprintformattingforthequotationonthescreen.

a) Menu path:

Logistics→SalesandDistribution→Sales→Quotation→Display

Choosesearchhelp“A:SalesDocumentsbyCustomerPurchaseOrder

Number”.

Enter##-2-4.1inthepurchaseordernumberfield.

Choosetheright document from thehit list.

Choose: Sales Document → Output

Choose Print preview.

2. Was the quotation header text output?

__________________________________________________

a) Yes, thequotation header text wasoutput.

3. Was the description of theIncoterms output?

__________________________________________________

a) Yes, thedescriptionoftheIncotermswasoutput.

Task 2:

1. Usethedocumentflowtofindtheorderthatwascreatedwithreferenceto

thisquotationanddisplaytheprintformattingfortheorderonthescreen.

a) Menu path:

Logistics→SalesandDistribution→Sales→Quotation→Display

Choose Display document flow.

Select the order number.

Choose Display document.

Choose Print preview.

Continued on next page

100

©2008SAPAG.Allrightsreserved. 2008/Q1

第 109 页 / 共 177 页

SCM650 Lesson: Output Processing

2. Wasthequotationheadertextoutputintheorderconfirmation?

__________________________________________________

a) No,thequotationheadertextwasnolongeroutput.

101

2008/Q1 © 2008 SAP AG. All rights reserved.

第 110 页 / 共 177 页

Unit4: Output SCM650

102

©2008SAPAG.Allrightsreserved. 2008/Q1

第 111 页 / 共 177 页

SCM650 Lesson: Output Processing

Exercise 10: Processing your Own Output

Types

Exercise Objectives

After completingthisexercise, youwillbeableto:

• Namethestepsneededforintegratingcustomer-specificoutputtypes

Business Example

Tooptimizesalesanddistributionprocessinginyourcompany,youhavecreateda

specialmateriallabel(outputtypeZMAT)intheSAPsystem. Theuseofthisnew

itemtexttype“Additionallabeltext”,outputwiththemateriallabel,shouldmake

iteasierforthecustomer(retailer)toidentifythedeliveredgoodsandassignthem

to the correct end customers.

Task 1:

Your colleagues in the programming department have informed you that

programming has been completed for the output type ZMAT and is ready for

testing.

1. Check whether output type ZMAT has been correctly configured in

Customizing.

2. Which procedure contains ZMAT (ZMAT should be an item output for

deliveries)?

3. Whichaccesssequenceisassignedtotheoutputtype?

4. Whichprocessingprogramandformhasbeenassigned?

Task 2:

ChangethesettingssothatyoucanalsouseoutputtypeZMATforyourshipping

point Z0# without any problems.

1. MaintaintheprintparametersforyourshippingpointZ0##.

Shipping point: Z0##

Output device: LP01

Suffix1: ZMAT

Suffix2: MAT-LABEL

2. CreateoutputconditionrecordsforyourcustomersT-S50A##andTS50B##

for output type ZMAT:

Continued on next page

103

2008/Q1 © 2008 SAP AG. All rights reserved.

第 112 页 / 共 177 页

Unit4: Output SCM650

SORG: 1000

Transmissionmedium: Printer

Time: Explicit request

Task 3:

1. Search for the order with purchaseorder number ##-2-4.3 and create an

outbound delivery for it.

2. Intheoutputscreenfortheitem,checkthatthesystemfindsandsetsoutput

typeZMAT.Usethedeterminationanalysistoclarifyanyproblems.

3. Ifoutputdeterminationiscorrect, savethedelivery.

4. Print the label.

5. Look at the output generated in the spool.

104

©2008SAPAG.Allrightsreserved. 2008/Q1

第 113 页 / 共 177 页

SCM650 Lesson: Output Processing

Solution 10: Processing your Own Output

Types

Task 1:

Your colleagues in the programming department have informed you that

programming has been completed for the output type ZMAT and is ready for

testing.

1. Check whether output type ZMAT has been correctly configured in

Customizing.

a) Menu path (general):

DisplaySAP ReferenceIMG→LogisticsExecution→Shipping→

BasicShippingFunctions→OutputControl→OutputDetermination

→MaintainOutputDeterminationforOutboundDeliveries

2. Which procedure contains ZMAT (ZMAT should be an item output for

deliveries)?

a) OutputtypeZMATwasincludedinprocedureV20001.

Menu path (continued):

→ Maintain Output Determination

SelecttheentryV20001andchoosetheControlnodeintheoverview

tree.

3. Whichaccesssequenceisassignedtotheoutputtype?

a) Accesssequence0003isassignedtotheoutputtypeZMAT.

Menu path (continued):

→ Maintain Output Types

Select the entry ZMAT.

Choose Detail.

4. Whichprocessingprogramandformhasbeenassigned?

a) Formedium1: ProgramZZLO650,formZZ_MAT_LABEL

Menu path (continued):

→ Maintain Output Types

SelecttheentryZMATandchooseProcessingRoutinesintheoverview

tree.

Continued on next page

105

2008/Q1 © 2008 SAP AG. All rights reserved.

第 114 页 / 共 177 页

Unit4: Output SCM650

Task 2:

ChangethesettingssothatyoucanalsouseoutputtypeZMATforyourshipping

point Z0# without any problems.

1. MaintaintheprintparametersforyourshippingpointZ0##.

Shipping point: Z0##

Output device: LP01

Suffix1: ZMAT

Suffix2: MAT-LABEL

a) Menu path:

DisplaySAP ReferenceIMG→LogisticsExecution →Shipping→

BasicShippingFunctions→OutputControl→OutputDetermination

→ Define Print Parameters Shipping

Choose Shipping.

Choose ZMAT.

Choose New Entries.

Enter and save your data.

2. CreateoutputconditionrecordsforyourcustomersT-S50A##andTS50B##

for output type ZMAT:

SORG: 1000

Transmissionmedium: Printer

Time: Explicit request

a) Menu path:

Logistics → Sales and Distribution → Master Data → Output →

Shipping → Create

ChooseZMATin the “Output type”field

ChoosethekeycombinationSalesOrganization/Customer

Enter your data.

Continued on next page

106

©2008SAPAG.Allrightsreserved. 2008/Q1

第 115 页 / 共 177 页

SCM650 Lesson: Output Processing

Task 3:

1. Search for the order with purchase order number ##-2-4.3 and create an

outbound delivery for it.

a) Menu path:

Logistics→SalesandDistribution→Sales→Order→Display

Choosesearchhelp“A:SalesDocumentsbyCustomerPurchaseOrder

Number”.

Enter##-2-4.3inthepurchaseordernumberfield.

Choosetheright document fromthe hit list.

Logistics→SalesandDistribution→ShippingandTransportation→

OutboundDelivery→Create→SingleDocument→WithReference

to Sales Order

Changetheselectiondatetotheendofnextweek.

2. Intheoutputscreenfortheitem,checkthatthesystemfindsandsetsoutput

typeZMAT.Usethedeterminationanalysistoclarifyanyproblems.

a) Menu path:

Select delivery item 10.

Choose: Extras→DeliveryOutput →Item

Choose Goto →Determination analysis

3. Ifoutputdeterminationiscorrect, savethedelivery.

a)

Continued on next page

107

2008/Q1 © 2008 SAP AG. All rights reserved.

第 116 页 / 共 177 页

Unit4: Output SCM650

4. Print the label.

a) Menu path:

Logistics→SalesandDistribution→ShippingandTransportation→

Communication/Printing→OutboundDeliveryOutput

In the selection screen, enter:

Output type: ZMAT

Shipping point: Z0##

Delivery: Deliveryfromlastactivity

Choose Execute.

Select the list of delivery items.

Choose Process.

5. Look at the output generated in the spool.

a) Menu path:

System → Services → Output Control

Choose Execute.

Select the relevant spool request.

Choose Display content.

108

©2008SAPAG.Allrightsreserved. 2008/Q1

第 117 页 / 共 177 页

SCM650 Lesson: Output Processing

Lesson Summary

You should now be able to:

• ExplainhowoutputtypesareprocessedintheSAPsystem

• Assessthedegreeofdifficultyinvolvedinadjustingtheexistinglayoutfor

output types to meet your requirements

• Namethestepsneededforintegratingcustomer-specificoutputtypes

109

2008/Q1 © 2008 SAP AG. All rights reserved.

第 118 页 / 共 177 页

UnitSummary SCM650

Unit Summary

You should now be able to:

• Describe the purpose of output types

• Setupvarioustransmissionmediaforissuingorprintingoutput

• Selectthedispatchtimesatwhichtheoutputisissued

• Adjusttheoutputdeterminationtomeetcustomer-specificrequirements

• ExplainhowoutputtypesareprocessedintheSAPsystem

• Assessthedegreeofdifficultyinvolvedinadjustingtheexistinglayoutfor

output types to meet your requirements

• Namethestepsneededforintegratingcustomer-specificoutputtypes

110

©2008SAPAG.Allrightsreserved. 2008/Q1

第 119 页 / 共 177 页

Unit 5

System Modifications

Unit Overview

Themembersoftheprojectteamneedtoknowtheavailableoptionsformodifying

thesystem,sincerequirementsariseinnearlyeveryimplementationprojectthat

necessitatetheextensionofSAPtransactionsbeyondtherangeofpossiblesettings

in table Customizing.

Unit Objectives

After completing thisunit, you will beableto:

• Describetheoptionsformakingrelease-independentmodificationstothe

systeminCustomizingforSalesandDistribution

• ExplaintheideabehindtheSAPenhancementconcept

• Usethestandardlistingfunctionsinthesalesprocessingsystem

• Usedisplayvariantsto adjustthelistingfunctionsfor certainusergroups

to their requirements

• Optimizethescopeofthedisplayfortheselistswithuser-specificdisplay

variants

• defineaccountgroupsformaintainingcustomermasterrecords

• adapt screens that use the display element “table control” to meet your

specific requirements

• create and use transaction variants

Unit Contents

Lesson: Basics of System Modification......................................112

Exercise 11: Elements of System Modification.........................125

Exercise 12: Extensions SAP Transactions.............................133

Lesson: Adapting Lists.........................................................137

Exercise 13: Lists and the ABAP List Viewer...........................143

Lesson: Adapting the User Interface.........................................148

Exercise 14: Account Groups / Field Selection Customer Master

Record .......................................................................155

Exercise 15: Table Control and Transaction Variants..................161

111

2008/Q1 © 2008 SAP AG. All rights reserved.

第 120 页 / 共 177 页

Unit5: SystemModifications SCM650

Lesson: Basics of System Modification

Lesson Overview

ThislessondescribesthebasicsofsystemmodificationinSalesandDistribution

andprovidesanintroductiontothevarioustechniquesthathavedevelopedover

the years.

Inanexample,severaldifferentenhancementsarecombinedtosolveaproblem.

Lesson Objectives

After completingthislesson, you will beable to:

• Describetheoptionsformakingrelease-independentmodificationstothe

systeminCustomizingforSalesandDistribution

• ExplaintheideabehindtheSAPenhancementconcept

Business Example

Duringmanyimplementationprojectsyouwillbefacedwithrequeststochange

theSAPtransactionsbeyondthecapabilitiesoftheCustomizingsettingstomatch

the processes used by the customers.

To do this, you can use the SAP system interfaces so that these enhancements

applyforallreleases(nofuturemaintenancenecessary).

Figure 48: Basics of System Modification

Whenmodifyingthesystem,yourmainaimshouldbetousetheSAPinterfaces

for customer enhancements.

This reduces, or ideally even eliminates any effort required to transfer these

modificationsevery timethereleaseis updated.

112

©2008SAPAG.Allrightsreserved. 2008/Q1

第 121 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Ifyoucarryoutcustomermodificationswithoutusingtheseinterfaces,youwill

probablyhavetomaintainthemeachtimethereleaseisupdated.

Elements of System Modification

Figure 49: Elements of System Modification

The elements for system modifications in Sales and Distribution are grouped

together in the IMG under the menu path

Sales and Distribution / System Modifications.

TheenhancementconceptalsoincludestransactionCMOD(ProjectManagement

ofSAPEnhancements),whichenablesthecustomertosupplementtheapplication

logic, screensand menuswith their ownelements.

113

2008/Q1 © 2008 SAP AG. All rights reserved.

第 122 页 / 共 177 页

Unit5: SystemModifications SCM650

Adding new fields

Figure 50: Adding New FieldsWith Condition Technique

We recommend that you usethecondition technique for systemmodifications

because many of the functions in the SD application component also use the

condition technique.

Thistechniqueisusedbypricing,outputcontrol,accountdetermination,listing,

exclusionandsubstitutiontodeterminepricesoroutput,forexample.

Foreachcomponent,allthefieldspermittedforaccesstoconditionrecordsare

combinedin their owncommunication structures.

Communicationstructuresthuscontainallthedatafieldsthatcanbeusedwhen

accessing a condition table.

You can only evaluatefields that are contained in therelevant communication

structureintheaccesssequenceswithinthedifferentapplicationsofthecondition

technique.

INCLUDESinwhichnewdatafieldscanbeaddedwerelinkedtoalltherelevant

communicationstructures. Thesystemdoesnotoverwritethemwhenyouupgrade

your release.

AdetailedchecklistintheImplementationGuideexplainstheprocedure.

SearchforCreateNewFields(UsingConditionTechnique).

114

©2008SAPAG.Allrightsreserved. 2008/Q1

第 123 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Figure 51: AddingNew FieldsWithoutConditionTechnique

Addingnewfieldsforprintingdocumentswasdiscussedintheunit"Processing

Output".

Customermasterfieldsarecopiedtothesalesdocumentintwosteps:

1. Afield from the customer master table(KNA1 or KNVV) isfirst copied

by INCLUDE (KUAGVZ, KUWEVZ, KURGVZ and KUREVZ) to the

sold-toparty,ship-topartyorpayerview(KUAGV,KUWEV,KURGVor

KUREV).Thefieldistransportedfromthemasterdatatotheviewwitha

user exit (V05E....).

2. The field is copied from the respective customer view (KUAGV,

KUWEV, KURGV or KUREV) to the order table (VBAK, VBKD or

VBAP).ThefieldispopulatedintheprogramMV45AFZZbyauser exit

(USEREXIT_MOVE_FIELD_TO_VBAK(_VBAP,_VBKD)).

Materialmasterfieldsarecopiedtothesalesdocumentintwosteps:

1. Afieldfromthematerialmastertable(MARA,MARCorMVKE)isfirst

copiedtothematerialview(MAAPVorMAEPV)usinganappendstructure.

2. The field is copied to the order item table (VBAP) from the material

view. Thefield ispopulatedin the programMV45AFZZ bytheuser exit

(USEREXIT_MOVE_FIELD_TO_VBAP).

115

2008/Q1 © 2008 SAP AG. All rights reserved.

第 124 页 / 共 177 页

Unit5: SystemModifications SCM650

Figure52: ReserveFieldsinCustomerandMaterialMasters

Reservefieldscanbeusedforallfunctionsandarestoredinthecustomermaster

record. Youcanfillthemandusethemforspecificinstallations.

• The fields are maintained in customer master maintenance for Sales and

Distributionunder“Extras→AdditionalData”. Differentfieldsareusedfor

thegeneral customermaster andfor salesdata.

Five3-digitfieldsarealsoincludedinthematerialmasterrecord(MVKE).

YoucanenterfieldsformaterialmastermaintenanceintheSalesandDistribution

view: Sales organization data 2 view.

There are check tables for each field where you can determine the permitted

values for that field.

Hint: Ifyouwant touseoneof thereservefields, youshouldgivethe

fielditsownname. YoucandothiswithintransactionCMODusingthe

menupath: Goto->Textenhancements->Keywords->Change

SincetheseareSAPfields,thesystemoverwritesthesenamesagainwhen

you update the release. Therefore, the same menu contains the point

Restorecust.versionsothatyoucanrestorethesenames.

Routines

Routinesareshortsubprogramsthatperformdifferentfunctionsduringdocument

processing. InSD,youcanusetransactionVOFMtocreateandprocessroutines

forcopyingrequirements,datatransfers,requirementsandformulae.

116

©2008SAPAG.Allrightsreserved. 2008/Q1

第 125 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Figure 53: Example fora customer-specific routine

Copyingrequirementsdeterminewhetherornotcertaindatacanbecopiedwhen

youcopy documents. For example, acopying requirementcan stipulate thatif

youcopyaninquirytoaquotation,thedocumentheadermustcontainthesame

customer.

Data transfer routines provide fine-tuned control for the copied fields. For

example, adatatransferroutinecanspecifythatcertainitemfieldscanonlybe

copiedtogetherwithotherfieldsandonlytocontracts,creditanddebitmemos.

Routines for requirements and formulae are used for functions that use the

condition technique.

A requirement can make the execution of an access dependent on certain

prerequisites. For example, it checks the document currency in pricing to see

whetherthelocalcurrencyoraforeigncurrencyisbeingused. Dependingupon

the result, the accessis either executed or not.

Thepricingusesformulaetodefineparticularlogicforthepricing. Youcannot

useonlythestandard Customizing tosetthislogic.

Overview of the enhancement technology that is used

in the module SD

Hint: Thetechnologythatispresentedhereisprovidedforprogrammers

intheBasiscourseBC425“EnhancementsandModifications”.

117

2008/Q1 © 2008 SAP AG. All rights reserved.

第 126 页 / 共 177 页

Unit5: SystemModifications SCM650

Figure 54: Example of a user exit

User exits are defined entry points in SAP transactions where customers can

implementtheirownadditionalprogramminglogicforaspecificinstallation.

Theyareusedtopopulatenewlyincorporatedfields,forexample.

Usingthemalsorequiresacertainamountofdisciplinebecause,incontrasttothe

functionalenhancementsdescribedbelow,thereisnoprecise,program-controlled

selection of the interface here.

Figure 55: Extensions to SAP Transactions

118

©2008SAPAG.Allrightsreserved. 2008/Q1

第 127 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

The enhancement concept makes frequently needed adjustments to customer

modifications when a release is upgraded virtually redundant. In contrast to

customermodifications, thisisachievedbyprovidinginterfacesthathavebeen

determinedbySAP for thecustomerenhancements.

ThecustomercanentercodinginalayerthathasbeendemarcatedbySAPand,

withincertainlimits,adaptthetransactionstosuitspecificprocesses.

Textenhancementsenableyoutoprovideextradocumentationfordataelements

usedin all transactions andchangekeywordtexts.

Functionmoduleexitsallowthecustomertoimplementadditionalprogramming

logicinatransaction. TheSAPapplicationdeveloperdetermineswhereafunction

moduleexitcanbecalledinatransactionandwhichdatacanbetransferred.

Screenenhancements: Areasinthescreensdefinedbytheapplicationdeveloper

can be configured by the customer. The customer can display additional

information here or enter data.

Menuenhancements: Thecustomercanactivateandnameguidingmenupoints.

Thefunctioncodethatyoudefineforselectingamenupointcanbeusedinthe

definitionof acorrespondingfunctionmoduleexit.

Figure 56: Example: Function Module Exit SDVFX004

Functionmoduleexitsallowthecustomertoimplementadditionalprogramming

logic in a transaction.

TheSAPapplicationdeveloperdetermineswhereafunctionmoduleexitcanbe

called in a transaction and which data can be transferred. The developer also

createstherelevantfunctionmoduleswithshorttext,interfaceanddocumentation.

119

2008/Q1 © 2008 SAP AG. All rights reserved.

第 128 页 / 共 177 页

Unit5: SystemModifications SCM650

The functions included in a function module exit are described in the relevant

SAP documentation.

Figure 57: Business Transaction Events (BTE)

BusinessTransactionEvents(BTEs)giveyoutheoptionofintegratingadditional

componentssuchasfunctionmodulesintotheSAPstandardsystem.

There are two types of interface available:

Publish & Subscribe interfaces

TheseshouldinformyouthatspecificeventshavetakenplaceintheSAPstandard

applicationandmakethedatacreatedasaresultavailabletotheexternalsoftware.

TheexternalsoftwaredoesnotreturnanydatatotheSAPstandardsystem.

Process Interfaces

These are used to submit business processes to another control that cannot be

implementedinthestandardsystem. Thismeansthatprocessinterfacesreplace

standard processes.

You can connect external developments to the standard SAP system. The

additionaldevelopmentsaregenerallycarriedoutusingtheABAPworkbench.

Figure 58: BTE: Possible Scenarios (1)

120

©2008SAPAG.Allrightsreserved. 2008/Q1

第 129 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

TheaboveexamplereferstoPublish&Subscribeinterfaces. Thedataflowonly

goesinonedirection-fromtheSAPapplicationtotheadditionalcomponents.

TheSAPapplicationdevelopermakesinterfacesavailableatspecificeventsina

transaction,inwhichapartnerorcustomercandefineadditionallogic.

Inthesimplestcase, suchaninterfacewouldonlybeusedbyonepartnerorby

the customer.

Figure 59: BTE: Possible Scenarios (2)

ThisscenarioalsoonlyreferstoPublish&Subscribeinterfaces.

Unlikecustomerexits,BusinessTransactionEventsgiveyoutheoptionofusing

an interfacemore than once for additional logic.

Ifthisisthecase,theusermustdecidewhichenhancementhewantstoexecuteat

a given time.

Bothenhancementsexistalongsideeachotherwithouthinderingeachother;only

oneenhancement canbeprocessedduring runtime.

121

2008/Q1 © 2008 SAP AG. All rights reserved.

第 130 页 / 共 177 页

Unit5: SystemModifications SCM650

Figure 60: Publish &Subscribevs. ProcessInterfaces

Publish & Subscribe interfaces:

• Whentheeventistriggered,oneormoreadditionaloperationscanbestarted.

They do not affect the standard program.

• Iftherearemorethantwooperations,theydonotaffecteachother.

• Add-on components only import data.

• Example: Additionalchecks(authorizations,availableduplicates,andsoon)

Process interfaces:

• UnlikePublish&Subscribeinterfaces, processinterfacesaredesignedso

thatdatacanbeexchangedinbothdirections. Thishasconsequencesforthe

additionalcomponentsthatcanbeconnectedtoaninterface.

• Whentheeventistriggered,aprocessinthestandardprogramcanonlybe

replaced by another process.

• Ifyouuseanadd-onfromapartnercompanythatusesaprocessinterface,

forexample,thisextensionisexecutedatruntime. Ifyoualsowanttouse

thesameinterface,thepartnerextensionisrejectedandyourownextension

executed at runtime.

122

©2008SAPAG.Allrightsreserved. 2008/Q1

第 131 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Figure61: BusinessTransaction Events: SAPand Customer

BusinessTransactionEventsallowthecustomer toimplementadditionallogic

in an application function in a similar way to function module exits. The

SAP application developer decideswheresuch eventsshould be defined in an

application function and what datashould be transferred. He createsa sample

functionmodulewithshorttexts,interfacesanddocumentationanddescribesthe

possiblefunctionsforthiseventintherelevantSAPdocumentation.

First,heassignsan8-digiteventnumber,whichqualifiestheBTE.Thisnumber

should be inaccordancewith specificconventions. The5thand 6th digits, for

example,shouldbeidenticalwitheventsinthesameprogram.

The SAP developer includestheevent with the extended tablemaintenance in

table TBE01. He specifies a sample function module sample_interface_<n>,

whichmustlaterbecreatedandwhichdefinestheinterfaceforthecustomer.

TheeventisassignedtoanapplicationcomponentintableTBE02. Itispossible

toassignaneventtoseveralcomponents. AnFIassignmentmeans,forexample,

thattheinterfaceisassignedtoallthenodesbelowit(FI-*).

123

2008/Q1 © 2008 SAP AG. All rights reserved.

第 132 页 / 共 177 页

Unit5: SystemModifications SCM650

Figure 62: Differences Between CustomerExitsand BTEs

Unlikecustomerexits,theuseofBusinessTransactionEventsisclient-specific.

Thismeansthatthesameeventcanbeusedfordifferentpurposesinseveralclients.

BTEs can be used more than once.

With Publish& Subscribeinterfaces the user can then choose which customer

enhancement he wants to execute.

For processinterfacesthe component that isfurthest totheright isexecutedin

thesequenceSAPApplication- AddOn- Customer.

ThemostrecentenhancementtechnologyistheBusinessAdd-In(BAdI).They

cameaboutwiththedevelopmentoftheABAPprogramminglanguagetowards

object-orientedprogramming(ABAPobjects). Wherepossible,SAPapplication

developersshouldcreatenewenhancementscenariosusingthistechnology.

Figure 63: Overview: Business Add-Ins

124

©2008SAPAG.Allrightsreserved. 2008/Q1

第 133 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Exercise 11: Elements of System

Modification

Exercise Objectives

After completingthisexercise, youwillbeableto:

• understand the options for creating system modifications in Sales and

Distributionthatremainindependentof therelease.

Business Example

BillingtypeF2hasbeenconfiguredforyourcompanysothatthedeliverynumber

isusedasasplitcriterionwhenyoucreatebillingdocuments.

However, you would also like to combine several deliveries in one billing

document for certain customers, if other requirementspermit. It is your job to

configuretheSAPsystemtomeetthisrequirementinsuchawaythatitremains

unaffectedbyanyreleaseupgrade(release-independentchanges). Someofyour

colleagueshavealreadydonethepreparatorywork,whichyoucannowusetofind

a solution for these requests.

Task 1:

Youhavedecidedto usethereserve field “Customer group 1” inthecustomer

master –sales areadata as aswitch for thispurpose. You want toanalyzethis

switchasarequirementincopyingcontrolforindividualbillingtypes.

Abillingtype(ZF##) hasalreadybeencreatedforyou.

1. Incopyingcontrolfor“Deliverydocumenttobillingdocument”withtarget

ZF##andsourceLF,replacecopyingrequirement004withrequirement904

(createdbytheinstructor) forallitemcategories.

Hint: First,selectalltheentriesandchooseEdit→ChangeField

Contents

2. IntheAdditionalData-SalesviewforcustomerT-S50B##,choosethevalue

001(SPECIAL)inthe“Billingdocumentvariant”field(beforethekeyword

changemadebyyourinstructor: customergroup1)

Task 2:

1. Create an order with order type ORfor the following purchase order for

customer T-S50B##.

Continued on next page

125

2008/Q1 © 2008 SAP AG. All rights reserved.

第 134 页 / 共 177 页

Unit5: SystemModifications SCM650

FAX

Customer: T-S50B##

PO number: ##-1-2

Req. delivery date: Immediately

Material: T-AS1##

Quantity: 10

Material: T-AS2##

Quantity: 10

2. Findoutwhetherthevalue001hasbeencopiedfromthecustomermasterto

the“Billingdocumentvariant”(=customergroup1)fieldintheadditional

data for the order header.

3. Save the order and note theorder number.

_____________________________________________________

Task 3:

1. Createadeliveryandatransferorderforpickingandpostthegoodsissuefor

thisorder. UseshippingpointZ0##andwarehousenumber010whenyou

createthetransportorder. Notedownthedocumentnumber.

________________________________________________________

Task 4:

1. Try to create an invoice for thisdelivery.

2. What system message do you receive?

______________________________________________________

3. What does the log say?

______________________________________________________

4. Whichbilling typeisautomaticallyproposed?

______________________________________________________

Continued on next page

126

©2008SAPAG.Allrightsreserved. 2008/Q1

第 135 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Task 5:

1. Tryoncemoretocreateaninvoiceforthisdelivery. Choosethenewbilling

type ZF## in the default data.

2. Savetheinvoiceand notethedocument number.

______________________________________________________

3. Why can you now create an invoice?

______________________________________________________

127

2008/Q1 © 2008 SAP AG. All rights reserved.

第 136 页 / 共 177 页

Unit5: SystemModifications SCM650

Solution 11: Elements of System

Modification

Task 1:

You havedecidedto usethereservefield“Customer group 1” inthecustomer

master – sales areadata as aswitch for this purpose. You want to analyzethis

switchasarequirementincopyingcontrolforindividualbillingtypes.

Abillingtype(ZF##)hasalreadybeencreatedforyou.

1. Incopyingcontrolfor“Deliverydocumenttobillingdocument”withtarget

ZF##andsourceLF,replacecopyingrequirement004withrequirement904

(createdbytheinstructor) forall itemcategories.

Hint: First,selectalltheentriesandchooseEdit→ChangeField

Contents

a) ChangeCopyingcontrol“Deliverydocumenttobillingdocument”:

Menu path:

DisplaySAPReferenceIMG→SalesandDistribution→Billing→

BillingDocuments→MaintainCopyingControlforBillingDocuments

ChooseCopyingcontrol: Deliverydocumenttobillingdocument

Choose: TableView→Display->Change

Select Target: ZF##, Source: LF

SelectthetableentryandchoosetheItemnodeintheoverviewtree.

Choose Select All.

Choose: Edit → ChangeField Contents

Choose Copying Requirement.

Enterroutine904inthe“CopyingRequirements”field.

Choose Replace.

Save your entries.

Continued on next page

128

©2008SAPAG.Allrightsreserved. 2008/Q1

第 137 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

2. IntheAdditionalData-SalesviewforcustomerT-S50B##,choosethevalue

001(SPECIAL)inthe“Billingdocumentvariant”field(beforethekeyword

changemadebyyourinstructor: customergroup1)

a) Enterthebillingvariantinthecustomermaster:

Menu path:

Logistics → Sales and Distribution → Master Data → Business

Partner→Customer→Change→SalesandDistribution

Enteryour customer andthesalesareadata.

Choose Sales area data.

Choose: Extras → Additional Data

Maintain thedata and save your entries.

Task 2:

1. Create an order with order type ORfor the following purchase order for

customer T-S50B##.

FAX

Customer: T-S50B##

PO number: ##-1-2

Req. delivery date: Immediately

Material: T-AS1##

Quantity: 10

Material: T-AS2##

Quantity: 10

a) Create order:

Menu path:

Logistics→SalesandDistribution→Sales→Order→Create

Continued on next page

129

2008/Q1 © 2008 SAP AG. All rights reserved.

第 138 页 / 共 177 页

Unit5: SystemModifications SCM650

2. Findoutwhetherthevalue001hasbeencopiedfromthecustomermasterto

the“Billingdocumentvariant”(=customergroup1)fieldintheadditional

data for the order header.

a) Yes! Value001 (SPECIAL) was copied.

Menu path:

ChooseDisplaydetailsfordocument header.

Choose the Additional data Atab page.

3. Save the order and note theorder number.

_____________________________________________________

a)

Task 3:

1. Createadeliveryandatransferorderforpickingandpostthegoodsissuefor

thisorder. UseshippingpointZ0##andwarehousenumber010whenyou

createthetransportorder. Notedownthedocumentnumber.

________________________________________________________

a) Createtheoutbounddelivery,pickandpostthegoodsissue.

Menu path:

Logistics→SalesandDistribution→ShippingandTransportation→

OutboundDelivery→Create→SingleDocument→WithReference

to Sales Order

For picking, choose:

SubsequentFunctions→CreateTransferOrder

Enter your warehouse number 010. Choose function 2 in the field

“Transfer picking quantity” (transfer picking quantity as delivery

quantitytothedeliveryandpostgoodsissue).

Save the transfer request.

Continued on next page

130

©2008SAPAG.Allrightsreserved. 2008/Q1

第 139 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Task 4:

1. Try to create an invoice for this delivery.

a) Create a billing document:

Menu path:

Logistics→SalesandDistribution→Billing→Billing Document

→ Create

Enterthedeliverynumber andchooseExecute.

2. What system message do you receive?

______________________________________________________

a) Nobillingdocumentshavebeencreated. Seelog.

3. What does the log say?

______________________________________________________

a) Contentsoflog: RequirementLO650hasnotbeenmet.

Menu path:

Edit → Log

4. Whichbilling type is automatically proposed?

______________________________________________________

a) Thebillingtype“Invoice(F2)”isautomaticallyproposed.

Menu path:

Display SAP Reference IMG → Sales and Distribution → Sales

→ Sales Documents → Sales Document Header → Define Sales

Document Types

DisplaythedetailsforsalesdocumenttypeOR.

Delv-rel. billing type: F2

Continued on next page

131

2008/Q1 © 2008 SAP AG. All rights reserved.

第 140 页 / 共 177 页

Unit5: SystemModifications SCM650

Task 5:

1. Tryoncemoretocreateaninvoiceforthisdelivery. Choosethenewbilling

type ZF## in the default data.

a) Createthebillingdocumentwiththenewbillingtype(defaultdata):

Menu path:

Logistics →Salesand Distribution → Billing →Billing Document

→ Create

Choose billing type ZF## in the default data (trade fair billing

document ##).

Enteryourdeliverynumber andchooseExecute.

2. Savetheinvoiceandnotethedocument number.

______________________________________________________

a)

3. Why can you now create an invoice?

______________________________________________________

a) The invoice can be created with the new billing type, because the

billingvariantfield(=customergroup1)intheadditionaldataforthe

orderbelongingtothedeliveryitemcontainsthevalue001(SPECIAL).

132

©2008SAPAG.Allrightsreserved. 2008/Q1

第 141 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Exercise 12: Extensions SAP Transactions

Exercise Objectives

After completingthisexercise, youwillbeableto:

• understandthebasicprinciplesbehindtheSAPenhancementconcept.

Business Example

AsanelementintheSAPenhancementconcept,functionmoduleexitsallowthe

customertoimplementadditionalprogramminglogicinatransaction.

The Customer Accounting department in your company requires the material

number to be transferred as additional information to the G/L account line in

the accounting interface.

Task 1:

An enhancement project DEMO650 has been created in order to meet the

Accounting department’s request.

1. Display the enhancement components for the enhancement project

DEMO650.

Task 2:

Test the functions in this enhancement.

1. Displaytheaccountingdocumentforyourinvoicefromexercise11-5.2. The

textfieldintheG/Laccountlineshouldnowcontainthematerialnumber.

Task 3:

1. Trytofindoutwhetherthereisauserexitinthesystemfordeterminingthe

storagelocation. Searchfortheterm“storagelocation”.

133

2008/Q1 © 2008 SAP AG. All rights reserved.

第 142 页 / 共 177 页

Unit5: SystemModifications SCM650

Solution 12: Extensions SAP Transactions

Task 1:

An enhancement project DEMO650 has been created in order to meet the

Accounting department’s request.

1. Display the enhancement components for the enhancement project

DEMO650.

a) Menu path:

Tools→ABABWorkbench→Utilities→Enhancements→Project

Management→EntertheprojectnameDEMO650

Select the subobject Components.

Choose Display.

Task 2:

Test the functions in this enhancement.

1. Displaytheaccountingdocumentforyourinvoicefromexercise11-5.2. The

textfieldintheG/Laccountlineshouldnowcontainthematerialnumber.

a) Display accounting document:

Menu path:

Logistics →Salesand Distribution → Billing →Billing Document

→ Display

Choose Accounting Overview.

Display the accounting document.

Choose a revenue account item.

Thetextfieldshouldnowcontainthematerialnumber.

Continued on next page

134

©2008SAPAG.Allrightsreserved. 2008/Q1

第 143 页 / 共 177 页

SCM650 Lesson: Basics of System Modification

Task 3:

1. Trytofindoutwhetherthereisauserexitinthesystemfordeterminingthe

storagelocation. Searchfortheterm“storagelocation”.

a) Menu path:

Tools→ABABWorkbench→Utilities→Enhancements→Definition

Choosethesearchhelpinthe Enhancementfield.

Choose Infosystem.

Donotcompleteanyfieldsintheselectionscreen,removethelimitfor

the number of hits and choose Execute.

Alist of all theSAPenhancementsappears.

Choose Find (binoculars).

Search for the wordstorage location.

Amongothers,youshouldfindenhancementV02V0002.

135

2008/Q1 © 2008 SAP AG. All rights reserved.

第 144 页 / 共 177 页

Unit5: SystemModifications SCM650

Lesson Summary

You should now be able to:

• Describetheoptionsformakingrelease-independentmodificationstothe

systeminCustomizingforSalesandDistribution

• ExplaintheideabehindtheSAPenhancementconcept

136

©2008SAPAG.Allrightsreserved. 2008/Q1

第 145 页 / 共 177 页

SCM650 Lesson: Adapting Lists

Lesson: Adapting Lists

Lesson Overview

Listsplayacentralroleinmanagingthedailyworkoftheenduserinmanyareas

oftheSAPsystem. Itisthereforeparticularlyimportantthatthesystemprovidesa

broad range of personalization options.

Heretoo,youwillseereal-worldexamplesofhowtheseextensiveoptionscanbe

extended further by employing user exits.

Lesson Objectives

After completingthislesson, youwillbeable to:

• Usethestandardlistingfunctionsinthesalesprocessingsystem

• Usedisplayvariantsto adjustthelistingfunctionsfor certainusergroups

to their requirements

• Optimizethescopeofthedisplayfortheselistswithuser-specificdisplay

variants

Business Example

Therearelistfunctionsto search for andcheck salesdocumentsinthesystem.

Thesehelpyousolvedifferenttypesofbusinessqueries.

You can adapt these lists to meet the specific requirements of individual user

groups.

User-specific display variants also enable you to personalize lists to meet the

demands of each user.

137

2008/Q1 © 2008 SAP AG. All rights reserved.

第 146 页 / 共 177 页

Unit5: SystemModifications SCM650

Figure 64: Lists Are Used Everywhere

TheinformationprovidedbySalesandDistributioncanbedividedintofourareas:

• Linkstosalesdocumentsand master recordsfor:

– Finding business transactions

– Displayingalltransactionsthatarerelevanttoamasterrecord

• Displayingtransactionsthathavereachedacertainstage,forexample:

– All orders due for shipping

– All currently valid quotations

• Displayingthedocumentflow,toanswersuchquestionsas

– Whichordershavebeencopiedfromquotations?

– In which delivery and which billing document were certain order

items entered?

• Analyses, for example

– Orders blocked for delivery

– Documents according to status

138

©2008SAPAG.Allrightsreserved. 2008/Q1

返回FICO参考资料列表