7$:$%$3:RUNEHQFK&RQFHSWV 7$: $%$3:RUNEHQFK&RQFHSWV Part 2/2 SAP AG 2005 SAP AG©2004 R/3 System Release 4.6D or above 2005/Q2 Material number 50077373 © SAP AG TAW12 Preface-1 © SAP AG TAW12 Preface-2 &RS\ULJKW &RS\ULJKW6$3$*$OOULJKWVUHVHUYHG 1RSDUWRIWKLVSXEOLFDWLRQPD\EHUHSURGXFHGRUWUDQVPLWWHGLQ DQ\IRUPRUIRUDQ\SXUSRVHZLWKRXWWKHH[SUHVVSHUPLVVLRQRI 6$3$*7KHLQIRUPDWLRQFRQWDLQHGKHUHLQPD\EHFKDQJHG ZLWKRXWSULRUQRWLFH SAP AG 2005 Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. … © SAP AG TAW12 Preface-3 … SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages. © SAP AG TAW12 Preface-4 &RXUVH3UHUHTXLVLWHV 5HTXLUHG z 7$:6$31HW:HDYHU $%$3:RUNEHQFK)XQGDPHQWDOV RUVLPLODUNQRZOHGJH SAP AG 2004 © SAP AG TAW12 Preface-5 7DUJHW*URXS 7DUJHW*URXS z 'HYHORSPHQWFRQVXOWDQWVDQGGHYHORSHUVZKRDUH UHVSRQVLEOHIRUDGDSWLQJDQGGHYHORSLQJEXVLQHVV DSSOLFDWLRQVLQ$%$3$%$32EMHFWV 'XUDWLRQ z 'D\V " SAP AG 2004 © SAP AG TAW12 Preface-6 &RXUVH*RDOV $WWKHHQGRIWKLVFRXUVH\RXZLOOEHDEOHWR z 'HVFULEHWKHFRQFHSWVEHKLQGWKH$%$3 SURJUDPPLQJODQJXDJH z 8VHWKH$%$3SURJUDPPLQJODQJXDJHDQGWKH WRROVRI$%$3:RUNEHQFKWRGHYHORS\RXURZQ EXVLQHVVDSSOLFDWLRQVRUWRPDNHDGMXVWPHQWVWR WKHVWDQGDUG6$3VRIWZDUH z 3XW\RXUNQRZOHGJHDVDMXQLRUFRQVXOWDQWWR SUDFWLFDOXVH SAP AG 2004 © SAP AG TAW12 Preface-7 &RXUVH&RQWHQW6$31HW:HDYHU ± $%$3 :RUNEHQFK&RQFHSWV 3UHIDFH 6HFWLRQ 'HYHORSLQJ8VHU'LDORJV 6HFWLRQ 3URJUDPPLQJ'DWDEDVH 8SGDWHV 6ROXWLRQ0DQDJHU 6HFWLRQ 6HFWLRQ (QKDQFHPHQWVDQG 0RGLILFDWLRQV &DVH6WXG\ SAP AG 2004 This SAP Consultant Education training course contains different individual courses (section), each of which deals with a separate topic. Each individual course (section) is divided into different units. © SAP AG TAW12 Preface-8 &RPSOH[ (QKDQFHPHQWVDQG0RGLILFDWLRQV SAP AG 2003 © SAP AG TAW12 Complex 4 &RXUVH&RQWHQWV 3UHIDFH Unit 1 &RXUVH2YHUYLHZ Unit 2 &KDQJLQJWKH6$36WDQGDUG Unit 3 3HUVRQDOL]DWLRQ Unit 4 (QKDQFHPHQWVWR$%$3'LFWLRQDU\(OHPHQWV Unit 5 (QKDQFHPHQWV8VLQJ&XVWRPHU([LWV Unit 6 %XVLQHVV7UDQVDFWLRQ(YHQWV Unit 7 %XVLQHVV$GG,QV Unit 8 0RGLILFDWLRQV Unit 9 &RQFOXVLRQ Unit 10 $SSHQGL[ Exercises and their solutions can be found at the end of each unit SAP AG 2002 © SAP AG TAW12 Complex 4 ,QWURGXFWLRQ &RQWHQWV &RQWHQWV z &RXUVHJRDOV z &RXUVHREMHFWLYHV z &RXUVHFRQWHQWV z &RXUVHRYHUYLHZGLDJUDP z 0DLQEXVLQHVVVFHQDULR z ,QWURGXFWLRQ SAP AG 2002 © SAP AG TAW12 19-1 &RXUVH*RDOV 7KLVFRXUVHZLOOSUHSDUH\RXWR z 0DNHTXDOLILHGFKDQJHVWRWKH6$3VWDQGDUG z (YDOXDWHWKHGLIIHUHQWPHWKRGVIRUPRGLILFDWLRQ DQGFKRRVHWKHULJKWRQHIRUWKHJLYHQVLWXDWLRQ SAP AG 2002 © SAP AG TAW12 19-2 &RXUVH2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 'HVFULEHWKHGLIIHUHQWNLQGVRIFKDQJHOHYHOV DYDLODEOHLQWKH56\VWHP z (QKDQFH$%$3'LFWLRQDU\REMHFWVZLWKRXW KDYLQJWRPRGLI\WKHP z ,PSOHPHQWHQKDQFHPHQWVWRWKH5VWDQGDUG XVLQJFXVWRPHUH[LWV%XVLQHVV7UDQVDFWLRQ (YHQWVDQG%XVLQHVV$GG,QV z 0DNHDQGDGMXVWPRGLILFDWLRQVXVLQJWKH 0RGLILFDWLRQ$VVLVWDQW SAP AG 2002 © SAP AG TAW12 19-3 &RXUVH2YHUYLHZ'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVV7UDQVDFWLRQ(YHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 19-4 0DLQ%XVLQHVV6FHQDULR z <RXDUHHPSOR\HGE\DPDMRUWUDYHODJHQF\DV DFRPSXWHUVSHFLDOLVW,WLV\RXUUHVSRQVLELOLW\ WRHQKDQFHWKHSURJUDPVWKDW\RXUFXVWRPHU VHUYLFHVSHFLDOLVWVXVHZKHQKHOSLQJFOLHQWV z 7KHUHDUHVHYHUDOZD\VRIHQKDQFLQJ\RXU VRIWZDUHZLWKRXWKDYLQJWRDFWXDOO\PRGLI\ \RXUV\VWHP VVWDQGDUG SAP AG 1999 © SAP AG TAW12 19-5 &KDQJLQJWKH6$36WDQGDUG &RQWHQWV z 2YHUYLHZRIWKH&KDQJH/HYHOV z 'HFLVLRQGLDJUDP z &KDQJHWHFKQLTXHV SAP AG 1999 © SAP AG TAW12 20-1 &KDQJLQJWKH6$36WDQGDUG 8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 'HVFULEHWKHGLIIHUHQWOHYHOVDWZKLFK\RXFDQ PDNHFKDQJHVWRWKHVWDQGDUGGHOLYHUHGE\6$3 z &KRRVHWKHPRVWVXLWDEOHPHWKRGIRUFKDQJLQJ WKHVWDQGDUG z /LVWWKHHQKDQFHPHQWWHFKQLTXHVDYDLODEOHDQG KRZWKH\ZRUN SAP AG 2002 © SAP AG TAW12 20-2 &RXUVH2YHUYLHZ'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVV7UDQVDFWLRQ(YHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 20-3 &KDQJH/HYHOV 5%XVLQHVV $SSOLFDWLRQV 7KH6$36WDQGDUG &XVWRPL]LQJ 3HUVRQDOL]DWLRQ &XVWRPHU SURJUDPV 0RGLILFDWLRQ &XVWRPL]LQJ (QKDQFHPHQW &XVWRPHU GHYHORSPHQW $%$3 :RUNEHQFK SAP AG 2002 You can adjust the R/3 System to meet your needs in the following ways: y &XVWRPL]LQJ:Setting up specific business processes and functions for your system according to an implementation guide. The need for these changes has already been foreseen by SAP and an implementation procedure has been developed. y 3HUVRQDOL]DWLRQ: Making changes to certain fields’ global display attributes (setting default values or hiding fields) as well as creating user-specific menu sequences. y 0RGLILFDWLRQV: Changes to SAP Repository objects made at the customer site. If SAP delivers a changed version of the object, the customer’s system must be adjusted to reflect these changes. Prior to Release 4.0B these adjustments had to be made manually using upgrade utilities. From Release 4.5A, this procedure has been automated with the Modification Assistant. y (QKDQFHPHQWV: Creating Repository objects for individual customers that refer to objects that already exist in the SAP Repository. y &XVWRPHU'HYHORSPHQWV Creating Repository objects unique to individual customers in a specific namespace reserved for new customer objects. Customizing and most personalization are done using tools found in the Business Engineer; customer developments, enhancements, and modifications are all made using the tools available in the ABAP Workbench. © SAP AG TAW12 20-4 2ULJLQDOVDQG&RSLHV 'HYHORSPHQWV\VWHP &XVWREMHFW 2ULJLQDO 6$3REMHFW 2ULJLQDO &XVWREMHFW 7UDQVSRUWRI GHYHORSPHQWV 6$3REMHFW &RS\ 1H[WV\VWHP &RS\ 6$3REMHFW &RS\ SAP AG 2002 An object is original in RQO\RQHV\VWHP. In the case of objects delivered by SAP, the original system is at SAP itself. In customer systems, these objects are then only available as copies. This applies to your development system and all other systems that come after it. If you write your own applications, the objects that you create are original in your development system. You assign your developments to a change request, which has the type 'HYHORSPHQW&RUUHFWLRQ. This request ensures that the objects are transported from the development system into the subsequent systems. © SAP AG TAW12 20-5 &RUUHFWLRQVDQG5HSDLUV 'HYHORSPHQWV\VWHP &XVWREMHFW &RUUHFWHG RULJLQDO &RUUHFWLRQ 6$3REMHFW &RUUHFWHG RULJLQDO &RUUHFWLRQ &XVWREMHFW 7UDQVSRUW RIFRUUHFWLRQ 6$3REMHFW 0RGLILHG FRS\ 5HSDLU 1H[WV\VWHP &RS\ 6$3REMHFW 7UDQVSRUW RIUHSDLU &RS\ SAP AG 2002 Changes to an original are called FRUUHFWLRQV They are recorded in a change request whose tasks have the type 'HYHORSPHQWFRUUHFWLRQ. If, on the other hand, you change a copy (an object outside its own original system), the change is recorded in a task with the type 5HSDLU. Repairs to SAP objects are called PRGLILFDWLRQV When you repair your own objects (for example, if something goes wrong in your production system), you can correct the original in your development system straight away. :KHQ\RXFKDQJH FRSLHV\RXPXVWFRUUHFWWKHRULJLQDOLPPHGLDWHO\ However, you cannot do this with SAP objects, because they are not original in any of your systems. You should only modify the SAP standard if the modifications you want to make are absolutely necessary for optimizing workflow in your company. Be aware that good background knowledge of application structure and flow are essential prerequisites for deciding what kind of modifications to make and how these modifications should be designed. © SAP AG TAW12 20-6 0RGLILFDWLRQVDQG8SJUDGHV 'HYHORSPHQWV\VWHP 1H[WV\VWHP &XVWREMHFW &XVWREMHFW &RUUHFWHG RULJLQDO 6$3REMHFW &RUUHFWHG RULJLQDO &RS\ 6$3REMHFW 0RGLILHG FRS\ 0RGLILFDWLRQ DGMXVWPHQW 6$3REMHFW 7UDQVSRUW RIDGMXVWPHQW &RS\ 8SJUDGH 8SJUDGH SAP AG 2002 Whenever you upgrade your system, apply a Support Package, or import a transport request, conflicts can occur with modified objects. Conflicts occur when you have changed an SAP object and SAP has also delivered a new version of it. The new object delivered by SAP becomes an active object in the Repository of your system. If you want to save your changes, you must perform a PRGLILFDWLRQDGMXVWPHQWfor the objects. If you have a lot of modified SAP objects, your upgrade can be slowed down considerably. To ensure consistency between your development system and subsequent systems, you should only perform modification adjustments in your development system. The objects from the adjustment can then be transported into other systems. © SAP AG TAW12 20-7 &XVWRPL]LQJ 3URFHGXUHIRU&KDQJLQJD)XQFWLRQ Are there standard functions that can be adjusted to fulfill the customer’s needs using customizing or personalization? &XVWRPL]LQJ 3HUVRQDOL]DWLRQ Yes No &XVWRPHUGHYHORSPHQW &63VROXWLRQ 'HYHORSPHQW Do similar functions exist in the SAP standard? No Yes Does the SAP application allow you to add additional functions using enhancements? No No &XVWGHYHORSPHQWZLWK 6$3SURJDVWHPSODWH (QKDQFHPHQW Yes 0RGLILFDWLRQ SAP AG 2002 If your requirements cannot be filled by Customizing or personalization, you can either start a development project or use a Complementary Software Product (CSP) solution, if available. A list of CSP solutions certified by SAP is available in the SAP Service Marketplace under the alias /VRIWZDUHSDUWQHU. A development project falls into the customer development category if the SAP standard does not already contain functions similar to the one you are trying to develop. If, however, a similar SAP function exists, try to assimilate it into your development project by either enhancing or modifying it, by using a user exit, or simply by making a copy of the appropriate SAP program. Modifications can cause problems: After an upgrade, new versions of SAP objects must be compared to modified versions of SAP objects you have created and adjusted if necessary. Prior to Release 4.0B these adjustments had to be made manually using upgrade utilities. From Release 4.5A, this procedure has been automated with the Modification Assistant. Thus, you should only make modifications if: y Customizing or personalizing cannot satisfy your requirements y Enhancements or user exits are not planned y It would not make sense to copy the SAP object to the customer namespace. © SAP AG TAW12 20-8 &XVWRPL]LQJ |8` 7<D4/;:e` /c7<;</e- ) *,+.- /.*/102 34265 780'9':.5 ;</ 8| = :?><5 04/4>@>|8` 7.D.?8D/.03e`65 7.> ++.- 5 D3@25 7807<*,+<704/102 > w k } r k k p z m m h wo k m { r p p o q r w k k r h k m z j m q w g lm m r p w ~kr r km z r mp qw h um r p x k { m l ~ r v l q u h l w p m k w mso r qn rvg t mo qh hu h iq f jh gtk hml hm h t m h = :?><5 04/4>@>AB(C /@D42 > E F M G GH N I L J G K L M E G F N G L H G I O J P L K Q L R H S I O T L L N K F S L E HF M G H T I K JO U K T L QVM LG NT LP G ^ O Q6L G L P FE GF T G J H WI SJ LYK XL J M H G Z N J L U G O T U P I E O G FNG HX IJ JG P K [\L N M L G S N O ] L L G G [ 802 /.`6+.`5 >e/A`.3.0e5 (34265 70 AB C /D426_ A`V5 /10?2 /@; ab342 3$cd7<;./efh m g n hg i o jl ko p lo q m r so r m n r g t o qh u h n sg mq rp k t p qo q h r o r f v g q h h i w j kk p l o q m r r x q pj o o v yo i k o pr o qz r f g q h hi t jm k h l m lk izs jh m m r mt wg q {moh r zp |8` 7.D@/4>>,c7.;e/.- 5 5H I 0R HUHQF GHO H 71` 6- 7@3104;$A` <3.0.5 (325 70 SAP AG 2002 The Business Engineer is made up of all SAP LPSOHPHQWDWLRQWRROV. These include: y 7KH55HIHUHQFH0RGHO Contains all of the models used to describe R/3 (the process model, the data model, and the organization model) y 7KH,PSOHPHQWDWLRQ*XLGH (IMG) y A complete list of all customizing changes © SAP AG TAW12 20-9 3HUVRQDOL]DWLRQ <RXFDQRIWHQVLPSOLI\DQGSHUVRQDOL]HDQ DSSOLFDWLRQZLWKRXWKDYLQJWRXVHWKH$%$3 :RUNEHQFKXVLQJWKHIROORZLQJPHWKRGV z *OREDOGLVSOD\DWWULEXWHVRIILHOGV z 6(7*(7SDUDPHWHUV z 9DULDQWWUDQVDFWLRQV z 7DEOHFRQWUROVHWWLQJVYDOLGWKURXJKRXWWKHHQWLUH V\VWHP z 3HUVRQDOL]HGPHQXV z 5ROHEDVHGPHQX z )DYRULWHV z 6KRUWFXWVRQ\RXUGHVNWRS SAP AG 2002 3HUVRQDOL]DWLRQaccelerates and simplifies how business cases are processed by the R/3 System. During personalization, individual application transactions are adjusted to meet the business needs of your company as a whole or even to the needs of specific user groups within your company. Unnecessary information and functions in the transaction are switched off. Global display attributes allow you to define default values for specific screen fields. You can also suppress individual fields or table control columns in a particular transaction, or even a whole screen. Role-based menus, favorites, and shortcuts allow you to adjust PHQXVHTXHQFHV to reflect the needs of different user groups within your company. © SAP AG TAW12 20-10 &KDQJH/HYHOVLQWKH$%$3:RUNEHQFK 5%XVLQHVV $SSOLFDWLRQV 7KH6$36WDQGDUG 0RGLILFDWLRQ z $VVLVWHGPRGLILFDWLRQ &XVWRPHU SURJUDPV (QKDQFHPHQW z $%$3'LFWLRQDU\ $ ? z 3URJUDPHQKDQFHPHQWV ' ,' ! $6d & ddd ? $6d ¡¢£(¤6 &XVWRPHU 'HYHORSP 'HYHORSP z &DOOLQJ 6$3REMHFWV z :LWKRXWFDOOLQJ6$3 REMHFWV z 0HQXHQKDQFHPHQWV "#!$ $6d ¡¢£(¤6 z 6FUHHQHQKDQFHPHQWV %&(¡! $6d ¡¢£(¤6 z 8VHUH[LWV SAP AG 2002 Modifications are changes to SAP objects in customer systems. They are: y Executed with the help of user exits (these are subroutines reserved for customers in objects in the SAP namespace) y Hard-coded at various points within SAP Repository objects. Customer developments are programs developed by customers that can call SAP Repository objects. Example: A customer creates a program that calls an SAP function module. The enhancement concepts embody the reverse of this principle: SAP programs call Repository objects that you, as a customer, have created or changed. Example: You use a function module exit called by an SAP program. You can enhance your system at the following levels: y In ABAP programs (IXQFWLRQPRGXOHH[LWV) y On GUI interfaces (PHQXH[LWV) y On screens by inserting a subscreen in an area specified by SAP (VFUHHQH[LWV) y On screens by processing customer code that refers to a specific field on the screen (ILHOGH[LWV) y In ABAP Dictionary tables or structures (WDEOHHQKDQFHPHQWV) © SAP AG TAW12 20-11 7DEOH(QKDQFHPHQWV $%$3'LFWLRQDU\ 7DEOHGHILQLWLRQ )LHOG )LHOG )LHOG 7DEOHGHILQLWLRQ )LHOG )LHOG )LHOG &,B,QFO <<)LHOG ==)LHOG $SSHQGVWUXFWXUH <<)LHOG ==)LHOG &,B,QFOXGH 'DWDEDVH ¦¥ § ¨ ©ª© ' «« SAP AG 2002 SAP provides two ways to enhance tables and structures with fields. y Structures y Customizing includes (CI includes) Both techniques allow you to attach fields to a table without actually having to modify the table itself. Append structures may only be assigned to a single table. A table may, however, have several append structures attached to it. During activation, the system searches for all active append structures for that table and attaches them to the table. Append structures differ from include structures in how they refer to their tables. To include fields from an include structure in a table, you must add an .INCLUDE... line to the table. In this case, the table refers to the substructure. Append structures, on the other hand, refer to their tables. In this case, the tables themselves are not altered in any way by the reference. © SAP AG TAW12 20-12 7DEOH(QKDQFHPHQWV 6$3DQGWKH&XVWRPHU 6$3 &XVWRPHU 7DEOH 7DEOHHQKDQFHPHQW $SSHQGVWUXFWXUH 7DEOHLQFOXGH VWDWHPHQW 7DEOHHQKDQFHPHQW &,B,QFOXGH SAP AG 2002 Append structures allow you to attach fields to a table without actually having to modify the table itself. Table enhancements using append structures therefore do not have to be planned by SAP developers. An append structure can belong to only one table. In contrast, CI_includes allow you to use the same structure in multiple tables. The include statement must already exist in the SAP table or structure. Table enhancements using CI_includes do, however, have to be planned by SAP developers. © SAP AG TAW12 20-13 3URJUDP(QKDQFHPHQWV +RZ7KH\ :RUN 6$3SURJUDP 6$3SURJUDP 352*5$0QDPHRI6$3SURJUDP! 352*5$0QDPHRI6$3SURJUDP! &DOOHQKDQFHPHQW! 2EMHFWLQ FXVWRPHU QDPHVSDFH! ([LWIXQFWLRQPRGXOH &XVWRPHUH[LW %XVLQHVV7UDQVDFWLRQ(YHQW )XQFWLRQPRGXOH 0HWKRG %XVLQHVVDGGLQ SAP AG 2002 The purpose of a program enhancement is always to call an object in the customer namespace. You can use the following techniques here: y Customer Exits A special exit function module is called by the SAP application program. The function module is part of a function group that is handled in a special manner by the system. y Business transaction events The SAP application program dynamically calls a function module in the customer namespace. y Business add-ins The application program calls a method of a class or instance of a class. This class lies in the customer namespace. © SAP AG TAW12 20-14 3URJUDP(QKDQFHPHQWV 6$3DQGWKH&XVWRPHU 6$3 &DOO $GPLQLVWUDWLRQ ,QWHUIDFH 'RFXPHQWDWLRQ &XVWRPHU &XVWRPHUH[LW )XQFWLRQPRGXOHH[LW %XVLQHVV WUDQVDFWLRQ HYHQWV %XVLQHVVDGGLQV )XQFWLRQPRGXOHFRGH )XQFWLRQPRGXOHLQ FXVWRPHUQDPHVSDFH 0HWKRGLQ FXVWRPHUFODVV SAP AG 1999 Program enhancements permit you to execute additional program logic in SAP application programs. SAP currently provides the techniques outlined above. The advantages and restrictions of the particular enhancement techniques will be discussed in detail in later units. © SAP AG TAW12 20-15 0HQX(QKDQFHPHQWV 6$3DQGWKH&XVWRPHU 6$3 0HQX 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWRPHU 0HQX 0HQX 'RFXPHQWDWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWIXQFWLRQ )XQFWLRQFRGH (QKDQFHPHQW 0HQX 0HQXH[LWV 7H[W ,FRQV SAP AG 1999 Menu enhancements permit you to add additional menu entries to an SAP standard menu. The system provides two options here: y Customer exits y Business add-ins The additional menu entries are merged into the GUI interface. When the function code is implemented, you can change the text of the menu entry, and - provided the SAP developer specified this option - change the icons. © SAP AG TAW12 20-16 6FUHHQ(QKDQFHPHQWV 6$3 &XVWRPHU 6$35 6$35 )LHOG )LHOG )LHOG )LHOG )LHOG= )LHOG; )LHOG< 6XEVFUHHQ DUHDV )ORZORJLF (QKDQFHPHQW 'RFXPHQWDWLRQ 6FUHHQH[LW 6XEVFUHHQV %XVLQHVV$GG,Q )XQFWLRQPRGXOHFRGH SAP AG 2002 Screen exits are a type of customer exit. They allow you to display additional objects in an SAP application program screen. The SAP developer must: y Define the subscreen areas y Specify the corresponding calls in the flow logic y Provide the framework for the data transport y Include the screen exit in an enhancement y Maintain the documentation From SAP Web Application Server 6.20 onwards, Business Add-Ins can also contain screen exits. You can implement screen exits by creating subscreens, possibly with flow logic. You also have to implement the data transport. How to implement screen exits will be discussed in two later units in this course: (QKDQFHPHQWV XVLQJ&XVWRPHU([LWV (for classical screen exits) and %XVLQHVV$GG,QV for the new screen exits). © SAP AG TAW12 20-17 0RGLILFDWLRQV 6$3 &XVWRPHU 6$3SURJUDP ¬­®¯'­°±³²²² ² ²²² 6$3SURJUDP ¬­®¯'­ °±¿²²² ² ²²² ´ $ ® µ¶'·¶'¸¹º¼»½¾¶'¸·#²'² ²²² ²²² ²²² ´ $ ® µ¶'·¶'¸¹º¼»½¾¶'¸'·#²² ²²² ²²² ²²² ´ »½'¾ÀÄ ÂÁdÃ$¹'¸·'À¾Ä½µ¼¹¾¾$À¾ÆÅ$ÇÊ ÉÈ Ã$À Á'Ë Ì'ȽÍ,Àµ ²²² ´ ®$µ¶'·¶'¸¹º¼»½¾¶'¸'·#²² ²²² ²²² ´ $ ® µ¶'·¶'¸¹º¼»½¾¶'¸·#²'² ²²² SAP AG 2002 Any change that you make your system to an object that has been delivered by SAP is known as a modification. Modifications can lead to complications at upgrade. When SAP delivers a new version of the object, you must decide whether the new object should be used, or whether you want to continue using your old object. Prior to Release 4.0B, modifications were only recorded at Repository object level (for example, an include program). Since Release 4.5A, the granularity for recording modifications has been finer. This has been made possible by the Modification Assistant, which is discussed in the Modifications unit of this course. The modification adjustment process has also been overhauled. How modifications are adjusted is also discussed in the Modifications unit. © SAP AG TAW12 20-18 &KDQJLQJWKH6$36WDQGDUG 8QLW6XPPDU\ <RXDUHQRZDEOHWR z *LYHDQRYHUYLHZRIWKHFKDQJHOHYHOVRIIHUHGE\ 6$3 z 'HFLGHZKLFKPHWKRGLVPRVWVXLWDEOHIRU FKDQJLQJWKH6$3VWDQGDUG z ([SODLQZK\6$3RIIHUVHQKDQFHPHQWWHFKQLTXHV IRUFKDQJLQJWKHGHOLYHUHGVWDQGDUG z /LVWWKHHQKDQFHPHQWWHFKQLTXHVRIIHUHGE\6$3 SAP AG 1999 © SAP AG TAW12 20-19 © SAP AG TAW12 20-20 'DWD8VHG .H\WRLFRQVLQWKHH[HUFLVHVDQGVROXWLRQV ([HUFLVHV 6ROXWLRQV 2EMHFWLYHV %XVLQHVVVFHQDULRV +LQWVDQGWLSV :DUQLQJRUFDXWLRQ 'DWDXVHGLQH[HUFLVHV 7\SHRIGDWD 'DWDLQWUDLQLQJV\VWHP Tables SFLIGHT00 .. SFLIGHT18 Data elements S_CARRID00 .. S_CARRID18 Programs SAPBC425_EXIT_00 .. SAPBC425_EXIT_18 Transaction codes BC425_00 .. BC425_18 Programs SAPBC425_BOOKING_00 .. SAPBC425_BOOKING_00 © SAP AG TAW12 20-21 3HUVRQDOL]DWLRQ &RQWHQWV z 3HUVRQDOL]LQJWUDQVDFWLRQV SAP AG 2002 © SAP AG TAW12 21-1 3HUVRQDOL]DWLRQ8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 3HUVRQDOL]HWUDQVDFWLRQVE\ z &UHDWLQJVFUHHQYDULDQWV z &UHDWLQJWUDQVDFWLRQYDULDQWV z &KDQJLQJVFUHHQVXVLQJ*XL;7 SAP AG 2002 © SAP AG TAW12 21-2 3HUVRQDOL]DWLRQ %XVLQHVV6FHQDULR z <RXUHQGXVHUVXVHRQO\D VPDOOSDUWRIWKH IXQFWLRQV SURYLGHGE\5 7RVLPSOLI\WKHLU GDLO\ ZRUNWKH\ VKRXOGVHWXSWKHLUZRUN FHQWHUWR FRUUHVSRQGWRWKHLU QHHGV z <RXUFROOHDJXHVVKRXOGDOVREHDEOHWR H[HFXWH VLPSOLILHGWUDQVDFWLRQVIURPWKHLUZRUNFHQWHUV 7KLVFDQXVXDOO\EHGRQHZLWKWUDQVDFWLRQYDULDQWV SAP AG 2002 © SAP AG TAW12 21-3 2YHUYLHZ'LDJUDP3HUVRQDOL]DWLRQ 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHU H[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVV 7UDQVDFWLRQ (YHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 21-4 3HUVRQDOL]DWLRQ/HYHOV 723'2:1FRQILJXUDWLRQ 723 (QWHUSULVH z (QWHUSULVHVWUXFWXUH z %XVLQHVVSURFHVVHV 8VHUUROH FRQILJXUDWLRQ 8VHUUROHV z $UHDPHQXV z 5ROHEDVHGPHQXV z 7UDQVDFWLRQYDULDQWV 5ROH EDVHG $UHD 5ROH EDVHGPHQXV 7UDQV 5ROH5ROH PHQXV PHQXV YDULDQWV 3HUVRQDOFRQILJXUDWLRQ )DYRULWHV /LQNV 'HVNWRS 3HUVRQDO FRQILJXUDWLRQ z )DYRULWHV z /LQNV z 'HVNWRSOLQNV SAP AG 2002 You can adjust the SAP System to meet the work requirements of specific users. When the system is started, the users are only offered functions that they typically use in their daily work. There is no unnecessary navigating through functions that are not used. In the past, user menus could be called in the Session Manager or in the dynamic menu in R/3. As of Release 4.6A, role-based menus appear in the form of a tree at logon. When a function is selected, it is started in the same session. The executed function replaces the rolebased menu. The role-based menu appears again automatically when you leave a transaction or when you start a new session. On the role maintenance screen (transaction PFCG), the administrator can combine the menu structure for a role (consisting of transactions, reports, and Internet/Intranet links) with a user menu. You can choose any structure and description for the functions contained. The enterprise menu is no longer available from Release 4.6A onwards. © SAP AG TAW12 21-5 7UDQVDFWLRQ9DULDQWV3XUSRVH z 6LPSOLI\WKHV\VWHPE\KLGLQJIXQFWLRQVWKDWDUHQRWUHTXLUHG z 3UHGHILQHILHOGV z 5HYRNHUHDG\IRULQSXWVWDWXV z +LGHVFUHHQHOHPHQWVWKDWDUHQRWQHHGHG ILHOGVVXEVFUHHQV VFUHHQV z 6WDQGDUGYDULDQWVRULQGLYLGXDOYDULDQWV z :<6,:<*PDLQWHQDQFHZLWKVSHFLDOUHFRUGLQJIXQFWLRQ SAP AG 2002 You can reduce the complexity of the system by hiding functions you do not need. Transaction variants allow you to reduce the complexity of a complete transaction for the user as follows: y Predefine fields with values. The user can overwrite these values. y Revoke the 5HDG\IRU,QSXW status of fields for which the user does not have to enter information. y Hide screen elements, such as input fields, that the user does not need. y Hide whole screens. We will discuss the maintenance of transaction variants in the following slides. © SAP AG TAW12 21-6 7UDQVDFWLRQ9DULDQWV ([DPSOH )+*-,/.0*213 @A:BC9+5D>FE:5-AG<:7 >? 456567 8:9+;=<+7 >? @A:BC9+5D>FE:5-AH>F7 IJA ^ aeb b ]P[0f )+*2,V.0*D13 456567 8:9+;=<+7 > ? @A:B+9C5D>FEM52AH>F7 IJA ^ acb b ]+[_f ^acb b ]C[/d )C*-,/.0*213 47 5F; 7 RCA Q+; 7 NOP> @9=>2AHK:LML-; 7 NOP> gh=ikjlnmo 7UDQVDFWLRQ YDULDQW ^:]_]=` Z [/\ ] S C< <+TVUCA=9=>2U Q+52ACAGU0AP9=>2U W567 <PA S C< <+TVUCA=9=>2U Q+5-ACAYU=A=9=>2U W 5F7 <PA z z z )+*-,.=*213 47 56; 7 RCA Q:; 7 NO=> @9=>2AHKML:L-; 7 NXOC> ^:]0]=` Z [\] 3UHGHILQHILHOGVZLWKYDOXHV 6XSSUHVVILHOGV +LGHVFUHHQV SAP AG 2002 In this example you see two screens of an SAP transaction that should be redesigned using a transaction variant. Screen 100 is changed as follows: fields are hidden, field attributes are changed; and buttons are hidden. Screen 200 shows the following changes: buttons moved and screen inserted (with GuiXT). We will discuss the use of GuiXT in more detail later. © SAP AG TAW12 21-7 7UDQVDFWLRQ9DULDQWV 3ULQFLSOH 7UDQVDFWLRQYDULDQW 6FUHHQYDULDQW 6FUHHQYDULDQW ]WHVWB 6FUHHQYDULDQW ]WHVWB ]WHVWB 6FUHHQYDULDQW ]WHVWB 6FUHHQYDULDQW 6FUHHQYDULDQW ]WHVWB ]WHVWB SAP AG 2002 A WUDQVDFWLRQYDULDQW is a reference to a set of VFUHHQYDULDQWV. You can create any number of screen variants for a screen. The transaction variant consists of these screen variants. © SAP AG TAW12 21-8 7UDQVDFWLRQ9DULDQWV 2SWLRQV 6WDQGDUGYDULDQW 6$3 WUDQVDFWLRQ 7UDQVDFWLRQ YDULDQW 7UDQVDFWLRQ YDULDQW YDULDQW z $VWDQGDUGYDULDQW RU z $Q\QXPEHURILQGLYLGXDO YDULDQWV z 6WDQGDUGYDULDQWRYHUULGHV 6$3WUDQVDFWLRQ z 2WKHUZLVH 9DULDQW WUDQVDFWLRQV 7UDQVDFWLRQ YDULDQW YDULDQW SAP AG 2002 You can create different kinds of transaction variants for an SAP transaction: y A standard variant y Any number of normal transaction variants The standard variant is executed at runtime instead of the SAP delivered transaction. No new transaction code is required. A normal transaction variant will be called with its own transaction code of type YDULDQWWUDQVDFWLRQ. © SAP AG TAW12 21-9 &UHDWLQJ7UDQVDFWLRQ9DULDQWV 7UDQVDFWLRQYDULDQWV 7UDQVDFWLRQ QDPH 7UDQVDFWLRQ 9DULDQW 9DULDQWQDPH &UHDWH z 7RROVo $FFHOHUDWHG6$3 o 3HUVRQDOL]DWLRQ o 7UDQVDFWLRQ9DULDQWV SAP AG 2002 To create transaction variants, choose $FFHOHUDWHG6$3Æ 3HUVRQDOL]DWLRQÆ 7UDQVDFWLRQYDULDQW. This takes you to the transaction for maintaining transaction variants. Enter the name of the transaction for which you want to create a variant. The name of the variant must be unique in the system and be in the customer namespace. With the menu option *RWR, choose whether you want to create a client-specific or a cross-client transaction variant. To create the variant, choose the appropriate button in the application toolbar. © SAP AG TAW12 21-10 7UDQVDFWLRQ9DULDQWV (YDOXDWLQJ)LHOGV )+*-,/.0*21/3 @ A:B+9+5>FEM5-AY<+7 >? 4$56567 8:9+;=<+7 >? @ A:B+9+5>FEM5-A >F7 IJA ^acb b ]P[0f ^ acb b ]C[/d pn&6& ' 6q r & & s' 6q pn&6& t u v ew v ex & yXz&6 { |~}&y )LQLVKDQGVDYH 0HQXIXQFWLRQV *XL;7 SAP AG 2002 Select 6FUHHQHQWULHVto start the transaction in CALL mode. Triggering a dialog also triggers Process After Input (PAI) of the current screen. The system sends another screen in which you can evaluate the fields of the screen. Online documentation provides further information about transaction variants. The screen that was evaluated is stored as a screen variant when you continue. This will be discussed next. © SAP AG TAW12 21-11 6FUHHQ9DULDQWV 6FUHHQYDULDQW QDPH pn&6& ' 6q r & & s' 6q pn&6& t u v ew v ex 'HVFULSWLRQ & yXz&6 { |~}&y )LQLVKDQGVDYH 0HQXIXQFWLRQV *XL;7 6HWILHOG DWWULEXWHV 'HDFWLYDWHPHQX IXQFWLRQV SAP AG 2002 A screen variant is an independent Repository object, which has a unique name in the system. The name is constructed as follows: y Variant name y Client (only for client-specific transaction variants) y Screen number Here you specify whether or not field contents should be copied to the screen variant. You can set various attributes for the individual fields: y You can undo or hide the input status of a field y You can find a detailed list of options in the online documentation about transaction variants © SAP AG TAW12 21-12 *XL;7 p'&&(u v (w v (x )LQLVKDQGVDYH 0HQXIXQFWLRQV *XL;7 6FUHHQYDULDQW 6FUHHQYDULDQW PDLQWHQDQFH VFUHHQ z 6FULSWHGLWRU z 6FULSWLVVWRUHGDV WH[WILOH z 6FULSWVFDQEH LPSRUWHG 6FUHHQILOHV SAP AG 2002 The GuiXT tool allows you to design the individual screens in a more flexible manner. GuiXT uses a script language to y Position objects on the screen y Set attributes y Include new objects If you select *XL;, an editor window appears where you can enter the script. You can also choose GuiXT files stored on your local machine. You can also import scripts created on the local machine and export them there. © SAP AG TAW12 21-13 *XL;7 6FULSW/DQJXDJH 9HUVLRQ &RPPHQW ,QVHUWVFUHHQ ,0$*( &?VDSMSJ %2; )UDPH 326 >(OHPHQW@>(OHPHQW@ 326 >$UHD@>$UHD@ 3XVKEXWWRQ 7H[W6&03 ,QVHUWIUDPH 0RYH HOHPHQW 3XVKEXWWRQ ZLWKWH[WDQG IXQFWLRQFRGH SAP AG 2002 You can change the layout of a screen with the script language used by GuiXT. You can: y Move objects y Insert screens y Insert pushbuttons y Insert value helps y Change the input attributes of fields y Delete screen elements You are provided with complete documentation of GuiXT with the installation. You can find more information on the homepage of the GuiXT vendor, http://www.synactive.com. © SAP AG TAW12 21-14 6WDUWLQJ7UDQVDFWLRQ9DULDQWV 2SWLRQVIRUVWDUWLQJWUDQVDFWLRQYDULDQWV z 7HVWHQYLURQPHQW z 7UDQVDFWLRQFRGH z )URPXVHUPHQX SAP AG 2002 You have the following options for starting a transaction variant: y Test environment y Transaction code of type YDULDQWWUDQVDFWLRQ y User menu You can test the process flow of the transaction in the test environment of transaction variant maintenance. This is intended primarily for developers who are creating transaction variants. To hang a variant transaction in a user menu or role, you must create a transaction code of type YDULDQWWUDQVDFWLRQ. © SAP AG TAW12 21-15 &UHDWLQJ9DULDQW7UDQVDFWLRQV 7UDQVDFWLRQ0DLQWHQDQFH 7UDQVDFWLRQFRGH QDPH 7UDQVDFWLRQ&RGH 'LVSOD\ &KDQJH &UHDWH &UHDWH &UHDWHWUDQVDFWLRQ 7UDQVDFWLRQFRGH 7UDQVDFWLRQ$WWULEXWHV 'LDORJ7UDQVDFWLRQ 5HSRUW7UDQVDFWLRQ 227UDQVDFWLRQ 9DULDQW7UDQVDFWLRQ 3DUDPHWHU7UDQVDFWLRQ SAP AG 2002 To start a transaction variant from a menu, you must create a transaction code of type YDULDQW WUDQVDFWLRQ. You can navigate to the maintenance screen for the transaction variants by choosing *RWR from the 7UDQVDFWLRQ0DLQWHQDQFHinitial screen. Alternatively, you can create a transaction code from the ABAP Workbench. If you choose this approach, remember to choose the correct initial object, 9DULDQW7UDQVDFWLRQ. © SAP AG TAW12 21-16 3HUVRQDOL]DWLRQ8QLW6XPPDU\ <RXDUHQRZDEOHWR z 3HUVRQDOL]HWUDQVDFWLRQVE\ z &UHDWLQJVFUHHQYDULDQWV z &UHDWLQJWUDQVDFWLRQYDULDQWV z &KDQJLQJVFUHHQVXVLQJ*XL;7 SAP AG 2002 © SAP AG TAW12 21-17 © SAP AG TAW12 21-18 ([HUFLVHV 8QLW 3HUVRQDOL]DWLRQ 7RSLF &UHDWLQJD3DFNDJH For correct development you need a package. 1-1 Create a package. 1-1-1 The package should be named ZBC425_## (where ## is your group number). 1-1-2 Assign the package to a change request. © SAP AG TAW12 21-19 © SAP AG TAW12 21-20 8QLW 3HUVRQDOL]DWLRQ 7RSLF 7UDQVDFWLRQ9DULDQWV At the conclusion of this exercise, you will be able to: • Simplify use of a transaction with screen variants and transaction variants. Your users complain that Transaction %&B7$9$5 is much too difficult to use (despite the Enjoy initiative). Actually you only have to fill in a few fields. A number of other fields, however, are superfluous. Help your users by simplifying use of the transaction. 1-1 Create a transaction variant for transaction %&B7$9$5. 1-1-1 How do you get to the maintenance screen for transaction variants? Include the corresponding transaction in your list of favorites. 1-1-2 Give the variant a name: =%& (where ## is your group number). 1-2 Go through the transaction screen by screen and create a screen variant for each of the screens. You should make the following changes: 1-2-1 Initial screen: Initialize the first two fields with "DE", "Frankfurt" and cancel the 5HDG\IRU,QSXW status. 1-2-2 Second screen: Set column "FLH" of the table control to QRWYLVLEOH. Deactivate menu function "BACK". 1-2-3 Third screen: Deactivate menu function "BACK". 1-3 Create a transaction code for the variant. Call your transaction =%&. 1-4 Include the variant in the area menu you created. 1-5 Test your results. © SAP AG TAW12 21-21 © SAP AG TAW12 21-22 6ROXWLRQV 8QLW 3HUVRQDOL]DWLRQ 7RSLF &UHDWLQJD3DFNDJH 1-1 You create a package by choosing the following menu path in the SAP menu: 7RROVo$%$3:RUNEHQFKo2YHUYLHZo2EMHFW1DYLJDWRU 1-1-1 Alternatively you can choose transaction SE80. 1-0-0 Choose the menu path :RUNEHQFKo(GLW2EMHFW 2-0-0 On the 'HYHORSPHQW&RRUGLQDWLRQ tab, choose 3DFNDJH and enter the name of the package you want to create in the appropriate field. 3-0-0 Choose &UHDWH. 4-0-0 On the next screen, enter a meaningful short description for your package. Assign the package to the software component HOME. Confirm your entries. 5-0-0 On the next screen, assign a change request and confirm it. 6-0-0 You will assign all your subsequent development objects to this package that you have just created. © SAP AG TAW12 21-23 © SAP AG TAW12 21-24 8QLW 3HUVRQDOL]DWLRQ 7RSLF 7UDQVDFWLRQ9DULDQWV 1-1 Create a transaction variant for transaction %&B7$9$5: 1-1-1 You can go to the maintenance screen for transaction variants in different ways, for example using 6$30HQXÆ7RROVÆ&XVWRPL]LQJÆ,0*Æ(GLW3URMHFW. Choose *RWR Æ'LVSOD\6$35HIHUHQFH,0*, followed by *HQHUDO6HWWLQJVÆ)LHOG 'LVSOD\&KDUDFWHULVWLFV. Choose the ([HFXWH icon. The system launches transaction 6+'. Choose 6\VWHPÆ8VHUSURILOHÆ([SDQGIDYRULWHV to include the transaction in your list of favorites. 1-1-2 Enter the name of the transaction from which you want to create a variant in the field 7UDQVDFWLRQ. Enter the name of the variant in the field 9DULDQW: =%& (where ## is your group number). 1-2 Execute the transaction screen by screen. Enter the corresponding values in the input fields. Leave the screen with the appropriate pushbutton and create a screen variant for each of the screens. 1-2-1 Initial screen: Assign the first two fields the values "DE" and "Frankfurt". Leave the screen by choosing the appropriate pushbutton. In the next popup window select the checkbox "Copy field values" and the corresponding checkboxes for the screen objects. Give the screen variant a short description: Save the screen variant. 1-2-2 Second screen: Leave the screen by choosing the appropriate pushbutton. Choose &RS\YDOXHV again in the next dialog box. Select 1RWYLVLEOH for the column "FLH" of the table control. Choose the pushbutton for menu functions and deselect function code "BACK". Save the screen variant. 1-2-3 Third screen: Leave the screen using the 6DYH function. Deactivate menu function "BACK" as in 1-2-2. Save the screen variant. 1-2-4 A list with a summary of all the screen variants that were created appears. You can now check your entries again. Save them to finally create the transaction variant. 1-3 To create a transaction code for the variant you can call the transaction code maintenance screen. Alternatively you can choose the menu path *RWRÆ &UHDWHWUDQVDFWLRQFRGH from transaction SHD0. Call it =%&. 1-4 Go to the area menu maintenance screen (Transaction SE43). Include the transaction variant in your area menu =%&B. Proceed as described in the exercise on maintaining area menus. © SAP AG TAW12 21-25 (QKDQFHPHQWVWR$%$3'LFWLRQDU\(OHPHQWV &RQWHQWV z $SSHQGVWUXFWXUHV z &XVWRPL]LQJLQFOXGHV z 7H[WHQKDQFHPHQWV SAP AG 2002 © SAP AG TAW12 22-1 (QKDQFHPHQWVWR$%$3'LFWLRQDU\(OHPHQWV8QLW 2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z (QKDQFHWDEOHVXVLQJDSSHQGVWUXFWXUHV z (QKDQFHWDEOHVXVLQJ&XVWRPL]LQJLQFOXGHV z &KDQJHILHOGODEHOVDQGLQSXWKHOSHQWULHV DVVRFLDWHGZLWKGDWDHOHPHQWVZLWKRXWPRGLI\LQJ 6$3REMHFWV SAP AG 2002 © SAP AG TAW12 22-2 (QKDQFHPHQWVWRWKH$%$3'LFWLRQDU\2YHUYLHZ 'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVVWUDQVDFWLRQHYHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 22-3 7DEOH(QKDQFHPHQWV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z (QKDQFHWDEOHVXVLQJDSSHQGVWUXFWXUHV z (QKDQFHWDEOHVXVLQJ&XVWRPL]LQJLQFOXGHV SAP AG 2002 © SAP AG TAW12 22-4 7DEOH(QKDQFHPHQWV 2YHUYLHZ z 7KHUHDUHWZRZD\VWKDW\RXFDQDGGDGGLWLRQDOILHOGVWR WDEOHVZLWKRXWPRGLI\LQJ\RXUV\VWHP z $SSHQGVWUXFWXUH z $SSHQGVWUXFWXUHVDUHFUHDWHGIRUXVHZLWKD VSHFLILFWDEOH z 0XOWLSOHDSSHQGVWUXFWXUHVFDQEHXVHGZLWKD VLQJOHWDEOH z $SSHQGVWUXFWXUHVFDQEHXVHGMXVWOLNHDQ\RWKHU VWUXFWXUH z &XVWRPL]LQJLQFOXGH z 0XVWEHVSHFLILHGE\WKH6$3GHYHORSHU z ,VFUHDWHGE\WKH FXVWRPHU SAP AG 2002 Tables and structures can be expanded in one of two different ways: y Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures, customers can add their own fields to any table or structure they want. y Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it. If it is known in advance that one of the tables or structures delivered by SAP needs to have customer-specific fields added to it, the SAP application developer includes these fields in the table using a Customizing include statement. y The same Customizing include can be used in multiple tables or structures. This ensures consistency in these tables and structures whenever the include is extended. y Nonexistent Customizing includes do not lead to errors. © SAP AG TAW12 22-5 $SSHQG6WUXFWXUHV <<)LHOG ==)LHOG $SSHQGVWUXFWXUH 7DEOH )LHOG )LHOG )LHOG *)+ ,- . /1 0/ ' 22 SAP AG 2002 Append structures allow you to attach fields to a table without actually having to modify the table itself. Append structures may only be assigned to a single table. A table may, however, have several append structures attached to it. Whenever a table is activated, the system searches for all active append structures for that table and attaches them to the table. If an append structure is created or changed and then activated, the table it is assigned to is also activated, and all of the changes made to the append structure take effect in the table as well. You can use the fields in append structures in ABAP programs just as you would any other field in the table. If you copy a table that has an append structure attached to it, the fields in the append structure become normal fields in the target table. © SAP AG TAW12 22-6 $SSHQG6WUXFWXUHVDW8SJUDGH <<)LHOG ==)LHOG $SSHQGVWUXFWXUH 7DEOH )LHOG )LHOG )LHOG )LHOG 1HZ6$3YHUVLRQ LVLPSRUWHG )LHOG )LHOG )LHOG $FWLYDWLRQ )LHOGLVDSSHQGHG LQWKHGDWDEDVH )LHOG 3)4 ,5 . /1/ ' 22 6 SAP AG 2002 You create append structures in the customer namespace. This protects them from being overwritten at upgrade or during release upgrade. New versions of standard tables are loaded during upgrades. The fields contained in active append structures are then appended to the new standard tables when these new standard tables are activated for the first time. From Release 3.0, the field sequence in the ABAP Dictionary can differ from the field sequence in the database. Therefore, no conversion of the database table is necessary when adding an append structure or inserting fields into an existing one. All necessary structure adjustment is taken care of automatically when you adjust the database catalog ($/7(57$%/(). The table’s definition is changed when it is activated in the ABAP Dictionary and the new field is appended to the database table. Pay attention to the following points when using append structures: y You cannot create append structures for pool and cluster tables. y If a table contains a long field (either of data type /&+R or /5$:), then it is not possible to expand the table with an append structure. This is because long fields of this kind must always be the last field in their respective tables. No fields from an append structure may be added after them. y If you use an append structure to expand an SAP table, the field names in your append structure must be in the customer namespace, that is, they must begin with either YY or ZZ. This prevents naming conflicts from occuring with any new fields that SAP may insert in the future. © SAP AG TAW12 22-7 &XVWRPL]LQJ,QFOXGHV &XVWRPL]LQJWUDQVDFWLRQ RU6$3HQKDQFHPHQW &XVWRPL]LQJLQFOXGH <<)LHOG ==)LHOG 7DEOH$ 7DEOH% )LHOG )LHOG &,B,QFO )LHOG )LHOG/ )LHOG0 &,B,QFO )LHOG1 *); ,< $. /1/ =' 22 *78 *"9 : /1/ ' 22 SAP AG 2002 Some of the tables and structures delivered with the R/3 standard contain special include statements: Customizing includes. These are often inserted in those standard tables that need to have customerspecific fields added to them. In contrast to append structures, Customizing includes can be inserted into more than one table. This provides for data consistency throughout the tables and structures affected whenever the include is altered. Customizing include programs are part of the customer namespace; all of their names begin with CI_. This naming convention guarantees that nonexistent Customizing includes do not lead to errors. No code for Customizing includes is delivered with the R/3 standard. You create Customizing includes using special Customizing transactions. Some are already part of SAP enhancements and can be created by using project management. This is discussed further in the unit Enhancements using Customer Exits. The Customizing include field names must lie in the customer namespace just like field names in append structures. These names must all begin with either YY or ZZ. When adding the fields of a customizing include to your database, adhere to same rules you would with append structures. © SAP AG TAW12 22-8 7H[W(QKDQFHPHQWV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z &KDQJHILHOGODEHOVDQGLQSXWKHOSHQWULHV DVVRFLDWHGZLWKGDWDHOHPHQWVZLWKRXWPRGLI\LQJ 6$3REMHFWV SAP AG 2002 © SAP AG TAW12 22-9 7H[W(QKDQFHPHQWV2YHUYLHZ 6$3 &XVWRPHU %* 3>D @?E BA*CF. %*># @?B EA*CFK. G H G HJG I G II H System Help G H G HLG I G II H System Help 6$3NH\ZRUG &XVWRPHUNH\ZRUG ? ? 6$3GRFXPHQWDWLRQ 6$3GRFXPHQWDWLRQ &XVWRPHUGRFXPHQWDWLRQ SAP AG 1999 Possible text enhancements include customer keywords and customer documentation of data elements. Text enhancements differ from other application enhancements in that they take effect globally in all related SAP applications after activation (global enhancements). © SAP AG TAW12 22-10 .H\ZRUGV 6$3 &XVWRPHU 'HILQLQJ GDWDHOHPHQWV 'HILQLQJ JOREDO HQKDQFHPHQWV .H\ZRUG .H\ZRUG 6KRUW 0HGLXP /RQJ +HDGHU 6KRUWWH[W ) 6KRUW 0HGLXP /RQJ +HDGHU 6KRUWWH[W ) SAP AG 1999 SAP application programmers define keywords in different lengths and a short description for each data element. Use the project management function to change these keywords and short texts. All screen fields that use the keyword text of data elements can be renamed in this manner. A new short text in a data element will appear in the F1 help of the screen field. © SAP AG TAW12 22-11 (GLWLQJ7H[W(QKDQFHPHQWV ?*3&P(M1"#=NO= G H G HQG I G II H System Help 3URMHFW *OREDOHQKDQFHPHQWV .H\ZRUGV 'DWDHOHPHQWV %* 3>D @?R BA3CF. System Help &XVWRPHUNH\ZRUGV 6KRUW 0HGLXP /RQJ +HDGHU &XVWRPHUVKRUWWH[W %*3>@ D?E BA*CFK. G H G H G I G II H System Help G H G H G I G II H &XVWRPHUGRFXPHQWDWLRQ ? SAP AG 2002 To edit text elements in project management choose $%$3:RUNEHQFKÆ8WLOLWLHVÆ(QKDQFHPHQWV Æ3URMHFWPDQDJHPHQW Under *OREDOHQKDQFHPHQWVyou can find enhancement functions for keywords and documentation for data elements. © SAP AG TAW12 22-12 5HTXLUHPHQWVIRU&KDQJLQJ.H\ZRUGV 6$3 6FUHHQ3DLQWHU )LHOGOLVW %1'& S?WT(&XVU Y = G H G H G I G II H System Help . . ($02' /)$/)15 /)$/)15 . . . SAP AG 2002 In order for keyword changes to take effect on a screen, SAP application programmers have to maintain the MOD attribute (keyword modification indicator) of the affected field accordingly in the Screen Painter field list. The MOD attribute must have one of the following values: SPACE: the keyword that best fits the field length 1: short keyword 2: medium keyword 3: long keyword 4: keyword for header V: variable text transfer from the ABAP Dictionary F: fixed, no text transfer If ) is entered, then the keyword is fixed on the screen and cannot be replaced. In all other cases, screens that refer to that particular data element will show the changed keyword. © SAP AG TAW12 22-13 .H\ZRUG&KDQJHVDQG5HOHDVH8SJUDGHV 6$3 &XVWRPHU Release x.x Release x.x Z\[]b^` a Z\[]_^\`a System Help 2OG6$3NH\ZRUG System Help G H G H G I G II H &XVWRPHUNH\ZRUG G H G HLG I G II H Release y.y Z\[]b^` a Release y.y System Help Z\[]_^\`a System Help 1HZ6$3NH\ZRUG 1HZ6$3NH\ZRUG G H G HJG I G II H G H G HLG I G II H Restore customer Release x.x Z\[]b^` a System Help &XVWRPHUNH\ZRUG G H G HLG I G II H SAP AG 1999 You must always restore keywords after a release upgrade or after new corrections have been imported, whenever SAP has redelivered existing keywords. If customers want to retain their own keywords from the last release, they should choose the menu option 5HVWRUHFXVWRPHU. SAP recommends that you always restore your keywords after a release upgrade. Keywords are restored by a program running in the background. This program checks all of the data elements that you have edited and restores their keywords and short texts if necessary. With certain central keywords, such as BUKRS, MANDT, and so on, we recommend that you start the restoration process at a time when the contents of the tables that use BUKRS and MANDT are not being changed. Otherwise, activation of the data element may fail, changing the status to only partially active. © SAP AG TAW12 22-14 5HVWRULQJ6$3.H\ZRUGV 6$3 &XVWRPHU Release x.x Z\[]b^` a System Help &XVWRPHUNH\ZRUG Release x.x G H G H G I G II H Z\[]_^\`a System Help 6$3NH\ZRUG H G I G II G H G J H Restore SAP Release x.x Z\[]b^` a System Help 6$3NH\ZRUG G H G H G I G II H SAP AG 1999 To undo keyword changes, choose the menu option 5HVWRUH6$3. Keywords are restored by a program running in the background. This program checks all of the data elements that you have edited and restores their keywords and short texts if necessary. With certain central keywords, such as BUKRS, MANDT, and so on, we recommend that you start the restoration process at a time when the contents of the tables that use BUKRS and MANDT are not being changed. © SAP AG TAW12 22-15 (QKDQFHG'RFXPHQWDWLRQIRU'DWD(OHPHQWV &XVWRPHU 6$3 *OREDOHQKDQFHPHQWV 'DWDHOHPHQWV 'DWDHOHPHQWV 'RFXPHQWDWLRQ &XVWRPHUGRFXPHQWDWLRQ %* 3>D @?E BA*CF. System Help %*># @?B EA*CFK. G H G H G I G II H System Help G H G H G I G II H ,1&/8'(6$3 ,1&/8'(6$3'RNX! 6$3GRFXPHQWDWLRQ &XVWRPHUGRFXPHQWDWLRQ SAP AG 1999 When enhancing data element documentation, include your SAP documentation as an include module. By doing this you do not lose the reference to SAP documentation. Any following documentation delivered by SAP is also taken into consideration. If you press the F1 key while on the appropriate field after you have activated your documentation, your text will appear in addition to the SAP documentation. You can generate a list of data elements that have been changed and edit the documentation by selecting the elements’ corresponding lines in the list. Simply delete your own documentation if you want original SAP documentation to be displayed. © SAP AG TAW12 22-16 &XVWRPHU'RFXPHQWDWLRQ *OREDOHQKDQFHPHQWV 'DWDHOHPHQWV &XVWRPHUGRFXPHQWDWLRQ %* 3>D @?R BA3CF. System Help %*># @?B EA*CFK. G H G H G I G II H System Help G H G H G I G II H ([SDQG,1&/8'(! ,1&/8'(6$3'RNX! &XVWRPHUGRFXPHQWDWLRQ &XVWRPHUGRFXPHQWDWLRQ SAP AG 1999 You also have the option to create your own data element documentation independent of the SAP documentation. However, this is not recommended, since the reference to SAP documentation is lost. If SAP delivers a new version of the documents in question, you may miss important information. You may also use the include module for the SAP documentation in your own documentation. You should only do this, however, if changes to the contents of the original documentation are absolutely necessary in your R/3 System. The reference to SAP documentation is not totally lost in this case, but any changes that appear in later versions will not be reflected in your system. © SAP AG TAW12 22-17 7H[W(QKDQFHPHQWV 6XPPDU\ c ==($ O& d*&K !(e '(fO & ' O(= &XVWRPHU NH\ZRUGV %3 *>@ D?B EA*CKF. System Help G H G HLG I G II H 6$3NH\ZRUG SAP AG 1999 SAP customers can enhance the R/3 System with their own keywords, short texts, and documentation for data elements. These enhancements can be made using the project management function. Once they are activated, enhancements of this kind are available in all SAP applications that use the data elements in question. © SAP AG TAW12 22-18 (QKDQFHPHQWVWR$%$3'LFWLRQDU\(OHPHQWV8QLW 6XPPDU\ <RXDUHQRZDEOHWR z (QKDQFHWDEOHVXVLQJDSSHQGVWUXFWXUHV z (QKDQFHWDEOHVXVLQJ&XVWRPL]LQJLQFOXGHV z &KDQJHILHOGODEHOVDQGLQSXWKHOSHQWULHV DVVRFLDWHGZLWKGDWDHOHPHQWVZLWKRXWPRGLI\LQJ 6$3REMHFWV SAP AG 2002 © SAP AG TAW12 22-19 © SAP AG TAW12 22-20 ([HUFLVHV 8QLW (QKDQFHPHQWVWR$%$3'LFWLRQDU\2EMHFWV 7RSLF 7DEOHHQKDQFHPHQWV At the conclusion of this exercise, you will be able to: • Enhance tables with append structures. You work as a computer specialist for a large travel agency. Your company uses R/3. One of the transactions in your R/3 System has been specifically tailored to process air travel data. Your fellow employees use transaction %&B to display flight information when helping customers. They would like more information about a flight, for example the pilot’s name or the main meal. Your flight data is stored in table 6)/,*+7. You need to add two columns to this table without modifying it. 1-1 How can you add these two fields to table 6)/,*+7without modifying it? 1-1-1 How do you go about enhancing table 6)/,*+7? 1-1-2 Enhance table 6)/,*+7 with a technique that does not require modifications. 1-2 Create an append structure for table 6)/,*+7. 1-2-1 Include two fields in the structure: One should contain the SLORW VQDPH (character string of length 25) and one should contain the PHDO (character string of length 20). Note: You must create the pilot name as the first structure field and the meal as the second field. You must also create the fields with the length and type specified. Your Instructor will execute a program that will fill your table and the append structure with data. 1-2-2 Define the types of the fields. Choose the type that you think is most suitable. You will use these fields later on in a screen. Doing a little more work now will save you work later on. © SAP AG TAW12 22-21 © SAP AG TAW12 22-22 6ROXWLRQV 8QLW (QKDQFHPHQWVWR$%$3'LFWLRQDU\2EMHFWV 7RSLF 7DEOHHQKDQFHPHQWV 1-1 An append structure is the only way to enhance a transparent table ()/,*+7is such a table) without modifying it. 1-1-1 How do you go about enhancing table 6)/,*+7? You can work with append structures just like with "normal" structure definitions. They are created and attached to a table (or structure). Call the ABAP Dictionary (transaction SE11 or from the Object Navigator), choose the pushbutton Edit Object and then select the tab for Dictionary. In either case, enter table name 6)/,*+7 and choose 'LVSOD\. 1-1-2 Enhance table 6)/,*+7 with the append technique. The detailed procedure is described below: 1-2 Create your append structure using either the menu option *RWRÆ$SSHQG VWUXFWXUHV« or its corresponding pushbutton; accept the name that the system proposes. Give the append structure a short description and save it under the development class you created. 1-2-1 Include two fields in the structure: The field names must begin with YY or ZZ. For example <<3,/27 and <<0($/. One should contain the SLORW VQDPH (character string of length 25) and one should contain the PHDO (character string of length 20). 1-2-2 Create one data element each to define the field type. Ideally you should use forward navigation. Enter the name =B3,/1$0( and double-click on the field. Give the data element a short description and an adequate field label. Create a data element called =B0($/ for the meal. Remember to activate the data element. 1-3 © SAP AG Activate the append structure. If an error occurs, you can find details in the activation log. TAW12 22-23 (QKDQFHPHQWV8VLQJ&XVWRPHU([LWV &RQWHQWV z ,QWURGXFWLRQ z (QKDQFHPHQWPDQDJHPHQW z )XQFWLRQPRGXOHH[LWV z 0HQXH[LWV z 6FUHHQH[LWV SAP AG 1999 © SAP AG TAW12 23-1 (QKDQFHPHQWV8VLQJ &XVWRPHU([LWV 8QLW 2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z ([SODLQKRZHQKDQFHPHQWVZRUNZLWKFXVWRPHU H[LWV z (QKDQFHSURJUDPVXVLQJIXQFWLRQPRGXOHH[LWV z (QKDQFHPHQXVXVLQJPHQXH[LWV z (QKDQFHPHQXVXVLQJVFUHHQH[LWV z ([SODLQKRZWKHGLIIHUHQWW\SHVRIHQKDQFHPHQW LQWHUDFW SAP AG 2002 © SAP AG TAW12 23-2 (QKDQFHPHQWV8VLQJ&XVWRPHU([LWV2YHUYLHZ'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z 7DEOHV z 'DWDHOHPHQWV z &XVWRPHUH[LWV z )XQFWLRQPRGXOHH[LWV z 0HQXH[LWV z 6FUHHQH[LWV z %XVLQHVVWUDQVDFWLRQHYHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 23-3 &XVWRPHU([LWV 2YHUYLHZ 2YHUYLHZ 2YHUYLHZ (QKDQFHPHQW0DQDJHPHQW (QKDQFHPHQW0DQDJHPHQW )XQFWLRQ0RGXOH([LW )XQFWLRQ0RGXOH([LW 0HQX([LW 0HQX([LW 6FUHHQ([LW 6FUHHQ([LW SAP AG 2002 © SAP AG TAW12 23-4 6$3$SSOLFDWLRQ(QKDQFHPHQWV 6$3 &XVWRPHU GHYHORSV $SSOLFDWLRQ IXQFWLRQ XVHV GHILQHV &RPSRQHQWVRIWKH DSSOLFDWLRQ HQKDQFHPHQW HGLWV VXPPD UL]HV $SSOLFDWLRQ HQKDQFHPHQW DFWLYDWHV SAP AG 2002 Application enhancements allow customers to enhance their application functions. Customer exits are preplanned by SAP and generally consist of several components. Application enhancements are inactive when delivered and can be completed and activated by customers as they are needed. Application enhancement characteristics: y Each enhancement provides you with a set of preplanned, precisely defined functions. y Each interface between SAP and customer functions is clearly defined. As a customer, you do not need in-depth knowledge of how to implement SAP applications. You do not need to adjust enhancements at upgrade because of new functions that SAP has developed. © SAP AG TAW12 23-5 &XVWRPHU(QKDQFHPHQW3URMHFWV 6$3 &XVWRPHU 'HILQLWLRQ RI 6$3 'RFXPHQW 'HILQLWLRQ RI HQKDQFHPHQW SURMHFWV 602' &02' SAP AG 1999 The SAP application programmer creates SAP enhancements from function module exits, menu exits and screen exits. A management function is provided for this purpose (transaction code SMOD). Customers are given a catalog containing an overview of existing SAP enhancements. They can then combine the SAP enhancements they want into an enhancement project using transaction CMOD. © SAP AG TAW12 23-6 (QKDQFHPHQWVDQG(QKDQFHPHQW3URMHFWV & ( & & & & ( & & & & & & & & & ( & & ( & 6$3HQKDQFHPHQW ( $FWLYDWH & ( ( ( $FWLYDWH & $FWLYDWH & ( & & &RPSRQHQW SAP AG 1999 SAP enhancements are made up of component parts. These components include function module exits, menu exits, and screen exits. A specific component may be used only once in a single SAP enhancement (this guarantees the uniqueness of SAP enhancements). Customer enhancement projects consist of SAP enhancements. Each individual SAP enhancement may be used only once in a single customer enhancement program (this guarantees the uniqueness of a customer project). © SAP AG TAW12 23-7 &XVWRPHU([LWV (QKDQFHPHQW0DQDJHPHQW 2YHUYLHZ 2YHUYLHZ (QKDQFHPHQW0DQDJHPHQW (QKDQFHPHQW0DQDJHPHQW )XQFWLRQ0RGXOH([LW )XQFWLRQ0RGXOH([LW 0HQX([LW 0HQX([LW 6FUHHQ([LW 6FUHHQ([LW SAP AG 2002 © SAP AG TAW12 23-8 7KH6$3(QKDQFHPHQW&UHDWLRQ3URFHGXUH )XQFWLRQPRGXOHH[LWV &XVWRPHUH[LWV LQDSSOLFDWLRQIXQFWLRQV GHILQH 0HQXH[LWV 6FUHHQH[LWV &ROOHFW FRPSRQHQWVIRU 6$3HQKDQFHPHQWV & ( & & 6$3GRFXPHQWDWLRQ 'RFXPHQW HQKDQFHPHQWSURMHFW SAP AG 1999 The SAP application programmer plans possible application enhancements in an application and defines the necessary components. These components are combined in SAP enhancements. The programmers document their enhancements as best they can, so that customers can implement the enhancements without having to analyze program source code or screen source code. © SAP AG TAW12 23-9 3URFHGXUHDWWKH&XVWRPHU V3UHPLVHV ' & (( * ( ) &+!,. "((( (#$( &% ( & $FWLYDWH & ( & ([LWIXQFWLRQPRGXOHV / 02+ + . 1 +(% (( * ( ) 0HQXHQWULHV 6XEVFUHHQV 5 5 4 % * $ (+0#(4# $ ( &6 ++77 3)#4#4#* $ ( (( * ( ) ' & (( * ( ) 8 # & SAP AG 1999 First, create an enhancement project and then choose the SAP enhancements that you want to use. Next, edit your individual components using the project management function and document the entire enhancement project. Finally, activate the enhancement project. This activates all of the project’s component parts. © SAP AG TAW12 23-10 &UHDWLQJ&XVWRPHU(QKDQFHPHQW3URMHFWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW &UHDWH 1DPHRIWKH 1DPHRIWKH HQKDQFHPHQWSURMHFW HQKDQFHPHQWSURMHFW &UHDWH &UHDWH 6XEREMHFWV $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH (QKDQFHPHQW3URMHFW$WWULEXWHV 3URMHFW 'HVFULSW SURMHFW! SAP AG 2002 Transaction CMOD starts the project management function. You must give your enhancement project a name. SAP recommends that you think up a naming convention for all of your projects. You can, for example, include the project’s transaction or module pool in its name. All enhancement project names must be unique. Next, go to the project’s attributes and enter a short text describing the enhancenent project. The system inserts all of the project’s other attributes (such as created by, created on, or status). © SAP AG TAW12 23-11 $VVLJQLQJ6$3(QKDQFHPHQWVWR&XVWRPHU 3URMHFWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW &UHDWH 6XEREMHFWV $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH 6$3(QKDQFHPHQWVLQ3URMHFW (QKDQFHPHQW 'HVFULSWLRQ SAP AG 2002 Use the project management function to assign SAP enhancements to customer enhancement projects. Enter the names of the SAP enhancements you want to use on the appropriate screen. The search function gives you a catalog-like overview of existing SAP enhancements. From there you can select those enhancements that are of interest to you. © SAP AG TAW12 23-12 (GLWLQJ&RPSRQHQWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW &UHDWH )XQFWLRQPRGXOH 6XEREMHFWV &KDQJHWH[W $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW 0HQXWH[W &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ )XQFWLRQ%XLOGHU &RS\ &KDQJH 6FUHHQ3DLQWHU SAP AG 2002 Use the product management function to edit the components of your enhancement project. Depending on whether the component you are editing is a function module, a menu entry, or a subscreen, you branch to either the Function Builder, a dialog box for entering menu entries, or to the Screen Painter. © SAP AG TAW12 23-13 $FWLYDWLQJ(QKDQFHPHQW3URMHFWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW &UHDWH $FWLYDWLRQ $FWLYDWLRQ 6XEREMHFWV $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH SAP AG 2002 Activation of an enhancement project affects all of its components. After it has been activated successfully, the project has the status DFWLYH. During activation, all programs, screens, and menus containing components that belong to the project are regenerated (programs at the time they are executed). After activation, you can see the effect of the enhancements in your application functions. The 'HDFWLYDWH function allows you to reset an active enhancement project’s status to LQDFWLYH. © SAP AG TAW12 23-14 7UDQVSRUWLQJ3URMHFWV 'HYHORSPHQWV\VWHP 1H[WV\VWHP $FWLYDWH ( & & ( & 7UDQVSRUW UHTXHVW ( & $FWLYDWH & ( & SAP AG 1999 When the enhancement project was created, you should have assigned it to a change request. Each of the component pieces (include programs, subscreens, menu exits, and so on) should be assigned to the same change request. Using the same change request allows you to transport the entire enhancement at the same time. © SAP AG TAW12 23-15 &XVWRPHU([LWV )XQFWLRQ0RGXOH([LW 2YHUYLHZ 2YHUYLHZ (QKDQFHPHQW0DQDJHPHQW (QKDQFHPHQW0DQDJHPHQW )XQFWLRQ0RGXOH([LW )XQFWLRQ0RGXOH([LW 0HQX([LW 0HQX([LW 6FUHHQ([LW 6FUHHQ([LW SAP AG 2002 © SAP AG TAW12 23-16 3URJUDP([LWV2YHUYLHZ 6$3 GHILQHV )XQFWLRQPRGXOH H[LW &XVWRPHU DFWLYDWHV &DOO $GPLQLVWUDWLRQ )XQFWLRQ PRGXOH ,QWHUIDFH 6RXUFHFRGH 'RFXPHQWDWLRQ SAP AG 1999 Function module exits allow customers to implement additional logic in application functions. SAP application programmers define where function module exits are inserted and what kind of data they transfer. SAP programmers also create an exit’s corresponding function modules complete with short text, interface, and documentation, as well as describing each function module exit’s intended purpose in the SAP documentation. You write the source code for the function modules yourself. If need be, you can also create your own screens, text elements, and includes for the function group. The system processes your ABAP code when the enhancement project (of which your function module is a component) is activated. Function module exits have no effect prior to enhancement project activation. © SAP AG TAW12 23-17 )XQFWLRQ0RGXOH([LW 3URFHVV)ORZ $SSOLFDWLRQSURJUDP ;IXQFWLRQJURXS ([LWIXQFWLRQPRGXOH (;,7BSURJBQDPH!B &$//&86720(5)81&7,21 ,QFOXGHLQ FXVWRPHUQDPHVSDFH SAP AG 1999 This graphic shows the flow of a program providing an enhancement in the form of a function module exit. The exit function module is called in the PAI logic of a screen at a position determined by the SAP application developer. Within the function module, the user can add functions in the customer namespace using an include. © SAP AG TAW12 23-18 &DOOLQJDQG&UHDWLQJ)XQFWLRQ0RGXOHV 352*5$0SURJUDPBQDPH! 352*5$0SURJUDPBQDPH! 67$572)6(/(&7,21 67$572)6(/(&7,21 &$//&86720(5 &$//&86720(5)81&7,21 (;3257,1* ,03257,1* )81&7,21322/;$$$ )81&7,21322/;$$$ )81&7,21H[LWBSURJUDPBQDPH!B )81&7,21H[LWBSURJUDPBQDPH!B ,1&/8'(][DDDX (1')81&7,21 (1')81&7,21 SAP AG 2002 To call function modules use the ABAP statement &$//&86720(5)81&7,21 QQQ where nnn is a three-digit number. The programmer must also create the function module he wants to call and its related function group. These function modules always belong to function groups whose names begin with X (X function group). The following naming convention applies to function modules: • Prefix: EXIT • Name: Name of the program that calls the function module • Suffix: Three-digit number The three parts of the name are separated by an underscore. The CALL CUSTOMER-FUNCTION statement is only executed once the enhancement project has been activated. Multiple calls of the same function module are all activated at the same time. © SAP AG TAW12 23-19 )LQGLQJ)XQFWLRQ0RGXOH([LWV z )URPDQDSSOLFDWLRQ SURJUDP z 8VLQJWRROV 6\VWHPÆ 6\VWHPÆ 6WDWXV Æ 'RXEOH 'RXEOHFOLFNWKHSURJUDPQDPH $SSOLFDWLRQKLHUDUFK\ )LQGFKDUDFWHUVWULQJ FDOO FXVWRPHU *OREDOLQSURJUDPSURJ ! *OREDOLQSURJUDPSURJ! 5HSRVLWRU\ ,QIRUPDWLRQ6\VWHP Æ &02' 8WLOLWLHV ¬ FRPSRQHQWVIRU ,0* Æ 5HVWULFWVHDUFK ZLWK SURJUDPBQDPH! 'RFXPHQWDWLRQ SAP AG 2002 The most frequently asked question concerning enhancements is: how can you see if an application program offers a function module exit? There are a number of ways to find the answer to this question. To see quickly if an application program offers a function module exit, you can follow the path on the left-hand side of the graphic: (The menu path 6\VWHPÆ6WDWXV always displays the name of the current application program). In our example, a suitable character string would be CALL CUSTOMER. Use the )LQG icon and search globally in the program. If your search does not provide any results, you can define a larger search area. Determine the environment for the corresponding program and look for the specific character string in the program environment. The right side of the graphic shows you how to find the name of the required enhancement using search tools. You can restrict the search in the R/3 Repository Information System using different criteria: These are: • Development class (also try generic entries) • Technical name of the enhancement © SAP AG TAW12 23-20 (GLWLQJ)XQFWLRQ0RGXOH([LWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW )XQFWLRQ%XLOGHU &UHDWH )81&7,21H[LWBSURJBQDPH!B 6XEREMHFWV $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW ,1&/8'(][DDDX (1')81&7,21 &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH $%$3(GLWRU ,1&/8'(][DDDX SAP AG 2002 Use the project management (transaction: CMOD) function to edit function modules for function module exits. Use the button for editing components to go directly to the function module editor (display mode). DO NOT change the function module itself. It is especially important that you do not alter the interface in any way. The function module, however, contains an ,1&/8'( statement for an include program that you have to create in the customer namespace. Select the include name beginning with ZX. This automatically takes you to the editor of the include program, where you can enter your code. © SAP AG TAW12 23-21 6WUXFWXUHRID)XQFWLRQ*URXS 6$3/;$$$ 3URJUDPQDPH /;$$$723 *OREDOGDWD /;$$$8;; $OOIXQFWLRQPRGXOHV /;$$$8 )XQFWLRQPRGXOH /;$$$8 )XQFWLRQPRGXOH /;$$$) 6XEURXWLQHV SAP AG 2002 To understand how an X function group works, you need to understand how a normal function group works: y A function group consists of includes. The system assigns unique names to the includes for different objects. Some of the include names are simply proposals and some cannot be changed. y Global data is stored in the TOP include. This include is generated automatically when a function group is created. y Function modules are stored in includes with sequential numbering, and they in turn are all stored in an include ending with UXX. y While you can freely choose the names of the includes for all other objects (subroutines, modules, events, and so on), we advie you to accept the proposed names. © SAP AG TAW12 23-22 6WUXFWXUHRIDQ([LW)XQFWLRQ*URXS 6$3/;$$$ 3URJUDPQDPH /;$$$723 *OREDOGDWD /;$$$7$3 *OREDO6$3GDWD =;$$$723 *OREDO FXVWRPHU GDWD /;$$$8;; $OOIXQFWLRQPRGXOHV /;$$$8 )XQFWLRQPRGXOH =;$$$8 &XVWRPHUVRXUFHFRGH /;$$$8 )XQFWLRQPRGXOH =;$$$8 /;$$$) &XVWRPHUVRXUFHFRGH 6$3VRXUFHWH[WSURSRVDO SAP AG 2002 Exit function groups created by SAP application programmers for enhancment exits contain include programs that begin with either LX or ZX. You can only edit includes beginning with a Z, since they are stored in the customer namespace. No further function modules may be added to the function group. The include program =[DDD8QQ contains the source code for the function modules of a function module exit. © SAP AG TAW12 23-23 ([LW)XQFWLRQ*URXS *OREDO'DWD )81&7,21322/[DDD )81&7,21322/[DDD 6$3/;$$$ ,1&/8'(/;DDD723 ,1&/8'(/;DDD723 ,1&/8'(=;DDD723 ,1&/8'(=;DDD723 /;$$$723 /;$$$7$3 7$%/(6 7$%/(6 '$7$ '$7$ =;$$$723 7$%/(6 7$%/(6 '$7$ '$7$ /;$$$8;; /;$$$8 =;$$$8 /;$$$8 =;$$$8 /;$$$) SAP AG 1999 SAP application programmers can declare global data in include program LXaaaTAP. You can declare your global data in include ZXaaaTOP. Include program LXaaaTOP also contains the FUNCTION-POOL statement, which may not be changed. Therefore, you must always include the message class in parentheses when outputting messages - for example, 0(66$*(( (8 . © SAP AG TAW12 23-24 &XVWRPHU6RXUFH&RGH 6$3/;$$$ /;$$$723 )81&7,21H[LWBSURJUDPBQDPH!B )81&7,21H[LWBSURJUDPBQDPH!B /;$$$7$3 =;$$$723 ,1&/8'(=;DDD8 ,1&/8'(=;DDD8 (1')81&7,21 (1')81&7,21 /;$$$8;; /;$$$8 ,1&/8'(=;DDD8 ,1&/8'(=;DDD8 '$7$ '$7$ ORFDOGDWD! ORFDOGDWD! =;$$$8 /;$$$8 )250 )250 (1')250 (1')250 02'8/( (1'02'8/( 02'8/( (1'02'8/( (1'02'8/( *(7 *(7 $7 $7 =;$$$8 /;$$$) SAP AG 2002 The ,1&/8'( statement for program ZXaaaUnn is in a )81&7,21(1')81&7,21 block. Because of this, neither events, nor subroutines()250), nor modules (02'8/() are allowed here. They can, however, be created in separate includes, which is explained later. Data declarations made here with '$7$ are valid locally in this function module. The SAP application programmer can also make a proposal for the source text. In this case, an ,1&/8'(/;DD)QQ is created (where QQ is the internal number for the function module in the include /;DDD8;;). Documentation is also provided within the SAP enhancement. You can copy the source code from this include into your own customer include program ZXaaaUnn using the project management transaction. You can create your own text elements for the function group. © SAP AG TAW12 23-25 ([LW)XQFWLRQ*URXS 2WKHU6$32EMHFWV 6$3/;$$$ 3URJUDPQDPH /;$$$723 *OREDOGDWD /;$$$8;; $OOIXQFWLRQPRGXOHV /;$$$) 6XEURXWLQHV /;$$$2 3%2PRGXOHV /;$$$, 3$,PRGXOHV /;$$$( $%$3HYHQWV SAP AG 2002 SAP application programmers can supply you with default subroutines in include LXaaaF01. There could be further includes containing specific sub-objects: y LX...F01 contains subroutines delivered by SAP y LX...E01 contains the events belonging to the X function group y LX...O01 contains PBO modules for screens to be delivered y LX...I01 contains the corresponding PAI modules © SAP AG TAW12 23-26 ([LW)XQFWLRQ*URXS &XVWRPHU2EMHFWV 6$3/;$$$ 3URJUDPQDPH /;$$$723 *OREDOGDWD /;$$$8;; $OOIXQFWLRQPRGXOHV =;$$$=== $OORWKHUFXVWRPHUREMHFWV =;$$$) 6XEURXWLQHV =;$$$2 3%2PRGXOHV =;$$$, 3$,PRGXOHV =;$$$( $%$3HYHQWV SAP AG 2002 Subroutines, modules, and interactive events(AT…)are created as include programs and included enhancements using include program ZXaaaZZZ. Additional includes must adhere to the following naming convention: y ZXaaaFnn for subroutines y ZXaaaOnn for PBO modules y ZXaaaInn for PAI modules y ZXaaaEnn for events © SAP AG TAW12 23-27 &XVWRPHU6FUHHQV 6$3/;$$$ /;$$$723 ,1&/8'(=;DDD8 ,1&/8'(=;DDD8 &$//6&5((1 &$//6&5((1 67$57,1*$7 67$57,1*$7 /;$$$8;; /;$$$8 ,1&/8'(=;DDD2 ,1&/8'(=;DDD2 =;$$$8 02'8/( 02'8/( 287387 287387 =;$$$=== (1'02'8/( (1'02'8/( =;$$$2 ,1&/8'(=;DDD, ,1&/8'(=;DDD, =;$$$, 02'8/( 02'8/( ,1387 ,1387 (1'02'8/( (1'02'8/( SAP AG 2002 You can use &$//6&5((1 to call your own screens. Create the related include programs for the Process Before Output (PBO) and Process After Input (PAI) modules in include program =;DDD===. Use forward navigation (select an object and then double-click on it) to create your own screens and modules. Screens created in this manner are automatically given the name of the function module’s main program (6$3/;DDD). The PBO modules for these screens can be found in include =;DDD2, the PAI modules in include =;DDD,. © SAP AG TAW12 23-28 6XPPDU\)XQFWLRQ0RGXOH([LWV 6$3$SSOLFDWLRQ3URJUDP ;)XQFWLRQ*URXS;$$$ $%$3 $%$3 999:;#< =2>;@?(>+A>B9(99 C D)EFDHGJI ;FK)LMN; ?PO(OO Q DR(R Q SBT E U VWXY Z S#[2Q E\ U [^]`_(_ab] W(c2d U(XE+\ [ : MFK2e>f+gih I ;FK)LM N; ?PO Z #S [2Q E\ U [ NjMAkKlBf I K _ _+a O 9 \mVd#U#X+E\ [ :nMFK2e>f+g \ [BQ R S CWpoc >(#>> S)_(a O W [ CZ S [BQ E+\U [ O 9 \ [2Q R S CWpoc >>(> SB_a Q DR(R T Q XW(W [w vu __#(_ O q (> ?(?MA#M#<(r>; lf#<sNBg(g M r I ;#< I Ms#t 6FUHHQV 7H[WHOHPHQWV *UDSKLFDOXVHULQWHUIDFH SAP AG 1999 You can enhance SAP applications by adding your own processing logic at predefined points. Such enhancements can include your own screens with their corresponding processing logic and graphical user interface, as well as text elements created by customers. © SAP AG TAW12 23-29 &XVWRPHU([LWV 0HQX([LW 2YHUYLHZ 2YHUYLHZ (QKDQFHPHQW0DQDJHPHQW (QKDQFHPHQW0DQDJHPHQW )XQFWLRQ0RGXOH([LW )XQFWLRQ0RGXOH([LW 0HQX([LW 0HQX([LW 6FUHHQ([LW 6FUHHQ([LW SAP AG 2002 © SAP AG TAW12 23-30 0HQX([LWV2YHUYLHZ 6$3 0HQX 0HQX &XVWRPHU 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWIXQFWLRQ SAP AG 1999 Menu exits allow you to attach your own functions to menu options in SAP menus. SAP application programmers reserve certain menu entries in your GUI interface for this. This allows you to define a text for the reserved menu entry and add your own logic, often in the form of a related function module exit. Once you activate menu exits, they become visible in the SAP menu. Whenever this menu option is chosen, the system processes either a function provided by SAP application programmers or your own function that you have implemented in a function module exit. © SAP AG TAW12 23-31 0HQX([LW5HTXLUHPHQWV 6$3 0HQX3DLQWHU 0HQX 0HQX %$&. %DFN ',63 'LVSOD\ $%& &XVWRPHUIXQFWLRQ 0HQX SAP AG 2002 In order for you to be able to implement menu exits, SAP application programmers must equip the GUI interface with function codes that begin with a plus sign (+). These function codes are inactive at first and do not appear in the GUI until you activate them. They do not appear on the screen. © SAP AG TAW12 23-32 (GLWLQJ0HQX([LWV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW 3URMHFW0DQDJHPHQW &UHDWH 6XEREMHFWV 0HQXH[LW $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW 6$30DEEFDEF &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH &KDQJHWH[W 0HQXWH[W &RS\ SAP AG 2002 Menu exits are edited with the project management transaction (CMOD). The pushbutton for editing components calls a dialog box where you can enter short descriptions and choose a language for each additional menu entry. You may not make any changes to the GUI interface. © SAP AG TAW12 23-33 0HQX([LWVDQG)XQFWLRQ0RGXOH([LWV 352*5$0SURJUDPBQDPH! 352*5$0SURJUDPBQDPH! '$7$RNBFRGH/,.(V\XFRPP '$7$RNBFRGH/,.(V\XFRPP &$6(RNBFRGH &$6(RNBFRGH :+(1 :+(1 ',63 ',63 :+(1 $%& &$//&86720(5 &$//&86720(5)81&7,21 (;3257,1* LBYDULDEOHV! ,03257,1* HBYDULDEOHV! (1'&$6( (1'&$6( SAP AG 2002 SAP application programmers determine where a program reads additional function codes and how it reacts - either with a function module exit or with a predefined function. © SAP AG TAW12 23-34 6XPPDU\0HQX([LWV xyz {|}~+z $*~+y#( H} | $GGLWLRQDO PHQXHQWULHV 2B!, 2B System Help 6$3 DSSOLFDWLRQ SAP AG 1999 You can implement menu exits based on reserved function codes. The SAP application programmer defines the relevant function codes, assigns them to menus, and often provides a function module exit. Menu exits and function module exits are both part of the same SAP enhancement. No pushbuttons may be assigned to additional function codes. You can, however, make changes to the various menu entries and activate their function codes. © SAP AG TAW12 23-35 &XVWRPHU([LWV 6FUHHQ([LW 2YHUYLHZ 2YHUYLHZ (QKDQFHPHQW0DQDJHPHQW (QKDQFHPHQW0DQDJHPHQW )XQFWLRQ0RGXOH([LW )XQFWLRQ0RGXOH([LW 0HQX([LW 0HQX([LW 6FUHHQ([LW 6FUHHQ([LW SAP AG 2002 © SAP AG TAW12 23-36 6FUHHQ([LWV2YHUYLHZ 6$3 &XVWRPHU 6$35 6$35 )LHOG )LHOG )LHOG )LHOG )LHOG= )LHOG; )LHOG< SAP AG 1999 Screen exits allow you to make use of reserved sections of a main screen (subscreen areas). You can either display additional information in these areas or input data. You define the necessary input and output fields on a customer screen (subscreen). © SAP AG TAW12 23-37 6XEVFUHHQVLQWKH56\VWHP 3KRQHQR )D[QR (PDLO 6$35 1DPH 3KRQHQR )D[QR 6$35 (PDLO 1DPH DEFG 6$35 1DPH 6WUHHW 7RZQ &RXQWU\ DEFG 6WUHHW 7RZQ &RXQWU\ DEFG SAP AG 1999 Subscreens are rectangular areas on your screen that are reserved for displaying additional screens at runtime. Each subscreen area can be filled with a different screen (of type subscreen) at runtime. © SAP AG TAW12 23-38 &DOOLQJD1RUPDO 6XEVFUHHQ z )ORZFRQWURORIWKHPDLQVFUHHQ 352&(66%()25(287387 02'8/( &$//68%6&5((1 DEFG DEFG ,1&/8',1* V\ V\FSURJ 02'8/( 352&(66$)7(5,1387 02'8/( &$//68%6&5((1 DEFG DEFG 02'8/(XVHUBFRPPDQGB SAP AG 2002 The R/3 System determines which screen will be displayed in a subscreen area at PBO. The general syntax is as follows: &$//68%6&5((1VXEVFUHHQBDUHD!,1&/8',1*SUJ!VFUHHQBQR! For each subscreen, PAI and PBO events are processed just as if the subscreen were a normal screen. The sequence of &$//68%6&5((1 statements in your main screen’s flow logic directly determines the order in which the flow logic of individual subscreens is processed. Caution: y Function codes are only processed in the main screen’s flow logic y You are not allowed enter a name for a subscreen’s command field y You are not allowed to define GUI statuses for subscreens y No value for next screen may be entered in a subscreen’s flow control © SAP AG TAW12 23-39 'HILQLQJ6FUHHQ([LWV 6FUHHQIURP6$3DSSOLFDWLRQ 6FUHHQIURP6$3DSSOLFDWLRQ SURJUDP SURJUDP 6$35 6$3/;$$$ 6FUHHQ &XVWILHOG &XVWILHOG DEFG 352&(66%()25(287387 &$//&86720(5 &$//&86720(568%6&5((1 DEFG ,1&/8',1* 6$3/;$$$ SAP AG 2002 The SAP application programmer can reserve multiple subscreen areas for a screen. The subscreen is called during flow control of the main screen with the CALL CUSTOMERSUBSCREEN statement. The name of the subscreen area must be defined without apostrophes. The function group to which the subscreen belongs is defined statically in apostrophes, but the screen number can be kept variable by using fields. The screen number must always have four digits. Screen exit calls are inactive at first, and are skipped when a screen is processed. Only after a corresponding subscreen has been created in an enhancement project, and this project has been activated, will the system process the screen exit. You create subscreens in X function groups. Normally, these function groups also contain function module exits. © SAP AG TAW12 23-40 &DOOLQJ&XVWRPHU6XEVFUHHQV 6$3$SSOLFDWLRQ3URJUDP ;)XQFWLRQ*URXS;$$$ 6FUHHQ 6FUHHQ d XU Q W TT- WZ#U(X(WU S Ed S E O VBU#C S R W OO#O Q DR#(R Q SBT EU V+WX Y TS2T Q XW(W [ > =s ? ] ]`a] O \ [2Q R S C\ [ : ]T D)d#R cDD#(D n VBU#C S R W OO#O d X+U Q W TTi W Z#U(X(WU S E d S E O VBU#C S RW O O(O VBU#C S RW O O(O DEFG d XU Q W TT D2ZEWX\ [ d S E O VBU#C S R W OO#O ? O Q DR#(R Q SBT EU V+WX Y TS2T Q X W(W [ > =s P VBU#C S R W OO#O d X+U Q W TT DBZEWX\ [ d S E O VBU#C S RW O O(O VBU#C S RW O O(O SAP AG 1999 Whenever the statement CALL CUSTOMER-SUBSCREEN <area> INCLUDING <Xfunction-pool> <screen_number> occurs at PBO in the flow control of a screen, a subscreen is included in the subscreen area defined by SAP application programmers. At this point, all modules called during the PBO event of the subscreen are also processed. The PAI event of a subscreen is processed when the calling screen calls the subscreen during its PAI event using the statement CALL CUSTOMER-SUBSCREEN <area>. © SAP AG TAW12 23-41 7UDQVSRUWLQJ'DWDWR6XEVFUHHQV 6$3$SSOLFDWLRQ3URJUDP 6FUHHQ VBU#C S R W O(OO Q DR(R Q ST E#UV2W(X)Y TS2T Q XW(W [ OO(O ;)XQFWLRQ*URXS;$$$ $%$3 $%$3 999:; < =2>;@?>+A>B9#99 C D)EFDHGI ;FK)LM N; ?PO#OO Q DR(R Q SBT E U V+WXY Z S#[+Q E\ U []`_(_a] W(cd(#U#X2+E\ [ : MFK+e+>(f2+gih I ;FKLMN+; ? PO 6FUHHQ Z #S [2Q E\ U [ NjMAkKlBf I K _ _+a O 9 \mVd#U#X+E\ [ :nMFK2e>f+g I ;mKBe>fh¡MKBe>fg8O W [ CZ S [BQ E+\U [ O 999:;#< 2= >;@?(>+A>B9(#99 C#D)EFDHG I F; K2e>(f,O(OO DEFG SAP AG 1999 The global data of the calling program is not known to the X function group that contains your subscreen; SAP application programmers use function module exits to explicitly provide this data to subscreens. In order to facilitate data transport, modules are called in the flow control of the calling program that contain function module exits for transferring data via interface parameters. Function modules belonging to these kinds of function module exits can be found in the same function groups as their corresponding subscreens. © SAP AG TAW12 23-42 7UDQVSRUWLQJ'DWDIURP6XEVFUHHQV 6$3$SSOLFDWLRQ3URJUDP 6FUHHQ ;)XQFWLRQ*URXS;$$$ $%$3 $%$3 999:;#< 2= >; C >+A>B9(#99 C#D)EFDHG I ;FK2e>(f,O(OO DEFG Q DR(R Q ST E#UV2W(X)Y TS2T Q XW(W [ OO(O VBU#C S R W O(OO 6FUHHQ Q DR(R Q SBT E U V+WXY Z S#[+Q E\ U []`_(_ '] \mVBd(#U#X2+E\ [ : NK+e+>(f2+gih I ;FKLMN+; ? PO 999:; < =2>; C +> A>B9#99 C )D EFDHGI ;FK)LM N; ?PO#OO Z #S [2Q E\ U [ NjMAkKlBf I K _ _( O 9 W(c+d#U#X+E\ [ :@NK2e>f+g NK+2e>f+gih I ;FK+2e>(f,!O W [ CZ S [BQ E+\U [ O SAP AG 1999 Data must be transported in the other direction as well, since global data from the X function group that contains your subscreen is not known to the calling program either. For this reason, SAP application programmers use function module exits to return any data to the calling program that was changed in the subscreen. This is done by calling a module during the main screen’s PAI event that contains a function module exit for returning customer data via interface parameters. © SAP AG TAW12 23-43 (GLWLQJ 6XEVFUHHQV 3URMHFW0DQDJHPHQWRI6$3(QKDQFHPHQWV 3URMHFW &UHDWH 3URMHFW0DQDJHPHQW 6FUHHQH[LW 6XEREMHFWV $WWULEXWHV (QKDQFHPHQWDVVLJQPHQW 6$30DEEFBDEFGB6$3/;DDD &RPSRQHQWV 'RFXPHQWDWLRQ 'LVSOD\ &KDQJH 6FUHHQ3DLQWHU SAP AG 2002 Subscreens are edited with the project management transaction (CMOD). The technical names of screen exits consist of the name of the calling program, a four-digit screen number, and the name of the subscreen area, followed by the name of the X function group’s program and the number of the subscreen. © SAP AG TAW12 23-44 (GLWLQJ 6XEVFUHHQV &RPSRQHQWV HQKDQFHPHQWSURMHFW No 6FUHHQ &UHDWH 6FUHHQ H[LVWV" {#¢&(z £ |&|¢}§¤¦y|& System Help Screen type Yes {#(¢& (z £ }¥¤z|&(¢ ( { ¢ # & (z £ }¥¤z|&(¢ System Help { ¢ ( z £ }¤z |&(¢ # System Help System Help @ 9 T D)d R c >>(> T s(f#N#Nr _(( d XU Q W TT- WZ#U(X(WnU S Ed S E O V2U#C S R W D O d¨¤¨¤X¨ U Q W TT DBZEWX\ [ d S E O V2U#C S R W© O &KRRVHREMHFW Sub-screen ,1&/8'(=;DDD2 02'8/(D287387 SAP AG 2002 You must create the subscreen as well as the corresponding PBO and PAI modules. The SAP development environment supports creation with forward navigation. Make sure that your subscreens are of screen type VXEVFUHHQ the first time you create them. You are not allowed to change any of the interfaces in the X function group that the subscreen and the function module exits belong to, nor are you allowed to add any of your own function modules. Note that the same constraints apply as when calling a normal subscreen. © SAP AG TAW12 23-45 6XPPDU\6FUHHQ([LWV ª y |~(¢ y¦ ­ #{#{(¢& (z ª y |6~$(¢ « ¢ ~{ }¥z ¬ ,QWHUIDFH 'DWDWUDQVIHU 2,2 System Help ® 6XEVFUHHQDUHD SAP AG 2002 Screen exits allow you to determine the layout of certain portions of a screen yourself. You can use these areas to display additional information, or to collect and process data. Screen exits must be predefined (planned) by an SAP application programmer. Use the statement CALL CUSTOMER-SUBSCREEN to integrate these preplanned subscreen areas into the flow control of the calling screen at PBO and PAI events. As soon as you activate an enhancement project that contains a subscreen as a component, the calling screen is regenerated and the subscreen is displayed the next time the application function is called. © SAP AG TAW12 23-46 (QKDQFHPHQWV8VLQJ &XVWRPHU([LWV 8QLW 6XPPDU\ <RXDUHQRZDEOHWR z ([SODLQKRZHQKDQFHPHQWVZRUNZLWKFXVWRPHU H[LWV z (QKDQFHSURJUDPVXVLQJIXQFWLRQPRGXOHH[LWV z (QKDQFHPHQXVXVLQJPHQXH[LWV z (QKDQFHVFUHHQVXVLQJVFUHHQH[LWV z ([SODLQKRZWKHGLIIHUHQWW\SHVRIHQKDQFHPHQW LQWHUDFW SAP AG 2002 © SAP AG TAW12 23-47 © SAP AG TAW12 23-48 ([HUFLVHV 8QLW &XVWRPHUH[LWV 7RSLF )XQFWLRQPRGXOHH[LW At the conclusion of this exercise, you will be able to: • Implement an enhancement with a function module exit. Your co-workers have asked you to alter transaction %&B so that every time they try to display the details of a flight in the past, a warning message is displayed. Adjust the program so that there is a warning when a flight in the past is selected without modifying the program. 1-1 Check if it is possible to enhance the transaction. 1-1-1 Did the SAP developer implement a customer exit for the given transaction that you can use to add the required functionality? 1-1-2 What is the name of the corresponding enhancement? Choose the enhancement that you can use to implement a supplementary check when you leave the first screen of the transaction. 1-2 Implement the enhancement. 1-2-1 Name the enhancement project 7*&86 1-2-2 Program the following check: Check that the date that was entered is prior to today’s date (that is,. lies in the past). If this is the case, display a warning containing an appropriate text. 1-2-3 Use message in message class %&. 1-2-5 Check your results. © SAP AG TAW12 23-49 © SAP AG TAW12 23-50 8QLW &XVWRPHUH[LWV 7RSLF 0HQXH[LW At the conclusion of this exercise, you will be able to: • Implement an enhancement with a menu exit in combination with a function module exit. Your co-workers are thrilled with the new functions that you have built into the system. The new warning messages in transaction %&B help them to avoid selecting flights from the past. However, they want more... They want you to allow them to display a list of bookings for their current flight from within the flight display transaction. They already use a program that generates this kind of list, but up until now they have always had to call the program separately. It is called 6$3%&B%22.,1*B. 1-1 Examine transaction %&B. Are there any points in the transaction where you could call another program (or perhaps even a menu option that could allow you to call another program)? 1-1-1 Did the SAP developer implement a customer exit for the given transaction that you can use to add the required functionality? 1-1-2 What is the name of the corresponding enhancement? Choose the enhancement with which you can implement a menu enhancement. 1-2 1-3 © SAP AG Implement the enhancement. 1-2-1 Name the enhancement project 7*&86 1-2-2 Edit the components of the enhancement. In the menu exit, add appropriate menu text that indicates a report will be submitted. In the function exit, submit the report SAPBC425_BOOKING_## and pass the necessary values to the selection screen. Be sure you return to the transaction when the User leaves the report list. HINT: Use the Pattern pushbutton and choose Other Pattern radiobutton and enter SUBMIT in the field. The system will read the parameters of the report and create the SUBMIT statement for you. 1-2-3 Start the report by choosing the supplementary menu entry. Check your results. TAW12 23-51 © SAP AG TAW12 23-52 8QLW &XVWRPHUH[LWV 7RSLF 6FUHHQH[LW At the conclusion of this exercise, you will be able to: • Display further fields in the screen of an SAP transaction and fill them. "It would be really great if the details lists of Transaction %&B for displaying flights would also display further data…" You accept this new challenge from your co-workers and try to solve the problem without having to modify the transaction. Specifically, you start looking for a way to add a couple of new fields to the second screen of this transaction (screen number 200). 1-1 What kind of possibilities are there to place additional fields on a screen? Take a closer look at screen 200 in Transaction %&B and see if this is possible. 1-1-1 Is there a screen exit for enhancing the screen? 1-1-2 If this is the case, what is the name of the corresponding enhancement? 1-2 Implement the enhancement for doing the following (project name: 7*&86): 1-2-1 Enhance the screen with three fields. The following should appear: • Pilot’s name • Meal • Number of seats still free on this flight. 1-2-2 Ensure that the data is correctly transported to the subscreen. 1-3 Check your results. © SAP AG TAW12 23-53 © SAP AG TAW12 23-54 6ROXWLRQV 8QLW &XVWRPHUH[LWV 7RSLF )XQFWLRQPRGXOHH[LW 1-1 You can check if the transaction offers customer exits as follows: 1-1-1 6\VWHPo6WDWXVgives you the name of the corresponding program (6$3%&B)/,*+7) 1-1-2 You now have several ways to look for customer exits: You can either search for the character string &$//&86720(5)81&7,21 globally in the program or you can use the R/3 Repository Information System to search for enhancements containing the program name in the technical name of the component (restrict the search with 6$3%&B)/,*+7 in the component name). The enhancement you were looking for has the name 6%&(. The documentation for the enhancement shows that it is intended for supplementary checks of the first screen of the transaction. 1-2 Choose transaction &02' to implement the enhancement. 1-2-1 You can go to transaction CMOD with the menu path 7RROVo $%$3:RUNEHQFKo8WLOLWLHVo(QKDQFHPHQWVo3URMHFWPDQDJHPHQW. Create a project named 7*&86 here and save it. 1-2-2 Include enhancement 6%&( that you found in your project. 1-2-3 Edit the components. The source text of the exit function module appears in the Function Builder. Create the include by double-clicking. Your source text could be as follows: IF flight-fldate < sy-datum. MESSAGE w011(bc425) WITH sy-datum. ENDIF. 1-2-4 Activate your include. Go back to project management and activate your enhancement project. © SAP AG TAW12 23-55 © SAP AG TAW12 23-56 8QLW &XVWRPHUH[LWV 7RSLF 0HQXH[LW 1-1 Examine the transaction as in the last exercise. It is advisable to search with the R/3 Repository Information System. 1-1-1 Ideally you can use the R/3 Repository Information System to search for a suitable enhancement containing the program name in the technical name of the component (restrict the search with 6$3%&B)/,*+7 in the component name). 1-1-2 The enhancement you were looking for has the name 6%&(. 1-2 Choose transaction &02' to implement the enhancement. 1-2-1 You can go to transaction CMOD with the menu path 7RROVo $%$3:RUNEHQFKo8WLOLWLHVo(QKDQFHPHQWVo3URMHFWPDQDJHPHQW. Create a project named 7*&86 here and save it. 1-2-2 Include enhancement 6%&( that you found in your project. Edit the enhancement’s components. Assign a menu text. Edit the function module exit by double-clicking. Create the customer include using forward navigation. 1-2-3 The source text of the include should be as follows for group: SUBMIT sapbc425_booking_00 WITH so_car = flight-carrid WITH so_con = flight-connid WITH so_fld = flight-fldate AND RETURN. Activate the include program. Activate the enhancement project. © SAP AG TAW12 23-57 © SAP AG TAW12 23-58 8QLW &XVWRPHUH[LWV 7RSLF 6FUHHQH[LWV 1-1 Look at the transaction screens in the Screen Painter. You will see that screen 200 of transaction %&B offers a screen exit. 1-1-1 Examine the flow logic of the screens for character string &$// &86720(568%6&5((1. You will see that screen 200 of transaction %&B offers a screen exit. 1-1-2 You can get the name of the enhancement, for example, by searching in the R/3 Repository Information System (see previous exercises). The name of the enhancement is 6%&(. 1-2 Implement the enhancement in the same way as described in the previous exercises. Create a project called 7*&86in transaction CMOD. Include enhancement 6%&( in your project. Edit the enhancement’s components. 1-2-1 Use the screen exit to enhance the screen. You can create screen 0500 by double-clicking on the enhancement component. Make sure that you choose screen type 6XEVFUHHQ. Copy the fields from the corresponding structure 6)/,*+7 of the Dictionary. You have two options for placing a field on the screen for the free seats: You can declare a variable in the TOP include of the X function group, generate the program. You can then place this program field on the screen. Generate the screen. (Or you can enhance your append structure. You should not do this in the exercise since the trainer fills the fields of the append structure with a program. Enhancing the append structure could result in errors in this program.) 1-2-2 Use the function module exit for a correct data transport. Create the customer include and enter the following source text (example for group 00): SFLIGHT## = FLIGHT. seatsfree = flight-seatsmax – flight-seatsocc. TOP include: TABLES: sflight##. DATA: seatsfree type s_seatsocc. Activate the programs. Activate the enhancement project. 1-3 © SAP AG Execute transaction BC425_## and check your results. TAW12 23-59 %XVLQHVV7UDQVDFWLRQ(YHQWV &RQWHQWV z :KDWDUHEXVLQHVVWUDQVDFWLRQHYHQWV %7( " z 'LIIHUHQWNLQGVRILQWHUIDFHV z 8VLQJEXVLQHVVWUDQVDFWLRQHYHQWV z )LQGLQJEXVLQHVVWUDQVDFWLRQHYHQWV z 'LIIHUHQFHVEHWZHHQFXVWRPHUH[LWVDQGEXVLQHVV WUDQVDFWLRQHYHQWV SAP AG 1999 © SAP AG TAW12 24-1 %XVLQHVV7UDQVDFWLRQ(YHQWV 8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 'HVFULEHKRZ%XVLQHVV7UDQVDFWLRQ(YHQWVZRUN z (QKDQFH\RXUV\VWHPXVLQJ%XVLQHVV7UDQVDFWLRQ (YHQWV z )LQGD%XVLQHVV7UDQVDFWLRQ(YHQWIRUDQ DSSOLFDWLRQSURJUDP z ([SODLQWKHGLIIHUHQFHVEHWZHHQ%XVLQHVV 7UDQVDFWLRQ(YHQWVDQGFXVWRPHUH[LWV SAP AG 2002 © SAP AG TAW12 24-2 2YHUYLHZ'LDJUDP%XVLQHVV7UDQVDFWLRQ(YHQWV 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVVWUDQVDFWLRQHYHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 24-3 %7( 6RIWZDUH'HOLYHU\3URFHVV z 'HOLYHU\SURFHVVZLWKFXVWRPHUH[LWV 6$3 &XVWRPHU &XVWRPHU H[LWV z 'HOLYHU\SURFHVVZLWKEXVLQHVVWUDQVDFWLRQHYHQWV 6$3 ,QGXVWU\ VROXWLRQ 3DUWQHU &XVWRPHU %XVLQHVV WUDQVDFWLRQ HYHQWV SAP AG 2002 Compared with earlier releases, the software delivery process now looks quite different. Previously, only two parties were involved in the delivery: SAP produced the software, and delivered it to its end-customers. Customers could enhance this standard using customer exits. However, now that the software is more component-oriented, more parties have become involved in the process: SAP provides the R/3 standard to each SAP Industry Solution, which uses it as a basis to add on its own encapsulated functions. The next link in the chain might be a partner firm, which builds its own Complementary Software Program (CSP) solution based on R/3. The last link in the chain is the customer, as before. All of the parties involved in this process are potential users and providers of enhancements. This requirement cannot be satisfied by customer exits, which can only be used once. Consequently, SAP developed a new enhancement technique in Release 4.0, which allows enhancements to be reused. © SAP AG TAW12 24-4 %XVLQHVV7UDQVDFWLRQ(YHQWV %7(V z $UHHQKDQFHPHQWVWKDWZHUH GHYHORSHGIRUWKH)LQDQFLDO $FFRXQWLQJ ), FRPSRQHQWRI5 z +DYHSUHGHILQHGLQWHUIDFHVDOORZLQJ FXVWRPHUDFFHVV z +DYHRQHRIWKHIROORZLQJW\SHVRI LQWHUIDFHV z 3XEOLVK 6XEVFULEH z 3URFHVVLQWHUIDFHV SAP AG 2002 Business Transaction Events (BTE) allow you to attach additional components, in the form of a function module, for example, to the R/3 system. Business Transaction Events use one of the following types of interfaces: y 3XEOLVK 6XEVFULEHLQWHUIDFHV These interfaces inform external software that certain events have taken place in an SAP standard application and provide them with the data produced. The external software cannot return any data to the R/3 System. y 3URFHVVLQWHUIDFHV These interfaces are used to control a business process differently than the way in which it is handled in the standard R/3 System. They intervene in the standard process, and return data to the SAP application. You can attach various external developments to the R/3 System. You can create additional developments using the ABAP Workbench. © SAP AG TAW12 24-5 %7( 3RVVLEOH6FHQDULRV 6$37UDQVDFWLRQ ,QWHUIDFHV 'DWDIORZ $GGRQFRPSRQHQWV SAP AG 2002 The example above pertains to Publish & Subscribe interfaces. In this case, data only flows in one direction - from the SAP application to the additional component. SAP application developers make interfaces available to you at certain callup points in a transaction. You can deposit additional logic at these points. In a very basic scenario, SAP partners and customers can use the interfaces themselves. In this case business transaction events function in much the same manner as customer exits. Refer to the Enhancements using Customer Exits section of this course. © SAP AG TAW12 24-6 %7( 3RVVLEOH6FHQDULRV 6$3WUDQVDFWLRQ ,QWHUIDFHV 'DWDIORZ $GGRQ FRPSRQHQWIURPSDUWQHU$ $GGRQ FRPSRQHQWIURPSDUWQHU% %RWKDGGLWLRQDO SURGXFWVH[LVW ZLWKRXWLQWHUIHULQJ ZLWKHDFKRWKHU SAP AG 2002 The above scenario also pertains solely to Publish & Subscribe interfaces. In contrast to customer exits, business transaction events allow you to use an interface for multiple types of additional logic. If this is the case, you must decide which bit of logic you want to execute at what time. Both of your enhancements exist side by side with out impeding each other; however, only one of the enhancements can be processed at runtime. © SAP AG TAW12 24-7 3XEOLVK 6XEVFULEH,QWHUIDFHV3URFHVV,QWHUIDFHV z 36LQWHUIDFHV ,%8 ,%8 3DUWQHU 3DUWQHU &XVW 6$37UDQVDFWLRQ 6$37UDQVDFWLRQ ,%8 z 3URFHVVLQWHUIDFHV 3DUWQHU 3DUWQHU &XVW 7ULJJHUVRQHRUPRUH DGGLWLRQDORSHUDWLRQV ,%8 3DUWQHU 3DUWQHU &XVW 3DUWQHU 3DUWQHU &XVW 3URFHVVHVH[DFWO\RQHDGGRQ FRPSRQHQW SAP AG 2002 Publish & Subscribe interfaces: y Allow you to start one or more (multiple) DGGLWLRQDORSHUDWLRQV when a particular event is triggered. They do not influence the standard R/3 program in any way. y Multiple operations do not interfere with each other. y Add on components can only import data. y Possible applications: Additional checks (authorizations, existing duplicates, and so on) Process interfaces: y In contrast to Publish & Subscribe interfaces, data is exchanged in both directions with process interfaces. This affects the number of additions that can be attached to the interface. y When an event is triggered, a process in the standard program can only be replaced by DVLQJOH H[WHUQDOSURFHVV using the process interface. y If you are using an add on from an SAP partner that uses a process interface, this enhancement is processed at runtime. If you choose to use this same process interface for one of your own developments, the partner enhancement is discarded and your own enhancement is processed at runtime instead. © SAP AG TAW12 24-8 %XVLQHVV7UDQVDFWLRQ(YHQW)XQFWLRQV 3URFHVV )ORZ'LDJUDP $FWLYHLPSOHPHQWDWLRQ $SSOLFDWLRQSURJUDP )XQFWLRQPRGXOH 23(1B),B3(5)250BQR! %7( )XQFWLRQPRGXOHLQ FXVWRPHU QDPHVSDFH &$//)81&7,21 &$//)81&7,21 SAP AG 2002 The graphic shows the process flow of an SAP program. The program contains an enhancement in the form of a Business Transaction Event. The program calls a function module that determines and processes the active implementation of the enhancement. The names of the function modules begin with OPEN_FI_PERFORM_ or OUTBOUND_CALL_. This function module OPEN_FI_PERFORM_<no> or OUTBOUND_CALL_<no> (Service function module) determines the active implementations for each enhancement and stores them in an internal table. Function modules are implemented in the sequence defined by the internal table. At this point the system also considers the conditions under which the function module will be processed in the customer namespace. For example, you can select the country or application as the condition. These conditions are also shown as filter values. © SAP AG TAW12 24-9 %XVLQHVV7UDQVDFWLRQ(YHQWV &DOOLQJ3URJUDPV 5(3257SURJUDPBXVLQJBEWH! 5(3257SURJUDPBXVLQJBEWH! 67$572)6(/(&7,21 67$572)6(/(&7,21 &$//)81&7,21 23(1B),B3(5)250BB( (;3257,1* LBYDULDEOHV! )81&7,21322/VDSBIS! )81&7,21322/VDSBIS! )81&7,21RSHQBILBSHUIRUPBBH )81&7,21RSHQBILBSHUIRUPBBH /223$7 /223$7 LWDE LWDE LQWR LQWR ZD ZD &$//)81&7,21 ZD ZDIEBQDPH IEBQDPH (;3257,1* LBYDULDEOHV! (1'/223 (1'/223 (1')81&7,21 (1')81&7,21 )0B1$0( =B)8%$ $%&)8%$ &8615)8%$ SAP AG 2002 This graphic shows the syntax used to call a program enhancement using a business transaction event. In the SAP application program, function module OPEN_FI_PERFORM_<...> (or OUTBOUND_CALL_<...>) is called. The application program passes data to the service function module using the interface. SAP developers have already designed the interface. The service function module searches for active implementations and places them in an internal table. They are then processed in a loop. © SAP AG TAW12 24-10 %XVLQHVV7UDQVDFWLRQ(YHQWV 6$3DQGWKH &XVWRPHU 6$3 GHILQH 5HJLVWHU 6$03/(B,17(5)$&(BQ! FUHDWHG &XVWRPHU (YHQW )XQFWLRQ PRGXOH &UHDWHSURGXFW $VVLJQ)0WRHYHQW XVLQJSURGXFW &RS\ 6RXUFHFRGH $FWLYDWH SAP AG 2002 Business transaction events allow you to implement additional logic in a task function, similar to function module exits. SAP application programmers determine where to place business transaction events in a task function and what data should be transferred at each point. They also create sample function modules complete with short texts, an interface, and documentation, and describe the functions possible with the enhancement in the accompanying SAP documentation. First, SAP application programmers assign a business transaction event an eight-digit number by which it can be identified. These numbers should observe a particular convention. For example, the fifth and sixth digits should be identical with events in the same program. The SAP developer registers the event and creates a template function module, VDPSOHBLQWHUIDFHBQ!, which establishes the interface for the user. © SAP AG TAW12 24-11 )LQGLQJD%XVLQHVV7UDQVDFWLRQ(YHQW z 'LUHFWO\LQDSSOLFDWLRQ z 8VLQJWRROV %XVLQHVV7UDQVDFWLRQ (YHQWV ,0* 6\VWHPo 6\VWHPo 6WDWXV o 'RXEOH 'RXEOHFOLFNRQ SURJUDPQDPH )LQGFKDUDFWHUVWULQJ )RUH[DPSOH 23(1B),B3(5)250 )LQDQFLDO$FFRXQWLQJ ¬ %DVLFVHWWLQJV 8VH%7( *OREDOLQSURJUDPSURJ! o 6$35HIHUHQFH,0* (QYLURQPHQW ¬ ,QIRV\VWHP o &KRRVH DSSOLFDWLRQ FRPSRQHQW )LQDQFLDO$FFRXQWLQJ ¬ %DVLFVHWWLQJV ¬ 8VH%7( (QYLURQPHQW ¬ ,QIRV\VWHP o 'RFXPHQWDWLRQ SAP AG 2002 To find out directly whether an application transaction offers business transaction events, you can use the procedure described on the left-hand side of the graphic. In the program source text, search for the character string OPEN_FI_PERFORM. The number that completes the name of the function module is also the name of the event. In the SAP Customizing Implementation Guide (IMG), you will find the entry, Use business transaction events, under the Financial Accounting Global Settings node of the Financial Accounting area. Choosing this entry calls a transaction (FIBF) where you can execute all of the actions necessary for using Business Transaction Events. Under Environmentin the IMG, you will find search functions that you can use to identify appropriate business transaction events. You can view the documentation for the event from the list. © SAP AG TAW12 24-12 %7( 'RFXPHQWDWLRQ (YHQW 6HWWLQJV (QYLURQPHQW ,QIRV\VWHP ,QIRV\VWHP 36 36 6$3%XVLQHVV)UDPHZRUN%XVLQHVV7UDQVDFWLRQ(YHQWV ,QIRV\VWHP ,QIRV\VWHP 3URFHVVHV 3URFHVVHV %XVLQHVV7UDQVDFWLRQ(YHQWV36,QWHUIDFHV .H\ z 0RGHO)0 z ,QWHUIDFH 'HVFULSWLRQ z 'RFXPHQWDWLRQ /LVW RIVHOHFWHGHYHQWV SAP AG 2002 The Environment menu of the service transaction FIBF contains two programs that you can use to search for BTEs. You can restrict the search by using various parameters. The BTEs that the system finds are displayed in a list. You can then: y Display the model function module (start the Function Builder and copy it, for example) y Display the interface y Display the documentation The documentation provides a clear explanation of how to use the enhancment and any restrictions that apply to it. © SAP AG TAW12 24-13 z 7KHSURGXFWJURXSV HQKDQFHPHQWVWRJHWKHU &XVWRPHU &XVWRPHU 3URGXFW 6$37UDQVDFWLRQ %7( 7KH3URGXFW)XQFWLRQ &XVWRPHU z &DQEHDFWLYDWHGRU GHDFWLYDWHGDVDZKROH 21 2)) SAP AG 2002 Use service transaction FIBF to create a product. A product groups together a collection of enhancements. You can create products for various layers in the delivery chain. They define a sequence for processing the implementations of a business transaction event. You can only switch each product on or off as a whole entity. This allows the user to control which enhancements should be processed and which should not. It also ensures the integrity of the whole enhancement. © SAP AG TAW12 24-14 ,PSOHPHQWLQJD%7( )XQFWLRQ%XLOGHU )XQFWLRQPRGXOH 6$03/(B,17(5)$&(BQ!B( =B z &RS\WKHIXQFWLRQ PRGXOHWRWKH FXVWRPHUQDPHVSDFH z 6RXUFHFRGH z $FWLYDWLRQ (YHQW 6HWWLQJV (QYLURQPHQW 6$3%XVLQHVV)UDPHZRUN %XVLQHVV WUDQVDFWLRQHYHQWV 3URGXFWV 3URGXFWV RIDSDUWQHU RIDSDUWQHU 36PRGXOHV 36PRGXOHV RIDFXVWRPHU RIDFXVWRPHU 3URFHVVPRGXOHV 3URFHVVPRGXOHV z &UHDWHSURGXFW (YHQW z $VVLJQIXQFWLRQ PRGXOH 6HWWLQJV (QYLURQPHQW 6$3%XVLQHVV)UDPHZRUN %XVLQHVVWUDQVDFWLRQHYHQWV 3URGXFWV 3URGXFWV RID6$3XVHU RID6$3XVHU 36PRGXOHV 36PRGXOHV RIDSDUWQHU RIDSDUWQHU 3URFHVVPRGXOHV 3URFHVVPRGXOHV RIDFXVWRPHU RIDFXVWRPHU SAP AG 2002 You can use the transaction FIBF (called when you selected, “Use business transaction events”, from the financial accounting hierarchy) to carry out all necessary activities prior to using a business transaction event. First, you must choose an interface to attach your function module to. The ,QWHUIDFH button displays the parameter structure for the interface you have selected. You can also use the documentation to determine what functions each interface allows you to perform. Use the ABAP Workbench to copy the sample function module VDPSOHBLQWHUIDFHBQ! to the customer namespace (z_*) of a customer function group. You must not change the interface. You can fill the module with any source text except COMMIT WORK. Don't forget to activate the function module. Create a product in transaction FIBF. Assign a number to your function module and product. © SAP AG TAW12 24-15 &XVWRPHU([LWVDQG %7( 'LIIHUHQFHV &XVWRPHUH[LWV %XVLQHVV7UDQVDFWLRQ (YHQWV 6RXUFHFRGH 0HQXV 6FUHHQV 7DEOHV $GPLQLVWUDWLRQ OHYHOV 5HXVDEOH &OLHQW &OLHQW VSHFLILF )LOWHU )LOWHU VSHFLILF SAP AG 2002 In contrast to customer exits, business transaction events are FOLHQWVSHFLILF. This means that the same event can be used in different clients for different purposes. Business transaction events may also be used more than once. With Publish & Subscribe interfaces, you can choose which enhancement you want to use. With process interfaces, the system executes a single component in the hierarchical sequence: SAP application, add-on, customer. © SAP AG TAW12 24-16 %XVLQHVV7UDQVDFWLRQ(YHQWV 8QLW6XPPDU\ <RXDUHQRZDEOHWR z 'HVFULEHKRZEXVLQHVVWUDQVDFWLRQHYHQWVZRUN z (QKDQFH\RXUV\VWHPXVLQJEXVLQHVVWUDQVDFWLRQ HYHQWV z )LQGDEXVLQHVVWUDQVDFWLRQHYHQWIRUDQ DSSOLFDWLRQSURJUDP z ([SODLQWKHGLIIHUHQFHVEHWZHHQEXVLQHVV WUDQVDFWLRQHYHQWVDQGFXVWRPHUH[LWV SAP AG 1999 © SAP AG TAW12 24-17 %XVLQHVV $GG,QV &RQWHQWV z ,PSOHPHQWLQJ%XVLQHVV$GG,QV z 'HILQLQJ%XVLQHVV$GG,QV z 8VLQJ%XVLQHVV$GG,QVWRHQKDQFHVFUHHQV SAP AG 2002 © SAP AG TAW12 25-1 %XVLQHVV $GG,QV 8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z ([WHQGSURJUDPIXQFWLRQVXVLQJ%XVLQHVV $GG ,QV z &UHDWH%XVLQHVV$GGLQVVRDVWRPDNHWKHP DYDLODEOHWRVXEVHTXHQW5XVHUVLQWKH GHYHORSPHQWFKDLQ z ,PSOHPHQWVFUHHQHQKDQFHPHQWVXVLQJ%XVLQHVV $GG,QV SAP AG 2002 © SAP AG TAW12 25-2 %XVLQHVV$GG,QV %XVLQHVV6FHQDULR z <RXZDQWWRDGGQHZIXQFWLRQVWRDIOLJKW PDLQWHQDQFHWUDQVDFWLRQ 7KH6$3GHYHORSHUKDV SURYLGHGD%XVLQHVV$GG,Q z <RXZLOODOVRGHILQHD%XVLQHVV$GG,QRI\RXURZQ DQGXVHLWLQDSURJUDP SAP AG 2002 © SAP AG TAW12 25-3 %XVLQHVV$GG,QV2YHUYLHZ'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHUH[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! z %XVLQHVVWUDQVDFWLRQHYHQWV "#$ % $&' z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 25-4 %XVLQHVV$GG,QV 0RWLYDWLRQ z 'LVDGYDQWDJHVRIHDUOLHUHQKDQFHPHQWWHFKQLTXHV &RXOGEHXVHG RQO\RQFH FXVWRPHUH[LWV ( 1RVFUHHQHQKDQFHPHQW %XVLQHVV 7UDQVDFWLRQ (YHQWV %7(V ( 1RPHQXHQKDQFHPHQW %7(V ( 1RDGPLQLVWUDWLRQOHYHO %7(V ( z 5HTXLUHPHQWVIRUQHZHQKDQFHPHQWWHFKQLTXHV 5HXVDEOH ( $OOHQKDQFHPHQWW\SHV SURJUDPPHQXVFUHHQ ( ( ( $GPLQLVWUDWLRQOHYHO ,PSOHPHQWHGXVLQJODWHVWWHFKQRORJ\ SAP AG 2002 © SAP AG TAW12 25-5 6RIWZDUH'HOLYHU\3URFHVV z 7KHQ 6$3 &XVW &XVWRPHU H[LWV z 1RZ 6$3 ,%8 3DUWQHU &XVW $%$3([WHQVLRQ $%$32EMHFWV %XVLQHVV $GG ,QV SAP AG 1999 © SAP AG TAW12 25-6 ,QWHUIDFHV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 'HVFULEHDQ$%$32EMHFWVLQWHUIDFH SAP AG 2002 © SAP AG TAW12 25-7 2EMHFWV ,QWHUIDFH 3ULYDWH &RPSRQHQWV Flight Custom er Passenger list Address )/,*+7 3XEOLF DWWULEXWHV $LUOLQH )OLJKW QXPEHU 3XEOLF PHWKRGV 3XEOLF DFFHVV z %22. SAP AG 2002 A class is an abstract description of an object. Each object only exists while the program is running. In this unit, when we talk about objects, we may actually mean the abstract description (the class), depending on the context. An object is described by its class and consists of two layers - an inner and an outer layer. y Public components: The public components are those components of the class (for example, attributes and methods) that are visible externally. All users of the class can use the public components directly. The public components of an object form its LQWHUIDFH y Private components: These components are only visible within an object. Like the public components, the private components can be attributes and methods. The aim of object orientation is to ensure that a class can guarantee its own consistency. Consequently, the data of an object is normally internal, that is, represented using private attributes. The internal (private) attributes of a class can only be changed by methods of the class. As a rule, the public components of a class are methods. The methods work with the data in the class and ensure that it is always consistent. Objects also have an identity to differentiate it from other objects with the same attributes and methods. © SAP AG TAW12 25-8 ,QVWDQFHVRI)XQFWLRQ*URXSVDV2EMHFWV )XQFWLRQJURXS )XQFWLRQJURXS )XQFWLRQ PRGXOH )XQFWLRQ PRGXOH ... 'DWD … ... 'DWD … $%$3SURJUDPZLWK GDWD &$//)81&7,21 ,QWHUQDOVHVVLRQRIDQ$%$3SURJUDP ([WHUQDOVHVVLRQ SAP AG 2002 Until Release 4.0, the nearest thing to objects were function groups and function modules. When you call a function module, an instance of its function group - with all of its data definitions is loaded into the memory area of the internal session. An instance is a real VRIWZDUHREMHFW. An ABAP program can therefore load instances of different function groups by calling function modules, but only one instance of each function group can exist at a time. The principle difference between real object orientation and function modules is that a program can work with instances of different function groups, but not with several instances of a single function group. For example, suppose a program wanted to manage several independent counters, or several orders at the same time. If we did this using a function group, we would have to program an instance management to differentiate between the instances (using numbers, for example). © SAP AG TAW12 25-9 &ODVVHV*HQHUDOL]H)XQFWLRQ*URXSV )* ) &ODVVP ) + LQVWDQFH &ODVV+ LQVWDQFH 'DWD ,QWHUIDFH 'DWD ,QWHUIDFH 'DWD ... … ... … &ODVVPQ LQVWDQFH ) &ODVVP 'DWD+ LQVWDQFH )XQFWLRQ 'DWD PRGXOH 'DWD ,QWHUIDFH ... … ... … ... … ... … $%$3SURJUDPZLWK GDWD ,QWHUQDOVHVVLRQRIDQ$%$3SURJUDP SAP AG 2002 In practice, it is very cumbersome to implement instance management within a function group. Consequently, the data is usually in the calling program, and the function modules work with this data. This causes various problems. For example, all of the users have to work with the same data structures as the function group. If you want to change the internal data structure of a function group, you will affect a lot of users, and the implications of the changes are often hard to predict. Another problem is that all users have FRSLHVof the data, and it is difficult to keep them consistent when changes are made. Working with global data in function groups is dangerous, because it is almost impossible in a complex transaction to control when each function group is loaded. These problems have been solved with the introduction of FODVVHV. Data and functions are defined in FODVVHVinstead of function groups. An ABAP program can then work with any number of runtime instances that are based on the VDPHtemplate. Instead of loading a single runtime instance of a function group implicitly when you call a function module, ABAP programs can create runtime instances of classes explicitly. The individual runtime instances are uniquely identifiable objects and are addressed using object references. © SAP AG TAW12 25-10 ,QWHUIDFHV z ,QWHUIDFHKDVDGHILQLWLRQEXWQRLPSOHPHQWDWLRQ z ,QWHUIDFHVDUHLPSOHPHQWHGE\FODVVHV z 7KH\FDQEHDFFHVVHGXQLIRUPO\XVLQJLQWHUIDFHUHIHUHQFHV ,QWHUIDFH SAP AG 1999 Interfaces are defined LQGHSHQGHQWO\of classes. They can contain declarations for elements such as attributes and methods. Interfaces are implemented by classes The classes then have a uniform external point of contact. They must provide all of the IXQFWLRQVof the interface by implementing its methods. In a program, you can create UHIHUHQFHYDULDEOHV with reference to interfaces. However, you cannot instantiate an interface. Interface references can, however, point to REMHFWVRIGLIIHUHQWFODVVHV. © SAP AG TAW12 25-11 ,PSOHPHQWLQJ%XVLQHVV$GG,QV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 8VH%XVLQHVV$GG,QVWRLPSOHPHQW HQKDQFHPHQWVWRSURJUDPV SAP AG 2002 © SAP AG TAW12 25-12 %XVLQHVV$GG,QV$UFKLWHFWXUH 6$3 ,%8 3DUWQHU « &XVWRPHU *HQHUDWHG $GG,Q &ODVV ,PSOHPHQW ,PSOHPHQW DWLRQ 6$3 SURJUDP 6RIWZDUH SURGXFW %XVLQHVV$GG ,Q,QWHUIDFH ,PSOHPHQW ,PSOHPHQW DWLRQ SAP AG 2002 Unlike customer exits, Business Add-Ins take into account the changes to the software delivery process. The top part of the graphic illustrates the typical delivery process: It no longer merely consists of provider and user. Instead, it can now contain a whole chain of intermediate providers. The bottom part of the graphic explains how Business Add-Ins work. Enhancements are made possible by SAP application programs. This requires at least one interface and an adapter class that implements it. The interface is implemented by the user. The main advantage of this concept is the capacity for reuse. Once implemented, a Business Add-In can be reimplemented by other links in the software chain (further to the right in the graphic). Furthermore, an implementation can also offer Business Add-Ins of its own. © SAP AG TAW12 25-13 %XVLQHVV$GG,QV&RPSRQHQWV $WWULEXWHV %XVLQHVV$GG,Q ,17(5)$&( EDGLLQWHUIDFH! 5HXVDEOH '$7$D )LOWHUGHSHQGHQW )&RGHV ,.-0/12-'34 576 -0/18 @ABCEDF /BC /G$H 9;:=<?> 0(7+2'6P (;3257,1* HBSDU HBSDU ,03257,1* LBSDU *HQHUDWHG %XVLQHVV $GG,Q &ODVV 0(7+2'6P (1',17(5)$&( 6XEVFUHHQV >I3$JKJKFLB1 6 -M/1-'34 56 -0/18 P QC -SRB/2R P AV W$CQ-'H H$B3$-'H 3 N ON N :=I < >UT <.H WC P QC -RKR SAP AG 2002 A Business Add-In contains the components of an enhancement. Each Business Add-In can contain the following components: y Program enhancements: In the Business Add-In, the interfaces for program enhancements are defined in the form of interface methods. This interface is used to implement the enhancement. The SAP program calls the interface methods of the generated Business Add-In class. y Menu enhancements: As with customer exits, you can enter function codes in a Business Add-In. These menu entries are available in the GUI definition and are made visible when the Business Add-In is implemented. y Screen enhancements: As with customer exits, you can define screen enhancements in a Business Add-In, which you can then implement. Several components are created when you define a Business Add-In: y Interface y Generated class (Business Add-In class) that implements the interface The generated class (Business Add-In class) performs the following tasks: y Filtering: If you implement a filter-dependent Business Add-In, the Add-In class ensures that only the relevant implementations are called. y Control: The adapter class calls the active implementations. © SAP AG TAW12 25-14 %XVLQHVV$GG,QV)ORZ'LDJUDP 6HUYLFHFODVV &/B(;,7+$1'/(5 $SSOLFDWLRQSURJUDP 3URFHVVLQJIRU DFWLYHLPSOHPHQWDWLRQV ,QVWDQFHRI $GG,QFODVV EDGLFODVV! $GG $GG,Q,QVWDQFHRI LPSOHPHQWLQJFODVV SAP AG 2002 This graphic shows the process flow of a program that contains a Business Add-In call. It enables us to see the possibilities and limitations inherent in Business Add-Ins. Not shown: You must declare a reference variable referring to the Business Add-In interface in the declaration section. In the first step, an object reference is created by CL_EXITHANDLER, the service class delivered by SAP. We will discuss the precise syntax later on. This generates the conditions for calling methods of program enhancements. When you define a Business Add-In, the system generates a Business Add-In class, which implements the interface. In call (2), the interface method of the Add-In class is called. The Add-In class searches for all of the implementations of the Business Add-In and calls the implemented methods. © SAP AG TAW12 25-15 %XVLQHVV$GG,QV7KH&DOOLQJ3URJUDP 5(3257SURJUDPBXVLQJBEDGL! 5(3257SURJUDPBXVLQJBEDGL! ,QVWDQFHRI EDGL EDGLFODVV! '$7$UBYDU 7<3(5()72EDGL 7<3(5()72EDGLLQWHUIDFH! 67$572)6(/(&7,21 67$572)6(/(&7,21 &$//0(7+2' FOBH[LWKDQGOHU !JHWBLQVWDQFH &+$1*,1* LQVWDQFH UBYDU UBYDU &$//0(7+2'UBYDU !PHWKRG &$//0(7+2'UBYDU (;3257,1* LBYDULDEOHV! ,03257,1* HBYDULDEOHV! UBYDU (1'2)6(/(&7,21 (1'2)6(/(&7,21 SAP AG 2002 This graphic contains the syntax you use to call a Business Add-In. The numbered circles correspond to the calls from the previous page. First, you must define a reference variable with reference to the Business Add-In interface. The name of the reference variable does not necessarily have to contain the name of the Business Add-In. In the first call (1), an object reference is created. This generates an instance of the generated Business Add-In class. Only the methods of the interface can be called with this reference object. You can use this object reference to call the required methods available with the enhancement (2). © SAP AG TAW12 25-16 ,PSOHPHQWLQJ%XVLQHVV$GG,QV ,QLWLDO6FUHHQ %XVLQHVV $GG,QV ,PSOHPHQWDWLRQ 0DLQW,QLWLDO6FUHHQ ,PSOHPHQWDWLRQQDPH 'LVSOD\ 1DPHRIWKH LPSOHPHQWDWLRQ LPSO! &KDQJH &UHDWH &UHDWH %XVLQHVV$GG,QV 'HILQLWLRQ 6HO 'HILQLWLRQQDPH EDGL! SAP AG 2002 To implement Business Add-Ins, use transaction SE19 (7RROVÆ$%$3:RUNEHQFKÆ8WLOLWLHVÆ %XVLQHVV$GG,QVÆ,PSOHPHQWDWLRQ). Enter a name for the implementation and choose &UHDWH. A dialog box appears. Enter the name of the Business Add-In. The maintenance screen for the Business Add-In then appears. Alternatively, you can use the Business Add-In definition transaction (SE18) to reach its implementations. The menu contains an entry, Implementation, which you can use to get an overview of the existing implementations. You can also create new implementations from here. © SAP AG TAW12 25-17 ,PSOHPHQWLQJ%XVLQHVV$GG,QV 0HWKRGV $WWUV ,QWHUIDFH )&RGHV ,QWHUIDFHQDPH 1DPHRILPSOHPHQWLQJFODVV XYH DZQ/G$H 4 HEDZ/G8 5 ] EDGLLQWHUIDFH! LPSOFODVV! T.HEWQCQ-SF 6 DF /2B :[GG\0FLB4H DZ/G &ODVV%XLOGHU(GLW0HWKRG ,)BLQWHUIDFH!aP! X^_.`?abTcF dLe 5 V;3QGFK\ FfB D'H$-d'3QCEH;8;g 5 4HhDiZ/GQ87R jkRLRKR ^.l[TmX^_ `?abTmR SAP AG 2002 You can assign any name to the implementing class. However, it is a good idea to observe the proposed naming convention. The suggested name is constructed as follows: y Namespace prefix, Y or Z y CL_ (for class) y IM_ (for implementation) y Name of the implementation To implement the method, double-click its name. The system starts the Class Builder editor. When you have finished, you must activate your objects. © SAP AG TAW12 25-18 ,PSOHPHQWLQJ%XVLQHVV$GG,QV 3ULYDWH0HWKRGV &ODVV%XLOGHU (GLW0HWKRGEDGLLQWHUIDFH!aP! X^_ `?anToF dLe 5 V;3GFp\ FfB;D'H$-!d'3;CEH8;g 5 4]HDZ/G87R >?:| =ssv X^_.`? ran bT 576 -SF te4 ]HuDSZ/G8v^Q$wq,2abx? ._. ?yKl?z} {RpRKfR R ^2lqTmX^_.`rabTIR &ODVV%XLOGHU &KDQJHFODVVLPSOFODVV! $WWULEXWHV 0HWKRGV 3DUDPHWHUV X H D ZQ/G Y 56 -F te4HEDZ/GQ8 _$ 6 H (YHQWV ([FHSWLRQV T.HEWQCQ-SF 6 DF /2B B;H~4HEDSZ/GFfB]Fp4 6 J H4H$B D'3DF /2B SAP AG 2002 In the implementing class, you can create private methods that you then call from the interface method. To do this you must edit the implementing classes directly in the Class Builder. You create the private methods including interfaces. Specify a visibility level for the method, and implement it. © SAP AG TAW12 25-19 ,PSOHPHQWLQJ%XVLQHVV$GG,QV $FWLYDWLRQ %XVLQHVV $GG,QV ,PSOHPHQWDWLRQ 0DLQW,QLWLDO6FUHHQ ,PSOHPHQWDWLRQQDPH 'LVSOD\ LPSO! &KDQJH &UHDWH z $FWLYDWLRQ z 8QGRDFWLYDWLRQ SAP AG 2002 Use the Activate icon to activate the implementation of a Business Add-In. From now on, the methods of the implementation will be executed when the relevant calling program is executed. If you deactivate the implementation, the methods will no longer be called. However, the corresponding calls in the application program are still processed. The difference is that the instance of the adapter class will no longer find any active implementations. Unlike CALL CUSTOMERFUNCTION , the CALL METHOD CL_EXITHANDLER=>GET_INSTANCE call is still executed even if there are no implementations. The same applies to the method call that calls the method of the adapter class. You can only activate or deactivate an implementation in its original system without modification. The activation or deactivation must be transported into subsequent systems. If a Business Add-In can only have one implementation, there can still be more than one implementation in the same system. However, only one can be active at any time. © SAP AG TAW12 25-20 %$G, )XQFWLRQ&RGHV 2YHUYLHZ 6$3 0HQX 0HQX &XVW &XVW 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWIXQFWLRQ &XVWIXQFWLRQ SAP AG 2002 As with customer exits, you can use menu enhancements with Business Add-Ins. However, the following conditions must be met: y The developer of the program you want to enhance must have planned for the enhancement. y The menu enhancement must be implemented in a BAdI implementation. © SAP AG TAW12 25-21 %XVLQHVV$GG,Q )XQFWLRQ&RGHV 3UHUHTXLVLWHV 6$3 0HQX3DLQWHU 0HQX 0HQX %$&. ',63 ;;; %DFN 'LVSOD\ &XVWRPHU IXQFWLRQ 0HQX SAP AG 2002 Function codes of menu enhancements begin with a plus sign (+). The menu entry will only appear if there is an active business add-in implementation containing the corresponding enhancement. © SAP AG TAW12 25-22 %XVLQHVV$GG,QV )XQFWLRQ&RGHV 5HVWULFWLRQV $WWULEXWHV ,2-M/1-'34 0B;34H;W 6 3;CEHE0RpRKR ,QWHUIDFH )&RGHV @ABCEDF /BC /GH 9; T HEWCQ-F 6 DF /2B $WWULEXWHV 5HXVDEOH )LOWHUGHSHQGHQW SAP AG 2002 You can only create function codes for single use Business Add-Ins; moreover, the Business Add-In must not be filter-dependent. These restrictions are necessary to ensure that there are no conflicts between two or more implementations. (Which menu entry should be displayed?) © SAP AG TAW12 25-23 %XVLQHVV$GG,QV 3URFHVVLQJ)XQFWLRQ &RGHVLQWKH 3URJUDP 352*5$0SURJUDPBXVLQJBEDGL! 352*5$0SURJUDPBXVLQJBEDGL! '$7$RNBFRGH/,.(V\XFRPP '$7$RNBFRGH/,.(V\XFRPP '$7$UBYDU '$7$UBYDU 7<3(5()72EDGLLQWHUIDFH! 7<3(5()72EDGLLQWHUIDFH! &$6(RNBFRGH &$6(RNBFRGH :+(1 :+(1 ',63 ',63 :+(1 ;;; &$//0(7+2'UBYDU !PHWKRG ! &$//0(7+2'UBYDU !PHWKRG! (;3257,1* LBYDULDEOHV! ,03257,1* HBYDULDEOHV! (1'&$6( (1'&$6( SAP AG 2002 If the user chooses the menu entry in the program to which the function code, +<exit>, is assigned, the system processes the relevant method call. The method call and the menu enhancement belong inseparably to one another. Having the former without the latter would make no sense. For this reason, it is important that the two enhancement components are combined in a single enhancement - the Business Add-In. © SAP AG TAW12 25-24 'HILQLQJ%XVLQHVV$GG,QV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 'HILQH%XVLQHVV$GG,QV z :ULWHDSURJUDPWKDWRIIHUVDQHQKDQFHPHQW XVLQJD%XVLQHVV$GG,Q SAP AG 2002 © SAP AG TAW12 25-25 %XVLQHVV$GG,Q'HILQLWLRQ ,QLWLDO6FUHHQ %XVLQHVV $GG,QV 'HILQLWLRQ0DLQWHQDQFH,QLWLDO6FUHHQ 1DPHRI %$G,GHILQLWLRQ 'HILQLWLRQQDPHBB 'LVSOD\ &KDQJH &UHDWH &UHDWH SAP AG 2002 To create a Business Add-In, use the BAdI Builder (7RROVÆ$%$3:RUNEHQFKÆ8WLOLWLHVÆ %XVLQHVV$GG,QVÆ'HILQLWLRQ). © SAP AG TAW12 25-26 %XVLQHVV$GGLQ'HILQLWLRQ $WWULEXWHV $WWULEXWHV ,2-M/1-'34 ,QWHUIDFH )&RGHV @ABCEDF /BC /GH T HEWCQ-F 6 DF /2B $WWULEXWHV 5HXVDEOH )LOWHUGHSHQGHQW )LOWHU7\SH ILOWHUBW\SH! SAP AG 2002 A Business Add-In has two important attributes that you must define: y Reusable y Filter-dependent If you want the Business Add-In to support multiple active implementations, select 5HXVDEOH. The sequence in which the implementations will be processed is not defined. Even if the Business Add-In does not support multiple use, you can still have more than one implementation for it. However, only one implementation can be DFWLYHat a time. If you make a Business Add-In filter-dependent, you can make calls to it depending on certain conditions. You must specify the filter type in the form of a data element or as an ABAP Dictionary structure. The value table of the domain used by the data element contains the valid values for the implementation. If you use a structure for the filter type, the same applies to each field in this structure. When the enhancement method is called, a filter value must be passed to the interface. © SAP AG TAW12 25-27 %XVLQHVV$GG,Q'HILQLWLRQ )XQFWLRQ&RGHV $WWULEXWHV M Q ';] ;EE'pK ,QWHUIDFH )&RGHV $ $ ?EQ$f M $WWULEXWHV 5HXVDEOH )LOWHUGHSHQGHQW SAP AG 1999 You can include function codes in a Business Add-In definition (like menu exits in customer exits). To do this, enter the program name and function code, and a short description on the relevant tab page. Restrictions: y It is not currently possible to create BAdIs that consist RQO\of menu enhancements (function codes). y If you use menu enhancements, you cannot reuse a BAdI or make it filter-dependent. © SAP AG TAW12 25-28 %XVLQHVV$GG,Q'HILQLWLRQ,QWHUIDFH0HWKRGV $WWULEXWHV ,QWHUIDFH )&RGHV ,QWHUIDFHQDPH EDGLLQWHUIDFH! &ODVV%XLOGHU &KDQJH,QWHUIDFHEDGLLQWHUIDFH! $WWULEXWHV 0HWKRGV 3DUDPHWHUV XnHEDZ/G 5 4H;DZ/G2h8 5 4H;DZ/GO 8 _ 6 H (YHQWV ([FHSWLRQV T H WCQ-F 6 DiF /B ^.BZ;3$BCEHQ4]H$B D 4 HEDZQ/G ^.BZ;3$BCEHQ4]H$B D 4 HEDZQ/GO SAP AG 2002 The system proposes a name for the interface and the generated class. You can, in principle, change the name of the interface to anything you like. However, your Business Add-In will be easier to understand if you retain the proposed name. The name of the generated class is composed as follows: y Namespace prefix y CL_ (to signify a class in general) y EX_ (stands for exit) y Name of the Business Add-In (without the namespace prefix) If you double-click the interface name, the system switches to the Class Builder, where you can define the interface methods. A Business Add-In interface can have several interface methods. © SAP AG TAW12 25-29 %XVLQHVV$GG,Q'HILQLWLRQ 0HWKRG,QWHUIDFH3DUDPHWHUV &ODVV%XLOGHU &KDQJH,QWHUIDFHEDGLLQWHUIDFH! $WWULEXWHV 0HWKRGV 3DUDPHWHUV XnHEDZ/G 5 4H;DZ/G8 _ 6 H (YHQWV ([FHSWLRQV T H WCQ-F 6 DiF /B < A;WFKB;HEW;W:[GG\0yKB]4H DSZ/G m $WWULEXWHV 0HWKRGV ,73$-'34HED'H$- W 0HWKRGV _ 6 H y 4 6 /- DFfB1 ^$ 6 /2- DFKB1 >UZ;3$BQ1FKB1 (YHQWV ([FHSWLRQV x.H dSRh_$ 6 H T?HEWC$-F 6 DF /B SAP AG 2002 You can use all of the normal functions of the Class Builder. For example, you can: y Define interface methods y Define interface parameters for the methods y Declare the attributes of the interface If the Business Add-In is filter-dependent, you must define an import parameter IOWBYDO for each method. Otherwise, you define the interface parameters you need for the enhancement. © SAP AG TAW12 25-30 %XVLQHVV$GG,Q'HILQLWLRQ $FWLYDWLQJWKH,QWHUIDFH &ODVV%XLOGHU &KDQJH,QWHUIDFHEDGLLQWHUIDFH! $WWUV 0HWKRGV 3DUDPHWHUV XnHEDZ/G 4 H DZ/G8 5 ] _ 6 H (YHQWV ([FHSWLRQV $FWLYDWLRQ T EH WCQ-F 6 DF /2B <mA WFKB;H W;Wb:qGG\yKB4]H DZ/G SAP AG 2002 Once you have finished working on your interface, you must activate it. This generates the Business Add-In class for the Business Add-In. If you change the interface, the Add-In class is regenerated automatically. You can also generate the adapter class explicitly at any time by choosing 8WLOLWLHVÆ5HJHQHUDWH from the initial screen of the Business Add-In maintenance transaction. © SAP AG TAW12 25-31 %XVLQHVV$GG,Q'HILQLWLRQ&DOOLQ3URJUDP 5(3257SURJUDPBXVLQJBEDGL! 5(3257SURJUDPBXVLQJBEDGL! '$7$UBYDU '$7$UBYDU 7<3(5()72EDGL LQWHUIDFH! 7<3(5()72EDGL LQWHUIDFH! ,QVWDQFHRI EDGL EDGLFODVV! 67$572)6(/(&7,21 67$572)6(/(&7,21 &$//0(7+2' FOBH[LWKDQGOHU !JHWBLQVWDQFH &+$1*,1* LQVWDQFH UBYDU UBYDU &$//0(7+2'UBYDU !PHWKRG ! &$//0(7+2'UBYDU !PHWKRG! (;3257,1* LBYDULDEOHV! ,03257,1* HBYDULDEOHV! UBYDU (1'2)6(/(&7,21 (1'2)6(/(&7,21 SAP AG 2002 To call Business Add-In methods in an application program, you must include three statements in the program: y Declare a reference variable (1) with reference to the Business Add-In interface (in our example, UBYDU). y Call the static method GET_INSTANCE of the service class CL_EXITHANDLER (2). This returns an instance of the required object. This involves an implicit narrowing cast, so that only the interface methods of the object with the reference variable UBYDU can be called. y You can now call all of the methods of the Business Add-In (3). Make sure you specify the method interfaces correctly. © SAP AG TAW12 25-32 &DOOLQJD)LOWHU'HSHQGHQW%XVLQHVV$GG,Q 5(3257SURJUDPBXVLQJBEDGL! 5(3257SURJUDPBXVLQJBEDGL! ,QVWDQFHRI EDGL EDGLFODVV! '$7$UBYDU '$7$UBYDU 7<3(5()72EDGLLQWHUIDFH! 7<3(5()72EDGLLQWHUIDFH! 67$572)6(/(&7,21 67$572)6(/(&7,21 &$//0(7+2' &$//0(7+2' FOBH[LWKDQGOHU FOBH[LWKDQGOHU !JHWBLQVWDQFH !JHWBLQVWDQFH &+$1*,1* &+$1*,1* LQVWDQFH LQVWDQFH UBYDU UBYDU &$//0(7+2'UBYDU !PHWKRG ! &$//0(7+2'UBYDU !PHWKRG! (;3257,1* IOWBYDO ILOWHUZHUW! LBYDULDEOHV! ,03257,1* HBYDULDEOHV! UBYDU (1'2)6(/(&7,21 (1'2)6(/(&7,21 SAP AG 2002 If your Business Add-In is filter-dependent, you must pass an appropriate value to the parameter, IOWBYDO. © SAP AG TAW12 25-33 &UHDWLQJ6FUHHQ(QKDQFHPHQWV8VLQJ$GG,QV 7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z :ULWHDSURJUDPWKDWRIIHUVDQHQKDQFHPHQWXVLQJD %XVLQHVV$GG,Q SAP AG 2002 © SAP AG TAW12 25-34 $GG,Q6FUHHQ(QKDQFHPHQWV3ULQFLSOHV 6$3 DSSOLFDWLRQ SURJUDP Y P ^_¡yfl P _$:=lr>U^ z^_¥yKl P _$:=l?>|^ ,.¢._£T.:m_: ,PSOHPHQWSURJUDP IXQFWLRQJURXS z^_¤T.:I_: 7= ,.¢._£T :I_: q mm 6WDWLFDWWULEXWH 6FUHHQLQVWDQFH DEFG mq $GG,QFODVV EDGLFODVV! zb^_¡T2:m_: ,2¢ _£T2:q_$: zb^_£T:q_$: ,PSOHPHQWLQJ FODVV ,QVWDQFH DWWULEXWHV 6FUHHQGDWD SAP AG 2002 The ABAP virtual machine does not recognize screens bound to classes. Thus, only "classical" programs (of types 1, F, or M) can be used as containers for screens. Screen enhancements need to take this into consideration. When you create a Business Add-In screen enhancement, the provider reserves a subscreen area on the application program screen, which is then filled with the subscreen of the implementing program (similar to customer exits). However, the application program and subscreen container program do not communicate directly, but rather through the generated Business Add-In class. The following slides show this communication process step by step. © SAP AG TAW12 25-35 $GG,Q6FUHHQ(QKDQFHPHQWV&RPSRQHQWV $WWULEXWHV $GG,Q '$7$JOBGDW 0(7+2'6SXW BGDWD 0(7+2'6SXWB ,03257,1* GDWD! GDWD! 5HXVDEOH )LOWHUGHSHQGHQW )&RGHV ¦2§0¨©§'ª« ¬­ §0¨©® ,17(5)$&(,)B(;BEDGL! ³´µQ¶·¸ ¨µ]¶ ¨¹$º ¯ Y ° ±?² 0(7+2'6JHW BGDWD 0(7+2'6JHWB (;3257,1* GDWD! GDWD! 0(7+2'6 (1',17(5)$&( 6XEVFUHHQV ²rª»K»K¸Kµ© ­ §0¨©2§'ª« ¬7­ §'¨7©® ¾ Q¶ §¿fÀ?¨¿ ¾ ´Â ö§'º º$µ°|§'º ª Á?ºEÃQ¶ ¼ ½ ¼;¼ °Yr ± ²[Á ± » ª¿K¿ q SAP AG 2002 If a Business Add-In contains one or more screen enhancements, it cannot be flagged as 5HXVDEOH. If it contains menu enhancements, it cannot be flagged )LOWHU'HSHQGHQW You enter the calling program, screen number, and subscreen area on the 6XEVFUHHQV tab. The name of the implementing program and number of the subscreen screen are specified later by the implementing developer. © SAP AG TAW12 25-36 $GG,Q6FUHHQ(QKDQFHPHQWV&DOOVLQWKH $SSOLFDWLRQ3URJUDP z ,QWKH3%2 z *HQHUDWHWKHLQVWDQFH z 5HJLVWHUWKHLQVWDQFHVRWKDWLPSOHPHQWLQJFODVVHVFDQ DFFHVVLW z *HWWKHSURJUDPQDPHDQGVFUHHQQXPEHURIWKH LPSOHPHQWDWLRQ z 0DNHGDWDDYDLODEOH z &DOOWKHVXEVFUHHQ SAP AG 2002 To provide a screen enhancement using a Business Add-In, you need to do the following in the application program: y Generate the Business Add-In class. y Store a reference to this instance in the Add-In class. y Pass the data - that you want to make available to the enhancement - to the Add-In class. y Get the program name and screen number of the enhancement screen. y Finally, call the screen. © SAP AG TAW12 25-37 $GG,Q6FUHHQ(QKDQFHPHQWV&DOOVLQWKH $SSOLFDWLRQ3URJUDP z ,QWKH3$, z &DOOWKHVXEVFUHHQ z 3DVVWKHGDWDEDFN SAP AG 2002 In the PAI of the main screen, depending on how the implementing developer has designed the interface, you need to pass the changed data back to the application program using another method call. © SAP AG TAW12 25-38 6FUHHQ(QKDQFHPHQWV*HQHUDWLQJDQ,QVWDQFH 6$3DSSOLFDWLRQSURJUDP 6FUHHQ $%$3 &/B(;,7+$1'/(5 ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ É Ç$Ç áÄ2È7ÍQâ$QÅ ßãuä ÏÑÒ7ÓEå Ù Ü Úã æ à ç Ï2Ó ä ÒÜ.èQÓ Ù Ü É â $Ì.éhÌ2é ÒQÜ2è$Ó Ù Ü ß Ï ÏÝ ß Ï $GG,QFODVV EDGLFODVV! æ QÏ Ñ7ÒÓ É Ç$Ç Ê Æ ÊÉË È$ÈÌb$ DEFG SAP AG 2002 In the first step, an instance of the Add-In class is generated, just as in functional enhancements. You do this by calling the factory method JHWBLQVWDQFH from the class CL_EXITHANDLER. The reference variable assigned the type of the interface points to the instance of the Add-In class. © SAP AG TAW12 25-39 6FUHHQ(QKDQFHPHQWV5HJLVWHULQJWKH,QVWDQFH 6$3DSSOLFDWLRQSURJUDP 6FUHHQ $%$3 &/B(;,7+$1'/(5 ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ É Ç$Ç Ê Æ ÊÉË È$ÈÌb$ É Ç$Ç áÄ2È7ÍQâ$QÅ Ï Ý ßãuä ÏÑÒ7ÓEå Ù Ü Úã æ à2èEÏ2Ó ä ÒÜ.èQÓ Ù Ü ß Ï ä Þ$êÝ ä èEë Ø è ß ÝÏÏ$Ü.è ÈQì2; Ë ÍíÌ.é ÒQÜ2è$Ó Ù Ü ß Ï æ QÏ$Ñ7ÒÓU | $GG,QFODVV EDGLFODVV! DEFG SAP AG 2002 Later, the implementation will have to access the instance of the Add-In class. This means that you have to "publish" this instance by passing the reference variable to an attribute of the handler class, which in turn passes this interface reference to the Add-In class. You do this by executing the statement: CALL METHOD cl_exithandler=>set_instance_for_subscreens © SAP AG TAW12 25-40 6FUHHQ(QKDQFHPHQWV0DNLQJ'DWD$YDLODEOH 6$3DSSOLFDWLRQSURJUDP 6FUHHQ $%$3 &/B(;,7+$1'/(5 ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ É Ç$Ç Ê Æ ÊÉË È$ÈÌb$ É Ç$Ç áÄ2È7ÍQâ$QÅ ÏÑ7ÒÓ Û à î7ë.Ó ä Ú$Ù Ó Ù ÈQì2; Ë ÍíÌ.é ×7ÚÙ Ó Ù à $GG,QFODVV EDGLFODVV! 'DWD DEFG SAP AG 2002 To make data available to the implementation, you need to pass it in two steps: Pass the data to the Business Add-In class. This passed data is stored in global attributes in the implementation of this method. We also strongly advise you to provide sample code at this point. The data is passed by calling the method defined in the Add-In. The data stored in the Add-In class in global attributes is automatically passed to the global attributes of the implementing class, if there is an active implementation. © SAP AG TAW12 25-41 6FUHHQ(QKDQFHPHQWV*HWWKH3URJUDP1DPH DQG6FUHHQ1XPEHU 6$3DSSOLFDWLRQSURJUDP 6FUHHQ $%$3 &/B(;,7+$1'/(5 ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ É Ç$Ç Ê Æ ÊÉË È$ÈÌb$ É Ç$Ç áÄ2È7ÍQâ$QÅ ßãuä ÏÑÒ7ÓEå Ù Ü Úã ÏÝ .ÚQï ;Ü î æ à ç Ï2Ó ä î.Ý$ê ç ä .Ù Ü ÚEä2 ä Þ$êÝ ä èEë Ø è ß Ý ÈQì2; Ë ÍíÌ.é $ ðÄ?; Ë ÍíÌ.é ß$Ù$ãã Ï Úä î. 2Ý$ê ç Ý Ù ñ æ 7 ß$Ù$ãã Ï Úä Ú;ï Ü î ÝQê æ $ $GG,QFODVV EDGLFODVV! DEFG SAP AG 2002 %HIRUHexecuting the CALL SUBSCREEN statement in the flow logic of the container screen, you must fill the program name and screen number variables with the values for the relevant subscreen screen. The method call CALL METHOD cl_exithandler=>get_prog_and_dynp_for_subscr gets the calling subscreen screen. If there is no active implementation yet, the method returns an empty dummy subscreen screen (0200) from an existing dummy function group (SAPLSEXM). This screen is then called using the CALL SUBSCREEN <prog> <dynnr>. statement. If, however, there is an active implementation for the Add-In definition you want to use, the subscreen screen specified in the implementation is used. © SAP AG TAW12 25-42 6FUHHQ(QKDQFHPHQWV&DOOLQJWKH6XEVFUHHQ 6$3DSSOLFDWLRQSURJUDP 6FUHHQ $%$3 &/B(;,7+$1'/(5 ,PSOHPHQWLQJ SURJUDP 6FUHHQ ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ Ä.QÅ$ÆÇÈn$ $GG,QFODVV EDGLFODVV! É ?ÇQ$Ç Ê Æ$ ÊE;ÉQË ÈÈ;Ì Ù;Ø2 .ßQÚ ðÌíÌ É ÇQÆQ$År ?óÌíÌ? .éá òî2 .Ý$ê ç Ú;ï ÜQÜ7ÝU | 'DWD DEFG SAP AG 2002 Finally, the application program calls the subscreen screen. If there is no active implementation, the Add-In environment automatically retrieves and displays an empty default subscreen screen. © SAP AG TAW12 25-43 6FUHHQ(QKDQFHPHQWV5HWXUQLQJ6XEVFUHHQ 'DWD 6$3DSSOLFDWLRQSURJUDP 6FUHHQ DEFG $%$3 &/B(;,7+$1'/(5 ,PSOHPHQWLQJ SURJUDP 6FUHHQ ÅQ?ÍuÎÐÏÑÒ7Ó ÍÔ7È Ë È7ÕÖÍ ×Ø2Ù$Ú Ò2ÛEÒQÜÓ;ÏÝÞ Ù7ß ÏàU É ? ÇQ$Ç Ê Æ$ ÊE;ÉQË È È;Ì Ù Ø.ßQÚ ðÌíÌ É ÇQQÆ$År î.Ý$ê ç ?óÌíÌ? .é 2 Ú;ï ÜQÜ7Ý $GG,QFODVV EDGLFODVV! 'DWD Ä.QÅ$ÆÇÈn$ É Ç$Ç áÄ2È7ÍQâ$QÅ ÏÑ7ÒÓ Û à ç Ï2Ó ä Ú$Ù Ó Ù ðÄ?; Ë ÍíÌ.é × ÚÙ Ó Ù à SAP AG 2002 If you want to return more data from the implementation after leaving screen, you must call another method. © SAP AG TAW12 25-44 ,PSOHPHQWLQJ$GG,Q6FUHHQ(QKDQFHPHQWV7RSLF 2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z ,PSOHPHQWDQ$GG,QVFUHHQHQKDQFHPHQW SAP AG 2002 © SAP AG TAW12 25-45 ,PSOHPHQWLQJ$GG,Q6FUHHQ(QKDQFHPHQWV6WHSV z &UHDWHWKHSURJUDP IXQFWLRQJURXS z &UHDWHWKHVXEVFUHHQVFUHHQ z ,QWKH3%2 z *HWWKHLQVWDQFHRIWKHDGDSWHUFODVV z *HWGDWDIURPWKHDGDSWHUFODVV z ,QWKH3$, z :ULWHWKHFKDQJHGGDWDWRWKHDGDSWHUFODVV SAP AG 2002 To implement a Add-In screen enhancement: y Create the implementation for the Add-In definition. Specify the program containing the subscreen screen and the subscreen number. y Create the program specified in the Add-In implementation. y Create and lay out the subscreen screen. y The implementing program must get the instance of the Add-In class. y Data passed from the application to the Add-In class can be retrieved afterwards. If you want to return the changed data to the Add-In class, you must call a method to do so in the subscreen screen PAI. © SAP AG TAW12 25-46 ,PSOHPHQWLQJ$GG,Q6FUHHQ(QKDQFHPHQWV *HWWLQJWKH,QVWDQFH 6$3DSSOLFDWLRQ SURJUDP &/B(;,7+$1'/(5 ,PSOHPHQWLQJSURJUDP $%$3 6FUHHQ 6FUHHQ ÅQ?Íí]ÎöÏÑÒÓõ ÍQÔQÈ Ë ÈÕÖÍ ×ØÙÚ Ò.ÛEÒ$ÜÓQÏ$ÝÞ Ù7ß Ï7à| QY $GG,QFODVV EDGLFODVV! 'DWD É Ç$ÇáÄ2 .È7ÍQ$âQQ$Å Ï $Ý ßã ä Ï7Ñ$Ò7ÓEå Ù Ü Úã æ à ç Ï2Ó ä Ò;Ü.èÓ Ù Ü ß Ï ä Þ$ê$Ý ä èEë Ø è ß Ý;ÏÏQÜ.è ðÄôÄ? I Ë Í 2ðÌ.é ÒQÜ2 7è$Ó Ù Ü ß Ï æ $Ï Ñ7 ÒÓ7 õI Ä.QÅ$ÆÇ;Èn$ DEFG SAP AG 2002 To get the reference to the instance of the Add-In class, there is a method GET_INSTANCE_FOR_SUBSCREENS, in the class CL_EXITHANDLER. The reference is passed using CALL METHOD cl_exithandler=>set_instance_for_subscreens This allows you to access the interface methods and attributes of the Add-In class in the implementing program. © SAP AG TAW12 25-47 ,PSOHPHQWLQJ$GG,Q6FUHHQ(QKDQFHPHQWV*HWWLQJWKH 'DWD 6$3DSSOLFDWLRQ SURJUDP &/B(;,7+$1'/(5 6FUHHQ ,PSOHPHQWLQJSURJUDP ü #" $%$3 6FUHHQ $÷ÿ&$ÿ'(;ù % !) *% + , - ú ÷øù#ú þ$ þá û2 ÿ Q $ùQü ðíû? .÷Qù ! ú $GG,QFODVV EDGLFODVV! û.ùüý7þQÿn Yú$ú$ú û.ùüý7þQÿn Yú$ú$ú 'DWD DEFG SAP AG 2002 The implementing program gets the data from the Add-In class by calling the appropriate interface method. This method must pass the data stored in the global attributes of the Add-In class to the interface. © SAP AG TAW12 25-48 ,PSOHPHQWLQJ$GG,Q6FUHHQ(QKDQFHPHQWV 5HWXUQLQJWKH'DWD 6$3DSSOLFDWLRQ SURJUDP &/B(;,7+$1'/(5 6FUHHQ ,PSOHPHQWLQJSURJUDP $%$3 6FUHHQ ÅQ?Íí]ÎöÏÑÒÓõ ÍQÔQÈ Ë ÈÕÖÍ ×ØÙÚ Ò.ÛEÒ$ÜÓQÏ$ÝÞ Ù7ß Ï7à| QY $GG,QFODVV EDGLFODVV! 'DWD Emq É Ç$ÇáÄ2 .È7ÍQ$âQQ$Å ÏÑ7Ò$Ó72õ Û àEî 2ëÓ ä. 2Ú7Ù Ó Ù ÈQ;ì2 Ë Í 2ðÌ.é ×Ú7Ù Ó Ù àY # DEFG Ä.QÅ$ÆÇ;Èn$ SAP AG 2002 If the data is likely to be changed, this changed data is written to the global attributes of the instance of the Add-In class (similar to when retrieving this data). You do this by calling the appropriate AddIn method. © SAP AG TAW12 25-49 $GGLWLRQDO1RWHVRQ%XVLQHVV$GG,QV7RSLF 2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z ([SODLQZKDWDQH[WHQVLEOHILOWHUW\SHLV z ([SODLQWKHGHIDXOWDQGVDPSOHFRGH SAP AG 2002 © SAP AG TAW12 25-50 ([WHQGLEOH)LOWHU7\SHV 3UHUHTXLVLWHV )LOWHUW\SH '(! '(! 'RPDLQV 'RPDLQV 9DOXHWDEOH 9DOXHWDEOH )LHOG1DPH .H\ 7H[WWDEOH 7H[WWDEOH 7\SH '(! )LHOG1DPH .H\ ODQJXDJH 7\SH '(! 635$6 &URVV &URVVFOLHQW 'HOLYHU\FODVV (RU6 SAP AG 2002 The assignment of the H[WHQGLEOH attribute is subject to the following restrictions: The domain to which the extendible filter type refers must have the following properties: • The domain is linked to a FURVVFOLHQW value table. The value table has exactly one key field which has the data element of the filter type as its field type. • The domain has a text table with two key fields. A key field has the filter type as its field type, and a key field is a language field. To mark a field as a text field, the field must exist in this table that contains the string 7(;7 or 7;7 as a partial string. In the ABAP Dictionary, the text table must be assigned to the value table. • The delivery class of both tables must be ( or 6. All filter values that are created in the context of an extendible filter-dependent Business Add-In must not yet occur in the value field and are added to the value table when the data is saved. Correspondingly, the values are removed from the value table when the implementation or the entire Business Add-In is deleted. The same applies to text tables. © SAP AG TAW12 25-51 'HIDXOW,PSOHPHQWDWLRQ z ([HFXWHGLIQRRWKHUDFWLYH LPSOHPHQWDWLRQLVDYDLODEOH &DOOSURJUDP HQKDQFHPHQW $FWLYH LPSOHPHQWDWLRQ H[LVWV" <HV ([HFXWH LPSOHPHQWDWLRQ z &UHDWHGE\WKHSURYLGHU 1R 'HIDXOW LPSOHPHQWDWLRQ H[LVWV" 1R <HV ([HFXWHGHIDXOW LPSOHPHQWDWLRQ SAP AG 2002 A GHIDXOWLPSOHPHQWDWLRQ is executed whenever no active implementation of a Business Add-In exists. The default implementation is created by the enhancement provider. To create a default implementation in the BAdI definition choose *RWRÆ'HIDXOWFRGH. The system automatically generates a class with a predefined name. Implement the methods so that the required default behavior is generated. You can also create a VDPSOHLPSOHPHQWDWLRQ. This is a template that can be inserted into the methods of the implementation. To create sample implementations choose *RWRÆ6DPSOHFRGH. The system creates a class that implements the methods of the interface. The sample code is displayed for the user as a template. © SAP AG TAW12 25-52 &RPSDULVRQ:LWK2WKHU(QKDQFHPHQW7HFKQLTXHV z (QKDQFHPHQWRSWLRQV &XVWRPHUH[LWV %XVLQHVV WUDQVDFWLRQ HYHQWV %XVLQHVVDGG %XVLQHVVDGGLQV 6RXUFHFRGH 0HQXV 6FUHHQV 7DEOHV $GPLQLVWUDWLRQ OHYHOV 5HXVDEOH )LOWHU )LOWHU VSHFLILF SAP AG 2002 Business Add-Ins are a natural extension of conventional enhancement techniques. They have adopted the concept of the administration layer from customer exits, along with the availability of the various enhancement components. Add-Ins adopted the idea of reusability from business transaction events, and have been implemented using a consistent object-oriented approach. The object-oriented implementation provides previously unavailable opportunities. For example, it would be possible to enhance the 'RFXPHQW object. It would then be possible to provide a new instance of the enhancement for each individual document. © SAP AG TAW12 25-53 %XVLQHVV$GG,Q'HILQLWLRQ 1DPLQJ&RQYHQWLRQV z %XVLQHVV$GG,Q'HILQLWLRQ EDGL!RU=EDGL!RUEDGL! FKRRVHDQ\FRPSO\ZLWKQDPHVSDFH . z ,QWHUIDFH ,)B(;BEDGL!RU=,)B(;BEDGL!RU,)B(;BEDGL! FKRRVHDQ\FRPSO\ZLWKQDPHVSDFH . z 0HWKRGV &KRRVHDQ\QDPH\RXZDQW . z *HQHUDWHG%XVLQHVV$GG,Q&ODVV $GDSWHU&ODVV . &/B(;BEDGL!RU=&/B(;BEDGL!RU&/B(;BEDGL! FDQQRWEHFKDQJHG SAP AG 1999 © SAP AG TAW12 25-54 %XVLQHVV$GG,Q,PSOHPHQWDWLRQ 1DPLQJ &RQYHQWLRQV z %XVLQHVV$GG,Q,PSOHPHQWDWLRQ LPSO!RU=LPSO!RULPSO! FKRRVHDQ\FRPSO\ZLWKQDPHVSDFH . z ,QWHUIDFH ,)B(;BEDGL!RU=,)B(;BEDGL!RU,)B(;BEDGL! GHILQHGLQ%XVLQHVV$GG,QGHILQLWLRQ . z 0HWKRGV 'HILQHGLQ%XVLQHVV$GG,QGHILQLWLRQ . z ,PSOHPHQWLQJFODVV . &/B,0BLPSO!RU=&/B,0BLPSO!RU&/B,0BLPSO! FKRRVHDQ\FRPSO\ZLWKQDPHVSDFH SAP AG 1999 © SAP AG TAW12 25-55 )LQGLQJD%XVLQHVV$GG,Q z 'LUHFWO\LQWKHDSSOLFDWLRQ z 8VLQJWRROV 6\VWHP 6\VWHP! 6WDWXV !'RXEOH !'RXEOHFOLFNSURJUDPQDPH )LQGFKDUDFWHUVWULQJ $SSOLFDWLRQKLHUDUFK\ &/B(;,7+$1'/(5 *OREDOLQSURJUDPSURJ ! *OREDOLQSURJUDPSURJ! 5HSRVLWRU\ ,QIRUPDWLRQ6\VWHP o 'RXEOHFOLFNUHIHUHQFHYDULDEOH 'RXEOHFOLFNLQWHUIDFH &ODVV%XLOGHU o :KHUHXVHGOLVWIRULQWHUIDFH ,0* o &/B(;B$GG,Q1DPH! o 6( $GG,Q1DPH! o 'RFXPHQWDWLRQ o 'RFXPHQWDWLRQ SAP AG 2002 There are various ways of searching for Business Add-ins: y You can search in a relevant application program for the string "CL_EXITHANDLER". If a business add-in is called from the program, the "GET_INSTANCE" method of this class must be called. y You can then reach the definition of the business add-in using forward navigation. The definition also contains documentation and a guide for implementing the Business Add-In. y Use the application hierarchy to restrict the components in which you want to search. Start the Repository Information System, then choose (QKDQFHPHQWV!%XVLQHVV$GG,QV to start the relevant search program. y Alternatively, you can use the entries in the relevant component of the IMG. © SAP AG TAW12 25-56 %XVLQHVV $GG,QV8QLW6XPPDU\ <RXDUHQRZDEOHWR z ([WHQGSURJUDPIXQFWLRQVXVLQJ%XVLQHVV$GG ,QV z &UHDWH%XVLQHVV$GG,QVVRWKH\DUHDYDLODEOHWR VXEVHTXHQW5XVHUVLQWKHGHYHORSPHQWFKDLQ z ,PSOHPHQWVFUHHQHQKDQFHPHQWVXVLQJ%XVLQHVV $GG,QV SAP AG 2002 © SAP AG TAW12 25-57 © SAP AG TAW12 25-58 ([HUFLVHV 8QLW %XVLQHVV$GG,QV 7RSLF 8VLQJ%XVLQHVV$GG,QV At the conclusion of this exercise, you will be able to: • Implement an enhancement with Business Add-Ins The customer service personnel in the agency want the list of bookings that you implemented in the exercise on menu exits to contain more information. The list should contain the name of the customer in addition to his customer number. 1-1 Check if program 6$3%&B%22.,1*B (## = group number) can be enhanced. 1-1-1 Check the program for ways in which it can be enhanced. 1-1-2 Check if an enhancement option is suitable for outputting further information in the list. 1-2 Implement the enhancement you found. Call your implementation =%&,0. 1-2-1 What data is passed to the interfaces of the methods? Are there already fields here that should be displayed in the list? 1-2-2 Table 6&86720 contains the information about the customers. Get the customer’s name from his customer number. Output the name. 1-3 Format the list. 1-3-1 How can you move the vertical line so that the additional fields are displayed within the frame? 1-3-2 Is the &+$1*(B9/,1( method suitable for changing the position of the vertical line? If so, use it. 1-4 © SAP AG Check your results. TAW12 25-59 © SAP AG TAW12 25-60 8QLW %XVLQHVV$GG,QV 7RSLF &UHDWLQJ%XVLQHVV$GG,QV At the conclusion of this exercise, you will be able to: • Create a Business Add-In and offer an enhancement in a program with Business Add-In technology Develop your own supplementary components for the R/3 System. You want to offer an enhancement that can implement subsequent software layers in a program. You deliver a program that outputs list of flight connections. You want to provide your customers with the following enhancement options using a Business Add In: When the user double-clicks a row, developers at the customer’s site should be able to implement other actions. Your customers should be able to build a details list. In the second part of the exercise, test your enhancement. The details list should show all the flights for a connection. 1-1 Create a program that outputs list of flight connections. 1-1-1 To do so, copy program 6$3%&B7(03/$7( to the name =%&B%$',B. 1-1-2 Assign your program to a development class and a change request. 1-2 Create a Business Add-In. 1-2-1 The name of the Business Add-In is =%&. 1-2-2 Create a method. Define the interface. 1-2-3 Which parameter do you have to pass to the interface? 1-3 Edit the program so that a user can double-click on a line to output the details list. 1-3-1 Implement event $7/,1(6(/(&7,21. 1-3-2 Insert the appropriate statements in your program to call a Business Add-In: Declare a reference variable; instantiate an object of the Business Add-In class; implement the call of the Business Add-In method at the right place in the program. © SAP AG TAW12 25-61 1-4 Implement the enhancement (name of the implementation: =%,0). 1-4-1 A details list should be output when you double-click on a line of the list of the application program. The flight dates of the selected connection should be output in the details list. Table 6)/,*+7 contains the flight dates. 1-4-2 Read the relevant data from table 6)/,*+7 to an internal table with Array-Fetch. Then output selected fields of the internal table. 1-4-3 Which variables (attributes of the implementing class) do you have to declare? How do you declare an internal table? Where can you declare a table type? 1-5 © SAP AG Check your results. TAW12 25-62 8QLW %XVLQHVV$GG,QV 7RSLF ,PSOHPHQWDQ$GG,QVFUHHQHQKDQFHPHQW At the conclusion of this exercise, you will be able to: • Implement a screen enhancement using a Business Add-In. Use a transaction of your own to record and change flight data. At present, this transaction offers only standard input fields. Your enterprise wants to record additional data for each flight. The transaction offers an enhancement possibility for this purpose that you will implement. 1-1 Find out whether or not the program 6$3%&B)/,*+7B&+1* offers an enhancement possibility, which you can use to extend the detail recording screen. 1-2 Look for Business Add-Ins with which you can implement the above requirements. 1-2-1 Search the application hierarchy. 1-2-2 Search the Repository Info System. 1-2-3 Search the Implementation Guide. 1-2-4 If you find a Business Add-In, read its documentation and decide whether or not it is suitable for your enhancement. 1-3 Implement the enhancement. 1-3-1 Create the function group =%&,0. You need this function group to create a subscreen screen. 1-3-2 Create a subscreen screen and assign a number to it. 1-3-3 Add the appropriate fields to the screen. 1-3-4 Program the flow logic for this subscreen screen. At the PBO event, get the instance of the Add-In class and the data that is passed from the SAP application. At the PAI event, the changed data must be returned to the SAP application. 1-4 Create a Business Add-In implementation. Name your implementation =%&6,1. 1-4-1 Implement the interface method. 1-4-2 Enter the necessary information on the 6XEVFUHHQV tab. 1-4-3 Activate the implementation. 1-5 © SAP AG Test the enhanced application. TAW12 25-63 © SAP AG TAW12 25-64 6ROXWLRQV 8QLW %XVLQHVV$GG,QV 7RSLF 8VLQJ%XVLQHVV$GG,QV 1-1 Check if program 6$3%&B%22.,1*B (## = group number) can be enhanced as follows: 1-1-1 Place the cursor in the list and choose )Æ7HFKQLFDO,QIR. Double-click on the program name (You can also start directly in the ABAP Editor.). Look for the character string &/B(;,7+$1'/(5 in the program. Doubleclick the transfer parameter H[LWBERRN. Double-click the interface used to define the type of exit_book. The Class Builder is started. Make a whereused list for the interface in classes. A class &/B(;B%$',B%22. is displayed. The name of the Business Add-In is thus %$',B%22.. 1-1-2 Start transaction 6( (Business Add-In definition). Read the documentation about Business Add-Ins. 1-2 From transaction 6(, go to the transaction for creating implementations of Business Add-Ins using ,PSOHPHQWDWLRQÆ&UHDWH. Call your implementation =%&,0. 1-2-1 You can display the interface parameters by double-clicking the method in transaction 6(. In the Class Builder, place the cursor on the required method and choose "Parameters". The transfer structure does not contain the fields that you want to display in the list. You have to read the corresponding data separately. 1-2-2 Double-click on the method name to go to the Editor. A proposal for implementing the methods is given below (group 00): METHOD if_ex_badi_book00~output. DATA: name TYPE s_custname. SELECT SINGLE name FROM scustom INTO name WHERE id = i_booking-customid. WRITE: name. ENDMETHOD. © SAP AG TAW12 25-65 1-3 The FKDQJHBYOLQH method is provided for formatting the list. You can move the right edge of the list here. 1-3-1 Parameter FBSRV defines the position of the right vertical line. 1-3-2 The method can be implemented as follows: METHOD if_ex_badi_book00~change_vline. c_pos = c_pos + 25. ENDMETHOD. © SAP AG TAW12 25-66 8QLW %XVLQHVV$GG,QV 7RSLF &UHDWLQJ%XVLQHVV$GG,QV 1-1 Copy the template program as specified in the exercise. 1-2 To create Business Add-Ins, start transaction SE18 (in the ABAP Workbench: 8WLOLWLHVÆ(QKDQFHPHQWVÆ%XVLQHVV$GG,QVÆ'HILQLWLRQ). 1-2-1 Choose =%& as the name of the Business Add-In. Enter a short description and save your entries. 1-2-2 Choose the tab page "Interface". Double-click on the name of the interface. The Class Builder is started. Enter the name of a method. Give a short description. Choose 3DUDPHWHUV to define the interface. 1-2-3 Define two importing parameters whose types are defined with 6B&$55B,' (airline) and 6B&211B,' (connection number). Activate the interface. The adapter class is also generated. 1-3 Source code of the program with the Business Add-In: *&---------------------------------------------------------* *& Report SAPBC425_TEMPLATE* *&---------------------------------------------------------* REPORT sapbc425_badi. DATA: wa_spfli TYPE spfli, it_spfli TYPE TABLE OF spfli WITH KEY carrid connid. 5HIHUHQFH9DULDEOHIRU%$G, '$7$ H[LWBUHI7<3(5()72]LIBH[BEF * Selection Screen SELECTION-SCREEN BEGIN OF BLOCK carrier WITH FRAME TITLE text-car. SELECT-OPTIONS: so_carr FOR wa_spfli-carrid. SELECTION-SCREEN END OF BLOCK carrier. *&----------------------------------------------------------* © SAP AG TAW12 25-67 *& Event START-OF-SELECTION *&----------------------------------------------------------* START-OF-SELECTION. &$//0(7+2'FOBH[LWKDQGOHU !JHWBLQVWDQFH &+$1*,1* LQVWDQFH H[LWBUHI SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE it_spfli WHERE carrid IN so_carr. *&----------------------------------------------------------* *& Event END-OF-SELECTION *&----------------------------------------------------------* END-OF-SELECTION. LOOP AT it_spfli INTO wa_spfli. WRITE: / wa_spfli-carrid, wa_spfli-connid, wa_spfli-countryfr, wa_spfli-cityfrom, wa_spfli-countryto, wa_spfli-cityto, wa_spfli-deptime, wa_spfli-arrtime. HIDE: wa_spfli-carrid, wa_spfli-connid. ENDLOOP. CLEAR wa_spfli. *&----------------------------------------------------------* *& Event AT LINE-SELECTION. *&----------------------------------------------------------* © SAP AG TAW12 25-68 AT LINE-SELECTION.. CHECK NOT wa_spfli-carrid IS INITIAL. &$//0(7+2'H[LWBUHI!OLQHVHOHFWLRQ (;3257,1* LBFDUULG ZDBVSIOLFDUULG LBFRQQLG ZDBVSIOLFRQQLG FOHDUZDVSIOL © SAP AG TAW12 25-69 Implement the Business Add-In. From transaction SE18 FKRRVH,PSOHPHQWDWLRQVÆ &UHDWH. Give the implementation the name ZBC425##_IM. Choose the tab "Interface" and double-click on the name of the method. The Editor is started. Enter the source text here: 1-4 METHOD zif_ex_bc42500~lineselection. DATA: it_flights TYPE TABLE OF sflight00, wa_flights TYPE sflight00. FORMAT COLOR COL_HEADING. WRITE: / text-hea, i_carrid, i_connid. FORMAT COLOR COL_NORMAL. SELECT * FROM sflight00 INTO CORRESPONDING FIELDS OF TABLE it_flights WHERE carrid = i_carrid AND connid = i_connid. LOOP AT it_flights INTO wa_flights. / wa_flights-fldate, wa_flights-planetype, wa_flights-price CURRENCY wa_flights-currency, wa_flights-currency, wa_flights-seatsmax, wa_flights-seatsocc. ENDLOOP. ENDMETHOD. Activate the implementation. © SAP AG TAW12 25-70 8QLW %XVLQHVV$GG,QV 7RSLF 6FUHHQ(QKDQFHPHQWV 1-1 Find out whether or not the program 6$3%&B)/,*+7B&+1* offers an enhancement possibility, which you can use to extend the entry screen. 1-1-1 Choose 6\VWHPo6WDWXVto get the name of the program. Double-click this program name. Choose *RWRo2EMHFW&DWDORJ(QWU\. This tells you the package to which the application is assigned. Double-click the package name to find out the application component containing this package. 1-2 In either the Repository Info System or the application hierarchy, search for suitable Business Add-Ins, using this package and application component as criteria. 1-2-1 In the Repository, choose (QKDQFHPHQWVo%XVLQHVV$GG,QVo 'HILQLWLRQ to search for Business Add-Ins. 1-2-2 In the application hierarchy, select the application component. Then choose ,QIR6\VWHP to navigate to the Repository Info System. All the packages contained in the application component you have selected are entered as search criteria. 1-2-3 The system returns a list of Business Add-Ins. Select the Business Add-In you are interested in, %&B)/,*+7, and choose 'LVSOD\ You are now in the %XVLQHVV$GG,Q%XLOGHU, where you will find the documentation for this Add-In. Get to know the documentation. 1-3 Implement the enhancement. 1-3-1 Create the function group =%&,0 in the Object Navigator. To do this, display the object list for your package. Click the package name with the right mouse button and choose &UHDWHo)XQFWLRQ*URXS. Enter =%&,0 in the 1DPHfield and create a short description. Save your entries and assign them to a change request. 1-3-2 Create a subscreen in the function group and assign a number to it. Select the function group and choose &UHDWHo6FUHHQ from the context menu. Enter a short description and choose the type 6XEVFUHHQ. 1-3-3 Launch the Layout Editor. Choose *RWRo6HFRQGDU\:LQGRZo 'LFW3URJUDP)LHOGV. Enter the ABAP Dictionary structure and choose *HW IURP'LFW. Select the fields you want and confirm your choice. Add the fields to the screen. © SAP AG TAW12 25-71 1-3-4 Navigate to the flow logic for this subscreen screen. This flow logic should include a call to the following module: 352&(66%()25(287387 02'8/(JHWBLQVWDQFH 02'8/(JHWBGDWD 352&(66$)7(5,1387 02'8/(SXWBGDWD ,1&/8'(/=%&B,02 0RGXOHJHWBLQVWDQFH287387 02'8/(JHWBLQVWDQFH287387 &$//0(7+2'FOBH[LWKDQGOHU !JHWBLQVWDQFHBIRUBVXEVFUHHQV &+$1*,1* LQVWDQFH UBYDU (;&(37,216 27+(56 ,)V\VXEUF! 0(66$*(,'V\PVJLG7<3(V\PVJW\180%(5V\PVJQR :,7+V\PVJYV\PVJYV\PVJYV\PVJY (1',) (1'02'8/(JHWBLQVWDQFH287387 0RGXOHJHWBGDWD287387 02'8/(JHWBGDWD287387 &$//0(7+2'UBYDU!JHWBGDWD ,03257,1* HBFRQQ VG\QBFRQQ (1'02'8/(JHWBGDWD287387 © SAP AG TAW12 25-72 ,1&/8'(/=%&B,0, 0RGXOHSXWBGDWD,1387 WH[W 02'8/(SXWBGDWD,1387 &$//0(7+2'UBYDU!SXWBGDWD (;3257,1* LBFRQQ VG\QBFRQQ (1'02'8/(SXWBGDWD,1387 ,1&/8'(/=%&B,0723 )81&7,21322/NDXUDBLPBEF0(66$*(,' 7$%/(6 VG\QBFRQQ '$7$ UBYDU7<3(5()72LIBH[BEFBIOLJKW © SAP AG TAW12 25-73 1-4 Create a Business Add-In implementation. From the definition, choose ,PSOHPHQWDWLRQVo&UHDWH. Give the implementation the name =%&6,1 and confirm your entries. 1-4-1 To navigate to the ABAP Editor, choose the ,QWHUIDFH tab and double-click the name of the method. 0(7+2'LIBH[BEFBIOLJKWaJHWBGDWD 029(&255(6321',1*ZD72HBFRQQ (1'0(7+2',)B(;B%&B)/,*+7a*(7B'$7$ 0(7+2'LIBH[BEFBIOLJKWaSXWBGDWD 029(&255(6321',1*LBFRQQ72ZD (1'0(7+2',)B(;B%&B)/,*+7a387B'$7$ 1-4-2 On the 6XEVFUHHQV tab, enter the name of the program from your function group, 6$3/=%&,0, and the number of the subscreen screen you created. 1-4-3 Activate the implementation by choosing either ,PSOHPHQWDWLRQo $FWLYDWH or the appropriate button. 1-5 © SAP AG Execute the application and check that your enhancement is processed. TAW12 25-74 0RGLILFDWLRQV &RQWHQWV z :KDWPRGLILFDWLRQVDUH z 0DNLQJPRGLILFDWLRQV z 0RGLILFDWLRQ$VVLVWDQW z 0RGLILFDWLRQ%URZVHU z 8VHUH[LWV z 6$31RWH$VVLVWDQW z 0RGLILFDWLRQDGMXVWPHQWV SAP AG 2002 © SAP AG TAW12 26-1 0RGLILFDWLRQV 8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 'HVFULEHZKDWDPRGLILFDWLRQLV z /LVWWKHPRVWLPSRUWDQWUXOHVWRIROORZGXULQJD PRGLILFDWLRQ z ,PSOHPHQWPRGLILFDWLRQVXVLQJWKH0RGLILFDWLRQ $VVLVWDQW z 8VHXVHUH[LWVWRLPSOHPHQWHQKDQFHPHQWV z 0DLQWDLQ6$31RWHVXVLQJWKH1RWH$VVLVWDQW z $GMXVWPRGLILFDWLRQV SAP AG 2002 © SAP AG TAW12 26-2 0RGLILFDWLRQV2YHUYLHZ'LDJUDP 5%XVLQHVV$SSOLFDWLRQV 7KH6$36WDQGDUG 3HUVRQDOL 3HUVRQDOL ]DWLRQ 0RGLILFDWLRQ z 7UDQVDFWLRQ YDULDQWV z 0RGLILFDWLRQ$VVLVWDQW z 8VHU H[LWV (QKDQFHPHQW z $%$3'LFWLRQDU\ z &XVWRPHUH[LWV ! "#!$ % '& ! ( z %XVLQHVVWUDQVDFWLRQHYHQWV z %XVLQHVV$GG,QV z 2YHUYLHZ SAP AG 2002 © SAP AG TAW12 26-3 2ULJLQDOVDQG&RSLHV 'HYHORSPHQWV\VWHP &XVWREMHFW 2ULJLQDO 6$3REMHFW 2ULJLQDO &XVWREMHFW 7UDQVSRUWRI GHYHORSPHQWV 6$3REMHFW &RS\ 1H[WV\VWHP &RS\ 6$3REMHFW &RS\ SAP AG 2002 An object is original in RQO\RQHV\VWHP. In the case of objects delivered by SAP, the original system is at SAP itself. In customer systems, these objects are then only available as copies. This applies to your development system and all other systems that come after it. If you write your own applications, the objects that you create are original in your development system. You assign your developments to a change request, which has the type 'HYHORSPHQW&RUUHFWLRQ. This request ensures that the objects are transported from the development system into the subsequent systems. © SAP AG TAW12 26-4 &RUUHFWLRQVDQG5HSDLUV 'HYHORSPHQWV\VWHP &XVWREMHFW &RUUHFWHG RULJLQDO &RUUHFWLRQ 6$3REMHFW &RUUHFWHG RULJLQDO &RUUHFWLRQ &XVWREMHFW 7UDQVSRUW RIFRUUHFWLRQ 6$3REMHFW 0RGLILHG FRS\ 5HSDLU 1H[WV\VWHP &RS\ 6$3REMHFW 7UDQVSRUW RIUHSDLU &RS\ SAP AG 2002 Changes to an original are called FRUUHFWLRQV They are recorded in a change request whose tasks have the type 'HYHORSPHQWFRUUHFWLRQ. If, on the other hand, you change a copy (an object outside its own original system), the change is recorded in a task with the type 5HSDLU. Repairs to SAP objects are called PRGLILFDWLRQV When you repair your own objects (for example, if something goes wrong in your production system), you can correct the original in your development system straight away. :KHQ\RXFKDQJH FRSLHV\RXPXVWFRUUHFWWKHRULJLQDOLPPHGLDWHO\ However, you cannot do this with SAP objects, because they are not original in any of your systems. You should only modify the SAP standard if the modifications you want to make are absolutely necessary for optimizing workflow in your company. Be aware that good background knowledge of application structure and flow are essential prerequisites for deciding what kind of modifications to make and how these modifications should be designed. © SAP AG TAW12 26-5 0RGLILFDWLRQVDQG8SJUDGHV 'HYHORSPHQWV\VWHP 1H[WV\VWHP &XVWREMHFW &XVWREMHFW &RUUHFWHG RULJLQDO 6$3REMHFW &RUUHFWHG RULJLQDO &RS\ 6$3REMHFW 0RGLILHG FRS\ 0RGLILFDWLRQ DGMXVWPHQW 6$3REMHFW 7UDQVSRUW RIDGMXVWPHQW &RS\ 8SJUDGH 8SJUDGH SAP AG 2002 Whenever you upgrade your system, apply a Support Package, or import a transport request, conflicts can occur with modified objects. Conflicts occur when you have changed an SAP object and SAP has also delivered a new version of it. The new object delivered by SAP becomes an active object in the Repository of your system. If you want to save your changes, you must perform a PRGLILFDWLRQDGMXVWPHQWfor the objects. If you have a lot of modified SAP objects, your upgrade can be slowed down considerably. To ensure consistency between your development system and subsequent systems, you should only perform modification adjustments in your development system. The objects from the adjustment can then be transported into other systems. © SAP AG TAW12 26-6 3HUIRUPLQJ0RGLILFDWLRQV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 'HVFULEHZKDWWRSD\DWWHQWLRQWRZKHQPRGLI\LQJ SURJUDPREMHFWV SAP AG 2002 © SAP AG TAW12 26-7 5HJLVWHULQJ0RGLILFDWLRQVLQ66&5 ) *'$ (&6,+.-7 /&(0123&854 9 ' ;( <:%='&( System Help &XVWRPHU V\VWHP > ? > ?A> @ > @@ ? ) 3B (&DE:C3 Object list System Help Program SURJUDPBQDPH > ? > ? > @ > @@ ? Please enter the key for object ... F %G%I H4 %DGJM LK F EC3 ) 3BD 3& ; G System Help 6$31HW > ? > ?N> @ > @@ ? PgmID/OBJ/Name 575 Key 352* SURJUDPBQDPH SAP AG 2002 Changes made to SAP sources and manual changes to ABAP Dictionary objects must be registered by a registered developer. Exceptions to this registration are matchcodes, database indexes, buffer settings, customer objects, patches, and objects whose changes are based on automatic generation (for example, in Customizing). If the object is changed again at a later time, no new query is made for the registration key. Once an object is registered, the related key is stored locally and automatically copied for later changes, regardless of which registered developer is making the change. For the time being, these keys remain valid even after a release upgrade. How do you benefit from SSCR (SAP Software Change Registration)? y Quick error resolution and high availability of modified systems All objects that have been changed are logged by SAP. Based on this information, SAP’s First Level Customer Service can quickly locate and fix problems. This increases the availability of your R/3 System. y Reliable operation Having to register your modifications helps prevent unintended modification. This in turn ensures that your R/3 software runs more reliably. y Simplification of upgrades Upgrades and release upgrades become considerably easier due to the smaller number of modifications. © SAP AG TAW12 26-8 &DUU\LQJ2XWD5HJLVWHUHG0RGLILFDWLRQ $%$3(GLWRU z 6WHSV z 66&5NH\ 3URJUDP z &KDQJHUHTXHVW QXPEHU 66&5NH\ :DUQLQJ <RXDUHUHSDLULQJDQ 6$3REMHFW 7DVN 5HSDLUIODJ &KDQJHORFN &KDQJH5HTXHVW ,PSRUWORFN 5HTXHVW 9HUVLRQFUHDWLRQ SAP AG 2002 If you want to change an SAP Repository object, you must provide the Workbench Organizer with the following information: y SSCR key y Change request The above graphic shows you how to obtain an SSCR key. If you now continue to change the object, you must confirm the following warning dialogs: At this point, you can still cancel the action without repairing the object. The Workbench Organizer asks you to enter a change request, as it would for your own objects. The object is automatically added to a repair task. The change request has the following functions: y Change lock After the task has been assigned, only its owner can change the object. y Import lock The object cannot be overwritten by an import (upgrade or support package). y Version creation The system generates a new version of the object (see below). © SAP AG TAW12 26-9 :KHQWKH0RGLILFDWLRQLV)LQLVKHG 'RFXPHQWDWLRQ 5HOHDVHWDVN &KDQJHORFNSDVVHV WRFKDQJHUHTXHVW ,PSRUWORFNSDVVHV WRFKDQJHUHTXHVW &KDQJHORFN UHOHDVHG 5HOHDVHUHTXHVW ,PSRUWORFN UHOHDVHG 9HUVLRQV 7UDQVSRUWGLUHFWRU\ SAP AG 2002 After development is finished, the programmer releases the task. At this point, the programmer must document the changes made. The objects and object locks valid in the task are transferred to the change request. If the developer confirms the repair, the import lock passes to the change request. If the developer does not confirm the repair when releasing the task, the import lock remains in place. Only the developer can release this lock. Once the project is completed, you release the change request. This removes all of the change request’s object locks. This applies both to the change locks and the import locks. When the change request is released, the objects are copied from the R/3 database and stored in a directory at operating system level. The system administrator then imports them into subsequent systems. After the modifications have been imported into the quality system, the developer must test them and check the import log of the request. © SAP AG TAW12 26-10 9HUVLRQV 6$3REMHFW &RS\ )LUVWVDYH )XOOYHUVLRQ %DFNZDUGGHOWD 6$3REMHFW 5HOHDVHUHTXHVW 0RGLILHG FRS\ 5HSDLU SAP AG 2002 When you release a change request, a complete version of all objects contained in the change request is written to the versions database. If you transport the Repository object again later, the current object becomes a complete copy and the differences between the old and the new object are stored in the versions database as a backwards delta. When you assign a Repository object to a task, the system checks whether the current version matches the complete copy in the versions database. If not, a complete copy is created. This process is also initiated the first time you change an object, since SAP does not deliver versions of Repository objects. The versions of a Repository object provide the basis for modification adjustment. To support adjustment, information on whether the version was created by SAP or by the customer is also stored. © SAP AG TAW12 26-11 &ULWLFDO6XFFHVV)DFWRUV z (QFDSVXODWLRQ LQVWHDGRILQVHUWLRQ 5(3257VDSDEDS ,)V\WDEL[ 6'B,QVHUWLRQ FRXQW FRXQW /223$7WDE :+(5(I (1'/223 (1',) 5(3257VDSDEDS ,)V\WDEL[ 6'B,QVHUWLRQ &$//)81&7,21 =B)0 &+$1*,1* FRXQWHU FRXQW 7$%/(6 LWDE WDE (1',) )81&7,21]BIP FRXQWHU FRXQWHU /223$7LWDE :+(5(I (1'/223 (1')81&7,21 ,QVHUWLRQ (QFDSVXODWLRQ SAP AG 2002 Encapsulate customer source code in modularization units instead of inserting it directly into SAP source code (for example, by calling customer function modules in the program source code, or customer subscreen for additional screen fields). © SAP AG TAW12 26-12 &ULWLFDO6XFFHVV)DFWRUV z 8VHQDUURZLQWHUIDFHVGXULQJHQFDSVXODWLRQ z 6WDQGDUGL]H\RXUPRGLILFDWLRQGRFXPHQWDWLRQ z /RJDOOPRGLILFDWLRQV z &RQILUPDQGUHOHDVHDOOUHSDLUVDVZHOODVDOO UHTXHVWVWKDWFRQWDLQUHSDLUV SAP AG 2002 When encapsulating the customer portions of a program, be sure to use narrow interfaces. Define a standard for all of your company’s modification documentation (see the following slides). You should also maintain a list of all modifications to your system (a modification log - see the following slides). All requests that contain repairs must be released before an upgrade so that all relevant customer versions can be written to the versions database (the system compares versions during adjustment) . Repairs must also be confirmed prior to upgrade; otherwise the object being repaired is locked and cannot be imported. © SAP AG TAW12 26-13 &ULWLFDO6XFFHVV)DFWRUV z 'RQRWPRGLI\DQ\$%$3'LFWLRQDU\REMHFWVWKDW EHORQJWRWKHFRUHRI\RXUV\VWHP&KDQJH 'LFWLRQDU\REMHFWVRQO\LIWROGWRGRVRLQDQ6$3 1RWHRUE\VRPHERG\IURPWKH6$3+RWOLQH z 'RQRWFUHDWHDQ\DGGLWLRQDOIXQFWLRQPRGXOHVLQ 6$3IXQFWLRQJURXSV SULRUWR5HOHDVH$ z 'RQRWGHOHWHVRXUFHFRGHFRPPHQWLWRXWLQVWHDG SAP AG 2002 Any modifications that you make to ABAP Dictionary objects that belong to Basis components are lost at upgrade - these objects revert to their earlier form and QRDGMXVWPHQWKHOSis offered. This can lead to the contents of certain tables being lost. © SAP AG TAW12 26-14 0RGLILFDWLRQ/RJV ([DPSOH 2EMHFWW\SH SURJUDPVFUHHQ*8,VWDWXV 2EMHFWQDPH 5RXWLQH 6XEMHFWDUHD 352* 6$309$ 6$9(B'2& 6'B '(9. 5HTXHVWQXPEHURIUHSDLU &KDQJHGRQ 6PLWK &DUSHQWHU QR &KDQJHGE\ 3HUVRQUHVSRQVLEOH 3UHOLPLQDU\FRUUHFWLRQ" \HVQR ² ² 6$3QHWQRWHQXPEHU 9DOLGWRUHOHDVH 7LPHUHTXLUHGWRUHVWRUH KRXUV SAP AG 2002 SAP recommends that you NHHSDUHFRUGRIDOO PRGLILFDWLRQVthat have been made to your system (that is, of any changes you have made to Repository objects in the SAP namespace). The following information should be logged for each modification: y Object type (program, screen, GUI status, ...) y Object name y Routine (if applicable) y Subject area (according to process design blueprint or technical design) y Repair number y Changed on y Changed by y Preliminary correction? (yes/no) y SAP Note number, valid until Release x.y y Estimated time needed to incorporate the modification during adjustment © SAP AG TAW12 26-15 0RGLILFDWLRQ$VVLVWDQW7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z ,PSOHPHQWPRGLILFDWLRQVXVLQJWKH0RGLILFDWLRQ $VVLVWDQW z 'HVFULEHKRZWKH0RGLILFDWLRQ$VVLVWDQWZRUNV SAP AG 2002 © SAP AG TAW12 26-16 0RGLILFDWLRQ$VVLVWDQW 3XUSRVH 6LPSOLI\LQJPRGLILFDWLRQDGMXVWPHQWV z )LQHUJUDQXODULW\ z 0RGXOHV z 5RXWLQHV z )XQFWLRQPRGXOHV z &KDQJHVLQDVHSDUDWHVRIWZDUHOD\HUXVLQJPRGLILFDWLRQ H[LWV SAP AG 2002 The aim of the Modification Assistant is to make modification adjustments easier. In the past, the granularity of modifications was only at include program level. Today, a finer granularity is available. Now, modifications can be recorded at subroutine or module level. This is because (among other reasons) the modifications are registered in a different layer. As well as providing finer granularity, this means that you can reset modifications, since the original version is not changed. © SAP AG TAW12 26-17 +RZWKH0RGLILFDWLRQ$VVLVWDQW:RUNV 0RGLILFDWLRQV 6RXUFHFRGH *HQHUDWH /RDG SAP AG 2002 The Modification Assistant records changes in a separate layer. This means that the original source code of the object does not change. The modifications are not adopted until the load is generated, so that the executable object is created from both the parts of the original SAP program and the modifications. © SAP AG TAW12 26-18 0RGLILFDWLRQ$GMXVWPHQWV7KHQDQG1RZ z 7+(1 z *UDQXODULW\ZKHQFRQIOLFWVRFFXU,QFOXGHSURJUDP z 0RGLILFDWLRQDGMXVWPHQWOLQHE\OLQH z (DFKPRGLILFDWLRQKDGWREHLQFOXGHGLQWKHQHZ6$3 YHUVLRQPDQXDOO\ FXWDQG SDVWH z 12: XVLQJ0RGLILFDWLRQ$VVLVWDQW z *UDQXODULW\ZKHQFRQIOLFWVRFFXU0RGXOH IRUH[DPSOH VXEURXWLQH z 0RGLILFDWLRQDGMXVWPHQWDWPRGXOHOHYHO PRGLILFDWLRQ H[LW z 5HLPSRUWRIPRGLILFDWLRQVODUJHO\DXWRPDWHG SAP AG 2002 In the past, if you modified an include for which SAP provided a new version in an upgrade, you had to perform a modification adjustment line by line. The system provided little support. The Modification Assistant has changed this situation considerably. Modifications are now recorded with finer granularity. For example, if you modify a subroutine, the rest of the include remains unchanged. If SAP delivers a new version of the include, the system looks to see if there is also a new version of that subroutine. If this is not the case, your changes can be incorporated into the new version automatically. © SAP AG TAW12 26-19 0RGLILFDWLRQ$VVLVWDQW 6RIWZDUH/D\HUV 6$3 3DUWQHU &XVWRPHU 2ULJLQDOV 0RGLILFDWLRQOD\HU 0RGLILFDWLRQOD\HU SAP AG 2002 The original version of each software layer compsists of the originals from the previous layer plus current modifications. © SAP AG TAW12 26-20 0RGLILFDWLRQ$VVLVWDQW 7RROV6XSSRUWHG z $%$3(GLWRU z 0RGLILFDWLRQPRGH z 6FUHHQ3DLQWHU z /D\RXW z )ORZORJLF z 0HQX3DLQWHU z 7H[W(OHPHQWV z &ODVV%XLOGHU z )XQFWLRQ%XLOGHU z $GGLQJIXQFWLRQPRGXOHV z &RPSDWLEOHLQWHUIDFHHQKDQFHPHQWV z $%$3'LFWLRQDU\ z $SSHQGVWUXFWXUHVDUHUHJLVWHUHG z 'DWDHOHPHQWV )LHOGODEHOVFDQEHFKDQJHG z 'RFXPHQWDWLRQ z 6XEVWLWXWLQJGRFXPHQWDWLRQREMHFWV SAP AG 2002 Above is a list of the tools supported by the Modification Assistant. In the ABAP Editor, you can use modification mode to change source code. Only a restricted range of functions is available in this mode. You can add, replace, or comment out source code, all under the control of the Modification Assistant. Changes to layout and flow logic in the Screen Painter are also recorded. The Modification Assistant also records changes in the Menu Painter and to text elements, as well as the addition of new function modules to an existing function group. To avoid conflicts in the upgrade, table appends are also logged by the Modification Assistant. © SAP AG TAW12 26-21 0RGLILFDWLRQ$VVLVWDQW 3UHUHTXLVLWHV z 5SURILOH SDUDPHWHU z HXFRQWUROOHGBPRGLILFDWLRQ 0RGLILFDWLRQ$VVLVWDQW 7KHWUDQVSRUWREMHFWLVXQGHUWKHFRQWURORI WKH0RGLILFDWLRQ$VVLVWDQW 5HVWULFWHGHGLWRUIXQFWLRQV <RXFDQFKDQJHVHFWLRQVXVLQJWKH PRGLILFDWLRQLFRQ SAP AG 2002 If you want to change an SAP object, you must provide the following information: y SSCR key y Change request The system informs you that the object is under the control of the Modification Assistant. Only restricted functions are available in the editor. You can switch the Modification Assistant on or off for the entire system changing the R/3 profile parameter HXFRQWUROOHGBPRGLILFDWLRQ. SAP recommends that you always work with the Modification Assistant on. You can switch off the Modification Assistant for single Repository Objects. Once you have done so, the system no longer uses the fine granularity of the Modification Assistant. © SAP AG TAW12 26-22 0RGLILFDWLRQ$VVLVWDQW,FRQV ,QVHUW 5HSODFH 'HOHWH 8QGRPRGLILFDWLRQ 0RGLILFDWLRQRYHUYLHZ SAP AG 2002 In modification mode, you have access to a subset of the normal editor tools. You can access these using the appropriate pushbuttons. For example, in the ABAP Editor, you can: y Insert The system generates a framework of comment lines between which you can enter your source code. y Replace Position the cursor on a line and choose 5HSODFH. The corresponding line is commented out, and another line appears in which you can enter coding. If you want to replace several lines, mark them as a block first. y Delete Select a line or a block and choose 'HOHWH. The lines are commented out. y Undo modifications This undoes all of the modifications you have made to this object. y Display modification overview Choose this function to display an overview of all modifications belonging to this object. © SAP AG TAW12 26-23 ([DPSOH $%$3(GLWRU $%$3(GLWRU 352*5$06$33URJUDP! ,QVHUW ^,16(57'(9. ` ^5(3/$&('(9. ?:5,7(V\ :5,7(V\XQDPH&2/25&2/B.(< :5,7(V\XQDPH&2/25&2/B1250$/ ` ^'(/(7('(9. ?:5,7(V\ :5,7(V\XQDPH&2/25&2/B.(< ? ` 5HSODFH 'HOHWH SAP AG 2002 The graphic shows the result of changes made with Modification Assistant. The Modification Assistant automatically generates a framework of comment lines describing the action. The comment also contains the number of the change request to which the change is assigned, and a number used for internal administration. © SAP AG TAW12 26-24 0RGLILFDWLRQ2YHUYLHZ $%$3(GLWRU 352*5$06$33URJUDP! ^,16(57'(9. ` ^5(3/$&('(9. 0RGLILFDWLRQ2YHUYLHZ ?:5,7(V\ :5,7(V\XQDPH&2/25&2/B.(< :5,7(V\XQDPH&2/25&2/B1250$/ 6$33URJUDP ` :LWKRXWPRGXODUL]DWLRQXQLW 6$33URJUDP 60,7+ '(9. 6XEURXWLQH '2B620(7+,1* 60,7+ '(9. SAP AG 2002 The Modification Overview icon provides you with an overview of the modifications you have made in the current program. The display is structured according to the various modularization units. This corresponds to the structure used by the Modification Assistant to record the modifications. © SAP AG TAW12 26-25 5HVWRULQJWKH2ULJLQDO $%$3(GLWRU 352*5$06$33URJUDP! ^,16(57'(9. ` ^5(3/$&('(9. ?:5,7(V\ :5,7(V\XQDPH&2/25&2/B.(< :5,7(V\XQDPH&2/25&2/B1250$/ ` $%$3(GLWRU 352*5$06$33URJUDP! SAP AG 2002 :5,7(V\XQDPH&2/25&2/B.(< To undo a modification, place the cursor on it and choose 8QGR. The record of the modifications is deleted. You cannot restore this record. © SAP AG TAW12 26-26 0RGLILFDWLRQ%URZVHU,QLWLDO6FUHHQ 0RGLILFDWLRQ%URZVHU 6WDQGDUGVHOHFWLRQV /DVWFKDQJHGE\ 'HYHORSPHQWFODVV 5HTXHVWWDVN 0RGLILHGREMHFWV :LWK0RGLILFDWLRQ$VVLVWDQW :LWKRXW0RGLILFDWLRQ$VVLVWDQW :LWK0RGLILFDWLRQ$VVLVWDQW 'DWDHOHPHQWV 6B&$55B,' 60,7+ '(9. 'RPDLQV 3URJUDPV )XQFWLRQPRGXOHV SAP AG 2002 The Modification Browser provides an overview of all of the modified objects in the system. The Modification Browser differentiates between modifications made with the Modification Browser and those made without. On the initial screen of the Modification Browser, you can restrict the selection according to various criteria. This allows you to find modifications in a particular area. The Modification Assistant displays the hit list in tree form. Objects are arranged by: y Modification type (with/without the Assistant) y Object type (PROG, DOMA, DTEL, TABL, and so on) You can also use the Modification Browser to undo a whole group of modifications by selecting it and choosing the 5HVHWWR2ULJLQDOfunction. © SAP AG TAW12 26-27 8VHU([LWV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z ([SODLQZKDWXVHUH[LWVDUH z 'HVFULEHKRZ\RXILQGXVHUH[LWVLQWKHV\VWHP SAP AG 2002 © SAP AG TAW12 26-28 8VHU([LW 6WUXFWXUHRID0RGXOH3RRO 3URJUDP 6$309$ ,QFOXGH09$723 ,QFOXGH09$2 ,QFOXGH09$, 6SHFLDOLQFOXGH 6SHFLDOLQFOXGH SURJUDPV SURJUDPV 2WKHULQFOXGHV ,QFOXGH09$)=% SAP AG 2002 A module pool is organized as a collection of include programs. This is particularly useful for making the program easier to understand. The organization is similar to that of function groups. In particular, the naming convention, by which the last three letters of the name of the include program identify its contents, is identical. The main program, as a rule, contains the include statements for all of the include programs that belong to the module pool. The includes described as VSHFLDO includes in the program are themselves only include programs technically, they are not different. These programs are only delivered once. © SAP AG TAW12 26-29 8VHU([LWV 6$3,QFOXGHV 3URJUDP6$309$ ,QFOXGH09$)=% 8VHU([LWV5HOHDVH* )250XVHUH[LWBWHVW (1')250 )250XVHUH[LWBWZR (1')250 z (PSW\VXEURXWLQHV z ,QFOXGHVDUHRQO\ GHOLYHUHGRQFH z 0RVWO\ LQ6' z 7HFKQLFDOO\ PRGLILFDWLRQV ,QFOXGH09$)=& 8VHU([LWV5HOHDVH$ SAP AG 2002 User exits are a type of system enhancement that were originally developed for the Sales and Distribution Module (SD). The original purpose of user exits was to allow the user to avoid modification adjustment. A user exit is considered a modification, since technically objects in the SAP namespace are being modified. The SAP developer creates a special include in a module pool. These includes contain one or more subroutines routines that satisfy the naming convention userexit_<name>. The calls for these subroutines have already been implemented in the program. Usually global variables are used. After delivering them, SAP never alters includes created in this manner; if new user exits must be delivered in a new release, they are placed in a new include program. © SAP AG TAW12 26-30 8VHU([LWV([DPSOH ,1&/8'(09$)=% 7KLVLQFOXGHLVUHVHUYHGIRUXVHUPRGLILFDWLRQV )RUPVIRUVDOHVGRFXPHQWSURFHVVLQJ 7KHQDPHRIPRGLILFDWLRQPRGXOHVVKRXOGEHJLQZLWK == )RUP86(5(;,7B),//B9%$3B)520B+9%$3 7KLVXVHUH[LWFDQEHXVHGWRZULWHDGGWLRQDOGDWDWR9%$3 IURPWKHPDLQLWHP +9%$3 7KDWLVWKLVXVHUH[LWLV FDOOHGZKHQDQLWHPLVHQWHUHGZLWKUHIHUHQFHWRDPDLQ LWHP 7KLVIRUPLVFDOOHGIURPIRUP9%$3B)8(//(1B+9%$3 )250XVHUH[LWBILOOBYEDSBIURPBKYEDS 9%$3]]ILHOG +9%$3]]ILHOG (1')250 SAP AG 2002 User exits are actually empty subroutines that SAP developers provide for you. You then fill them with your own source code. The purpose behind this type of system is to keep all changes well away from program source code and store them in include programs instead. To this end, SAP developers create various includes that fulfill the naming conventions for programs and function groups. The last two letters in the name of the include refer to the include that the customer should use: = is usually found here. Example: This naming convention guarantees that SAP developers will not touch this include in the future. For this reason, includes of this nature are not adjusted during modification upgrade. If any new user exits are delivered by SAP with a new release, then they are bundled into new includes that adhere to the same naming convention. © SAP AG Program Include SAPM45A M45AFZB TAW12 26-31 8VLQJ8VHU([LWV z )URPDQDSSOLFDWLRQSURJUDP z 8VLQJWRROV 8VHUH[LWV 6\VWHPo 6\VWHPo 6WDWXV o 'RXEOH 'RXEOHFOLFNSURJUDPQDPH 6HDUFKIRUVWULQJ ,0* SHUIRUPXVHUH[LW *OREDOO\LQSURJUDP¢ *OREDOO\LQSURJUDP¢SURJ² SURJ² 6DOHVDQGGLVWULEXWLRQ ¬ 6\VWHPPRGLILFDWLRQV ¬8VHUH[LWV o 6$35HIHUHQFH,0* 6DOHVDQGGLVWULEXWLRQ ¬ 6\VWHPPRGLILFDWLRQV ¬8VHUH[LWV o &KRRVHUHOHYDQW FRPSRQHQW o &KRRVHUHOHYDQW FRPSRQHQW SAP AG 2002 You can find a list of all user exits in the SAP Reference Implementation Guide. There, you will also find documentation explaining why SAP developers have created a particular user exit. Follow the steps described in the Implementation Guide. © SAP AG TAW12 26-32 6$31RWH$VVLVWDQW7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z ,PSRUWQRWHFRUUHFWLRQVLQWRDQ6$36\VWHPXVLQJ WKH6$31RWH$VVLVWDQW z 1DPHWKHDGYDQWDJHVRIXVLQJWKH6$31RWH $VVLVWDQW z $GMXVWLPSOHPHQWHGQRWHFRUUHFWLRQVXVLQJWKH6$3 1RWH$VVLVWDQW SAP AG 2002 © SAP AG TAW12 26-33 7KH3ULQFLSOHRIWKH6$31RWH$VVLVWDQW 7KHQ 6$31RWH 6$31RWH 0DQXDO 6$31RWH 66&5 5HOHDVH Q 5HOHDVH Q 0DQXDO PRGLILFDWLRQ DGMXVWPHQW 1RZ 1RWH 6$31RWH 6$31RWH $VVLVWDQW 6$31RWH 5HOHDVH Q 5HOHDVH Q $XWRPDWLF PRGLILFDWLRQ DGMXVWPHQW SAP AG 2002 Before the SAP Note Assistant was introduced, you had to implement manually all notes requiring a correction to objects in your SAP System. This increased the possibility of errors. The other disadvantage of this approach is that you need to enter a registration key for the SAP object before you can change it. Developers also had to work out for themselves, from the note, what the dependency was between this error correction and other corrections already made in the system. Finally, you had to adjust the implemented error correction manually whenever you imported a Support Package or upgrade. The SAP Note Assistant solves most of these issues. You no longer need to enter a registration key. The SAP Note Assistant automatically imports the note corrections into the system using the Modification Assistant. Dependencies between this and other notes are recognized automatically. If they have not yet been implemented, the SAP Note Assistant instructs you to import these notes into your system. Moreover, notes have a specified validity period. When you import Support Packages and upgrades, the system checks to see whether or not the note correction is still valid. If not, you can undo the correction by clicking a pushbutton. © SAP AG TAW12 26-34 %HQHILWVRIWKH6$31RWH$VVLVWDQW z ,PSRUW6$31RWHVDXWRPDWLFDOO\ z 5HVWULFWHGWRFRUUHFWLRQVLQ$%$3VRXUFHFRGH z 'HDOZLWKGHSHQGHQFLHVDXWRPDWLFDOO\ z :LWKRWKHU6$31RWHV z :LWK6XSSRUW3DFNDJHV z :LWKPRGLILFDWLRQV z 2YHUYLHZRIDOOQRWHVLPSRUWHGLQWRWKH6$36\VWHP z 6XSSRUWIRUPRGLILFDWLRQDGMXVWPHQWVDIWHU6XSSRUW3DFNDJHVRU XSJUDGHV z &DXWLRQ1RWHVFRUUHFWLQGLYLGXDOHUURUV21/< 7KH\DUHQRVXEVWLWXWHIRU6XSSRUW3DFNDJHV ,PSRUWDQW SAP AG 2002 The purpose of the SAP Note Assistant is to support you when you import note corrections into your SAP System. Corrections are generally imported automatically. That is, you no longer have to maintain the source code manually, which reduces the likelihood of errors. Moreover, you no longer need to register the objects you want to correct in the SAP Software Change Registration (SSCR). The SAP Note Assistant offers several other benefits: It recognizes dependencies between different notes. Within each note, it also recognizes errors that already been removed by a Support Package. It then marks the note as obsolete. If modifications have already been performed on the object you want to correct, they are registered. Later, during modification adjustment, such objects are specifically flagged. Another useful feature of the SAP Note Assistant is that you can display an overview of all the note corrections imported into the system. If modifications are adjusted after an upgrade or Support Package has imported, the note corrections are listed in a separate category. Note corrections that are now obsolete in the current system state are specially flagged, which makes it easier to transfer the object to the standard. Remember: The SAP Note Assistant makes it easier to correct single errors. It is QRW designed for importing Support Packages. © SAP AG TAW12 26-35 6$31RWH$VVLVWDQW3URFHGXUH 6$31RWHV 'RZQORDG 8SGDWH 1RWHV%URZVHU 'HWDLOV 0RGLILFDWLRQ %URZVHU 6( 6$31RWH$VVLVWDQW Implement &RUUHFWLRQLQVWUXFWLRQ 0DQXDOFRQIOLFW UHVROXWLRQ 8SJUDGH 6SHFLDOYHUVLRQRIWKH 6SOLWVFUHHQ(GLWRU 0RGLILFDWLRQ $GMXVWPHQW 63$8 SAP AG 2002 Using the SAP Note Assistant you can download existing SAP Notes from the SAP Service Marketplace. The Notes Browser includes an overview of all the notes you have implemented in your system. You can then navigate from there to the Modification Browser, which provides an overview of all the objects corrected by a given note. You can also find out which notes can be implemented, have been implemented, or are now obsolete, by entering the appropriate status. After reading the note carefully, you can implement it according to the correction instruction. The SAP Note Assistant ascertains whether the note can be implemented automatically (indicated by a green traffic light icon beside the relevant object). If conflicts have occurred when the note corrections are being implemented - for example because the Note Assistant cannot find the context block - you can implement them manually using a special version of the Splitscreen Editor. © SAP AG TAW12 26-36 6$31RWH$VVLVWDQW:RUNOLVW 2YHUYLHZ 1RWH$VVLVWDQW:RUNOLVW8VHU;;; /RDG 6$31RWHV ,QFRQVLVWHQW 1HZ 1RWH7H[W &KHFN 1RWH7H[W 1RWH (GLWLQJ6WDWXV ,Q3URFHVV 7H[W (UURULQ3URJUDP$%& ,PSOHPHQW /RJ SAP AG 2002 You call the transaction SNOTE by entering this code in the command field. The system then displays a list of notes assigned to the following nodes: y Notes assigned to you as the processor y All new notes y All notes in an inconsistent state Notes that you can implement are indicated using the appropriate icon. (To find out what each icon means, choose 8WLOLWLHV −> &RORU/HJHQG The above example shows a new note, which is either obsolete or cannot be edited. This means either that a correction instruction is missing (that is, the note is purely for information), or the note’s validity period does not match the system release and patch level. © SAP AG TAW12 26-37 6$31RWH$VVLVWDQW/RDGLQJ1RWHV 3UREOHP 2YHUYLHZ 1RWH$VVLVWDQW Æ )LQGQRWH Æ 5HDGQRWH z &KHFNSUHUHTXLVLWHV z ,PSOHPHQWQRWH z 5HJLVWHUQRWH 2SWLRQ 'RZQORDGGLUHFWO\ 'R 2SW ZQ LRQ OR V \ D G W D VWH RI LOH P SAP AG 2002 /RDG &KHFN (GLWLQJVWDWXV '% E Q WLR G 2S SORD 8 ,PSOHPHQW /RJ )LOHV\VWHP You can download SAP Notes from the SAP Service Marketplace or the SAPNet-R/3 Frontend to your system, either directly using an RFC connection (1RWH!'RZQORDG) or by file transfer (1RWH !8SORDG . You can download SAP Notes from the SAP Service Marketplace or the SAPNet-R/3 Frontend to your system. To upload the note, first download a note from the SAP Service Marketplace and save it to your local hard drive. You then upload this note by file transfer from the Note Assistant. © SAP AG TAW12 26-38 6$31RWH$VVLVWDQW1RWHV%URZVHU 2YHUYLHZ 1RWH$VVLVWDQW1RWH%URZVHU $OO 1RWHV OPRQTS U VEP3WXQ:Q,SZYEQ [ \ \] ^`_RPaM\:P3bcSbcQ 3d W,P<_E^fecQhgRQiZe x yz6{$d| z [ u$u} O j v b \WhP_`SceRe m<nRo`pRn`q lr s,tEu SEavP bceRQWTgRQw P3b OZS pERpfmRmR W WhPWw bv\WhP WTg<a[Gx'y /HzXU j aM\] S:akSbcQ,^leRQTgcQ(iZe j aM\] S:akSbcQTSE~I_RP a#\:] ScQTS] y$g<bkRSkw aM\ ] S<aISbcQTSE~ /RDG &KHFN (GLWLQJ6WDWXV ,PSOHPHQW /RJ SAP AG 2002 © SAP AG TAW12 26-39 6$31RWH$VVLVWDQW,PSOHPHQWLQJD1RWH 2YHUYLHZ 1RWH$VVLVWDQW:RUNOLVW8VHU;;; /RDG 6$31RWHV ,QFRQVLVWHQW 1HZ &KHFN 1RWHWH[W 1RWHWH[W 1RWH The following notes will be implemented: ,QSURFHVV Implement Note (GLWLQJ6WDWXV 0427325000 Version 001 7 =E 7H[Wk3 3¡¢D£¤ 3¥ (UURULQ3URJUDP$%& 7 =E¦ k3 3¡¢D£¤ 3¥ ,PSOHPHQW /RJ 0DLQ3URJUDP SAP AG 2002 You then implement the note carefully after reading it. The system checks for prerequisites and dependencies of other notes. If prerequisite notes are not yet registered in your system, the SAP Note Assistant displays them in a list for you to implement. © SAP AG TAW12 26-40 6$31RWH$VVLVWDQW2WKHU)HDWXUHV z 6SOLWVFUHHQ(GLWRU z 6HYHUDOORJJLQJRSWLRQV z 'LVSOD\WKHLPSOHPHQWDWLRQVWDWXV z 'LVSOD\WKHDFWLRQORJ z 8QGRQRWHLPSOHPHQWDWLRQ SAP AG 2002 © SAP AG TAW12 26-41 6$31RWH $VVLVWDQW1RWHV ZLWK'HSHQGHQFLHV 2YHUYLHZ 1RWH $VVLVWDQW :RUNOLVW8VHU;;; /RDG 6$31RWHV ,QFRQVLVWHQW 1HZ 1RWH7H[W Load the following SAP Notes in the system: 1RWH7H[W 1RWH ,Q SURFHVV &KHFN (GLWLQJ 6WDWXV 7H[W (UURULQ 3URJUDP $%& ,PSOHPHQW /RJ SAP AG 2002 The Note Assistant ascertains whether a note has a prerequisite note associated with it, and if so, loads it into your system. It shows the note you chose as well as all the additional notes in a dialog box, the 1RWHV4XHXH You must implement the notes in the order shown. You have several options: y Implement several notes at once If you choose this option, the system implements as many notes as possible consecutively. However, it can only do this if all the corrections from the notes are to be adopted without changes. If you have modified any of the relevant includes yourself, the system may not be able to insert some of the changes. The system then implements these notes individually so that you can adjust your modification. y Implement each note once The system implements the specified notes individually. You can then trace detailed information on what changes in the source text change are associated with the relevant notes, and modify this source code change if necessary. y Cancel note implementation The system does not change the source text. © SAP AG TAW12 26-42 6$31RWH$VVLVWDQW0RGLILFDWLRQ$GMXVWPHQW 2YHUYLHZ 0RGLILFDWLRQ$GMXVWPHQWV /RDG (QKDQFHPHQWVDQG0RGLILFDWLRQV 1RWH&RUUHFWLRQV &KHFN 1RWH7H[W 7H[W 1RWH'HVFULSWLRQ (GLWLQJ6WDWXV ,PSOHPHQW /RJ $GMXVWPHQW SAP AG 2002 Each Support Package contains a collection of error corrections. You can import Support Packages into your system only as a whole and only in a specific order. Each correction in the Support Package is documented in a note. After you have imported the Support Package, any the following situations may arise: y Correction implemented by means of the note and included in the Support Package (traffic light icon, no color): When the Support Package is imported, the system checks whether or not the corrections in the Support Package have been implemented already in your system as note corrections. During modification adjustment (transaction: SPAU), these notes are displayed with a colorless traffic light icon and thus shown to be obsolete. You must then UHVHW the relevant objects to 6$32ULJLQDO. y Note implemented, but not included in the Support Package (yellow traffic light icon): The system checks whether or not corrections - that you previously implemented from a note - will be overwritten by a Support Package that does not contain these corrections. You must later implement these note corrections again. During modification adjustment, the system displays these notes with a yellow traffic light icon. Your worklist also indicates that these Notes must be implemented. They are displayed with the status ,QFRQVLVWHQW. y Note implemented, although parts of it are included in the Support Package (green traffic light icon) For example, a note may contain several correction instructions with different validity periods. When the Support Package is imported, some correction instructions will become obsolete, whereas others remain valid. In this - rare - case, the note is displayed with a green traffic light icon. © SAP AG TAW12 26-43 5HJLVWHULQJ1RWH&RUUHFWLRQV0DQXDOO\ z 7KH6&:1B5(*,67(5B127(6SURJUDP z 8VHUHQWHUVQRWHV z 1RWHVDUHORDGHG z 3URJUDPFKHFNVYDOLGLW\ z 3URJUDPFKHFNVWKDWQRWHKDVEHHQLPSOHPHQWHG z %HQHILWV z 'LVSOD\LQ1RWHV%URZVHU z 'HSHQGHQFLHVDUHVSHFLILHGFRUUHFWO\ z 'XULQJPRGLILFDWLRQDGMXVWPHQWFRUUHFWLRQVDUHGLVSOD\HGLQ WKHFDWHJRU\1RWH&RUUHFWLRQV SAP AG 2002 If you have implemented corrections from notes before you install the SAP Note Assistant, you can make this fact known to the Note Assistant. This is important, since the Note Assistant does not automatically recognize whether or not a note correction has been implemented manually in your system, without your using the Note Assistant. This process of registration confers the following benefits: y All the notes implemented in your system are displayed in the Notes Browser. y If a manually-implemented note (that is, without using the Note Assistant) is a prerequisite for another note, which you want to implement using the Assistant, the Assistant recognizes that the prerequisite note has already been implemented and does not require you to implement it again. y Later, during modification adjustment after an upgrade or Support Package import, these manually-implemented notes are displayed in the category 1RWHV&RUUHFWLRQ For these notes, the system ascertains whether they are to be reimplemented or reset to original. To register notes manually, launch the program SCWN_REGISTER_NOTES. On the program selection screen, enter the numbers of the notes that you want to register as completely implemented. The system loads the notes and checks whether these notes are valid for your release and Support Package level. The program also checks to see whether the notes have already been registered as implemented in the Note Assistant. © SAP AG TAW12 26-44 0RGLILFDWLRQ$GMXVWPHQW7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 1DPHWKHVWHSVWDNHQGXULQJDPRGLILFDWLRQ DGMXVWPHQW z /LVWZKLFKREMHFWVPXVWEHDGMXVWHGDQGZKHQ z 'HVFULEHKRZWKHPRGLILFDWLRQDGMXVWHPHQWLV SHUIRUPHGLQVXEVHTXHQWV\VWHPV SAP AG 2002 © SAP AG TAW12 26-45 2EMHFWVIRU$GMXVWPHQW $GMXVWPHQWUHTXLUHG $GMXVWPHQWUHTXLUHG 1HZYHUVLRQIURP6$3 0RGLILHGE\FXVWRPHU SAP AG 2002 The set of objects for adjustment is derived from the set of new objects delivered by SAP in a new release. This is compared with the set of modified objects. The intersection of these two sets is the set of objects that must be adjusted when you import an upgrade or support package. © SAP AG TAW12 26-46 0RGLILFDWLRQ$GMXVWPHQW 63''DQG63$8 6$3VWDQGDUG &XVWRPHU YHUVLRQ &RPSDUH 7UDQVDFWLRQV 63'' 63$8 5HYHUWWR 6$3VWDQGDUG $GMXVWPHQW SAP AG 2002 During modification adjustment, old and new versions of ABAP Repository objects are compared using transactions SPDD and SPAU. You GRQRW have to call transaction SPDD to adjust Dictionary objects if: y No changes have been made to SAP standard objects in the Dictionary y You have only added customer objects to your system. Only SAP objects that have been changed must be adjusted using this transaction. All other ABAP Repository objects are adjusted using transaction SPAU. Upgrade program R3up tells you to start the transaction after upgrade has finished. You have 30 days to use transaction SPAU after an upgrade. After 30 days, you must apply for a SSCR key for each object that you want to adjust. Transaction SPAU first identifies which objects have been modified and then ascertains for which of the modified objects a new version has been imported during the current upgrade. Modification adjustment allows you to transfer the modifications you have made in your system to your new R/3 Release. © SAP AG TAW12 26-47 0RGLILFDWLRQ$GMXVWPHQW2EMHFWV 63'' 63$8 $%$3SURJUDPV ,QWHUIDFHV 'RPDLQV 6FUHHQV 'DWDHOHPHQWV 6HDUFKKHOSV 7DEOHV 9LHZV /RFNREMHFWV SAP AG 2002 During the modification adjustment, use transaction SPDD to adjust the following ABAP Dictionary objects: y Domains y Data elements Tables (structures, transparent tables, pooled tables, and cluster tables, together with their technical settings) These three object types are adjusted directly after the Dictionary object import (before the main import). At this point in time, no ABAP Dictionary objects have yet been generated. To ensure that no data is lost, it is important that any customer modifications to domains, data elements, or tables are undertaken prior to their generation. Changes to other ABAP Dictionary objects - such as lock objects, matchcodes, or views - cannot result in loss of data. Therefore, these ABAP Dictionary objects are adjusted using transaction SPAU after both main import and object generation have been completed. You can use transaction SPAU to adjust the following object types: ABAP programs, interfaces (menus), screens, matchcode objects, views, and lock objects. © SAP AG TAW12 26-48 7UDQVSRUWLQJ$GMXVWPHQWVEHWZHHQ6\VWHPV 5HOHDVHL 5HOHDVHL 5HOHDVHL 0RGLILFDWLRQ DGMXVWPHQWV 63'' 0RGLILFDWLRQDGMXVWPHQWV DUHWUDQVIHUUHGWRWKHVH V\VWHPVDWXSJUDGH 7UDQVSRUWUHTXHVW 63$8 7UDQVSRUWUHTXHVW SAP AG 2002 During modification adjustment, you should use two different change requests to implement the changes you have made: One for SPDD adjustments and another for SPAU adjustments. These change requests are then transported into other R/3 systems you want to adjust. This guarantees that all actual adjustment work takes place solely in your development system. When upgrading additional R/3 systems, all adjustments exported from the first system upgrade are displayed during the ADJUSTCHK phase. You decide which adjustments you want to accept into your additional systems and these are then integrated into the current upgrade. Afterwards, the system checks to see if all modifications in the current R/3 system are covered by the change requests created during the first system upgrade. If this is the case, no adjustments are made during the current upgrade. Note: For this process to be effective, it is important that all systems involved have identical system landscapes. You can ensure this by first making modifications in your development system and then transporting them to later systems before you upgrade the development system. You can also guarantee that all of your systems have an identical system landscape by creating your development system before upgrade as a copy of your production system and then refraining from modifying the production system again until after upgrade. © SAP AG TAW12 26-49 0RGLILFDWLRQ$GMXVWPHQW ,QLWLDO6FUHHQ 0RGLILFDWLRQ$GMXVWPHQW 2EMHFW6HOHFWLRQ 6WDQGDUGVHOHFWLRQV /DVWFKDQJHGE\ 'HYHORSPHQWFODVV 5HTXHVWWDVN 0RGLILHGREMHFWV :LWK0RGLILFDWLRQ$VVLVWDQW :LWKRXW0RGLILFDWLRQ$VVLVWDQW :LWK0RGLILFDWLRQ$VVLVWDQW 8SJUDGHVDQGSDWFKHV 7REHHGLWHG $OOREMHFWV 'DWDHOHPHQWV 6B&$55B,' 60,7+ 'RPDLQV 3URJUDPV )XQFWLRQPRGXOHV SAP AG 2002 At the start of the modification adjustment (transaction SPAU), you can restrict the search hits on a selection screen. This allows you to choose whether or not to display all the objects to be adjusted, or only those that still need to be edited. You can restrict your selection using the following criteria: y Last changed by y Development class y Transport request numbers /Task numbers The system displays a list of the objects that are to be adjusted. The list is sorted using the criteria: y With/without Modification Assistant y Object type © SAP AG TAW12 26-50 0RGLILFDWLRQ$VVLVWDQW,FRQV $XWRPDWLFDGMXVWPHQW 6HPLDXWRPDWLFDGMXVWPHQW 0DQXDODGMXVWPHQW 2EMHFWDGMXVWHG 2ULJLQDOUHVWRUHG SAP AG 2002 The icons in front of the individual objects that need adjustment show how they can be adjusted. The possible methods are: y Automatically The system could not find any conflicts. The changes can be adopted automatically by choosing the appropriate icon or menu entry. y Semi-automatically The individual tools support you in adjusting the objects. When you adjust programs the Split Screen Editor is displayed, so that you can make the changes there. y Manually You must process your modifications with no special support from the system. In this case, the modification adjustment does allow you to jump directly into the relevant tool. Adjusted objects are identified by a green tick. If you want to use the new SAP standard version, use 5HVHWWR2ULJLQDO. If you do this, you will have no further adjustment work in future. © SAP AG TAW12 26-51 0RGLILFDWLRQV 8QLW6XPPDU\ <RXDUHQRZDEOHWR z 'HVFULEHZKDWDPRGLILFDWLRQLV z /LVWWKHPRVWLPSRUWDQWUXOHVWRIROORZGXULQJD PRGLILFDWLRQ z ,PSOHPHQWPRGLILFDWLRQVXVLQJWKH0RGLILFDWLRQ $VVLVWDQW z 8VHXVHUH[LWVWRLPSOHPHQWHQKDQFHPHQWV z ,PSOHPHQWQRWHVXVLQJWKH1RWH$VVLVWDQW z $GMXVWPRGLILFDWLRQV SAP AG 2002 © SAP AG TAW12 26-52 ([HUFLVHV 8QLW 0RGLILFDWLRQV 7RSLF ,PSOHPHQWLQJPRGLILFDWLRQV At the conclusion of this exercise, you will be able to: • Implement modifications using the Modification Assistant. • Implement non-registered modifications In addition to the extensive functions of the R/3 System, you also want to implement more functions. Incorrect functions are very occasionally delivered. This requires inserting corrections before the corresponding support package can be applied. The Modification Assistant does not allow some modifications. If you still need to implement them, you can deactivate the Modification Assistant. 1-1 1-2 Modify R/3 objects. Use the Modification Assistant where possible. The objects to be changed are specified below: Modify program 6$3%&B%22.,1*B. 1-2-1 Enhance the header so that the column with the customer’s name also has a header. 1-2-2 Create a new variable for counting the data records. Output the counter in the last column of the list. 1-2-3 Also read fields /8**:(,*+7 and :81,7 of table 6%22. and output them in the list. 1-3 Modify program 6$3%&B)/,*+7. 1-3-1 Change the layout of screen 100. Insert a frame around the three input fields. Create a pushbutton and assign it function code 025(. 1-4 Modify data element 6B&$55,'. 1-4-1 Change the field labels to: “Airline” (short) “Airline Company” (medium). 1-4-2 Modify the documentation for this data element. Create a meaningful text. 1-5 © SAP AG Check your modifications in the Modification Browser. TAW12 26-53 © SAP AG TAW12 26-54 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQ$GMXVWPHQW At the conclusion of this exercise, you will be able to: • Adjust modifications You must adjust the modifications made in the system after applying a support package or an upgrade. 1-1 Adjust the modifications you made to the objects you imported into the system. 0RGLILFDWLRQV © SAP AG TAW12 26-55 © SAP AG TAW12 26-56 ([HUFLVHV 2SWLRQDO 8QLW 0RGLILFDWLRQV 7RSLF 6$31RWH$VVLVWDQW±,PSOHPHQWLQJ1RWHV 3DUW, At the conclusion of this exercise, you will be able to: • Import notes into an SAP System using the SAP Note Assistant The program 6$3%&B consists of a selection screen where you can enter an airline. The system should display details of the flight in a list. However, there is an error in the list: It only shows the airline. Moreover, there are some buttons missing in the application toolbar. These errors have already been corrected in a note. SAP Note adds the missing information to the list. SAP Note inserts the missing field 0D[LPXP1RRI6HDWV in the list. Correct the errors by importing these two notes into the system. 1-1 Call the SAP Note Assistant. 1-1-1 Get to know the user interface. 1-1-2 What are the different icons for? 1-1-3 Change the processing status of the notes that belong to your group, , to ,Q3URFHVV. 1-1-4 Read note carefully. 1-2 Check whether or not this note corrects the problem you have found. 1-2-1 Reproduce the error in the system. Launch program 6$3%&B. 1-2-2 Is this note valid for your system? Check the correction instruction to find out. 1-2-3 Which objects are corrected in this correction instruction? Which modularization unit contains them? 1-2-4 Where in the program are these corrections inserted? Compare the context block in the correction instruction with the program source code. 1-2-5 After you have made sure that the note corrects the program error, implement this note. Create a new change request to do so. © SAP AG TAW12 26-57 1-3 The system displays all the objects corrected by the note in a dialog. 1-3-1 What do the different traffic light icons mean? 1-3-2 Display the changes in the Splitscreen Editor. 1-3-3 Make sure that the corrected objects are syntactically correct. 1-3-4 Continue the implementation. 1-4 After you have implemented the corrections: Test the program 6$3%&B and make sure that the original errors have been corrected. 1-5 Reset the implementation of note . 1-5-1 Confirm the reset. 1-5-2 What implementation status has this note in your worklist after it has been “ de-implemented” ? 1-5-3 Check whether or not the program runs in its original version. 1-6 Implement note . 1-6-1 Read the note carefully. Check whether or not this note corrects the problem you have found. 1-6-2 Is this note valid for your system? 1-6-3 What are the prerequisites for this note? Refer to the header of the correction instruction. 1-6-4 Which objects are corrected in this correction instruction? 1-6-5 After you have made sure that the note corrects the program error, implement this note. 1-6-6 The system displays the notes queue in a dialog. Read the prerequisite notes and make sure that the errors are corrected. 1-7 Were the errors corrected? 1-7-1 Execute the program 6$3%&B. 1-7-2 What steps are included in the Note Assistant log? Add your comments. 1-7-3 Call the Modification Browser. It displays all the objects corrected by the note corrections. In version management, find out about the changes you have made. 1-8 After making sure you have corrected all the errors, change the processing status of the relevant notes to &RPSOHWHG Where are these notes displayed now? 1-9 Release the transport request. © SAP AG TAW12 26-58 0RGLILFDWLRQV0RGLILFDWLRQV 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQVDQGWKH6$31RWH$VVLVWDQW At the conclusion of this exercise, you will be able to: • Modify programs • Modify headers • Modify screens The program 6$3%&B does not offer all the options you need in your enterprise. As well as the flight data, your enterprise wants to show the number of occupied seats beside the total number of seats. To make this possible, add another field to the list and generate the appropriate column header. If the user double-clicks a row in the list, the data for that flight is displayed in a separate window. Add the new field to the list. Maintain the column header: Create two new fields on the flight data display screen. Note that the program 6$3%&B contains an error: there is no %DFNbutton on the screen for displaying the flight data. In this exercise, you will implement SAP Note , which offers a workaround to this problem. 1-1 Modify program 6$3%&B. 1-1-1 Add the field VHDWVRFF to the list. The code that displays the field is in the subroutine GLVSOD\BIOLJKWV. 1-1-2 Save your modification. Test the programs. 1-2 Modify the column header for the list. 1-2-1 Add the text 2FFXSLHG6HDWV to the header. 1-2-2 Save the modifications. Save the modifications. © SAP AG TAW12 26-59 1-3 Modify a screen. 1-3-1 The screen that displays the flight data is part of the program 6$30%&B. To edit this program, launch the Object Navigator. 1-3-2 Change screen : Add the field for occupied seats (from the structure 6'<1B&211). 1-3-3 Save your modifications and activate the screen. 1-3-4 Start the program and check that the fields you added appear on the screen. 1-3-5 In the Modification Browser, check that your modifications have been recorded correctly. 1-4 Release the transport request. © SAP AG TAW12 26-60 0RGLILFDWLRQV0RGLILFDWLRQV 8QLW 0RGLILFDWLRQV 7RSLF 6$31RWH$VVLVWDQW±,PSOHPHQWLQJ1RWHV 3DUW,, At the conclusion of this exercise, you will be able to: • Implement notes semi-automatically • Implement corrections with the Splitscreen Editor in the Note Assistant If you choose more than one flight from the hit list of the program 6$3%&B, and then choose %RRNLQJV/LVW, the system should display a list of bookings. However, no bookings are actually shown, because of a program error. If the users double-clicks a row in the list, the flight data is displayed, but the screen does not have a %DFN button. Correct these errors by implementing a note. 1-1 Display the note and read it carefully. Are the errors you have found corrected in the note? 1-1-1 Reproduce the error in the system. 1-1-2 Which objects are corrected in this note? 1-2 After you have made sure that the note corrects the program error, implement this note. 1-2-1 A dialog box appears containing the object you need to correct. What does the yellow traffic light icon mean? How should you proceed? 1-2-2 Display the changes in the Splitscreen Editor. Use this editor to insert blocks of code manually. For more help on how to use the Splitscreen Editor, refer to the online help. 1-2-3 Insert the block at the appropriate point. 1-2-4 Is the program syntactically correct? Continue the implementation. 1-2-5 Since you have changed the object manually, the system displays an addition dialog box to let you confirm that you have implemented the note completely. Why does the system need to do this? © SAP AG TAW12 26-61 1-3 Check the logs for the notes. What are the differences between the implementations of the different notes? 1-4 Test the program. Have the errors been corrected? 1-5 After making sure you have corrected all the errors, change the processing status of the note to &RPSOHWHG 1-6 Release the transport request. © SAP AG TAW12 26-62 0RGLILFDWLRQV0RGLILFDWLRQV 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQ$GMXVWPHQW At the conclusion of this exercise, you will be able to: • Adjust modifications after importing a Support Package. You have previously imported SAP Notes into your system to correct errors. You have also made your own modifications. Notes are always included in Support Packages and delivered in them. If you import a Support Package, part of the note corrections and modifications may be overwritten. This is why you need to perform a modification adjustment. 1-1 To start 0RGLILFDWLRQ$GMXVWPHQW, choose 6$30HQXo$%$3:RUNEHQFKo 8WLOLWLHVo0DLQWHQDQFHo8SJUDGH8WLOLWLHVo$GMXVW3URJUDPV Alternatively, launch the transaction 63$8. 1-1-1 Enter your user name in the &KDQJHG%\ field. Execute the program. 1-1-2 Look at the objects in each category. What do the icons mean? 1-2 Adjust the modifications, working from top to bottom: 1-2-1 Start with the objects in the category 1RWH&RUUHFWLRQV 1-2-2 If the system has not ascertained the adjustment mode, restart the calculation by double-clicking the question mark icon. 1-2-3 Create a new change request if necessary. 1-2-4 Continue with the category :LWK0RGLILFDWLRQ$VVLVWDQW. 1-2-5 Finally, edit the category :LWKRXW0RGLILFDWLRQ$VVLVWDQW. 1-3 © SAP AG After you have adjusted all the objects, release the transport request. TAW12 26-63 © SAP AG TAW12 26-64 6ROXWLRQV 8QLW 0RGLILFDWLRQV 7RSLF ,PSOHPHQWLQJPRGLILFDWLRQV 1-1 Modifying R/3 objects: Use the Modification Assistant. 1-2 Modification of program 6$3%&B%22.,1*B. 1-2-1 You can change the header either directly from the list (6\VWHPÆ/LVWÆ /LVWKHDGHU) or in the Editor. 1-2-2 You can create a new variable directly in the R/3 program. Use the insert function of the Modification Assistant. Ideally you keep the changes locally in subroutine GDWDBRXWSXW. Also output the counter. Alternatively you can implement this functionality in the enhancement, which would not cause a modification. 1-2-3 Read the additional fields /8**:(,*+7 and :81,7 from the table 6%22. and display them in the list: Add these two fields to the 6(/(&7 statement. Display the fields in the subroutine GDWDBRXWSXW. 1-3 Modification of program 6$3%&B)/,*+7. 1-3-1 Use the Screen Painter to change the layout of screen 0100. 1-4 Modification of data element 6B&$55,'. 1-4-1 Start the maintenance transaction for data elements. Place the cursor on the corresponding object and choose the modification icon. You can enter new text in the next dialog box. 1-4-2 Choose the "Documentation" pushbutton and enter new text. 1-5 © SAP AG To check the modification choose the Modification Browser (transaction 6(). Limit the selection with the user name or change request/task. TAW12 26-65 © SAP AG TAW12 26-66 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQ$GMXVWPHQW 1-1 © SAP AG Start the Patch Manager (transaction 63$0). Call transaction 63$8with the menu path ([WUDVÆ$GMXVWPRGLILFDWLRQV. You can adjust the modifications here. TAW12 26-67 0RGLILFDWLRQV © SAP AG TAW12 26-68 8QLW 0RGLILFDWLRQV 7RSLF 6$31RWH$VVLVWDQW,PSRUWLQJ1RWHV 1-1 Call the SAP Note Assistant. Enter the transaction code 6127( in the command field. 1-1-1 Get to know the user interface including the menu entries. 1-1-2 What are the different icons for? Refer to 8WLOLWLHVo&RORU/HJHQGfor more information. 1-1-3 Change the processing status of the notes that belong to your group, , to ,Q3URFHVV. Position the cursor on the root node and choose 1RWHo6HW 3URFHVVLQJ6WDWXV. 1-1-4 Read note carefully. Position the cursor on the root node and choose 1RWHo'LVSOD\1RWH. 1-2 Check whether or not this note corrects the problem you have found. Find it globally in the text of the note. 1-2-1 Reproduce the error in the system. Launch program 6$3%&B, for example by choosing transaction 6$. 1-2-2 In the correction instruction, check the release status and Support Package level to which the note applies. 1-2-3 For a list of the objects corrected in the instruction, and the modularization units containing them, refer to the correction instruction at the end of the note. 1-2-4 To find out where in the program you should insert the corrections, compare the context block in the correction instruction with the program source code. 1-2-5 To start the note implementation procedure, place the cursor on the note number and choose 1RWHo,PSOHPHQW1RWH If the system asks you to enter a change request, create a new one. © SAP AG TAW12 26-69 1-3 The system displays all the objects corrected by the note in a dialog. 1-3-1 The traffic light icons indicate the following: *UHHQ: The corrections can be implement unchanged. <HOORZ: The corrections can be partly implemented. Before you confirm the implementation, adjust the corrections, to ensure that changes to the objects are adopted correctly. If you click the object name or icon, the system displays the Splitscreen Editor, where you can edit the source code directly. 5HG: Changes made to the objects cannot be adopted. 1-3-2 Display the changes in the Splitscreen Editor, by choosing the icon. 1-3-3 Make sure that the corrected objects are syntactically correct, by choosing 6\QWD[&KHFNIRU0DLQ3URJUDP. 1-3-4 Continue the implementation. 1-4 After you have implemented the corrections: Test the program 6$3%&B and make sure that the original errors have been corrected. Execute the program again. 1-5 Reset the implementation of note , by choosing 1RWHo5HVHW1RWH ,PSOHPHQWDWLRQ. 1-5-1 Confirm the reset. 1-5-2 The note now has the status &DQ%H,PSOHPHQWHG and ,Q3URFHVV. 1-5-3 Execute the program 6$3%&B again. 1-6 Implement note in a similar manner. 1-6-1 Read the note carefully. Check whether or not this note corrects the problem you have found. 1-6-2 The validity period of the note is specified in the header of the correction instruction. 1-6-3 To find out what prerequisites apply to this note, refer to the header of the correction instruction. 1-6-4 To find out which objects are corrected in this correction instruction, refer to the header of the correction instruction. 1-6-5 After you have made sure that the note corrects the program error, implement this note as above. 1-6-6 The system displays the notes queue in a dialog. You can implement the note carefully after reading it. © SAP AG TAW12 26-70 1-7 To find out whether or not the error has been corrected, start the program. 1-7-1 Execute the program 6$3%&B. 1-7-2 Display the implementation log by choosing *RWRo/RJ. To add your own comments, choose 1RWHo&UHDWH 1-8 1-9 © SAP AG 1-7-3 To call the Modification Browser, choose (QYLURQPHQWo 0RGLILFDWLRQ%URZVHU. It displays all the objects corrected by the note corrections. To display version management, choose8WLOLWLHVo9HUVLRQV. Change the processing status of the note by choosing 1RWHo6HW3URFHVVLQJ 6WDWXV The note disappears from the list and can be displayed in the 1RWHV %URZVHU Release the change request in the 7UDQVSRUW2UJDQL]HU (transaction 6(). TAW12 26-71 © SAP AG TAW12 26-72 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQVDQGWKH6$31RWH$VVLVWDQW 1-1 Modify program 6$3%&B as follows. 1-2-1 Add the field VHDWVRFF to the list. Modify the subroutine GLVSOD\BIOLJKWV. )250GLVSOD\BIOLJKWV /223$7LWBVIOLJKW,172ZDBVIOLJKW :5,7(PDUN$6&+(&.%2;,138721 ZDBVIOLJKWFDUULG ZDBVIOLJKWFRQQLG ZDBVIOLJKWIOGDWH ZDBVIOLJKWSULFH&855(1&<ZDBVIOLJKWFXUUHQF\ ZDBVIOLJKWFXUUHQF\ ^5(3/$&(7. ?ZDBVIOLJKWVHDWVPD[ ZDBVIOLJKWVHDWVPD[ ZDBVIOLJKWVHDWVRFF `5(3/$&( (1'/223 (1')250',63/$<B)/,*+76 1-2-2 1-2 Save your modification. Test the program. Modify the column header for the list. 1-2-1 Change the header by choosing 6\VWHPo/LVWo/LVW+HDGHU from the list. 1-2-2 Save the modifications. Test the program. © SAP AG TAW12 26-73 1-3 Modify a screen. 1-3-1 The screen that displays the flight data is part of the program 6$30%&B. To edit this program, launch the Object Navigator. 1-3-2 Change screen : Add the field for occupied seats, 6($762&& (from the structure 6'<1B&211). 1-3-3 Save your modifications and activate the screen. 1-3-4 Start the program and check that the fields you added appear on the screen. 1-3-5 To call the Modification Browser, choose (QYLURQPHQWo 0RGLILFDWLRQ%URZVHU from the Object Navigator. On the selection screen, enter your user name in the &KDQJHG%\ field. 1-4 © SAP AG Release the change request in the 7UDQVSRUW2UJDQL]HU. TAW12 26-74 8QLW 0RGLILFDWLRQV 7RSLF 6$31RWH$VVLVWDQW±,PSOHPHQWLQJ1RWHV 3DUW,, 1-1 Display the note , as described above, and read it carefully. The errors are corrected in this note. 1-1-1 Reproduce the error in the system by starting the program 6$3%&B. 1-1-2 To find out which objects are corrected in this note, refer to the correction instruction at the end of the note text. 1-2 After you have made sure that the note corrects the program error, implement this note. 1-2-1 A dialog box appears containing the object you need to correct. The yellow icon means that parts of the note cannot be implemented automatically. Choose the yellow traffic light to display the Splitscreen Editor. 1-2-2 On the right side of the screen, place the cursor on the header of the block you want to insert. Choose 6HOHFW. Choose &RS\WR%XIIHU. 1-2-3 On the left side of the screen, place the cursor where you want to insert the block. Choose ,QVHUWIURP%XIIHU. Choose &RS\&KDQJHV. 1-2-4 Go back to the dialog: Check the main program by choosing the appropriate pushbutton. The program should be syntactically correct. Continue the implementation by choosing &RQWLQXH. 1-2-5 Since you have changed the object manually, the system displays an addition dialog box to let you confirm that you have implemented the note completely. Confirm by choosing <HV. If you choose 1R, the note is shown as inconsistently implemented. 1-3 Check the logs for these notes: Place your cursor in the note and choose *RWRo /RJ The manual implementation is logged. 1-4 Test the program. The error should have been removed. 1-5 Change the processing status of the note to &RPSOHWHG. 1-6 Release the change request in the 7UDQVSRUW2UJDQL]HU. © SAP AG TAW12 26-75 © SAP AG TAW12 26-76 8QLW 0RGLILFDWLRQV 7RSLF 0RGLILFDWLRQ$GMXVWPHQW 1-1 To start 0RGLILFDWLRQ$GMXVWPHQW, choose 6$30HQXo$%$3:RUNEHQFKo 8WLOLWLHVo0DLQWHQDQFHo8SJUDGH8WLOLWLHVo$GMXVW3URJUDPV Alternatively, launch the transaction 63$8. 1-1-1 Enter your user name in the &KDQJHG%\ field. Execute the program. 1-1-2 Look at the objects in each category. To find out what the different icons mean, refer to the documentation on modification adjustment. 1-2 Adjust the modifications, working from top to bottom: 1-2-1 Start with the objects in the category 1RWH&RUUHFWLRQV 1-2-2 If the system has not ascertained the adjustment mode, restart the calculation by double-clicking the question mark icon. 1-2-3 Create a new change request if necessary. 1-2-4 Continue with the category :LWK0RGLILFDWLRQ$VVLVWDQW. 1-2-5 Finally, edit the category :LWKRXW0RGLILFDWLRQ$VVLVWDQW. 1-3 © SAP AG After you have adjusted all the objects, release the change request in the 7UDQVSRUW 2UJDQL]HU. TAW12 26-77 &RQFOXVLRQ &RQWHQWV z 6XPPDU\ z (YDOXDWLRQRIWKHGLIIHUHQWHQKDQFHPHQWWHFKQLTXHV SAP AG 2002 © SAP AG TAW12 27-1 &RQFOXVLRQ8QLW2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR z 'HVFULEHWKHFRXUVHFRQWHQWV z 'HVFULEHKRZWRSURFHHGZKHQFKDQJLQJWKH6$3 VWDQGDUG z /LVWWKHDGYDQWDJHVDQGGLVDGYDQWDJHVRI PRGLILFDWLRQV z 1DPHWKHDOWHUQDWLYHVWRPRGLILFDWLRQV SAP AG 2002 © SAP AG TAW12 27-2 $YRLGLQJ$GMXVWPHQWV z 6$3HQKDQFHPHQWFRQFHSW z6$3REMHFWVDUHQRWFKDQJHG z7KHUHLVQRDGMXVWPHQWGXULQJWKHXSJUDGH z 6XSSRUWSDFNDJHVDUHDSSOLHGIURPWKH2QOLQH &RUUHFWLRQ6HUYLFHV 2&6 z 5HWXUQWRWKH6$3VWDQGDUG 9HUVLRQGDWDEDVHDQGHQWULHVLQWKH:%2DQGWUDQVSRUW V\VWHPDUHQRWFKDQJHG SAP AG 1999 Modification adjustment is not necessary if you avoid making changes to SAP objects. Use program enhancements and appends with SAP tables to enhance SAP objects in such a way that your changes cannot be overwritten by SAP at upgrade. From Release 3.0, you can use Online Correction Services to import and cancel support packages and patches automatically (instead of having to insert preliminary corrections manually). © SAP AG TAW12 27-3 7DEOH(QKDQFHPHQWV $%$3'LFWLRQDU\ 7DEOHGHILQLWLRQ )LHOG )LHOG )LHOG 7DEOHGHILQLWLRQ )LHOG )LHOG )LHOG &,B,QFO <<)LHOG ==)LHOG $SSHQGVWUXFWXUH <<)LHOG ==)LHOG &,B,QFOXGH 'DWDEDVH SAP AG 2002 SAP provides two ways to enhance tables and structures with fields. y Structures y Customizing includes (CI includes) Both techniques allow you to attach fields to a table without actually having to modify the table itself. Append structures may only be assigned to a single table. A table may, however, have several append structures attached to it. During activation, the system searches for all active append structures for that table and attaches them to the table. Append structures differ from include structures in how they refer to their tables. To include fields from an include structure in a table, you must add an .INCLUDE... line to the table. In this case, the table refers to the substructure. Append structures, on the other hand, refer to their tables. In this case, the tables themselves are not altered in any way by the reference. © SAP AG TAW12 27-4 )XQFWLRQ0RGXOH([LW 3URFHVV)ORZ $SSOLFDWLRQSURJUDP ;IXQFWLRQJURXS ([LWIXQFWLRQPRGXOH (;,7BSURJBQDPH!B &$//&86720(5)81&7,21 ,QFOXGHLQ FXVWRPHUQDPHVSDFH SAP AG 1999 This graphic shows the flow of a program providing an enhancement in the form of a function module exit. The exit function module is called in the PAI logic of a screen at a position determined by the SAP application developer. Within the function module, the user can add functions in the customer namespace using an include. © SAP AG TAW12 27-5 %XVLQHVV7UDQVDFWLRQ(YHQW)XQFWLRQV 3URFHVV )ORZ'LDJUDP $FWLYHLPSOHPHQWDWLRQ $SSOLFDWLRQSURJUDP )XQFWLRQPRGXOH 23(1B),B3(5)250BQR! %7( )XQFWLRQPRGXOHLQ FXVWRPHU QDPHVSDFH &$//)81&7,21 &$//)81&7,21 SAP AG 2002 The graphic shows the process flow of an SAP program. The program contains an enhancement in the form of a Business Transaction Event. The program calls a function module that determines and processes the active implementation of the enhancement. The names of the function modules begin with OPEN_FI_PERFORM_ or OUTBOUND_CALL_. This function module OPEN_FI_PERFORM_<no> or OUTBOUND_CALL_<no> (Service function module) determines the active implementations for each enhancement and stores them in an internal table. Function modules are implemented in the sequence defined by the internal table. At this point the system also considers the conditions under which the function module will be processed in the customer namespace. For example, you can select the country or application as the condition. These conditions are also shown as filter values. © SAP AG TAW12 27-6 %XVLQHVV$GG,QV)ORZ'LDJUDP 6HUYLFHFODVV &/B(;,7+$1'/(5 $SSOLFDWLRQSURJUDP 3URFHVVLQJIRU DFWLYHLPSOHPHQWDWLRQV ,QVWDQFHRI $GG,QFODVV EDGLFODVV! $GG $GG,Q,QVWDQFHRI LPSOHPHQWLQJFODVV SAP AG 2002 This graphic shows the process flow of a program that contains a Business Add-In call. It enables us to see the possibilities and limitations inherent in Business Add-Ins. Not shown: You must declare a reference variable referring to the Business Add-In interface in the declaration section. In the first step, an object reference is created by CL_EXITHANDLER, the service class delivered by SAP. We will discuss the precise syntax later on. This generates the conditions for calling methods of program enhancements. When you define a Business Add-In, the system generates a Business Add-In class, which implements the interface. In call (2), the interface method of the Add-In class is called. The Add-In class searches for all of the implementations of the Business Add-In and calls the implemented methods. © SAP AG TAW12 27-7 0HQX([LWV2YHUYLHZ 6$3 0HQX 0HQX &XVWRPHU 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWIXQFWLRQ SAP AG 1999 Menu exits allow you to attach your own functions to menu options in SAP menus. SAP application programmers reserve certain menu entries in your GUI interface for this. This allows you to define a text for the reserved menu entry and add your own logic, often in the form of a related function module exit. Once you activate menu exits, they become visible in the SAP menu. Whenever this menu option is chosen, the system processes either a function provided by SAP application programmers or your own function that you have implemented in a function module exit. © SAP AG TAW12 27-8 %$G, )XQFWLRQ&RGHV 2YHUYLHZ 6$3 0HQX 0HQX &XVW &XVW 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ 0HQX 0HQX )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ )XQFWLRQ &XVWIXQFWLRQ &XVWIXQFWLRQ SAP AG 2002 As with customer exits, you can use menu enhancements with Business Add-Ins. However, the following conditions must be met: y The developer of the program you want to enhance must have planned for the enhancement. y The menu enhancement must be implemented in a BAdI implementation. © SAP AG TAW12 27-9 6FUHHQ([LWV2YHUYLHZ 6$3 &XVWRPHU 6$35 6$35 )LHOG )LHOG )LHOG )LHOG )LHOG= )LHOG; )LHOG< SAP AG 1999 Screen exits allow you to make use of reserved sections of a main screen (subscreen areas). You can either display additional information in these areas or input data. You define the necessary input and output fields on a customer screen (subscreen). © SAP AG TAW12 27-10 $GG,Q6FUHHQ(QKDQFHPHQWV3ULQFLSOHV 6$3 DSSOLFDWLRQ SURJUDP "!#%$'& (#)&+*,! -5!#$7&(#)&*8! 1(2 #3/()#) ,PSOHPHQWSURJUDP IXQFWLRQJURXS -5!#6/()"#) 1(2 #3/ )"#) 6WDWLFDWWULEXWH 6FUHHQLQVWDQFH DEFG $GG,QFODVV EDGLFODVV! -.!#%/0)#) 102 #3/0)#) -.!#3/4)#) ,PSOHPHQWLQJ FODVV ,QVWDQFH DWWULEXWHV 6FUHHQGDWD SAP AG 2002 The ABAP virtual machine does not recognize screens bound to classes. Thus, only "classical" programs (of types 1, F, or M) can be used as containers for screens. Screen enhancements need to take this into consideration. When you create a Business Add-In screen enhancement, the provider reserves a subscreen area on the application program screen, which is then filled with the subscreen of the implementing program (similar to customer exits). However, the application program and subscreen container program do not communicate directly, but rather through the generated Business Add-In class. The following slides show this communication process step by step. © SAP AG TAW12 27-11 0RGLI\LQJYHUVXV &RS\LQJ &RQQHFWLRQ WR6$3 3URMHFW VHFXULW\ 0RGLI\LQJ &RS\LQJ SAP AG 1999 Modification has the advantage that your live Repository objects do not lose their connection to the SAP standard. Copying, on the other hand, has the advantage that no modification adjustment will be necessary for your live Repository objects during subsequent upgrades. Choose copying instead of modifying if: y You have to make numerous changes to an SAP program y Your requirements will not be met by the standard in future R/3 releases During copying, pay attention to a Repository object’s environment as well. You should only decide whether to modify or copy after having informed yourself of the consequences for the main program, as well as for all of the includes attached to the main program. The same holds true for function groups and function modules. © SAP AG TAW12 27-12 (YDOXDWLRQRI$%$3'HYHORSPHQW3URMHFWV z 4XHVWLRQVSULRUWRWKH GHYHORSPHQWSURMHFW z $OWHUQDWLYHV z &XVWRPL]LQJ z ,PSOHPHQWDWLRQFRVWV" z 3HUVRQDOL]DWLRQ z &RQVHTXHQFHV z (QKDQFHPHQWWHFKQLTXHV z 6\VWHPSHUIRUPDQFH z &XVWRPHUH[LWV z &RVWVGXULQJDQXSJUDGH z %XVLQHVV7UDQVDFWLRQ (YHQWV z %XVLQHVVDGGLQV SAP AG 2002 ABAP development projects can be evaluated according to the following criteria: y What will implementation cost, measured in manpower (creating the concept, implementation, testing)? How will the ABAP development project influence: y Production operation performance? y The amount of adjustment at upgrade? By calling SAP objects in your own Repository object, you can drastically reduce the amount of effort needed to implement your object. However, any changes that SAP makes to the Repository object you choose to call may make extra adjustment necessary after an upgrade. For example, SAP could conceivably change the user interface of a screen for which you have written a batch input program. © SAP AG TAW12 27-13 1DPLQJ&RQYHQWLRQVIRU5HSRVLWRU\2EMHFWV 0DLQ RIILFH 6$3 6$3SDUWQHUV FHQWUDOL]HG =$ $SSOLFDWLRQ DUHD &XVWRPHUQDPHVSDFH DFFRUGLQJWRQRWH 9B75(61 GHFHQWUDOL]HG 6$3VWDQGDUG VRIWZDUH 6DOHV RIILFH <$ 1DPHVSDFHUHVHUYDWLRQ :RUNEHQFK2UJDQL]HU 'HYHORSPHQWV [[[[ 1DPHVSDFHUHVHUYHGXVLQJ 6$31HW5)URQWHQG &RPSOHPHQWDU\ 6RIWZDUH SAP AG 2002 Naming conventions allow you to avoid naming conflicts and give your Repository objects meaningful names (that can be understood by others). The following naming conflicts can occur: y $Q6$35HSRVLWRU\REMHFWDQGDFXVWRPHU5HSRVLWRU\REMHFWFRQIOLFW SAP Repository objects and customer Repository objects should be separated from each other by strict adherence to SAP naming conventions. OSS note 16466 gives you an overview of the current naming conventions for customer Repository objects (usually names that begin with either Y or Z). y 7ZRFXVWRPHU5HSRVLWRU\REMHFWVFRQIOLFW Naming conflicts can also occur between customer Repository objects in decentralized development scenarios where more than one development system is being used. You can avoid naming conflicts in this area by reserving a special namespace for development areas within the customer namespace. The Workbench Organizer checks to make sure that you adhere to these conventions by making entries in view 9B75(61. y &RPSOHPHQWDU\VRIWZDUHDQGFXVWRPHU5HSRVLWRU\REMHFWVFRQIOLFW You can avoid naming conflicts when importing complementary software from SAP partners by reserving special namespaces in the SAP Online Service System. In addition, IURP5HOHDVH SAP partners can apply for prefixes in the SAP Online Service System that they can add on to the beginning of their Repository objects’ names (For additional information, refer to SAP notes 84282 and 91032, or the white paper ’Development Namespaces in the R/3 System’, order number E:50021723 [English] and D:50021751 [German]). © SAP AG TAW12 27-14 &RQFOXVLRQ8QLW6XPPDU\ <RXDUHQRZDEOHWR z 'HVFULEHWKHFRXUVHFRQWHQWV z 'HVFULEHKRZWRSURFHHGZKHQFKDQJLQJWKH6$3 VWDQGDUG z /LVWWKHDGYDQWDJHVDQGGLVDGYDQWDJHVRI PRGLILFDWLRQV z 1DPHWKHDOWHUQDWLYHVWRPRGLILFDWLRQV SAP AG 2002 © SAP AG TAW12 27-15 $SSHQGL[ &RQWHQWV z )LHOG([LWV z $SSHQG6HDUFK+HOSV z %XVLQHVV'DWD7RROVHW %'7 z ([HUFLVHRQ)LHOG([LWV SAP AG 2002 © SAP AG TAW12 Appendix-1 )LHOG([LWV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 8VHILHOGH[LWVWRDSSO\FKHFNVWRDVFUHHQILHOG SAP AG 2002 © SAP AG TAW12 Appendix-2 *OREDO(QKDQFHPHQWV 6$3 &XVWRPHU 'HILQLQJ JOREDO HQKDQFHPHQWV 'HILQLQJ GDWDHOHPHQWV 'RFXPHQWLQJ GDWDHOHPHQWV &UHDWLQJILHOGH[LWV SAP AG 1999 SAP application programmers define keywords in different lengths and a short description for each data element. You create field exits in 3URMHFW0DQDJHPHQW Field exits are processed when the user leaves a screen that contains a field that refers to a data element containing a field exit. © SAP AG TAW12 Appendix-3 )LHOG([LWV $%$3'LFWLRQDU\ "± &KHFN )LHOGIRUPDWFKHFN ),(/'(;,7 )81&7,21 ),(/'B(;,7B ,03257,1*,1387 (;3257,1*287387 0(66$*(( EF (1')81&7,21 SAP AG 1999 SAP lets you create a field exit for every input-ready screen field that has been created with reference to the ABAP Dictionary. The additional program logic is stored in a function module and is executed at a specific point at the PAI event. The slide shows the order in which processing takes place. Before the PAI event of the screen is executed, the system performs the following checks: First the system checks if all the required fields have been filled in. If a required field is empty, the screen is shown again. The system then checks that data has been entered in the correct format. Any defined field exits are executed next. For example, by sending an error message you can have the screen sent again. Once all the field exits have been checked, the screen is processed as normal. y Field transport y Foreign key check y Processing of PAI module for screen © SAP AG TAW12 Appendix-4 *OREDODQG/RFDO)LHOG([LWV !#"%$ ),(/'B(;,7B*/2% 2 ; @ +)) 'DWDHOHPHQW */2% '& ( ) * ),(/'B(;,7B /2&B 1 ; ,)) % !& -$.$ 'DWDHOHPHQW /2& 1 @ /102*34560278 9 : 5 0;7% /10<= > *? ),(/'B(;,7B/2&B SAP AG 1999 Field exits take you from a screen field with a data element reference to a function module. Field exits can be either global or local. *OREDOILHOGH[LWV are not limited to a particular screen. If a global exit’s data element is used on several screens, the system goes to the function module for all these screens after activating the field exit. Here you can, for example, edit the contents, force a new entry to be made by outputting an error message, or prohibit certain users from proceeding further. /RFDOILHOGH[LWV are valid for one screen only. If you assign a screen from a specific program to a field exit, then the system will go to the appropriate function module from this screen once the exit has been activated. You can either create one global field exit or up to 36 local field exits for a data element, but not both. Each exit number refers to a different function module. Field exit function modules adhere to the following naming convention: y Prefix: FIELD_EXIT_ y Name: <Data element> y Suffix (for local field exit): _0 to _9, _A to _Z © SAP AG TAW12 Appendix-5 &UHDWLQJ)LHOG([LWV z 6WDUWSURJUDP5602'35) z )LHOGH[LW! &UHDWH )XQFWLRQ%XLOGHU )XQFWLRQPRGXOH P:Q R+SUT F2V ),(/'B(;,7B'(! AKJGF+LNMOD ACBEDGFHID )XQFWLRQ%XLOGHU )XQFWLRQPRGXOH ,PSRUWSDUDPHWHU ),(/'B(;,7B'(! ,1387 ([SRUWSDUDPHWHU 287387 SAP AG 2002 To create field exits, choose 8WLOLWLHV in the ABAP Workbench. Choose (QKDQFHPHQWV and then 3URMHFW0DQDJHPHQW to edit field exits and to implement customer exits. With *RWRÆ*OREDOHQKDQFHPHQWVÆ)LHOGH[LWV you start the transaction for maintaining field exits. To create a new enhancement, choose the menu path, 7H[W(QKDQFHPHQWVÆ&UHDWH Enter the name of the data element to which your screen field refers in the modal dialog box. The Function Builder is started. The system specifies the name of the field exit. Do not change this name. Create the function module in a customer function group. The function module interface is fixed and cannot be changed. The function module has an import parameter INPUT and export parameter OUTPUT. The contents of the screen field are stored in parameter INPUT. The contents of OUTPUT are returned in the screen field when you leave the function module. © SAP AG TAW12 Appendix-6 6RXUFH&RGHIRU)LHOG ([LWV WXUYNZ)[=\][2XG^N\ )81&7,21ILHOGBH[LWB'(! RXWSXW LQSXW (1')81&7,21 z 7KHVHVWDWHPHQWV DUHQRW DOORZHGLQILHOGH[LWV z %5($.32,17 z &$//68%0,7 z &200,7:25.52//%$&.:25. z 67235(-(&7 z 0HVVDJH,0HVVDJH: SAP AG 2002 In the source text, export parameter OUTPUT of the function module must be assigned a value that is transported back to the screen field. Otherwise the screen field would be initial after executing the field exit. The following ABAP statements are not allowed in field exit function modules: y CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT y COMMIT WORK, ROLLBACK WORK y COMMUNICATION RECEIVE y EXIT FROM STEP-LOOP y MESSAGE I, MESSAGE W y STOP, REJECT When you debug a screen that is referenced by a field exit, the field exit code is ignored by the debugger. As with any normal function module, you can, however, debug the field exit code in the Function Builder’s test environment. © SAP AG TAW12 Appendix-7 /RFDO)LHOG([LWV )LHOGH[LWVIRUGDWDHOHPHQWV $VVLJQSURJVFUHHQ 'DWDHOHPHQW )LHOGH[LWVIRUGDWDHOHPHQWV 6WDWXV 3URJUDP 'DWDHOHPHQW! LQDFWLYH *OREDO 'DWDHOHPHQW 'DWDHOHPHQW! )LHOGH[LW 3URJUDPQDPH SURJUDPBQDPH! 6FUHHQ )XQFWLRQ%XLOGHU )XQFWLRQPRGXOH P`Q R+SUT F1V ),(/'B(;,7B'(!B A<JGFOLNMOD AKB_DFHID SAP AG 2002 You can create local field exits that relate to a specific screen. Create a local field exit. A global field exit must already exist. Edit the local field exit based on the global field exit. You can create up to 36 local field exits, each of which carries a unique suffix. The system proposes a name for the function module; you should use this name. Defining local field exits means that the function module of the global field exits initially created are no longer used. For technical reasons, however, you must not delete the global function module. The field exits in the system would be deleted if you deleted the global function module of the field exit from the list. © SAP AG TAW12 Appendix-8 $FWLYDWLQJ)LHOG([LWV z $FWLYDWLQJIXQFWLRQPRGXOHV )XQFWLRQ%XLOGHU )XQFWLRQPRGXOH P`Q RUSUT FV ),(/'B(;,7B'(! ACJGFULNMOD ACB_DF1HID z $FWLYDWLQJILHOGH[LWV )LHOG([LW )LHOGH[LWVIRUGDWDHOHPHQWV $FWLYDWH $FWLYDWH 'DWDHOHPHQW 6WDWXV 3URJUDP 'DWDHOHPHQW! LQDFWLYH JOREDO SAP AG 2002 You must activate the field exit as well as the function module. Also note that field exits are only taken into account during screen execution if the R/3 profile parameter DEDSILHOGH[LW <(6 has been set for all application servers. (This profile parameter is set to 12 by default). If you declare field exits for multiple screen fields, you have QRFRQWUROover the order in which they are processed. In particular, you cannot access the contents of other screen fields in a field exit. Also read note 29377 about field exits. © SAP AG TAW12 Appendix-9 $SSHQG6HDUFK+HOSV7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z &UHDWHVHDUFKKHOSVWRGHILQH\RXURZQVHDUFK SDWKV z &UHDWHVHDUFKKHOSVWRKLGHWKHVHDUFKSDWKV GHOLYHUHGZLWKWKHVWDQGDUGV\VWHP SAP AG 2002 © SAP AG TAW12 Appendix-10 $SSHQG6HDUFK+HOSV 6$3 FROOHFWLYHVHDUFKKHOS DSSHQGV ,QFOXGHGVHDUFKKHOSV ,QFOXGHGVHDUFKKHOSV FXVWRPHU DSSHQG VHDUFKKHOS SAP AG 2002 The set of search paths that are meaningful for an object greatly depends on the particular circumstances of the SAP customer. The customer often would like to enhance the standard SAP collective search helps with his own elementary search helps. Release 4.6 provides an append technique that permits the enhancement of collective search helps without modifications. An DSSHQGVHDUFKKHOS is a collective search help that is assigned to another collective search help (its appending object) and that enhances it with the search helps it includes. The append search help uses the interface of its appending objects. The append search help lies in the customer namespace. Normally the search helps included in the append search help are also created by the customer and lie in the customer’s namespace. However, the required elementary search help might already be provided by SAP, in which case, the customer only has to add it to his own append search help. Append search helps are used with SAP to improve component separation. Some SAP collective search helps therefore already have one or more append search helps in the standard search help. Customer enhancements should always be made by creating a separate append search help. SAP collective search helps often contain elementary search helps that are not required by all customers. The search helps you do not need can be hidden using an append search help. To do this, the corresponding search help must be included in the append search help and the KLGGHQ flag must be set. © SAP AG TAW12 Appendix-11 %XVLQHVV'DWD7RROVHW7RSLF2EMHFWLYHV $WWKHFRQFOXVLRQRIWKLVWRSLF\RXZLOOEHDEOHWR z 'HVFULEHWKHHQKDQFHPHQWRSWLRQVRIIHUHGE\WKH %XVLQHVV'DWD7RROVHW SAP AG 2002 © SAP AG TAW12 Appendix-12 %XVLQHVV'DWD7RROVHW %'7 z 'HILQLWLRQ 7RROVHWIRUPDVWHUGDWDDQGVLPSOHWUDQVDFWLRQGDWD z 'HVLJQJRDOV ([WHQVLELOLW\ &RQILJXUDELOLW\ 'LYLVLELOLW\ $OWHUQDWLYHXVHULQWHUIDFHV 8VDELOLW\ )DVWHUGHYHORSPHQW *HQHULFREMHFWVHUYLFHV SAP AG 2002 The Business Data Toolset (BDT) - formerly known as master data administration or business partner administration - is the main administration tool for maintaining master data and simple transaction data, either using dialogs, direct input, or function modules. The BDT also provides generic objects services for consistent recurring requests – such as changing document lists, field modifications, and the deletion program. The BDT manages generic parts of these objects and the objects themselves and calls the applications using predefined interfaces (control tables and events) – such as writing to and reading from the application tables in the database. The BDT is used at SAP to maintain different application objects. Development partners and customers use BDT interfaces to enhance these objects ZLWKRXWPRGLI\LQJWKHVRXUFHFRGH. In addition, the BDT enables you to use alternative user interfaces by separating the UI from the programming logic. Generic services like direct input and field administration are provided. © SAP AG TAW12 Appendix-13 'HYHORSPHQW:LWKRXWWKH%'7 0DLQWHQDQFH WUDQVDFWLRQV )LHOG PRGLILFDWLRQ 'DWDWUDQVIHU 6HUYLFH $XWKRUL]DWLRQV (YDOXDWLRQRI FKDQJH GRFXPHQWV 1RWHV SAP AG 2002 You need the same functions over and over again in both development and implementation projects. The SAP Web Application Server provides some service functions, but most of these functions still need to be developed. Field modification, change document evaluation, and screen checks from the ABAP Dictionary are examples of such services. © SAP AG TAW12 Appendix-14 6SHHGLQJ8S'HYHORSPHQWZLWKWKH%'7 $X 'D WD WU DQ V IH 6HUYLFH WKR UL] DWL R QV 1R U &KDQJHGRF HYDOXDWLRQ )LHOG PRGLILFDWLRQ FH Q D HQ LRQV W LQ FW 0D QVD W UD WH V 0DLQWHQDQFHSHUIRUPHGFHQWUDOO\ 0DLQWHQDQFHSHUIRUPHGFHQWUDOO\ UHTXLUHVIHZHUGHYHORSPHQW UHTXLUHVIHZHUGHYHORSPHQW UHVRXUFHV UHVRXUFHV SAP AG 2002 Since the BDT controls dialog processes, the applications need only implement business functions. The BDT also provides services in which applications can be integrated. These factors considerably reduce the development time. The applications lose a little of their individual character but in return gain the benefits of reduced object maintenance, standardized dialogs, generic Object Services, and more rapid development. © SAP AG TAW12 Appendix-15 8VDELOLW\ZLWK9DULRXV2EMHFWV 2WKHU 6$3%3 $SSOREMHFW %83$ $SSOREMHFW %'7 6$3%3 UHODWLRQVKLSV &ODLPV FDSWXUH $SSOREMHFW %835 %DQN DFFRXQW $SSOREMHFW %.. &RQWUDFW DFFRXQW $SSOREMHFW ),&$ ,65( FRQWUDFW $SSOREMHFW ,&/ $SSOREMHFW 5(&1 SAP AG 2002 The following are just some examples of objects developed using the BDT: &HQWUDO%XVLQHVV3DUWQHU y Partner maintenance y Relationship maintenance &RQWUDFW$FFRXQWV5HFHLYDEOHDQG3D\DEOH y Contract account ,%8%DQNLQJ y Bank account y Standing order y Financial product y Financial conditions y Risk object y Variable transactions ,%8,QVXUDQFH y Insurance: Claims y Insurance: Loss event y Commissions: Remuneration agreement ,65( y Real estate contract y Cost efficiency analysis © SAP AG TAW12 Appendix-16 (YHQWVDQG3URJUDP)ORZ kEe d e8gh i j j b a b c d c e fgh i j j b DTITL DTITL DCUAD DCUAC ISSTA Start Before output Before output Call subscreen Call subscreen DCUAD DCUAC ISDAT ISDST AUTH1 Before output After input FCODE Changed? No Changed? DCHCK XCHNG No Changed? Yes Cancel. AUTH1 A Save? Yes XCHNG No No Cancel. A Save? No Cancel? Yes DSAVB DSAVB DSAVC AUTH1 AUTH1 DCHCK Changed? No Yes Yes DTAKE DSAVE Cancel End XCHNG Yes DSAVB FCODE Back XCHNG A Call subscreen After input Save Before output Call subscreen Yes No A DCHCK DTAKE DTAKE DSAVC DSAVC DSAVE DSAVE DLVE1 DLVE2 Events in dialogs: Save mode End SAP AG 2002 Within the program flow, applications can take events defined by the BDT and define their own program logic for them in function modules. These function modules can be defined for any event and are then called dynamically by the BDT. The starting point is a normal transaction code. This code always launches the program (BUSSTART in the Business Partner). The BDT reads all the necessary information from the control tables along with the name of the transaction code. The program flow is fully specified. All function modules that belong to the part of the object executed are called in the appropriate event. © SAP AG TAW12 Appendix-17 %'7 'HYHORSPHQWDQGWKH $%$3:RUNEHQFK )XQFWLRQ )XQFWLRQ JURXS JURXS )XQFWLRQ PRGXOHV ,667$ ,6'$7 ,6'67 6FUHHQV • lGlOm=lon Q B R HqprL1HIFGp;H *(7 3%2 PRGXOH &ROOHFW (YHQWV IRU HDFK WDEOH t w@y •x • s ss B3%&B 3$, PRGXOH B3%&B B3$, B B3$,B t u]v •U • s ss (YHQWV IRU HDFK YLHZ 3URJUDP ORJLF (YHQWV IRU HDFK DSSOLFDWLRQ SAP AG 2002 Each application develops within a separate function group. Screens (that is, subscreens), PBO modules, PAI modules, and function modules are created for the events (for each application, table, and view) in this function group. The PBO module calls only one BDT service function module to set the field attributes. The PAI module calls only one BDT service function module to get the cursor position. Program logic: y Events for applications (reading, checking, saving data) y Events for tables (communication between applications/function groups) y Events for views A) PBC - event for formatting a table (such as sorting) B) PBO - event before output (such as reading text descriptions from Customizing tables) C) PAI - event after input (such as checking input values) y Note: The same code is executed in maintenance modes without dialogs (such as direct input) You need not program this code again. © SAP AG TAW12 Appendix-18 ([HUFLVHV 8QLW $SSHQGL[ 7RSLF )LHOGH[LWV At the conclusion of this exercise, you will be able to: • Implement a field exit that can be used to make supplementary checks of a screen field. The transaction that your co-workers use to display flight information (%&B) allows you to access data for all airline carriers. The customer service personnel, however, should only be able to access the airlines for which it has explicit authorization. 1-1 What is the name of the program for the above transaction? 1-1-1 What is the name of the data element referenced by the input field for the airline? 1-1-2 Are the requirements met for linking a field exit to this screen field? 1-2 How can you create a field exit? 1-2-1 Create a field exit for the screen field found under 1-1. Reference the corresponding data element. 1-2-2 The Function Builder is started. Can you change the interface of the Function Builder? You will need to create a function group before you continue. Create one from Object Navigator and name it =%&B. 1-2-3 What do you have to code in the source text? Program an authorization check. How do you perform an authorization check? Use the authority check object S_CARRID with an activity of ‘03’. 1-2-4 If the check is negative, send a message to this effect. Use message in message class %&. 1-2-5 Activate the function module and the field exit. © SAP AG TAW12 Appendix-19 1-3 Check your results. 1-3-1 For which airline(s) do you not have authorization? 1-4 Create a local field exit for screen 0100 of transaction %&B based on the global field exit. Use a second session. This is logical, especially when creating function groups in parallel. © SAP AG TAW12 Appendix-20 6ROXWLRQV 8QLW $SSHQGL[ 7RSLF )LHOGH[LWV • Implement a field exit that can be used to make supplementary checks of a screen field. The transaction that your co-workers use to display flight information (%&B) allows you to access data for all airline carriers. The customer service personnel, however, should only be able to access the airlines for which it has explicit authorization. 1-1 The name of the program for transaction %&B is 6$3%&B)/,*+7. You can get this information by choosing the menu path 6\VWHPÆ6WDWXV. 1-1-1 The name of the data element to which the input field for the airline refers is 6B&$55,'. 1-1-2 You can find the screen field and its data element by going to the ScreenPainter for screen 0100 in program SAPBC425_FLIGHT##. You can see that attribute "Dictionary" is set for field SFLIGHT00-CARRID in the general attributes of the element. The data element you need is S_CARRID##. 1-1-3 Create a function group Z_BC425_## from the Object Navigator. 1-2 Create a field exit using program RSMODPRF. Execute the report RSMODPRF and enter the name of the data element S_CARRID##. Press F8 to run the report. 1-2-1 The function builder is displayed with the correct name of the field exit already supplied. Do QRW change this name and do QRW attempt to build the field exit from the Function Builder! © SAP AG TAW12 Appendix-21 1-2-2 The importing and exporting parameters are already defined and must QRW be changed. Select the tab for source code. Use the Pattern pushbutton and select the radiobutton for AUTHORITY-CHECK. Enter the value S_CARRID and press the Enter key. Complete the coding as shown. The source text should be as follows: output = input. AUTHORITY-CHECK OBJECT ’S_CARRID’ ID ’CARRID’ FIELD input ID ’ACTVT’ FIELD ’03’. IF sy-subrc <> 0. MESSAGE e045(bctrain) WITH input. ENDIF. 1-3 © SAP AG Activate the function module and all of the related function group objects. Use the menu function BACK to return to the selection screen for the report RSMODPRF. Leave both fields on the selection screen blank and press F8 to execute the report. A list of all field exits is displayed. Select your field exit and activate it with )LHOGH[LW Æ$FWLYDWH. TAW12 Appendix-22 &DVH6WXG\ SAP AG 2003 © SAP AG TAW12 Case Study-1 © SAP AG TAW12 Case Study-2 $%$3:RUNEHQFK&RQFHSWV&DVH6WXG\ 7RSLF $%$3'LFWLRQDU\8VHU'LDORJVDQG (QKDQFHPHQWV At the end of this case study, you can: • Determine whether or not you can put the knowledge you have obtained from TAW12 (Dictionary, user dialog, and enhancement concept) to practical use. 1. Your customer, an international airport operator, implements SAP R/3. The standard SAP system enables you to enter, book, and cancel flights. An additional application for displaying and maintaining flights and flight bookings exists from a previous project. Your customer now wants to extend the scope of the project so that he or she is able to enter additional information and passengers’ special requirements in the system. Examples of special requirements include: Vegetarian meal Passenger with a physical disability VIP requiring special treatment VIP requiring personal protection (bodyguard) Difficult or awkward passenger Child with accompanying adult It is to be possible to store the list of possible special requirements, and the surcharges they imcur for the airfare, in Customizing tables. Since not all airlines accommodate for all special requirements, the customer needs to be able to assign the special requirements to particular airlines. The customer is to be able to select the various special requirements in the standard SAP software for creating flight bookings. When the customer saves the booking, these requirements are to be stored in the database. Customer enhancements are not to be permitted since SAP offers a variety of enhancements. Alternatively, you can reuse parts of an existing customer development for displaying and maintaining bookings and include a display function for special requirements. © SAP AG TAW12 Case Study-3 1-1 $VNyour course instructor about the details of the customer requirements and analyze the existing applications. Familiarize yourself with the solutions. If necessary, refer to the ideal solution (program 6$30%&B7$:B&66B%22.,1*6function groups %&B7$:B&66 and %&B7$:B&66B9%in package %&B7$:). 1-1-1 The standard SAP program you are to enhance is 6$30%&B7$:B&6B%22.,1*6in package %&B7$:B. This is very similar to the previous ideal solution in course BC414. Familiarize yourself with the functions of this program and analyze the enhancement options. Do QRWFUHDWHDFRS\of this program. Instead, enhance it as follows using the enhancement components available. 1RWHwhen you create a booking (screen 300), a tab exists that is only displayed after you have implemented a BAdI. 1-2 (QDEOHthe customer to enter special requirements in the system. If necessary, allow the customer to enter the special requirements of each particular airline. 1-2-1 Create a table =63(&,$/6that belongs to delivery class C in which special requirements can be defined using a technical name (char 1). Include fields for entering the surcharge incurred by each special requirement. To enable the application to be used in different languages, you should enter the descriptive text for a special requirement in a text table =63(&,$/67 To enable you to define the type of fields required, create data elements and domains with the relevant properties. 1-2-2 To enable the customer to assign special requirements to particular airlines, you must create an additional table =63(&,$/6B$66,*1 that belongs to delivery class C. Maintain external key relationships. 1-2-3 Enable the customer to maintain the data in these Customizing tables. To do this, generate maintenance dialogs. To ensure that the data in these two tables remains consistent, it must be possible to maintain both tables simultaneously. You can do this by using a maintenance view or a view cluster. 1-3 (QKDQFHthe flight data model so that it includes a table for entering any special requirements for a flight booking. 1-3-1 Create a table =6%22.B$''6 that belongs to delivery class A. You should include the key fields 6%22.and an additional unique field 63(&,$/,'for identifying a special requirement. Enter meaningful external key relationships. 1-3-2 Create a suitable domain of type 180& for the 63(&,$/,'. 1-3-3 Create a number range object for this domain. © SAP AG TAW12 Case Study-4 1-4 &UHDWH a new function group =%&B7$:B&6. The function group acts as a framework program for the subscreen that you can incorporate in the SAP application for booking flights using the screen enhancement of BAdI %&B7$:B&6B. During runtime, you manage the special requirements selected for a booking in this function group and use a table control to display these on the subscreen. Create a blank subscreen. 1-5 ,PSOHPHQW the BAdI %&B7$:B&6B of the SAP application 6$30%&B7$:B&6B%22.,1*6. 1-5-1 Specify the framework program and the number of the subscreen. 1-5-2 In method *(7B7$%B1$0(, enter a name for the tab that was previously hidden in the SAP program. 1-5-3 Ensure that the BAdI methods enter the information (maintenance mode, selected flight, booking record ID) transferred from the SAP application in the private instance attributes. 1-5-4 After you have activated the implementation, check whether the tab page that was previously hidden is now displayed. 1-6 &UHDWHthe subscreen for your function group and include all the required functions. 1-6-1 Define global data for managing the selected special requirements. 1-6-2 Use a table control to display the selected special requirements. Include information such as the name and surcharge incurred for a special requirement in the table control. 1-6-3 If you use pushbuttons on your subscreen, the SAP application uses the 352&(66B)&2'( method of the BAdI interface to notify you when your function code has been triggered. In your implementation of this method, you can call a new function module of your function group that processes the function code that was triggered. © SAP AG TAW12 Case Study-5 1-7 (QVXUHthat when a new flight booking is saved, the globally defined special requirements in your function group are posted to the new booking in the logical unit of work (LUW) of the SAP application. 1-7-1 Create an additional function group =%&B7$:B&6B9%. 1-7-2 Create a posting-enabled function module that receives the special requirements of a posting and updates your table =6%22.B$''6 with this data. 1-7-3 When a new booking is saved, the SAP application calls the 6$9( method of the BAdI interface. Ensure that your posting module is called and that it creates an additional posting entry in the LUW before the SAP application exits the LUW. 2-1 2SWLRQDO7DVN As part of the course BC410, you developed a transaction for displaying (and maintaining) flights and flight bookings. Enhance this transaction so that you can also use it to display any special requirements that exist for a flight booking. 2-1-1 Enhance your program 6$30=%&B62/87,21from BC410 or copy the template 6$30%&B7$:B&67B),*+7. For more information, see the ideal solution 6$30%&B7$:B&66B),*+7. 2-1-2 On subscreen 130 of your program, include a pushbutton for ’Special Requirements’. 2-1-3 Process a modal dialog box when you select the ‘Special Requirements’ pushbutton in which you can display the special requirements that exist for a selected booking. Try and incorporate the subscreen of your function group =%&B7$:B&6. In your function group, include function modules for transferring data and include the logic for dictating whether or not a field in the table control is ready-for-input. © SAP AG TAW12 Case Study-6 3UHSDUDWLRQIRU&HUWLILFDWLRQ &RQWHQWV z 'HVFULSWLRQRI&HUWLILFDWLRQ z ([DPSOH4XHVWLRQV SAP AG 2003 © SAP AG TAW12 Certification-1 © SAP AG TAW12 Certification-2 6$3&RQVXOWDQW&HUWLILFDWLRQ 'HYHORSPHQW&RQVXOWDQWP\6$37HFKQRORJ\±$%$3:RUNEHQFK Software components: SAP Web Application Server 6.20 Duration of certification: 3 hours Number of certification questions: 80 multiple choice questions Certificates for participants in this certification test: none Please note that auxiliary materials are not permitted during the certification test (no access to the online documentation and no access to an SAP system). The development consultant mySAP Technology – ABAP Workbench (2003) certification test verifies the participant’s knowledge in the field of the ABAP Workbench consultant profile within mySAP Technology. Participants can use this certificate to prove their basic knowledge in this consultant profile and to implement this knowledge in projects. The certification test contains questions from the following content areas: &RQWHQW$UHDV 1. mySAP.com technologies (+) P\6$3FRP Navigation (handling the system) Technical Structure of an SAP System Cross-System Concepts 2. ABAP Workbench Fundamentals (++) 3. ABAP Objects (++) 'DWD7\SHVDQG'DWD2EMHFWV ,QWHUQDO7DEOHV 'DWD5HWULHYDO $XWKRUL]DWLRQ&KHFN 6XEURXWLQHV 7KH$%$35XQWLPH6\VWHP &UHDWLQJDQG&DOOLQJ)XQFWLRQ*URXSVDQG)XQFWLRQ0RGXOHV 3URJUDP&DOOVDQG 'DWD7UDQVIHU &ODVVHVDQG2EMHFWV ,QKHULWDQFH &DVWLQJ ,QWHUIDFHV (YHQWV *OREDO&ODVVHVDQG,QWHUIDFHV ([FHSWLRQ+DQGOLQJ '\QDPLF3URJUDPPLQJ © SAP AG TAW12 Certification-3 4. ABAP Dictionary (++) 'DWDEDVH7DEOHV Performance with table accesses &RQVLVWHQF\7KURXJK,QSXW&KHFN )RUHLJQ.H\'HSHQGHQF\ 'HSHQGHQFLHVZLWK$%$3'LFWLRQDU\2EMHFWV 9LHZV 6HDUFK+HOS 5. Techniques of List Processing (++) 6. Dialog Programming (++) 7. Database Updates (+) 8. Enhancements and Modifications (+) 2XWSXWWLQJ'DWDWR/LVWV 6HOHFWLRQ6FUHHQ /RJLFDO'DWDEDVH ,QWHUQDO'DWD&ROOHFWLRQ 'DWD)RUPDWWLQJDQG &RQWURO/HYHO3URFHVVLQJ 6DYLQJ/LVWVDQG%DFNJURXQG3URFHVVLQJ ,QWHUDFWLYH/LVWV 6FUHHQ )XQGDPHQWDOV 7KH3URJUDP,QWHUIDFH *8,7LWOH*8,6WDWXV 6FUHHQ(OHPHQWVIRU2XWSXW 7H[W)LHOGV6WDWXV,FRQVDQG*URXS%R[HV ,QSXW2XWSXW6FUHHQ(OHPHQWV 6XEVFUHHQDQG7DEVWULS&RQWURO 7DEOH&RQWURO &RQWH[W0HQX /LVWVLQ'LDORJ3URJUDPPLQJ 'DWDEDVH8SGDWHVZLWK2SHQ64/ /8:·VDQG&OLHQW6HUYHU$UFKLWHFWXUH 6$3/RFN&RQFHSW 2UJDQL]LQJ'DWDEDVH8SGDWHV &RPSOH[/8:3URFHVVLQJ 1XPEHU$VVLJQPHQW &UHDWLQJ&KDQJH'RFXPHQWV &KDQJLQJWKH6$36WDQGDUG 3HUVRQDOL]DWLRQ (QKDQFLQJ'LFWLRQDU\(OHPHQWV (QKDQFHPHQWV8VLQJ&XVWRPHU([LWV %XVLQHVV7UDQVDFWLRQ(YHQWV %XVLQHVV$GG,QV 0RGLILFDWLRQV © SAP AG TAW12 Certification-4 Key for certification weighting: + = 1 - 10% ++ = 11 - 20% +++ = More than 20% © SAP AG TAW12 Certification-5 © SAP AG TAW12 Certification-6 ([HUFLVHV ([DPSOH4XHVWLRQVIRUWKH&HUWLILFDWLRQ7HVW8VLQJ WKH&RQWHQWVRI7UDLQLQJ&RXUVH7$:P\6$3 7HFKQRORJ\±$%$3:RUNEHQFK&RQFHSWV At the end of this training course you will have an overview of - the structure of the Certification Test 7RSLF$%$3'LFWLRQDU\ 4XHVWLRQ Foreign keys: Which conditions are linked to the check field and the validation table field that is assigned? $QVZHU Both fields must have the same name. $QVZHU Both fields must have the same data element. $QVZHU Both fields must have the same domain. © SAP AG TAW12 Certification-7 $QVZHU,QFRUUHFW $QVZHU,QFRUUHFW $QVZHU&RUUHFW © SAP AG TAW12 Certification-8 4XHVWLRQ Which selection methods are permitted in an elementary search help? $QVZHU Database view $QVZHU Maintenance view $QVZHU Help view $QVZHU Table with text table $QVZHU A different search help © SAP AG TAW12 Certification-9 Answer 1: Correct Answer 2: Incorrect Answer 3: Correct Answer 4: Correct Answer 5: Incorrect © SAP AG TAW12 Certification-10 7RSLF/LVW&UHDWLRQ 4XHVWLRQ What can be specified with the statement SELECT-OPTIONS so FOR xxx? $QVZHU The data element name. $QVZHU The name of a program variable created with DATA. $QVZHU The name of a structure field from the ABAP Dictionary. $QVZHU 7KHQDPHRIDVWUXFWXUHILHOGIURPWKH$%$3'LFWLRQDU\LIDVXLWDEOH7$%/(6VWDWHPHQWH[LVWV LQWKHSURJUDP $QVZHU The name of a program type created with TYPES. © SAP AG TAW12 Certification-11 $QVZHU,QFRUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW © SAP AG TAW12 Certification-12 4XHVWLRQ Which statements apply to the structure of a logical database? $QVZHU The structure determines the sequence in which the GET events must be executed in the program. $QVZHU The structure determines the read sequence of the logical database. $QVZHU The node names in the structure are always the names of database tables. © SAP AG TAW12 Certification-13 $QVZHU,QFRUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW © SAP AG TAW12 Certification-14 7RSLF3URJUDPPLQJ8VHU'LDORJV 4XHVWLRQ Changes to table controls ... $QVZHU .. are temporary if they refer to table control fields. $QVZHU .. are permanent if they refer to attributes of the whole table control. $QVZHU ... must be executed at the PAI screen event. $QVZHU ... must be executed within LOOP AT SCREEN. ... ENDLOOP. © SAP AG TAW12 Certification-15 $QVZHU&RUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW $QVZHU,QFRUUHFW © SAP AG TAW12 Certification-16 4XHVWLRQ You want to hide a field on a screen. How do you do it? $QVZHU You set SCREEN-ACTIVE to 1 and SCREEN-INPUT to 0. $QVZHU You set SCREEN-ACTIVE to 1, SCREEN-INIVISIBLE to 1. $QVZHU You set SCREEN-ACTIVE to 0. SCREEN-INIVISIBLE doesn’t matter. $QVZHU You set SCREEN-INVISIBLE to 1. SCREEN-ACTIVE doesn’t matter. © SAP AG TAW12 Certification-17 $QVZHU,QFRUUHFW $QVZHU&RUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW © SAP AG TAW12 Certification-18 7RSLF'DWDEDVH8SGDWHV 4XHVWLRQ You want to change the contents of a database table. Which of the following elements should your program contain to do this? $QVZHU Use a logical database. $QVZHU Use AUTHORITY-CHECK. $QVZHU Use OPEN CURSOR. $QVZHU Call ENQUEUE/DEQUEUE function modules. © SAP AG TAW12 Certification-19 $QVZHU,QFRUUHFW $QVZHU&RUUHFW $QVZHU,QFRUUHFW $QVZHU&RUUHFW © SAP AG TAW12 Certification-20 7RSLF(QKDQFHPHQWVDQG0RGLILFDWLRQV 4XHVWLRQ Which of the following statements about Business Add-Ins (BAdI) are correct? $QVZHU A BAdI method can be called by one program only. $QVZHU If the BAdI is flagged as reusable, no filter dependency can be defined. $QVZHU A Business Add-In always has exactly one interface. © SAP AG TAW12 Certification-21 $QVZHU,QFRUUHFW $QVZHU,QFRUUHFW $QVZHU&RUUHFW © SAP AG TAW12 Certification-22