Professional Documents
Culture Documents
foreign key
domain must be
Value table assigned at Domain customization object to enter value, Check table e.g.: employee Foreign key table is Main difference of Check table is used value table never Hierarchy of input explicit ABAP input
no F4 Help
value table
Change DB table Change key field Change ordinary Conversion process Lock db change name to Activate new load data into QCMTAB deleted QCM8TAB renamed Remove lock Problems with Tablespace Because both old Extend tablespace ambiguous key after Incompatible types recreate the old rename QCMTAB to Remedy to Analyze with SE14 deactivate view index deleted make sure no MOVEreactivate view required conversion no change required
Index Name - 3 chars View Include entire table For View FIeld, give For Field, give * Exclude a field after '- for View Field for Field, give Append View one append view one db view has View can be Maintenance View no '*' nor '-' allowed
RTTI
Runtime Type
SUBMIT Program Insert program Leave To Terminates CALL inserts a transaction /nT_CODE
Logical Memory External session Internal session SAP GUI One program has inserted program is New executable New Transaction LEAVE TO Previous internal A program call Main program group one program group additional programs Additional program Transfer data Selection screen ABAP Memory SAP Memory DB Local file SUBMIT with value SUBMIT zreport 6 external session 9 internal session
LOOP AT itab INTO AT NEW WRITE: sy-tabix. ENDAT. ENDLOOP. OPEN CURSOR c COLLECT keyword SET PF-STATUS READ LINE syread current line TOP-OF-PAGE sy-lilli line num selected sy-lisel READ current line
Change data create field exit in GoTo->Text EnhancementsStandard screen obligatory check check data format of Field Exit field transport foreign key check Process PAI Types Global Local Data Element Naming convention FIELD_EXIT_<DATA_ELEMENT>_< Debugging Debug Field Exit Applies to all screens Applies to one screen only Create field exit in
AUTHORITYSU21 - Create SU21- create SU21 - create PFCG - Create Role SU20 - Create SU20 - Create SU01 - assign role Use AUTHORITYOBJECT
READ-ONLY Can be read only Can be changed Constructor Can only have Static constructor No parameters Event ACTIVATION space to undo registration
Extract Dataset Jobs & Job Steps Job scheduling External command Background Job PRINTING NEW-PAGE PRINT GET_PRINT_PARA SET_PRINT_PARA Ranked lists Info set BSP Data clusters Display ranking infocube Functional area SET LEFT SCROLLSAP Roll Memory ABAP Query Report EDI Smart Form REJECT CALL DIALOG COMMUNICATION RECEIVE STEP-LOOP FIELD TRANSPORT (PBO PAI) Batch data communication Info Object
Dialog program Changes are written System is informed Changes are sent to Update program Success -> Log Fail -> Log entries User is sent an rdisp/vbmail 1 or 0 rdisp/vb_mail_user_ $ACTUSER - record SM13 to check
CALL FUNCTION add Function one SAP LUW has COMMIT WORK LUW Header is LUW Unit is closed
ROLLBACK WORK or MESSAGE A discards all update UPDATE MODULE COMMIT WORK Dialog program delete locks
Local update Set update Task V1 V2 main changes calculations - e.g. for Local Update, after program For Async/Sync, Always stored in
Inform dispatcher
VBLOG is a table
LOOP AT SCREEN MODIFY SCREEN . LOOP AT MODULE trans to tc ENDLOOP PAI. LOOP AT FIELD sdyn_bookENDLOOP WITH CONTROL
Single screen combines input and Create change Type 1 M F J, K I screens screen above 9000 1000 through 1010 data communication screen name and Change Attributes Enable/Disable using SCREEN SET SCREEN LEAVE SCREEN Click back returns CALL SCREEN Modal dialog box CALL SCREEN 101 STARTING AT lc ur left column ENDING AT rc lr right column SET CURSOR for MODULE SET CURSOR ENDMODULE . STATUS should assign for assign function key TITLEBAR can be created at Forward Navigation In Object navigator Fastpath Menu Function from application Recommended function key complies with SAP ergonomic standard app toolbar max 35 buttons Menu max 8 top menus max 3 levels text 6+ system + help function group Interface, Class pool include program
menu bar of program's status max 15 entries per menu Function keys Utilities->Help Texts>Internal key number Context Menu on_ctmenu_sub130 FORM on_ctmenu_sub130 USING p_menu TYPE REF TO cl_ctmenu . cl_ctmenu=>load_g ui_status( program = sy-cprog status = 'SUB130' menu = p_menu ) . ENDFORM .
UI elements can be occupies a position Layout manager Flow Row Form Matrix Grid does not force line input field label formatted text view, button, button link choice, link to check box, tri state drop down by index, radio button image line break row head data matrix head data FormTopData FormHeadData Data binding click binding button Poor design hard coded UI value change UI element Controlling UI create context choose data type set value of attribute using any method of it is possible to bind multiple UI to one attribute bind directly/via property Enabled, Read only, Required, Visible, Final Group and tray are user defined
obselete
Composite UI elements cant display data on their own textview inputfield selection mode table cannot be selection column not selected displayed One row may be single/singleNoLead selected leas_selection_inde singleNoLead/multi x not changed by NoLead selecting row none wdr_test_ui_elemen ts
insert
Modification Modification user exit Original/copy original in one correction done in repair done in copy Modification causes SAP Software SSCR Key Change request Request is released copied from SAP Full version old version stored
Critical success Encapsulation not direct insertionX Standardized doc comment SAP keep modification object type, routine, do not modify Release all request Modification Finer granularity: use modification New modification vs. Module granularity Modification exit at original source code modifications not Old modification Include program line by line each modification is
Software layer Original -> Partner Tools supported by ABAP Editor Screen Painter Menu Painter Text Elements Class Builder Function Builder ABAP Dictionary Documentation RZ11 parameter name eu/controlled_modifi cation
User Exits special include blank subroutine include delivered Mainly in SD module It is also search PERFORM userexit search S&D System adjustmentChoose component SPDD (can change) Domains, Data SPAU (can change) ABAP Program User Interface Screens Search Helps Views Lock objects Legend for green yellow red tick two blue-yellow SPAM (can adjust Goto->adjust automatic semi auto manual object adjusted original restored
Customizing Implementation Personalization set menu and fields default value for personalized menu role based, Modification change SAP without customer changed SET/GET custom table
Extension ABAP Dictionary, Table enhancement Customizing include Append strucutre Program User exit customer exit BTE BAdI Menu enhancement Customer exit BAdI Screen define subscreen write flowlogic provide data implement screen documentation Table enhancement new field of SAP Customizing include Append structure Text enhancements F1 help
CMOD Screen painter, attribute window, Dict tab, MOD Restaore SAP, Restore Customer
Create customer documentation for screen field Customer Exits customer exit is planned by SAP CMOD SMOD project enhancement assignment Components Program exit customer modification used by SAP to define exits choose enhancements to be implemented Screen, Functin module, or Menu EXIT_program_nam e_001 exit FUNCTION group structure
Menu Exit user menu visible after active '+MNU Give menu text Menu exit hasto have program exit Screen Exit call subscreen abcd including sy-cprog dynr. call subscreen abcd. transporting of program<-> subscreen are done using Function module
Customer development
EXIT
Program_Name
3 numc
SAPLXAAA LXAAATOP LXAAAUXX LXAAAF01 LXAAAO01 LXAAAI01 LXAAAE01 ZXAAAZZZ ZXAAAF01 ZXAAAO01 ZXAAAI01 ZXAAAE01
program name global data Function Module of the Exit Subroutine PBO PAI Events
calls the PBO of the subscreen calls the PAI of the subscreen
BAdI is an reusability Multiple usage All enhancement program, menu, Badi Interface and search BAdI CL_EXITHANDLER Repository SE18 - BAdI SE19 - BAdI can because BAdI is a Menu Enhancement is preplanned avoid conflict: Extensible filter type filter looks for Value table has Value table has Text Default Naming convention Name Interface Method Generated class Implementation Implementing class new BAdI benefits Improved additional filter integrates with new integrates with classic BAdI execute through BAdI adapter class bridging method new BAdI definition within enhancement spot BAdI handle calls method to call implementation search new BAdI SE84 search 'GET BADI' in program create BAdI implementation display enh spot badi, zbadi IF_EX, ZIF_EX CL_EX, ZCL_EX impl, Zimpl CL_IM, ZCL_IM
GET BADI
CALL BADI
choose implment enh spot enter name for enh impl, enter name for BAdI maintain attributes for BAdI click implementing class change double click methods to implement activate the method and enhancement Filter dependent filter value
Difference: procedural separate data fn can access global encapsultation function module OOPS share functions create many runtime protects data obselete code not
Advantages of inheritance polymorphism respond differently event controlling customer integration Analysis and design Diagram types class diagram Generalization/Spec specialization implement components in Friend class lcl_friend class x1 definition class lcl_friend class x1
Hooks Methods in Webdynpro for ABAP Attachments:1 Added by Chidanand Chauhan, last edited by Objective: Different type of Hooks methods in Webdynpro for ABAP There are several Methods present in Webdynpro for ABAP as a
WDDOBEFORENAVIGATION The method WDDOBEFORENAVIGATION can be used to This method can only be used for the component controller
WDDOAFTERACTION This method is called for all visible views at the time an action Here functions can be placed that are carried out equally for
WDDOBEFOREACTION Before an action is triggered, you can perform your own The method can only be used for view controllers. It is used for all visible views of the component assigned to
WDDOOPEN and WDDOCLOSE Every window controller has the WDDOONOPEN and These two methods are only processed when a window is Since the opening of a dialog box does not involve any
The WDDOONOPEN method can therefore be used to implement initializations WDDOAPPLICATION STATECHANGE (Handling for Suspending &Resuming an Application) It is processed whenever the status of an application changes that is precisely when the application is transferred from running to suspend mode and when it is subsequently restarted via the resume plug. This method thus replaces the 'WDDOEXIT' method in the phase model.
Application development can - but does not have to - add code to the method 'WDDOAPPLICATIONSTATECHANGE'. However it can be useful, for example, to delete database locks in this method that are not be in place during the resume state. WDDOMODIFYVIEW (Method for Modifying the View before Rendering) This is the only method in which dynamically modifying the UI controls is permitted. The reference to the view and the information whether this view is displayed for the first time are passed to the method. To know the complete explanation of the hook methods is given in the reference, SAP Help Hook Methods http://wiki.sdn.sap.com/wiki/display/WDABAP/Hooks+Methods+in+ Webdynpro+for+ABAP Meta model declaration common app design godo for tool support screen layout & nesting navigation error handling Data flow componentization Sap Enterprise portal Web Dynpro application ABAP WebDynpro Runtime Custom coding
avoid SELECT statement in controller Model object is not supported Reusable entities Global class Faceless WebDynpro contains only reusable functionality Web dynpro benefits maximize design, minimize coding, separate layout and logic, support reuse of components support data binding run on multiple platform browser app, zero footprint 508 accessibility define forms and tables in UI and source code, in controller methods context contains data, controller contains methods data on UI element is refreshed upon user input, initiates the next server roundtrip Navigation events are special asynchronous events placed in navigation queue navigation events are processed in the web dynpro processing phase inbound plugs deal with navigation events raised by firing outbound plugs only when the navigation queue is processed when the views in the current view assembly fire their outbound plugs context is hierarchical
no validation errors occurred that would cause navigation to be cancelled outbound plugs triggers navigation between views raise navigation event define next UI navigation links links outbound and inbound plugs together View assembly current and next view controllers window for each window has layout, checking user input, handling user action one component controller for one WebDynpro Component encapsulate sub functions of component controller implement personalization. only 0 to one configuration component for each componentcontroller can access configuration controller, configuration cannot access other controller
view
component
custom
configuration
Component interface
interface view interface controller Web dynpro application is the entry point to WebDynpro component
Created by explicit declaration context tree additional attributes additional methods all properties Events Actions Outbound/Inbound plug and used controllers
gurantees universality good for datadriven, dynamic apps implementation of business rules dynamic screen modification access to services (files) Portal eventing
methods of classes defined in own system function modules defined in own system
Context lifespan is as long Can modify contents Change context Creating new Create nodes and design time define context root runtime root node element can be context root A1 A2 N1 N2 WD_CONTEXTCardinality runtime element nr min max instances runtiem error if index starts with 1 but internal table Lead selection index Singleton N2 is singleton at Supply function written for context called at runtime to node collection is lead selection index node collection is Context mapping map a view context to another controller's context, drag from source to target internal mapping within same component node's collection
Explicit Hooks prepared by New enhancement enhancement points enhancement new BAdI is Implicit end of block beginning of block end of interface of Fn Mod, end of additional attributes additional methods pre-method, postend of end of includes Xno implicit Explicit option provided by section allow user to replace Switch Framework assign business assign menu entries assign screen collection is called insertion options
Controller types
Hook methods Standard WDDOINIT WDDOEXIT Component WDDOBEFORENAVIGATION WDDOPOSTPROCESSING WDDOAPPLICATIONSTATECHANGE -4 WDDOBEFOREACTION WDDOAFTERACTION WDDOMODIFYVIEW WDDOONCONTEXTMENU (trigger if sent as dialog) WDDOONOPEN WDDOONCLOSE after action before ui sent to suspend resume trigger event last method to be right click before open before close called on controller
View controller
Window controller
Phase model WDDOINIT inbound plug WDDOBEFORENA WDDOPOSTPROC WDDOMODIFYVIE user action inbound plug WDDOBEFOREAC WDDOONACTION WDDOAFTERACTI outbound plug navigation to WDDOINIT WDDOEXIT WDDOMODIFYVIE W WDDOPOSTPROC ESSING Additional Method Event handler Supply function Component Standard attributes WD_CONTEXT ordinary method read context node, node set as invalid all controllers
WD_THIS WD_COMP_CONTROLLER Additional attribute public attributes can be shared to other components controller attributes cannot be exposed to component interface lead selection returns reference to if_wd_context_elem ent get_child_node get_element get_element_count get static attribute get attribute get static attributes table set_attribute set_static_attributes create_element bind_element bind_structure bind_table remove_element
To set SAP memory Create a new AT SELECTION GET PARAMETER START-OFSET PARAMETER Better Alternative pa_car TYPE sbook-
Benefit Faster data access cross program concurrent lock mechanism saved as attribute Disadvantage bottleneck Declaration SHMA Area is created Area accessed via root /nSHMA root class assigned root class as root requires handle to Overview handle is used to handle->root handle->set_root( attach for read/write detach internal session concurrent reading read lock for read lock for active one active version Shared objects instances of shared in shared memory read lock for active Global area class the area class