BC425-Enhancements and Modifications
-
Upload
carlos-patricio-vargas-villanueva -
Category
Documents
-
view
125 -
download
6
Transcript of BC425-Enhancements and Modifications
SAP AG
R
BC425BC425BC425Enhancements andModificationsEnhancements andEnhancements andModificationsModifications
SAP AG
R
ABAP WorkbenchLevel 3
BC420 2 daysInterface Programmingfor Data Transfer
BC430 2 daysABAP Dictionary
BC405 5 daysTechniques of List Processing
BC410 5 daysTransaction Processing
BC415 3 daysCommunication Interface Programmingin ABAP
BC460 3 daysSAPscript: FormsDesign and TextManagement in R/3
BC425 2 daysEnhancements andModifications
BC440 5 daysDeveloping Internet Application Components(IAC)
BC411 5 daysAdvanced ABAPProgramming
Level 2
BC400 5 daysABAP WorkbenchBasics
SAP AG
R
Course Overview Diagram
R/3R/3 Business BusinessApplicationsApplications
((The SAPThe SAP Standard) Standard)
CustomerCustomerProgramsPrograms
CustomerCustomerDevelopmentDevelopmentEnhancementEnhancementModificationModification
22
33
44
55
With referencesto SAP objects
Withoutreferences to SAPobjects
Hard-CodedModifications
ABAP DictionaryTable enhancements
Field exitsText enhancements
Customer ExitsFunction module exits
Menu exitsScreen exits
BusinessTransaction Events
User Exits
S A P A G
R
C h a n g e L e v e l s
R / 3R / 3 B u s i n e s s B u s i n e s sA p p l i c a t i o n sA p p l i c a t i o n s
( S A P S t a n d a r d )( S A P S t a n d a r d )
C u s t o m e rC u s t o m e rP r o g r a m sP r o g r a m s
C u s t o m e rC u s t o m e rD e v e l o p m e n tD e v e l o p m e n tE n h a n c e m e n t sE n h a n c e m e n t sM o d i f i c a t i o n sM o d i f i c a t i o n sC u s t o m i z i n gC u s t o m i z i n g
B u s i n e s sE n g i n e e r
A B A PW o r k b e n c h
P e r s o n a l i z a t i o nP e r s o n a l i z a t i o n
S A P A G
R
D e c i d i n g W h a t K i n d o f C h a n g e s t o M a k e
M o d i f i c a t i o nC u s t . d e v . w i t h S A P p r o g r a m s a s e x a m p l e s
N o
N o
Y e s
D o s i m i l a r f u n c t i o n s e x i s t i n t h e S A P s t a n d a r d ?
N o
D o e s t h e S A P a p p l i c a t i o n a l l o w y o u t o a d d a d d i t i o n a l f u n c t i o n s u s i n g e n h a n c e m e n t s ?
Y e s
E n h a n c e m e n t / U s e r E x i t
A r e t h e r e s t a n d a r d f u n c t i o n s t h a tc a n b e a d j u s t e d t o f u l f i l l t h e c u s t o m e r ’ s n e e d s
u s i n g C u s t o m i z i n g o r p e r s o n a l i z a t i o n ?
Y e s
C u s t o m i z i n gP e r s o n a l i z a t i o n
N o
C u s t o m e r D e v e l o p m e n tC S P S o l u t i o n
Cu
sto
miz
ing
Cu
sto
miz
ing
De
ve
lop
me
nt
De
ve
lop
me
nt
SAP AG
R
Change Levels in the ABAP Workbench
R/3 BusinessR/3 BusinessApplicationsApplications
(The SAP Standard)(The SAP Standard)
CustomerCustomerProgramsPrograms
CustomerCustomerDevelopmentDevelopmentEnhancementsEnhancementsModificationModification
Hard-CodedModifications
With referencesto SAP objects
Withoutreferences toSAP objects
User Exits
ABAP Dictionary
Table enhancementsField exitsText enhancements
Customer Exits
Function module exitsMenu exitsScreen exits
BusinessTransaction Events
SAP AG
R
Customer Exits: Overview
PROGRAM ... ....
CALL CUSTOMER-FUNCTION ...
...
Function module exitsFunction module exits (Customer functions)(Customer functions)
Function module
ABAP
Menu#1 Menu#2 Menu#3 System Help
SAP R/3
Field y
Field zScreen exitsScreen exits
(Customer fields)(Customer fields)
Menu exitsMenu exits(Customer functions)(Customer functions)
Function 1Function 2Function 3
Function 4Customer functionCustomer function
SAP AG
R
Implementing Customer Exits
CALL CUSTOMER-FUNCTION ...
Function Description
+ CUS <menu_entry> . . . . . .
Function module exit
Menu exit
ABAP
Menu Painter
Screen Painter
CALL CUSTOMER-SUBSCREEN...
Screen exit
SAP AG
R
Customer Exits: SAP and the Customer
SAP Customer
Function module exitsAdministration
InterfacesDocumentation
Function modulecode
Customer screens
Menu exitsFunction codes Text
Screen exitsSubscreen areasFlow logic
SubscreensFunction module code
SAP AG
R
System HelpSAP R/3SAP R/3
Field
System HelpSAP R/3SAP R/3
Field
System HelpSAP R/3SAP R/3
Field
Field Exits
Function moduleData elementData elementField exitField exit
SAP AG
R
SAP Customer
Field exitsData element Function module
Field Exits: SAP and the Customer
SAP AG
R
Table Enhancements
Field 1 Field 2 Field 3 FieldField A A FieldField B B
ABAP Dictionary
Append structureField BField AField 1 Field 2 Field 3
SAP table
Database
Customer fields
SAP AG
R
Text Enhancements
System HelpSAP R/3SAP R/3
Customer keyword
Text enhancementsText enhancements
DocumentationDocumentationSAP:SAP:..........Customer :Customer :..........
??
SAP AG
R
Text Enhancements: SAP and the Customer
SAPSAP CustomerCustomer
Data elementsSAP documentation
Data elements
Adds own documentation to
SAP documentation
SAP keyword Customer keyword
SAP AG
R
User Exits
PROGRAM ... ....
PERFORM user_exit_<name>.
...
SAP program*INCLUDE ......
FORM user_exit_<name>.*example code...ENDFORM....
Include for user exits
User exitUser exit (Customer function)(Customer function)
SAP AG
R
Modifications
PROGRAM ... ....
*Original source code...........*Code changed or added by the customer...*Original source code.....
ABAP
SAP AG
R
Evaluating ABAP Development Projects
Implementation costs
Consequences
System performance
An increased numberof adjustments
are greater than with Customizing.
... can be affected negatively.
... become necessary at upgrade.
SAP AG
R
Summary
You can enhance your R/3 system using Customizing,enhancements, customer developments, andmodifications.
If not all of the business processes that you want can beadded to your system during Customizing, use ABAPdevelopment projects are to expand your system’sfunctionality.
Function module exits, screen exits, menu exits, andfield exits all allow you to enhance programs.
Function module exits, screen exits, and menu exitshave to be planned and created by SAP programmers.
You should avoid making modifications to the SAPstandard since this makes additional adjustmentnecessary at upgrade.
SAP AG
R
What are modifications?
Customer R/3 System
SAP object
ModifiedSAP object
Change (with ABAP Workbench tools)
Domains, data elements,tables, ABAP programs,screens, interfaces, ...
SAP AG
R
Registering Modifications in SSCR
Customersystem
R/3 OSS
System HelpRepository Browser:Repository Browser: Initial ScreenInitial Screen
program_nameProgram
Object list
R
System HelpRegister objectRegister object
Please enter the key for object ... :
System HelpOSS:OSS: SAP Object RegistrationSAP Object Registration
Key
R3TRPgmID/OBJ/Name PROGprogram_name
07319180563614231463
S A P A G
R
C a r r y i n g O u t a R e g i s t e r e d M o d i f i c a t i o n
A s s i g n o b j e c t t o a c h a n g e r e q u e s t
C h a n g e S A P o b j e c tS p e r r e
A d m i n i s t r a t o r
I m p o r t
T r a n s p o r td i r e c t o r y
A u t o m a t i c a s s i g n m e n t t o a t a s k
R e l e a s e c h a n g e r e q u e s t
R e l e a s e t a s k
E x p o r t
SAP AG
R
Modifications: Critical Success Factors (1)
REPORT sapabap.IF sy-tabix = 1.*#SD_001...#Insertion count = count + 1. LOOP AT tab WHERE f1 < 10. .... ENDLOOP.ENDIF.
REPORT sapabap.IF sy-tabix = 1.*#SD_001...#Insertion CALL FUNCTION 'ZFM' CHANGING counter = count TABLES itab = tab.ENDIF.
Insertion
Encapsulation
FUNCTION zfm. counter = counter + 1. LOOP AT itab WHERE f1 < 10. .... ENDLOOP.ENDFUNCTION.
• Encapsulation instead of insertion
SAP AG
R
Modifications: Critical Success Factors (2)
Use narrow interfaces during encapsulation
Standardize your modification documentation
Log all modifications
Confirm and release all repairs, as well as allrequests that contain repairs
SAP AG
R
Modifications: Critical Success Factors (3)
Do not modify any ABAP Dictionary objects thatbelong to the core of your system (Basis Dictionaryobjects).
Only make changes to Basis Dictionary objects if toldto do so in an OSS note or by somebody from the SAPHotline.
Do not create any additional function modules in SAPfunction groups (prior to Release 4.5A)
Do not delete source code - comment it out instead
SAP AG
R
Modification Adjustment: SPDD and SPAU
SAP standard
Customerversion
Revert to SAP standard
Adjustment
Transactions:SPDDSPAU
Compare
SAP AG
R
Modification Adjustment: Objects
SPDD
Domains
Data elements
Tables
ABAP programs
Interfaces
Screens
Matchcode objects
Views
Lock objects
SPAU
SAP AG
R
The amount of work necessary at upgradeincreases...
Modified Repository objects create a significant amount of additional work at upgrade.
With the number of SAP objects thatyour ABAP development projectsdepend on
Every time SAP changes the objectsthat you call or have modified
With the importance of the SAPobjects you have modified.
SAP AG
R
User Exits
Type of enhancements used in SD
Consist of empty subroutines (FORM routines) inspecial includes
SAP never alters these includes ever
Include names must satisfy a special namingconvention
The use of user exits is technically consideredmodification
SAP AG
R
User Exits: An Example
***INCLUDE MV45AFZB .
************************************************************* This include is reserved for user modifications ** Forms for sales document processing ** The name of modification modules should begin with 'ZZ'. ***************************************************************&----------------------------------------------------------------**& Form USEREXIT_FILL_VBAP_FROM_HVBAP*&----------------------------------------------------------------** This user exit can be used to fill additional data into ** VBAP from the main item (HVBAP), that is, this user exit ** is called when an item is entered with reference to a main** item. This form is called from form VBAP_FUELLEN_HVBAP. **-----------------------------------------------------------------*FORM userexit_fill_vbap_from_hvbap.* VBAP-zzfield = HVBAP-zzfield2.ENDFORM.
SAP AG
R
Using User Exits
Look in the SAP Reference Implementation Guide forwhere to use user exits.
Read the relevant documentation
Follow the steps described in the documentation
SAP AG
R
Append Structures
Append structure
FieldField B BFieldField A A
Field 1 Field 2 Field 3 FieldField A A FieldField B B
Table
Field 1 Field 2 Field 3
SAP AG
R
Field 1 Field 2 Field 3 FieldField A A FieldField B B Field 4
Append Structures at Upgrade
Append structure
FieldField B BFieldField A A
Table
New SAP versionis imported
Activation
Field is appendedin the database
Field 1 Field 2 Field 3 Field 4
Field 1 Field 2 Field 3 FieldField 4 4
SAP AG
R
Customizing Includes
Customizing include
FieldField B BFieldField A A
Table A
Field LField M Field NCI_InclCI_Incl
Table B
Customizing transactionCustomizing transactionor SAP enhancementor SAP enhancement
Field 1 Field 2 Field 3CI_InclCI_Incl
Field L Field M Field N FieldField A A FieldField B BField 1 Field 2 Field 3 FieldField A A FieldField B B
SAP AG
R
Global Enhancements
SAP Customer
Definesdata elements
Documentsdata elements
Defines global enhancements
Creates field exits
Changes keywordsand short texts
SAP AG
R
Field Exits
EntryEntryEntry
Function module
Obligatoryfield checksObligatoryObligatory
field checksfield checks
Field formatchecks and
field transport
Field formatField formatchecks andchecks and
field transportfield transport
Foreignkey checks
ForeignForeignkey checkskey checks
System HelpSAP R/3SAP R/3
Field 1
Field 2
ABAP Dictionary
SAP AG
R
Global and Local Field Exits
System HelpProgram oneProgram one
Field 1
Field 2
System HelpProgram twoProgram two
Field 1
Field 2
System HelpProgram threeProgram three
Field 1
Field 2
Data elementDTEL
FIELD_EXIT_DTEL
Data elementLOCTEL
FIELD_EXIT_LOCTEL_1
FIELD_EXIT_LOCTEL_2
FIELD_EXIT_LOCTEL_3
SAP AG
R
Creating Field Exits
Global enhancements11
Create field exit22
Create function module44
Field exit for data element ...?33
Activate function module66
Assign program/screen(for local field exits only)
77
Activate field exit88
Edit function module55
System HelpFunction BuilderFunction Builder
FIELD_EXIT_DTELFunction module
System HelpFunction module:Function module: InterfaceInterface
INPUTImport parameter
OUTPUTExport parameter
SAP AG
R
Text Enhancements
SAP Customer
SAP documentationSAP documentation..............................
System HelpSAP R/3SAP R/3
SAP keyword
??SAP documentationSAP documentation....................CustomerCustomer documentationdocumentation..........
System HelpSAP R/3SAP R/3
Customer keyword
??
SAP AG
R
Keywords
SAP Customer
Defines data elements
Keyword
short:medium:long:Header:Short text (F1):
Definesglobal
enhancements
Keyword
short:medium:long:Header:Short text (F1):
SAP AG
R
Summary: Text Enhancements
CustomerCustomerkeywordskeywords
Customer Customer short texts andshort texts and
customercustomerdocumentationdocumentation
System HelpSAP R/3SAP R/3
SAP keyword
SAP AG
R
Summary
Table enhancements allow you to add your ownfields to SAP tables without having to modify yoursystem
You can enhance the functionality of specificscreen fields by using field exits
Text enhancements allow you to replace SAPkeywords with your own keywords
You can also enhance your documentation anddesign your own help topics
SAP AG
R
SAP Enhancements and Customer Enhancement Projects
SAP Customer
K
K
KK
K
E
K
KK
K
E
E
E
P
E
E
P
K EComponent SAP enhancement P Customer enhancement project
K E
K
SAP AG
R
Implementing Enhancements in Customer Systems
Put together an Put together an enhancement project enhancement project
using SAP enhancementsusing SAP enhancements
Edit the enhancement Edit the enhancement project’s componentsproject’s components
Document the Document the enhancement project enhancement project
Function modules
Menu entries
Subscreens
Customer documentation:
EE
E
P
Activate theActivate theenhancement projectenhancement project ActivationActivation
SAP AG
R
Creating Customer Enhancement Projects
CreateCreate
SaveSave
System Help
Project ManagementProject Management
Project
System Help
AttributesAttributes
Descript.
SAP AG
R
Assigning SAP Enhancements to Customer Projects
Change SAPChange SAPenhancementsenhancements
SaveSave
System Help
Project ManagementProject Management
Project
System HelpSAP ESAP Enhancementsnhancements
SAP Enhancements
SAP AG
R
Calling and Creating Function Modules
PROGRAM <program_name>. . . .CALL CUSTOMER-FUNCTION '001'. . . .
FUNCTION-POOL SAPLX<name>....
FUNCTION exit_<program_name>_001....
ENDFUNCTION.
SAP AG
R
Organization of an X Function Group
SAP CustomerINCLUDE INCLUDE LXaaaTOPLXaaaTOP..INCLUDE INCLUDE LXaaaUXXLXaaaUXX..INCLUDE INCLUDE LXaaaF00LXaaaF00..INCLUDE INCLUDE ZXaaaZZZZXaaaZZZ..
*INCLUDE ZXaaaZZZ.<customer subroutines (FORM )
and modules (MODULE )>
INCLUDE INCLUDE LXaaaU01LXaaaU01..INCLUDE INCLUDE LXaaaU02LXaaaU02..
FUNCTION FUNCTION exit_<exit_<program_nameprogram_name>_001.>_001....... INCLUDE INCLUDE ZXaaaU01ZXaaaU01........
ENDFUNCTION.ENDFUNCTION.
*INCLUDE ZXaaaU01.<customer source code>
FUNCTION-POOLFUNCTION-POOL SAPLXaaaSAPLXaaa.. INCLUDEINCLUDE LXaaaTAP.LXaaaTAP. INCLUDEINCLUDE ZXaaaTOP.ZXaaaTOP.
*INCLUDE ZXaaaTOP.<global customer data definitions>
SAP AG
R
Customer Screens
SAP
INCLUDE LXINCLUDE LX aaa aaa TOP. TOP.INCLUDE LXINCLUDE LX aaa aaa UXX. UXX.INCLUDE ZXINCLUDE ZX aaa aaa ZZZ. ZZZ.
CustomerFUNCTION FUNCTION exit_<exit_<program nameprogram name>_001.>_001....... INCLUDEINCLUDE ZXaaaU01ZXaaaU01........
ENDFUNCTION.ENDFUNCTION.
*INCLUDE ZXaaaU01....CALL SCREEN <screen> STARTING AT ....
*INCLUDE ZXaaaZZZ.INCLUDE ZXaaaO01.INCLUDE ZXaaaO02....INCLUDE ZXaaaI01.
*INCLUDE ZXaaaO01.MODULE ... OUTPUT....ENDMODULE.
SAP AG
R
Graphical user Graphical user interfaceinterface
Summary: Function Module Exits
ProcessingProcessinglogiclogic
Text elementsText elements
AdditionalAdditionalprocessingprocessing
logiclogic
System HelpSAP R/3SAP R/3
SAPapplication
System HelpSAP R/3SAP R/3
Customerscreens
SAP AG
R
Menu Exits
SAP Customer
Menu#1 Menu#2 Menu#3 System Help
SAP R/3
Function 1Function 2Function 3
Customer functionCustomer function
Menu#1 Menu#2 Menu#3 System Help
SAP R/3
Function 1Function 2Function 3
SAP AG
R
Assigning SAP Enhancements to Customer Projects
System Help
Project Management
Project
System HelpMenu TextMenu Text
New text
ChangeChangecomponentscomponents
Edit Edit componentscomponents
System Help
Project Management
Menu exit
SAPMabbc+fc1
SAP AG
R
PROGRAM <program_name>.DATA ok_code LIKE sy-ucomm. ...... CASE ok_code. WHEN 'DISP'....... WHEN '+CU1'. CALL CUSTOMER-FUNCTION '001' EXPORTING ...... IMPORTING ............ ENDCASE.
Menu Exits and Function Module Exits
SAP AG
R
Screen Exits
SAP Customer
Field 1
Field 2
Field 1
Field 2
Field x
Field y
Field z
SAP AG
R
Subscreens in the R/3 System
P. O. box
Fax no.
Name
Phone no.
System HelpSAP R/3
Last name
abcd
System HelpSAP R/3
Last name Meyer
abcdName Klaus
Phone no. 45678
System HelpSAP R/3
Last name Meyer
abcdP. O. box 11334
Fax no. 67890
200
300 300
200
SAP AG
R
Calling Subscreens
Main screen flow control
PROCESS BEFORE OUTPUT. CALL SUBSCREEN abcd INCLUDING sy-cprog '0100'. ...
PROCESS AFTER INPUT. CALL SUBSCREEN abcd. ... MODULE ok_code_processing.
SAP AG
R
Defining Screen Exits
PROCESS BEFORE OUTPUT....CALL CUSTOMER-SUBSCREEN abcd INCLUDING 'SAPLXYYZ' '0444'....
Program:Program: SAPLXyyz SAPLXyyzScreen:Screen: 04440444
Customer field 1
Customer field 2
System HelpSAP R/3
Subscreen areaSubscreen areaabcdabcd
Program:Program: SAPMabbc SAPMabbcScreen:Screen: 1234 1234
SAP AG
R
SAP Customer
Program:Program: SAPMabbc SAPMabbc Screen:Screen: .... ....
PROCESS BEFORE OUTPUT.PROCESS BEFORE OUTPUT.......CALL CUSTOMERCALL CUSTOMER-SUBSCREEN -SUBSCREEN abcdabcd INCLUDINGINCLUDING 'SAPLXYYZ''SAPLXYYZ' '0444''0444'........PROCESS AFTER INPUT.PROCESS AFTER INPUT.......CALL CUSTOMER-SUBSCREEN CALL CUSTOMER-SUBSCREEN abcd.abcd.
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
Calling Customer Subscreens
Program: SAPLXyyz Screen: 0444
System HelpSAP R/3
Subscreen areaSubscreen areaabcdabcd
Field y
Field z
SAP AG
R
Editing Subscreens (1)
Change Change componentscomponents
EditEditcomponentscomponents
System Help
Project ManagementProject Management
Project
System Help
Project ManagementProject Management
Screen exit
SAPMabbc1234_abcd_SAPLXyyz 0444
SAP AG
R
System HilfeScreen PainterScreen Painter
System HilfeScreen PainterScreen Painter
Editing Subscreens (2)
**INCLUDEINCLUDE ZXyyzO01ZXyyzO01.. MODULE a OUTPUT MODULE a OUTPUT........
Choose object
Edit components
Create Create screen?screen?
No Yes
System HelpScreen attributesScreen attributes
Screen type
Subscreen
System HelpScreen PainterScreen Painter
* SAPLXyyz Dynpro 0444PROCESS BEFORE OUTPUT. MODULE ....PROCESS AFTER INPUT. MODULE m.
a
Does Does screen screen exist?exist?
SAP AG
R
Summary: Screen Exits
Data transfer
Customerprocessing
CustomerCustomersubscreensubscreen
Interface
System HelpSAP R/3
Subscreen area