Inquiry by Customer--> Quotation by vendor --> Purchase Order by Customer (Tables EKKO and EKPO) --> Sales Order against PO (Tables VBAK and VBAP) --> Delivery against Sales Order (Tables LIKP and LIPS) --> Invoices (VBRK and VBRP)
0 Comments
Performance Analysis(ST05) :
This tool contains SQL Trace, Enqueue Trace, RFC Trace, Buffer Trace. SQL Trace displays the details of database tables accessed as part of the program/transaction execution. It contains the details of how the OPEN SQL statements are converted to standard SQL statements,positions of COMMIT statements,repeated database accesses,what database accesses or changes occur in the update section of application. Enqueue Trace helps you to track the locking and unlocking statements with details like Table names of lock event,name of the program that set the lock,type of lock,total time required for the lock. RFC Trace allows you to track the RFC calls that are triggered upon executing your application.It provides the details of function modules that have been called remotely,total time used to process the remote call,whether RFC was executed successfully,number of bytes sent and received etc. Buffer Trace allows you to monitor the table buffer accesses with details of table name,buffer type,key field values of buffer access. Runtime Analysis( SE30 / SAT ) :
This tool is required to calculate or evaluate the quality of the code.This measures the CPU time required by ABAP statements like Database access (Open SQL,Native SQL statements,IMPORT,EXPORT....) Modularization Units(PERFORM,CALL FUNCTION,CALL METHOD,SUBMIT,CALL TRANSACTION...) Internal table operations(APPEND,COLLECT,INSERT,MODIFY,READ TABLE,SORT...) Data Transfer(READ DATASET,TRANSFER.....). Measurement Options Overview : The Evaluation Overview contains total runtime required for(as a bar chart): ABAP interpreter Database System statements For ABAP and System statements : Red bar indicates that the category required more than 50% of total run time. Green bar indicates that the category required less than 50% of total run time. For Database operations,red bar appears if category required more than 25% of total run time. Other available options are Statement Hit list,Table Hit list,Group Hit List,Call Hierarchy etc. FLOOR to round-off to lower value.
CEIL to roun-off to higher value. For example : gv = 27.5 lv = FLOOR( gv ) = 27 lv = CEIL( gv ) = 28 1. Parallel Cursor method : technique used when you have to use loop inside a loop.
2. Parallel processing method : For optimized usage of work processes available. Here we write the main processing logic in a function module and we will pass packets of data to this FM and process the data in parallel threads. 3. Using BINARY SEARCH with READ TABLE statement for a sorted table. Using Hash table with READ TABLE statement. 4. Complete specification of all the Primary key fields in the WHERE clause of a SELECT query. 5. Activate buffering for small master data tables which are accessed frequently and updated rarely. 6. Use ST05 tool for measuring the sql statements performance and SAT(SE30) for measuring the application performance . This functionality can be achieved by using the Events option in the table maintenance generator screen of a table. Here we have predefined events like Before saving the data in the database,Creating a new entry,Before deleting the data displayed etc., for which we can define a FORM and write the logic for the required functionality in the form.
Consider a table ZTEST with fields EMPID, EMPFENAME, EMPL_AGE . Here, to disable the EMPL_AGE field for input,we need to follow the below steps : Goto Table Maintenance Generator screen of a table and navigate to Environment-->Modification-->Maintenance Screens In the Element list tab,check the output only option for EMPL_AGE field.
Now in SM30 we can observe that the Age field is disabled for input entry. Table entries can be transported from one system to another system in the landscape by enabling the 'Standard recording routine' option in the Table Maintenance Generator screen. Se11-->Give Table name --> Change mode-->Utilities(in the Menu bar)-->Table Maintenance Generator Select the Recording Routine option as 'Standard recording routine' and click on Environment-->Maintenance Objects-->Generate .
Now, whenever you change the entries of this table through SM30 the system will ask for a customizing request while saving and the entries will get attached to the transport. If the option 'no, or user, recording routine' is selected then the system will not ask for any transport request while making any changes(add,change,delete) to the entries of the table. Why the number of key fields in Generic buffering should be less than total number of key fields ?9/12/2014 If a table has 'n' key fields then in generic buffering the number of key fields possible are less than or equal to (n-1).
This is because if all the 'n' key fields are allowed for generic buffering , then it behaves like single record buffering as the number of records matching that criteria would anyways be only 1 record and it makes no sense as an additional buffering option. To change the value of a field in database table (which is not a customizing table) for a particular record,below are the steps with example. Consider the table ADRC, here I will change the text from 'Apollo Pharmacy' to 'Hetero Drugs' in debug mode. Double click on the entry for which you want to change the value. Give /h in the command bar and press ENTER . Debug mode gets active. Press ENTER twice now. Change the variable 'code' value from 'SHOW' to 'EDIT' .
Press ENTER and Execute(F8). The screen will now be displayed in Change mode. Now you can change the value of the field as required and click on Save. Search help exit : Search help exit is nothing but a function module that provides us with the flexibility to restrict or modify the values that will be displayed in the search help output list according to the requirement. For example, above is the search help for displaying material by Plant.
Now if you would like to restrict display of some of the materials for a particular User (or group of users) then you can satisfy this requirement by writing the code in this search help exit and give that exit name in the above highlighted area. This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE . This search help exit may also have further optional parameters (in particular any EXPORTING parameters). There are 3 different types of internal tables :
1. Standard table 2. Sorted table 3. Hashed table Standard table : The records of standard table are accessed by using a table index or key. Standard tables always have a non-unique key. A standard table can be populated by using the APPEND statement . Sorted table : The records of sorted table are accessed by using a table index or key. The key is defined as either unique or non-unique. Sorted table is populated by using INSERT statement.In sorted tables records entered are automatically sorted. Hashed table : These records of hashed table are accessed only by the keys (using hash algorithm) but not by indexes. The key of a hashed table must be defined as unique. Hashed table is populated by using INSERT statement. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data. Additional Info :Standard and Sorted tables are called index tables. Index access is the quickest possible access. For defining exceptions we have two options : 1. Classical exceptions 2. Class-based exceptions Classical exceptions : These can only be declared in interfaces of methods or function modules using EXCEPTIONS and can be raised within that method/FM using the statements RAISE <exception> or MESSAGE.......RAISING <exception>. Class-based exception : These exceptions are defined using exception classes in se24 and it may generate an exception object(when CATCH...INTO... is used) when an exception is raised using the statement RAISE EXCEPTION TYPE <exception> . As the exception class is declared globally, this can be accessed and used in any program . NOTE : Class-based exceptions are not supported in remote-enabled function modules (RFM). So, in the case of remote function calls (RFCs) classical exceptions needs to be implemented and handled . T-code to create a new authorization object is SU21. Example syntax : Here, we are checking whether the user has change('02') authority for Bank data.
The authorization will be assigned to the role of a particular user-id by the Basis team. This statement checks whether a particular user has authorization to perform a certain action. Based on the sy-subrc value after this statement we can proceed further in the program flow. REFRESH : If REFRESH is applied on an internal table then the entries in the table will be deleted but the memory allocated to that table still exists.
FREE : If FREE is applied on an internal table then the memory allocated to that table will not exist and that memory can be used by some other variable/object.In this case both the entries and the memory do not exist anymore. Before using BINARY SEARCH with READ TABLE the table must be sorted in ascending order according to the specified key and in the sequence in which the key fields occur.
Binary search will divide the entries in internal table in to two halves and it will compare the record to be searched with the middle item.If it matches then it will read that entry else it will check whether the search key is less than or greater than that of the middle item. Then it repeats this algorithm in the respective half till the record with respective search key is found. BAPI and BDC both are used to update data in SAP system.
In BDC we update the data in SAP through transaction. Using BAPI we can update the data in SAP through transaction and also through database table level updates(i.e. using UPDATE,INSERT,MODIFY,DELETE statements). RICEF is an acronym that categorizes the SAP technical development objects into five different areas.
RICEF stands for Reports , Interfaces , Conversions , Enhancements , Forms . R - Reports : All categories of reports like Classical, Interactive, ALV , Query reports , report painter , module pool etc., comes under this category. I - Interfaces : Interfaces includes development objects that are used for communication between SAP and non-SAP systems by picking or placing a file in the application server. The technical concepts ALE/IDOCS , FTP using OPEN DATASET..,PI concept etc., comes under this part. *FTP - file transfer protocol , PI - process integration . C - Conversions : Conversions are nothing but the techniques used to transfer data from legacy(non-SAP) systems to SAP system from a flat file as if the user is manually giving the inputs with thorough checks through a transaction.The techniques like BDC(call transaction and Session) , LSMW , BAPI etc comes under this category. E - Enhancements : Enhancements include all the modifications to SAP standard delivered objects. User Exits,Customer exits,BTE s,Enhancement points,Enhancement sections,Implicit and explicit enhancements,BADI are the techniques that come under enhancements. F - Forms : Forms refer to the display of structured data in a layout as required by the Business. Scripts, Smart forms , Adobe forms will come under this category. There are 5 different types of work processes available in SAP.
1. Dialog 2 .Update 3. Background 4. Enqueue 5. Spool Dialog work process : It deals with requests from an active user to execute dialog steps. Update work process : It executes database update requests. Background work process : It is used to process background jobs i.e. the programs that can be executed without user interaction. Enqueue work process : It handles the lock mechanism.It administers the lock table(in shared memory area),which stores the logical database locks for SAP system. Spool work process: It passes sequential datasets to output devices like printer,fax devices etc. The Dispatcher gathers the requests from the front-end and assigns the tasks to the work processes that corresponds to their type. Transaction code for Work Process Overview is SM50 Changes to standard business objects in SAP are logged in Change Documents. We can extend this concept to custom database tables also by creating a change document object in transaction SCDO and adding the tables under it. You can create a change document object for a business object. This change document object contains the tables in which the data of the business object is stored. Click on Insert Entries and Utilities -->Generate Update Pgm in the consecutive steps. Now a update function module will get generated which we can use in our program to update the CDHDR and CDPOS tables for the corresponding object id . Logging only takes place if the fields whose contents were changed refer to a data element that was flagged as relevant for the change document. The changes made are logged in two tables namely CDHDR and CDPOS .
Change Document Header table (CDHDR) : The database table CDHDR stores the header data of any changes logged in the system. For example, object class, object ID, change document number, the user ID of the user who made changes, the date and time at which the change was made, the transaction code through which change was made, etc. Change Document Item table (CDPOS) : The database table CDPOS stores the actual changes that have been made, i.e., the table name, field name, table key for the entry that has been changed, old value, new value, change flag etc. Additional Info : Reports to display change documents as an ALV report are RSSCD100 , RSSCD200 . |
AuthorVamsi Bodda. Archives
November 2016
|