|
abapsridhar
Rating: 43
Member since: 2008-04-22
Feeds: 3
Categories
|
Preview: ABAP - Advanced Business Application Programming
ABAP - Advanced Business Application ProgrammingSAP ABAP/4 Programming, ABAP Programs, Preparing for an Interview, Re-usable ABAP Program and utilities, SAP ABP Tools, Tips and Tricks, Jobs and books.Updated: 2009-10-21T20:09:03.427-07:00
COMPLETE ALV DOCUMENTATION 2008-06-03T03:38:23.626-07:00 ALV (ABAP LIST VIEWER):Sap provides a set of ALV (ABAP LIST VIEWER) function modules, which can be put into use to embellish the output of a report.This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.The commonly used ALV functions used for this purpose are;1. REUSE_ALV_VARIANT_DEFAULT_GET2. REUSE_ALV_VARIANT_F43. REUSE_ALV_VARIANT_EXISTENCE4. REUSE_ALV_EVENTS_GET5. REUSE_ALV_COMMENTARY_WRITE6. REUSE_ALV_FIELDCATALOG_MERGE7. REUSE_ALV_LIST_DISPLAY8. REUSE_ALV_GRID_DISPLAY9. REUSE_ALV_POPUP_TO_SELECTThe different steps used for getting the above function modules into use are described below.Step 1: DATA DECLARATIONSap standard type pools: SLIS, KKBLO.Sap standard tables types taken from the type pools are: SLIS_LAYOUT_ALV,SLIS_T_FIELDCAT_ALVSLIS_T_LISTHEADER,SLIS_T_EVENT,SLIS_SELFIELD.Internal tables to be used in the program declared based on the above table typesDATA: I_LAYOUT TYPE SLIS_LAYOUT_ALV, I_FIELDTAB TYPE SLIS_T_FIELDCAT_ALV, I_HEADING TYPE SLIS_T_LISTHEADER,I_EVENTS TYPE SLIS_T_EVENT.TYPES: KKBLO_SELFIELD TYPE SLIS_SELFIELD.Step 2 : Selecting the variants(Optional)SELECTING THE VARIANTS FOR INITIAL LIST DISPLAY (DEFAULT VARIANT)The variants in the list display can be both user-specific and general. The user can programmatically set the initial (default) variant for list display.The default variant can be found using the function module 'REUSE_ALV_VARIANT_DEFAULT_GET'.Sample code:CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save = variant save condition ( A=all, U = user-specific ) CHANGING cs_variant = internal table containing the program name (and the default variant---optional ) EXCEPTIONS not_found = 2.The user can also choose from the list of existing variants using the function module ‘REUSE_ALV_VARIANT_F4’.Step3(Defining Output Characteristics)DEFININING OUTPUT CHARACTERISTICS: PREPARING DISPLAY FIELDS CATALOGA field catalog is prepared using the internal table (I_FIELDCAT) of type SLIS_T_FIELDCAT_ALV. Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields).A field catalog is required for every ALV list output to add desired functionality (i.e. Key, Hotspot, Specific headings, Justify, Col. position etc) to certain fields of the output. If not mentioned specifically, then the defaults are taken. The possible values and defaults are listed below.The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling theREUSE_ALV_FIELDCATALOG_MERGE module.The minimal field catalog is documented below. This can be done in a routine using a local variable. The user can use the other optional parameters to assign output attributes to different fields in the output, which differ from the default.A field catalog need not be built-up and passed explicitly only under the followingconditions:1. The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE. In this case the attributes of the different fields is taken directly from the table and the attributes (key fields, length, texts etc) need to state explicitly.2. all fields in this structure are to be output3. The structure name is passed to ALV in the parameter I_STRUCTURE_NAME of the function module REUSE_ALV_LIST_DISPLAY.All the values entered in the catalog are specific to the particular field whose name is entered in th[...]
OOPS AT A GLANCE 2008-06-03T03:36:39.824-07:00 Object orientation (OO), or to be more precise, object-oriented programming, is a problem-solving method in which the software solution reflects objects in the real world.A comprehensive introduction to object orientation as a whole would go far beyond the limits of this introduction to ABAP Objects. This documentation introduces a selection of terms that are used universally in object orientation and also occur in ABAP Objects. In subsequent sections, it goes on to discuss in more detail how these terms are used in ABAP Objects. The end of this section contains a list of further reading, with a selection of titles about object orientation. Objects An object is a section of source code that contains data and provides services. The data forms the attributes of the object. The services are known as methods (also known as operations or functions). Typically, methods operate on private data (the attributes, or state of the object), which is only visible to the methods of the object. Thus the attributes of an object cannot be changed directly by the user, but only by the methods of the object. This guarantees the internal consistency of the object. Classes Classes describe objects. From a technical point of view, objects are runtime instances of a class. In theory, you can create any number of objects based on a single class. Each instance (object) of a class has a unique identity and its own set of values for its attributes. Object References In a program, you identify and address objects using unique object references. Object references allow you to access the attributes and methods of an object. In object-oriented programming, objects usually have the following properties: Encapsulation Objects restrict the visibility of their resources (attributes and methods) to other users. Every object has an interface, which determines how other objects can interact with it. The implementation of the object is encapsulated, that is, invisible outside the object itself. Polymorphism Identical (identically-named) methods behave differently in different classes. Object-oriented programming contains constructions called interfaces. They enable you to address methods with the same name in different objects. Although the form of address is always the same, the implementation of the method is specific to a particular class. Inheritance You can use an existing class to derive a new class. Derived classes inherit the data and methods of the superclass. However, they can overwrite existing methods, and also add new ones. Uses of Object Orientation Below are some of the advantages of object-oriented programming: Complex software systems become easier to understand, since object-oriented structuring provides a closer representation of reality than other programming techniques. In a well-designed object-oriented system, it should be possible to implement changes at class level, without having to make alterations at other points in the system. This reduces the overall amount of maintenance required. Through polymorphism and inheritance, object-oriented programming allows you to reuse individual components. In an object-oriented system, the amount of work involved in revising and maintaining the system is reduced, since many problems can be detected and corrected in the design phase.
ALV In BRIEF 2008-06-03T03:39:57.835-07:00 IntroductionHere is the definition for ALV from SAP Help: “The ALV Grid control is a flexible tool for displaying lists.The tool provides common list operations as generic functions and can be enhanced by self-defined options.”The ALV Grid control is used to build non-hierarchical, interactive, and modern-design lists. As a control, it is a component that is installed on the local PC.The ALV Grid control provides typical list functions as sorting, filtering, summing, etc.,while also gives the opportunity to develop user functions where needed.It presents numerous interfaces like Excel Inplace and Crystal Reports.The wrapper class implemented to encapsulate ALV Grid functionality is “CL_GUI_ALV_GRID”.There is another way to display lists with ALV utilizing “REUSE_ALV...” functions.Building BlocksWhile preparing a list to be displayed via an ALV grid control, we have some basic components to prepare.These are;i. List data:Obviously, this is the data in an internal table to be listed. Standard ALV functions except sorting makes just read access to the list data. However, sorting changes state of the internal table.The internal table holding list data may be of any flat type. Deep types are only allowed when set for some functionalities of ALV Grid.ii. Field Catalog: We use another internal table to define specifications on how the fields of our list will be displayed. This internal table is called the“field catalog”.The field catalog must comprise some technical and additional information about display options for each column to be displayed.There are three procedures to generate the field catalog as “Automatic generation”, “Semi-automatic generation”, and “Manual generation”.The internal table for the field catalog must be referenced to the dictionary type “LVC_T_FCAT”.iii. Layout Structure: We fill a structure to specify general layout options for the grid. With this structure we can set general display options, grid customizing, totals options, color adjustments etc...The layout structure must be of type “LVC_S_LAYO”.iv. Event Handler: We should define and implement an event handler class if we want to handle events triggered by the ALV Grid instance.After creating ALV Grid instance, we must register an instance of this event handler class to handle ALV Grid events.v. Additional Data: To trigger some additional features of ALV Grid we can have some additional data to pass as parameters. For example, initial sorting criteria, buttons to be deactivated, etc...General SchemeNow, we can figure out a primitive scheme to prepare our ALV Grid. As a control object, ALV Grid instance requires a container to be linked to the screen.Generally, an instance of the class “cl_gui_custom_container” is used for this purpose.Instances of some other container classes such as “cl_gui_docking_container”, “cl_gui_dialogbox_container” may also be used.In our example we take a custom container.To create a custom container instance, we need a custom control area on the screen. Step 1.Add a custom control on the screen which will be related to the custom container.Let’s give it the name ‘CC_ALV’.Step 2Declare global variables to be used for ALV Grid. Code Part 1 – Global data definitions for ALV*-- Global data definitions for ALV*--- ALV Grid instance reference DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .*--- Name of the custom control added on the screen DATA gc_custom_control_name TYPE scrfname VALUE ‘CC_ALV’ . *--- Custom container instance reference DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .*--- Field catalog table DATA gt_fieldcat TYPE lvc_t_fcat .*--- Layout structure DATA gs_layout TYPE lvc_s_layo .Step 3Declare your internal table which is supposed to hold the list data. Let’s name it “gt_list”. Here is an example declaration.*--- Internal table holding list data DATA BEGIN OF gt_list OCCURS 0 . INCLUDE STRUCTURE SFLIGHT .*--In further sections, some additional fields will added here*--for some functional[...]
Performance Tuning 2008-05-26T05:16:36.982-07:00 For all entriesThe for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number ofentries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit thelength of the WHERE clause.The plus * Large amount of data * Mixing processing and reading of data * Fast internal reprocessing of data * FastThe Minus * Difficult to program/understand * Memory could be critical (use FREE or PACKAGE size)Some steps that might make FOR ALL ENTRIES more efficient: * Removing duplicates from the the driver table * Sorting the driver table If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement: FOR ALL ENTRIES IN i_tab WHERE mykey >= i_tab-low and mykey C4A. C4A = T100-MSGNR. ENDSELECT. SELECT MAX( MSGNR ) FROM T100 INTO C4A WHERE SPRSL = 'D' AND ARBGB = '00'. Select with viewSELECT * FROM DD01L WHERE DOMNAME LIKE 'CHAR%' AND AS4LOCAL = 'A'. SELECT SINGLE * FROM DD01T WHERE DOMNAME = DD01L-DOMNAME AND AS4LOCAL = 'A' AND AS4VERS = DD01L-AS4VERS AND DDLANGUAGE = SY-LANGU. ENDSELECT. SELECT * FROM DD01V WHERE DOMNAME LIKE 'CHAR%' AND DDLANGUAGE = SY-LANGU. ENDSELECT. Select with index supportSELECT * FROM T100 WHERE ARBGB = '00' AND MSGNR = '999'. ENDSELECT. SELECT * FROM T002. SELECT * FROM T100 WHERE SPRSL = T002-SPRAS AND ARBGB = '00' AND MSGNR = '999'. ENDSELECT. ENDSELECT. Select … Into tableREFRESH X006. SELECT * FROM T006 INTO X006. APPEND X006. ENDSELECTSELECT * FROM T006 INTO TABLE X006.Select with selection listSELECT * FROM DD01L WHERE DOMNAME LIKE 'CHAR%' AND AS4LOCAL = 'A'. ENDSELECTSELECT DOMNAME FROM DD01L INTO DD01L-DOMNAME WHERE DOMNAME LIKE 'CHAR%' AND AS4LOCAL = 'A'. ENDSELECTKey access to multiple linesLOOP AT TAB. CHECK TAB-K = KVAL. " ... ENDLOOP. LOOP AT TAB WHERE K = KVAL. " ... ENDLOOP. Copying internal tablesREFRESH TAB_DEST. LOOP AT TAB_SRC INTO TAB_DEST. APPEND TAB_DEST. ENDLOOP. TAB_DEST[] = TAB_SRC[].Modifying a set of linesLOOP AT TAB. IF TAB-FLAG IS INITIAL. TAB-FLAG = 'X'. ENDIF. MODIFY TAB. ENDLOOP. TAB-FLAG = 'X'. MODIFY TAB TRANSPORTING FLAG WHERE FLAG IS INITIAL.Deleting a sequence of linesDO 101 TIMES. DELETE TAB_DEST INDEX 450.ENDDO. DELETE TAB_DEST FROM 450 TO 550.Linear search vs. binaryREAD TABLE TAB WITH KEY K = 'X'.READ TABLE TAB WITH KEY K = 'X' BINARY SEARCH.Comparison of internal tablesDESCRIBE TABLE: TAB1 LINES L1, TAB2 LINES L2. IF L1 L2. TAB_DIFFERENT = 'X'. ELSE. TAB_DIFFERENT = SPACE. LOOP AT TAB1. READ TABLE TAB2 INDEX SY-TABIX. IF TAB1 TAB2. TAB_DIFFERENT = 'X'. EXIT. ENDIF. ENDLOOP. ENDIF. IF TAB_DIFFERENT = SPACE. " ... ENDIF. IF TAB1[] = TAB2[]. " ... ENDIF. Modify selected componentsLOOP AT TAB. TAB-DATE = SY-DATUM. MODIFY TAB. ENDLOOP. WA-DATE = SY-DATUM. LOOP AT TAB. [...]
ABAP - Questions 2008-05-26T05:12:56.861-07:00 What is a 'Z' report? Y or Z report refer to customized abap programs written for modules such as mm, sd, pp or fi/co etc. Can we create an ABAP program without using Y or Z? No, this is because all non Yor Z programs are standard SAP programs. 1. How data is stored in cluster table? Each field of cluster table behaves as tables which contains the no. of entries. 2. What are client dependant objects in abap/sap? SAP Script layout, text element, and some DDIC objects. 3. On which even we can validate the input fields in module progams? In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.) 4. In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically? AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATERIAL. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' to get material and material group for the plant. 5. How do you get output from IDOC? Data in IDOc is stored in segments, the output from Idoc is obtained by reading the data stored in its respective segments. 6. When top of the page event is triggered? After excuteing first write statement in start-of-selection event. 7. Can we create field without data element and how? In SE11 one option is available above the fields strip. Data element/ direct type. 8. How do we debug sapscript? Go to SE71 give lay set name , go to utilities select debugger mode on. 9. Which transaction code can I used to analyze the performance of ABAP program. TCode AL21. 10. How can I copy a standard table to make my own z_table. Go to transaction SE11. Then there is one option to copy table. Press that button. Enter the name of the standard table and in the Target table enter Z table name and press enter. Following are some of the answers which I gave upto my knowledge. 1. What is the use of 'outerjoin' Ans. With the use of outer join you can join the tables even there is no entry in all the tables used in the view. In case of inner join there should be an entry in al the tables use in the view. 2. When to use logical database? Ans. Advantage of Logical databases: less coding s required to retrieve data compared to normal internel tables. Tables used LDB are in hierarchial structure. 3. What is the use of 'table index'? Ans .Index is used for faster access of data base tables. 4. What is the use of 'FOR ALL ENTRIES'? Ans. To avoid nested select statements we use SELECT FOR ALL ENTRIES statement. If there r more than 10000 records SELECT FOR ALL ENTRIES is used. Performance wise SELECT FOR ALL ENTRIES is better to use. 5. Can you set up background processing using CALL TRANSACTION? Yes,Using No Screen Mode. 6. What are table buffers? Table buffers reside locally on each application server in the system. The data of buffered tables can thus be accessed directly from the buffer of the application server. This avoids the time-consuming process of accessing the database. Buffering is useful if table needs to be accessed more no. of times in a program. 1. How do I set a flag for a field in any table? Create a char field of length 1. for example field STAS-LKENZ is Deletion Indicator. It means that if the value in the field is 'X' then that record has been deleted. 2. Can I execute user exits? If yes, how? Yes you can. after finding the user exit, you need to use, goto CMOD add ur user-exit to your project. Then activate the FM which you require. Now go into that function module there will be a Include program wit name ZX* . Double click on it, it will ask to create an object, answer it Yes and then write your code in it. 3. How do I find the output type of a table or a program? Table TNAPR / NAST 4. How to execute a program step by step on the ABAP editor? First test your code with '/h' type in command window which shall take you to debug or by putting break[...]
ABAP - Interview Questions 3 2008-05-26T04:58:47.465-07:00 1. What is the typical structure of an ABAP/4 program? HEADER ,BODY,FOOTER. 2. What are field symbols and field groups.? Have you used "component idx of structure" clause with field groups? Field symbols:- Field groups :- Can any body explain me what is field group? Field groups are groups similar fields together into one name. Field group works in conjuction with INSERT f1 f2 INTO fgEXTRACT fgSORT BY fgLOOP ... ENDLOOP INSERT f1 f2 INTO fg--------------------- The insert statement is used to create a field group dynamically by inserting the field into it. Only global data fields can be inserted and not local data fields eg : in form modules. EXTRACT fg---------- This will combine all the fields in the fieldgroup and write them to a sequential dataset as a single record. SORT BY fg---------- Sorting of sequential dataset by field group. LOOP AND ENDLOOP--------------- LOOP. AT ***..........ENDAT. AT ***.........ENDAT.ENDLOOP. *-- Chinmaya 3. What should be the approach for writing a BDC program? ANS:-STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED "CONVERSION".STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".STEP 3: DEPENDING UPON THE BDC TYPE i)call transaction(Write the program explicity) ii) create sessions (sessions are created and processed.if success data will transfer). 4. What is a batch input session? ANS:-BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed,program name behind it, and how next screen is processed. 5. What is the alternative to batch input session? ANS:-Call transaction. 6. A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it? ANS:- go to SM36 and create background job by giving job name,job class and job steps (JOB SCHEDULING) 8. What are the problems in processing batch input sessions? How is batch input process different from processing online? ANS:-PROBLEMS:- i) If the user forgets to opt for keep session then the session will be automatically removed from the session queue(log remains). However if session is processed we may delete it manually.ii)if session processing fails data will not be transferred to SAP database table. 10. What are the different types of data dictionary objects? ans:-tables, structures, views, domains, data elements, lock objects, Matchcode objects. 11. How many types of tables exists and what are they in data dictionary? ans :-4 types of tablesi)Transparent tables - Exists with the same structure both in dictionary as well as in database exactly with the same data and fields. Both Opensql and Nativesql can be used. ii)Pool tables & iii)Cluster tables - These are logical tables that are arranged as records of transparent tables.one cannot use native sql on these tables(only opensql).They are not managable directly using database system tools. iv)Internal tables - . 12. What is the step by step process to create a table in data dictionary? ans:- step 1: creating domains(data type,field length,range). step 2: creating data elements(properties and type for a table field). step 3: creating tables(SE11). 13. Can a transparent table exist in data dictionary but not in the data base physically?ANS:- NO.TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND FIELDS. 14. What are the domains and data elements? ANS:-DOMAINS : FORMAL DEFINITION OF THE DATA TYPES.THEY SET ATTRIBUTES SUCH AS DATA TYPE,LENGTH,RANGE.DATA ELEMENT : A FIELD IN R/3 SYSTEM IS A DATA ELEMENT. 15. Can you create a table with fields not referring to data elements? ANS:- YES. eg:- ITAB LIKE SPFLI.here we are referening to a dat[...]
TRANSACTION CODES - OTHERS 2008-05-25T22:14:44.316-07:00 Config Related OLEOLE demo transaction OLI0C Plant Maintenance Master Data OLI1Set Up INVCO for Material Movements OLI8Set Up SIS for Deliveries OLIAC Maintenance Processing OLIPC Plant Maintenance Planning OLIQNew set-up of QM info system OLIXSet Up Copying/Deleting of Versions OLIYSet Up Deletion of SIS/Inter.Storage OLIZStat Set Up INVCO: Invoice Verif OLM2Customizing: Volume-Based Rebates OLMBC RM-MAT Inventory Management Menu OLMDC RM-MAT MRP Menu OLMEC MM Menu: Purchasing OLMLC MM Menu for Warehouse Management OLMRC RM-MAT Menu: Invoice Verification OLMSC RM-MAT Master Data Menu OLMWC RM-MAT Valuation/Acct. Assgt. Menu OLPASOP Configuration OLPESales order value OLPKCustomizing for capacity planning OLPRProject System Options OLPSCustomizing Basic Data OLPVCustomizing: Std. Value Calculation OLQBC QM QM in Procurement OLQIAnalysis OLQMCustomizing QM Quality Notifications OLQSC QM Menu Basic Data OLQWC QM Inspection Management OLQZQuality Certificates OLS1Customizing for Rebates OLSDCustomizing: SD OLVAC SD Sales Menu OLVDC SD Shipping Menu OLVFC SD Billing Menu OLVSC SD Menu for Master Data SPROStart SAP IMG (Implementation Guide). (from john.omeara@syskoplan.ie)[...]
TRANSACTION CODES - MM configuration transactions 2008-05-25T22:13:47.865-07:00
TRANSACTION CODES - Material Management (MM) 2008-05-25T22:13:05.795-07:00
TRANSACTION CODES - FI Financial Management 2008-05-25T22:12:27.667-07:00
TRANSACTION CODES - SAP OFFICE 2008-05-25T22:11:43.007-07:00 SO00 send a note through SAP, can be sent to internet, X400, etc
TRANSACTION CODES - Sales and Distribution (SD) 2008-05-25T22:09:24.538-07:00
TRANSACTION CODES - Human Resources (HR) 2008-05-25T22:08:45.805-07:00
TRANSACTION CODES - Basis / ABAP 2008-05-25T22:07:58.695-07:00 You can execute the following commands in the transaction code (tcode) field with Enter. You will find some useful transaction codes below to work in tandem with the following commands: To call a transaction - In the same session (window) Enter: /nxxxx (xxxx = transaction code). - In an additional session, Enter: /oxxxx (xxxx = transaction code). If you enter this function before any of the tcodes below, you are able to break out of your current screen/business and begin a completely new session. Otherwise, the current business process has to be terminated, and return to the initial user screen (the main menu) has to be initiated before entering tcode spro). /o tcode saves you the effort of having to do this. To end the current transaction Enter: /n. Caution: Unsaved changes are lost without warning To delete the current session. Enter: /i. To generate a session list Enter: /o. To log off from the system Enter: /nend. From John O'Meara OSS Note 0026171 has additional information on OKCodes in SAP, and is a very useful read BASIS/ABAP USMMPressing F8 will display all hotpacks applied. SEARCH_SAP_MENU Show the menu path to use to execute a given tcode. You can search by transaction code or menu text. DI02ABAP/4 Repository Information System: Tables. LSMWLegacy System Migration Workbench. An addon available from SAP that can make data converstion a lot easier. Thanks to Serge Desland for this one. OSS1SAP Online Service System OY19Compare Tables SM13Update monitor. Will show update tasks status. Very useful to determine why an update failed. S001ABAP Development Workbench S001ABAP/4 Development Weorkbench. (from john.omeara@syskoplan.ie) S002System Administration. (from john.omeara@syskoplan.ie) SA38Execute a program. (from john.omeara@syskoplan.ie) SCATComputer Aided Test Tool SCU0Compare Tables SE01Old Transport & Corrections screen SE03Groups together most of the tools that you need for doing transports. In total, more than 20 tools can be reached from this one transaction. SE09Workbench Organizer SE10New Transport & Correction screen SE11ABAP/4 Dictionary Maintenance SE12 ABAP/4 Dictionary Display SE13 Maintain Technical Settings (Tables) SE12Dictionary: Initial Screen - enter object name. (from john.omeara@syskoplan.ie) SE13Access tables in ABAP/4 Dictionary. (from john.omeara@syskoplan.ie) SE14Utilities for Dictionary Tables SE15ABAP/4 Repository Information System SE16Data Browser: Initial Screen. (from john.omeara@syskoplan.ie) SE16NTable Browser (the N stands for New, it replaces SE16). Provided by Smijo Mathew. SE17General Table Display SE24Class Builder SE30ABAP/4 Runtime Analysis SE32ABAP/4 Text Element Maintenance SE35ABAP/4 Dialog Modules SE36ABAP/4: Logical Databases SE37ABAP/4 Function Modules SE38ABAP Editor SE39Splitscreen Editor: Program Compare SE41Menu Painter SE43Maintain Area Menu SE48Show program call hierarchy. Very useful to see the overall structure of a program. Thanks to Isabelle Arickx for this tcode. SE49Table manipulation. Show what tables are behind a transaction code. Thanks to Isabelle Arickx for this tcode. SE51Screen Painter: Initial [...]
TRANSACTION CODES - Production Planning (PP) 2008-05-25T22:02:07.734-07:00 C001 Create Production OrderC005N Collective Release C011N Time Ticket C012 Confirmation - Collective C013 Confirmation - Cancel C00IS Production order information system C0GI Reprocess Goods Movements C223 Maintain production version
TRANSACTION CODES - Plant Maintenance (PM) 2008-05-25T22:01:14.228-07:00 IW31 Create Plant Maintenance OrderIW32 Change Plant Maintenance Order IW33 Display Plant Maintenance Order IW34 Create Notification Order IW51 Create Service Notification IW52 Change Service Notification IW53 Display Service Notification IW54 Create Service Notification :Problem notification IW55 Create Service Notification :Activity Request IW56 Create Service Notification :Service Request IW57 Assign deletion Flag to Completed Service Notifications IW58 Change Service Notifications: Selection of Notification IW59 Display Service Notifications: Selection of Notification
ABAP - Interview Questions - 2 2008-05-25T20:09:57.180-07:00 1. What is an ABAP data dictionary? ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views. Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user. 3. What is foreign key relationship? A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible. 4. Describe data classes. Master data: It is the data which is seldomly changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data:It is the data which R/3 system needs for itself. 5. What are indexes? Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table are included in the index. Yhe indexes are activated along with the table and are created automatically with it in the database. 6. Difference between transparent tables and pooled tables Transparent tables: Transparent tables in the dictionary has a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary has a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.
SAP System - Fields 2008-05-15T01:34:04.593-07:00 ABCDE Constant: Alphabet (A,B,C,...) APPLI SAP applications BATCH Background active (X) IF SY-BATCH EQ SPACE. WRITE: / 'Report was started on-line'. WRITE: / 'Using variant:', SY-SLSET. ELSE. WRITE: / 'Report was started in background'. ENDIF. BATZD Background SUBMIT: Daily BATZM Background SUBMIT: Monthly BATZO Background SUBMIT: Once BATZS Background SUBMIT: Immediately BATZW Background SUBMIT: Weekly BINPT Batch input active (X) This field indicates if the transaction was called in a Batch Input session or by an online user. To test it, a batch input session must be created. From Release 3.1g the next procedure can be used. o Create a report which displays this system field o Create a Transaction code for this report o Use transaction SHDB to record a the previous transaction o Press the Overview button and choose the 'generate program' function. o Running the previously generated program it will create a Batch Input session o Now call transaction SM35 and process the created Batch Input in foreground. It should display an 'X' for system field SY-BINPT. BREP4 Background SUBMIT: Root name of request report BSPLD Background SUBMIT: List output to spool CALLD CALL mode active (X) This field indicates if the transaction was called from another transaction. o Create a report which displays this system field o Create a Transaction code for this report o Create a new report containing the next ABAP command: CALL TRANSACTION tcode. Where tcode is the Transaction code you created. When you run this report, it should display an 'X' for system field SY-CALLD. CALLR Print: ID for print dialog function CCURS Rate specification/result field (CURRENCY CONVERT) CCURT Table rate from currency conversion CDATE Date of rate from currency conversion COLNO Current column during list creation WRITE: SY-COLNO, ',', SY-LINNO, 'Cursor position (column, row).'. CPAGE Current page number WRITE: / 'SY-CPAGE:', SY-CPAGE LEFT-JUSTIFIED. CPROG Runtime: Main program WRITE: /5 'Main program:' RIGHT-JUSTIFIED, 40 SY-CPROG. CTABL Exchange rate table from currency conversion CTYPE Exchange rate type 'M','B','G' from CURRENCY CONVERSION CUCOL Cursor position (column) WRITE: / 'SY-CUCOL:', SY-CUCOL LEFT-JUSTIFIED. CUROW Cursor position (line) WRITE: / 'SY-CUROW:', SY-CUROW LEFT-JUSTIFIED. DATAR Flag: Data received In transaction programming this field indicates the change of data on the screen. In the PBO part you may set default values of the input fields of the dynpro. In the PAI part you can[...]
ABAP - Interview Questions - 1 2008-05-25T20:05:11.486-07:00 1. Preparation of the data records by the L.D.B and reading of the data records in the actual report are accomplished with the command pair Put and Get.2. The three main elements of LDB are Structure, Selections, and Database Program.3. In LDB what determines hierarchy of the tables? Structure.4. In general what are the two ways in which one can retrieve data from tables?Using Select statements, Database Program.5. With LDB one can modify the pre-generated selection screen to their needs (T/F).Yes.6. Logical databases are programs that read data from Database tables (Dictionary Structures).7. The event Get LATE process all tables that are hierarchically superior to the . (True/False)False. It processes all tables that are hierarchically inferior to the .8. The Database Program of LDB is a collection of SUBROUTINES, which selects data and passes it to the report. 9. The layout of the Database program is determined by both Structure and Selections.10. The order in which data is made available to the report depends on Structure of the LDB.11. Apart from the structure and selections of the LDB the GET statements in the report determines the behavior of the database at runtime.12. Node at the highest level in the structure is known as Root.13. There can be more than one node at the highest level in the structure. (T/F) False. One can define only one node at the highest level in the structure on LDB.14. All nodes in the structure of LDB need not be defined in the ABAP/4 Dictionary (T/F). False. One has to define all nodes in the Dictionary or one has to select all nodes that are defined in the Dictionary.15. It is not possible to use ABAP/4 Dictionary Structures without an underlying database using LDB. (T/F)True. One can use additionally related tables, along with the tables defined in the structure of LDB.16. Dynamic selections allow the user to define further selections for database access in addition to the selection criteria already defined in the LDB selections.17. Check statement can be used along with the event GET in the report for checking the selections, which are not table-specific values.18. In sense of Database Management System (DBMS) LOGICAL DATABASE is a database Structure. (T/F).False.19. It is not necessary to maintain the Parent-Child relationship between the tables in Logical Database Structure. (T/F)False. One has to maintain the Parent-Child relationship.20. Is it possible to extract data from tables without using the event ‘GET’ in the report with an appropriate LDB. (T/F).False. One can extract data from tables using Select statements in a report, though the report is having a LDB attribute.21. What sorts of tables one can se in designing the hierarchy of a LDB?Tables, which are having Foreign Key relations.22. A report program, which uses only SELECT statements, is called SQL Report.23. One cannot use SELECT statements in a report program linked to a Logical Database (T/F). False.24. Is it true that the Logical Database reads the data from the database tables using Select Statements (T/F).Yes. We are coding that in Database part of LDB.25. In a report with an LDB attribute, you do not have to define how the information should be retrieved from the database tables, but only how the data should be represented on the screen. (T/F).True.26. One can use the event GET in a report without LDB attribute. (T/F).False.27. The last character of the LDB name denotes Application.28. The structure of Logical Databases reflects the Foreign Key dependencies of hierarchical tables in the SAP syste[...]
ABAP - Performance tuning 2008-05-15T00:54:01.064-07:00 For all entriesNested selectsSelect using JOINS Use the selection criteria Use the aggregated functions Select with view Select with index support Select … Into table Select with selection list Key access to multiple lines Copying internal tables Modifying a set of lines Deleting a sequence of lines Linear search vs. binary Comparison of internal tables Modify selected components Appending two internal tables Deleting a set of lines Tools available in SAP to pin-point a performance problem Optimizing the load of the database Other General Tips & Tricks for Optimization For all entries The for all entriescreates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is largerthan rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause. The plus Large amount of data Mixing processing andreading of data Fast internal reprocessing of data Fast The Minus Difficult to program/understand Memory could be critical (use FREE or PACKAGE size) Some steps that might make FOR ALL ENTRIES moreefficient: Removingduplicates from the the driver table Sorting the driver table If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and ORstatement:FOR ALL ENTRIES IN i_tabWHERE mykey >= i_tab-low andmykey C4A.C4A = T100-MSGNR.ENDSELECT. SELECT MAX( MSGNR ) FROM T100 INTO C4AWHERE SPRSL = 'D' AND ARBGB = '00'. Select with view SELECT * FROM DD01L WHERE DOMNAME LIKE 'CHAR%' AND AS4LOCAL = 'A'. SELECT SINGLE * FROM DD01T WHERE DOMNAME = DD01L-DOMNAME AND AS4LOCAL = 'A' AND AS4VERS = DD01L-AS4VERS AND DDLANGUAGE = SY-LANGU.ENDSELECT. SELECT * FROM DD01V WHERE DOMNAME LIKE 'CHAR%' AND DDLANGUAGE = SY-LANGU.ENDSELECT. Select with index support SELECT * FROM T100 WHERE ARBGB = '00'AND MSGNR = '999'.ENDSELECT. SELECT * FROM T002. SELECT * FROM T100 WHERE SPRSL = T002-SPRAS AND ARBGB = '00' AND MSGNR = '999'.ENDSELECT. ENDSELECT. Select … Into table REFRESH X006. SELECT * FROM T006 INTO X006.APPEND X006. ENDSELECTSELECT * FROM T006 INTO TABLE X006. Select with selection list SELECT * FROM DD01L WHERE DOMNAME LIKE 'CHAR%' AND AS4LOCAL = 'A'.ENDSELECTSELECT DOMNAME FROM DD01LINTO DD01L-DOMNAME WHERE DOMNAME LIKE 'CHAR%'AND AS4LOCAL = 'A'.ENDSELECT Key access to multiple lines LOOP AT TAB. CHECK TAB-K = KVAL." ... ENDLOOP. LOOP AT TAB WHERE K = KVAL." ... ENDLOOP. Copying internal tables REFRESH TAB_DEST. LOOP AT TAB_SRC INTO TAB_DEST.APPEND TAB_DEST. ENDLOOP. TAB_DEST[] = TAB_SRC[]. Modifying a set of lines LOOP AT TAB. IF TAB-FLAG IS INITIAL.TAB-FLAG = 'X'.ENDIF. MODIFY TAB. ENDLOOP. TAB-FLAG = 'X'. MODIFY TAB TRANSPORTING FLAG WHERE FLAG IS INITIAL. Deleting a sequence of lines DO 101 TIMES. DELETE TAB_DEST INDEX 450.ENDDO. DELETE TAB_DEST FROM 450 TO 550. Linear search vs. binary READ TABLE TAB WITH KEY K = 'X'.READ TA[...]
ABAP - REPORT GENERATION - FORMATTING 2008-05-14T23:51:30.969-07:00 REPORT GENERATION – FORMATTING 1. The alignment of a type ‘c’ field in a report is left Aligned. 2. In the statement Write:/15(10) Ofal-lifnr. what do the number 15 and 10 stand for 15 stand for the offset on the screen and 10 stands for the field length displayed.3. Specify the default alignment for the following field types: ‘D’ – Left, ‘F’-Right, ‘N’-Left, ‘I’-Right, ‘T’-Left. 4. If s_time has the value ‘123456’ how would you get an output of 12:34:56 with a single ‘Write:’ statement. Write:s_time using edit mask’--:--:--‘. 5. In order to suppress the leading zeroes of a number field the keywords used are NO-ZERO. 6. The total no of date formats that can be used to display a date during output is MM/DD/YY, DD/MM/YY, DD/MM/YYYY, MM/DD/YYYY, MMDDYY, DDMMYY, YYMMDD. 7. The UNDER Command allows for vertical alignment of fields one below the other.8. In order to concatenate strings only for output purposes the command NO-GAP can be used in conjunction with the ‘Write’ statement. 9. The no of decimal places for output can be defines within a write statement. (T/F).TRUE. Write:/ decimals 2.10. Data can be moved from one field to another using a ‘Write:’ Statement and stored in the desired format. (T/F).TRUE. Write: Date_1 to Date_2 format DD/MM/YY.11. In the statement Write:/15(10) lfa1-lifnr. The values 15 and 11 can also be defined by variables (T/F). False.12. Differentiate between the following two statements if any.ULINE.Write: sy-uline.No-difference. Except that uline is used outside the ‘Write’ Statement.13. In order to skip a single line the number of lines need not be given as an assignment (T/F)TRUE.14. The “SKIP TO LINE line number” is dependent on the LINE-COUNT statement included in the report statement of the program.15. In order to skip columns the command used is POSITION .16. In order to have boldfaced text as output the command used is Write:INTENSIFIED.17. Background and foreground colors can be interchanged using the command Format Inverse.18. In order to restore the system defaults for all changes made with the format statement is Format Reset.19. Like ULINE the statement VLINE is used to insert vertical lines. (T/F).False.20. Suppressing the number signs (+/-) is carried out using the addition NO-SIGNS to the Write statement. (T/F). False.21. If SY-UZEIT has the value 6:34:45 it can be displayed as 063445 using No Edit Mask.22. If the variable “Text” has the value ‘ABCDEF’ the output for the statement “Write:/Text+2(3)” will be “CDE”23. The fields specified by select-options and parameters statement cannot be grouped together in the selection screen. (T/F). False.24. When calling an external report the parameters or select-options specified in the external report cannot be called. (T/F)FALSE.25. Selection Texts in the text elements of the program helps in changing the displayed names of variables in the parameters statement.26. Type F datatype cannot be used to define parameters.27. Rounding off of values can be carried out using the write statement. (T/F). TRUE28. How would you define the exponents for a type ‘f’ field?Exponent .29. How would you format the output as left, centered or right-justified using the write statement.Left-justified, Centered, Right-justified.30. If the same formatting options were used for a WRITE statement that follows the FORMAT statement, which settin[...]
ABAP - Creating and Changing ABAP Programs 2008-05-11T17:19:48.568-07:00 ABAP programs are objects of the R/3 Repository. Like all other Repository objects, you maintain them using an ABAP Workbench - in this case, the ABAP Editor. This section provides a brief description of the ABAP Workbench and an overview of how to create and edit ABAP programs. It describes the different ways of starting the ABAP Editor. In the text below, 'open a program' always means 'start the ABAP Editor and use it to open a program'.
Starting the ABAP Editor : To start the ABAP Editor to create or change ABAP programs, the R/3 system offers three possibilities: Using the Repository Browser : The Repository Browser in the ABAP Workbench (transaction SE80) offers a hierarchical overview of all R/3 Repository objects, ordered by development class, user name of the programmer, object type, and so on. If you enter a program name, you can directly access all of its components, such as the main program, subroutines, and global data. If you select a program object in the Repository Browser and choose Change, the system automatically opens the appropriate tool; in this case, the ABAP Editor. This method is suitable for complex programs, since the Repository Browser always provides you with an overview of all of the program components. Using the ABAP Editor : You can open a program directly by choosing ABAP Editor from the initial screen of the ABAP Workbench (Transaction SE38). If you want to change a program using this method, you must already know its name and environment. This procedure is suited for maintaining or creating relatively simple or short programs, which have few or no additional components. Using Forward Navigation : In any of the tools in the ABAP Workbench, you can open a different Repository object by positioning the cursor on it and double-clicking. The system automatically opens the object using the correct tool. This also applies to ABAP programs. Forward navigation by double-clicking is possible wherever an ABAP program is called from another object, such as screen flow logic or another program. Naming ABAP Programs : The name of an ABAP program can be between 1 and 30 characters long.
ABAP - ABAP Statements 2008-05-11T07:23:53.334-07:00 ABAP statements always begin with an ABAP keyword and are always concluded with a period (.) . Statements can be several lines long; conversely, a line may contain more than one statement.Comments are distinguished by the preceding signs * (at the beginning of a line) and “ (at anyposition in a line).ABAP statements use ABAP data types and objects.Statements and Keywords : The first element of an ABAP statement is the ABAP keyword. This determines the category of the statements. The different statement categories are as follows:Declarative Statements : These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.Examples of declarative keywords: TYPES, DATA, TABLESModularization Statements :1) Event Keywords : You use statements containing these keywords to define event blocks. There are no special statements to conclude processing blocks - they end when the next processing block is introduced.Examples of event keywords are: AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMAND2) Defining keywords : You use statements containing these keywords to define subroutines, function modules, dialog modules and methods. You conclude these processing blocks using the ENDstatements.Examples of definitive keywords:FORM ..... ENDFORM, FUNCTION ... ENDFUNCTION,MODULE ... ENDMODULE.Control Statements : You use these statements to control the flow of an ABAP program within a processing blockaccording to certain conditions.Examples of control keywords: IF, WHILE, CASECall Statements : You use these statements to call processing blocks that you have already defined using modularization statements. The blocks you call can either be in the same ABAP program or in adifferent program.Examples of call keywords: PERFORM, CALL, SET USER-COMMAND, SUBMIT, LEAVE TOOperational Statements : These keywords process the data that you have defined using declarative statements.Examples of operational keywords: WRITE, MOVE, ADDDatabase Statements : These statements use the database interface to access the tables in the central database system. There are two kinds of database statement in ABAP: Open SQL and Native SQL.Open SQL : Open SQL is a subset of the standard SQL92 language. It contains only Data Manipulation Language (DML) statements, such as SELECT, IINSERT, and DELETE. It does not contain any Data Definition Language (DDL) statements (such as CREATE TABLE or CREATE INDEX). Functions of this type are contained in the ABAP Dictionary. Open SQL contains all of the DML functions from SQL92 that are common to all of the database systems supported by SAP. It also contains a few SAP-specific functions. ABAP programs that use only Open SQL statements to access the database are fully portable. The database interface converts the OPEN SQL commands into commands of the relevant database.Native SQL : Native SQL statements are passed directly from the database interface to the database without first being converted. It allows you to take advantage of all of your database’s characteristics in your programs. In particular, it allows you to use DDL operations. The ABAP Dictionary uses Native SQL for tasks such as creating database tables. In ordinary ABAP programs, it is not worth using DDL statements, since you cannot then take advantage of the central administra[...] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||