Professional Documents
Culture Documents
Exercise # 1
Topic: Objective: ABAP Data Dictionary To be able to practice how to create domains, data element, tables, views and search help 1. Object should start with either Z or Y Use Z for actual programs Use Y for test or sample programs 2. When you create objects, a dialog box from the correction and transport system is displayed. Please specify local objects. Y - test object TAB - table/ DOM - domain / DEL - Data Element / VIEW - View / SH - search help DESC - free field (to describe the table) XX - trainee number Domain YDOM_DESCXX Date YDEL_DESCXX Element Table View Search Help YTAB_DESCXX YVIEW_DESCXX YSH_DESCXX
General Rule:
Naming Convention:
Example: YTAB_CUST00 (Customized Table created by trainee # 00) ____________________________________________________________________________________ Create a customized table for reservation system. Exercise 1.1 In the transaction code SE11 (ABAP Dictionary) Create a domain.
YDOM_RSRVNO00 char 10
Exercise 1.2 Create a Data Element Field YDEL_ADD100 YDEL_ADD200 YDEL_TEL100 Domain YDOM_ADD00 YDOM_ADD00 YDOM_TEL00 Field Label Agent Address Customer Address Agent Telephone No. Customer Telephone No. Reservation Number
YDEL_TEL200
YDOM_TEL00
YDEL_RSRVNO00 YDOM_RSRVNO00
Exercise 1.3 Create a transparent table (customized table) Table Structure 1: Master Data Table: YTAB_AGENT00 Fields AGENTCODE NAME OFFICE TELNO Table Structure 2: Transactional Table: YTAB_TRAVEL00 Fields RESERV_NO CARRID CONNID FLIGHT DATE NO. OF SEAT CUST_NAME ADDRESS TELNO AGENTCODE Data Element YDEL_RSRVNO00 S_CARR_ID S_CONN_ID S_DATE CHAR 4 CHAR 30 YDEL_ADD200 YDEL_TEL200 KUNNR No. of reserved seat Customer Name Description Data Element KUNNR NAME1 YDEL_ADD100 YDEL_TEL100
Exercise 1.4 Create a view YVIEW_REPORT100 for SPFLI & SFLIGHT using the ff fields: SPFLI-CARRID SPFLI-CONNID SPFLI-CITYFROM SPFLI_CITYTO SFLIGHT-FLDATE SFLIGHT-SEATOCC SFLIGHT-SEATSMAX
Exercise 1.5 Create an Elementary search help YSH_00 Selection Method: Search for views: (use the database view that was created in Exercise 1.4) Search help paramter: CARRID, CONNID and FLDATE.
Expected Objects: Five (5) objects (domain, data element, table and view, search help)
Naming Convention:
TITLE: My First Report INPUT: NONE PROCESS: 1. Create a program that will show the current date, time and the user id who execute it. 2. Create a box. Enclose text in a box. 3. Remove page heading. 4. Add format to text: a. Date - Orange b. Time - Red c. User - Green
OUTPUT:
Expected Objects: Two (2) objects (report, text element and transaction code)
Naming Convention:
OUTPUT:
General Rule:
Naming Convention:
TITLE: ARITHMETIC INPUT: NONE PROCESS: 1.1. a. b. The following are the equations and rules: Write the sum of two even numbers. Write the quotient of the two even numbers ( in letter a ). Divide it by 2.
c. d. e.
Write the difference. Subtract the quotient ( letter b ) by 1. Write the product. Multiply the difference ( letter c ) by 100. Write the result. Combine all the equation into one statement. Make sure it should be the same result as d.
Example: First Even Number = 10. Second Even Number = 4. a. b. c. d. e. SUM = 14. QUOTIENT = 7 DIFFERENCE = 6 PRODUCT = 600 RESULT = 600
OUTPUT:
Name: <Indicate Your Name>. Date : <system Date>. Sum of two Even Numbers : < Result a> Divided by 2 will give the result: < Result b> Subtracting by 1 will have the result: < Result c> This will be the product if multiplied by 100: < Result d> Combined all of this will have the same result as < Result e>
Naming Convention:
a.
Write the sum of two even numbers by adding the first two valued entered in the parameter b. Write the quotient of the two even numbers ( in letter a ). Divide it by 2. c. Write the difference. Subtract the quotient ( letter b ) by 1. d. Write the product. Multiply the difference by the value 3rd parameter ( letter c ) e. Write the result. Combine all the equation into one statement. Make sure it should be the same result as d. Example: 1st Parameter = 10 2nd Parameter = 4. 3rd Parameter = 100.
a. b. c. d. e.
SUM = 14. QUOTIENT = 7. DIFFERENCE = 6 PRODUCT = 600 RESULT = 600 Please follow the layout
OUTPUT:
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
Example: Date: 06/03/2008 Days: 5 The date after 5 days is: 06/08/08
OUTPUT:
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
TITLE: Control Statements INPUT: Follow the input screen below Parameter number 1 & 2 are required input fields
PROCESS: 1. Compute number1 and number2 parameters based on the selected operators (radiobutton). 2. the result will be use as the number of times in do..enddo and while..endwhile statements. (use both loop statement) 3. for Division option, there must be an error message, when the number2 parameter is equal to 0. 4. be sure you use if..endif and case statements. OUTPUT: Please follow the layout
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
TITLE: Internal Tables TABLES: SPFLI INPUT: none PROCESS: 1. Create an internal table following the fields below: carrid, connid, cityfrom, cityto.
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
TITLE: Internal Tables - collect TABLES: SPFLI INPUT: none PROCESS: 1. Create an internal table following the fields below: CARRID, SEATSOCC 2. Select the given field in SFLIGHT table
OUTPUT:
CARRID, SEATSOCC
Expected Objects: Three (3) objects (report, text element and transaction code)
General Rule:
Naming Convention:
Create a program that will use different SQL statements. See the effect. In the transaction code SE38 (ABAP Editor), create a program named YSQLXX (XX - trainee number). In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER09XX (XX - trainee number).
TITLE: Different SQL Statements INPUT: Follow the input screen below
Type radio button radio button radio button radio button radio button
Description Appending Corresponding Into Corresponding appending corresponding (diff f) select into (diff fields) Select single
Step 1: Create an internal table with the following fields: carrid, connid, cityfrom, cityto, countryfr, countryto *field names should be the same with the reference fields. ex: carrid like SPFLI-CARRID
Step 4: Display output. What did you observe? for rb2 Step 1: Use the internal table in rb1. Step 2: Select the following fields (CARRID CONNID CITYFROM CITYTO) from table SPFLI using a select statement with into corresponding. Step 3: Select the following fields (CARRID CONNID COUNTRYFR COUNTRYTO) from table SPFLI using a select statement with into corresponding. Step 4: Display output. What did you observe? for rb3 Step 1: Create an internal table with the following fields: carrid, connid, cityfrom, cityto, countryfr, countryto *field names should be the same with the reference fields except for countryfr, countryto. Ex. country_to like spfi-countryto
Step 2: Select the following fields (CARRID CONNID CITYFROM CITYTO COUNTRYFR COUNTRYTO) from table SPFLI using a select statement with appending corresponding. Step 3: Display output. What did you observe? for rb4 Step 1: Use the internal table in rb3. Step 2: Select the following fields (CARRID CONNID CITYFROM CITYTO COUNTRYFR COUNTRYTO) from table SPFLI using a select statement with select... into...end select. Step 3: Display output. What did you observe? for rb5 Step 1: Use the internal table in rb3. Step 2: Select the following fields (CARRID CONNID CITYFROM CITYTO COUNTRYFR COUNTRYTO) from table SPFLI using a select statement with select single... into...end select.
in summary: there will be two internal table five radio buttons for rb1 and 2, there will be two select statements each. for rb 3,4,5 there will be one select statement each. Please follow the steps carefully. Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
Field Field Label / Required Reference POR Name Description (yes/no) carrid spfli-carrid Range Carrier ID connid spfli-connid Range PROCESS: Step 1: Copy the program YEXER08aXX. Step 2: Revise the select statement. Use the select statement with where condition. conditions: carrid and connid no Connection no ID
OUTPUT: ex:
Expected Objects: Three (3) objects (report, text element and transaction code)
General Rule:
Naming Convention:
TITLE: Complex SQL Statements - inner join INPUT: Follow the input screen below
Field Field Label / Required Reference POR Name Description (yes/no) carrid spfli-carrid Range Airline connid spfli-connid Range fldate sflightfldate no Connection no Number no
PROCESS: Step 1: Select the following fields in the following tables: a. SCARR carname b. SFLIGHT planetype fldate price c. SPFLI cityfrom cityto
* use inner join * conditions should be based on the input parameters above * display the data based on the given layout below * if no record retrieve, an error message appear "No records found".
OUTPUT: ex:
Expected Objects: Three (3) objects (report, text element and transaction code)
General Rule:
Naming Convention:
TITLE: Complex SQL Statements - for all entries PROCESS: 1. Copy YEXER11aXX. 2. Remove the existing select statement. 3. Use FOR ALL ENTRIES instead of INNERJOIN. 4. Select the following fields (carrid, connid, planetype, fldate and price) 5. Inner join SCARR and SFLIGHT tables only.
6. Conditions will be based on the given parameters 7. Output should be Carrier ID, Planetype, Flight Date and Price only. * if no record retrieve, an error message appear "No records found".
Expected Objects: Three (3) objects (report, text element and transaction code)
Exercise # 11c
Topic: Objective: SQL Statements - complex selection To be able to practice programming with SQL Statements using inner join, for all entries and distinct 1. Object should start with either Z or Y Use Z for actual programs Use Y for test or sample programs 2. When you create objects, a dialog box from the correction and transport system is displayed. Please specify local objects. YDESCXX Y - test object DESC - free field (to describe the table) XX - trainee number Example: YREPORT00 (Customized Table created by trainee # 00) ____________________________________________________________________________________ Create a program that will use different complex SQL statements. See the effect. In the transaction code SE38 (ABAP Editor), create a program named YSQL3aXX (XX - trainee number). In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER11cXX (XX - trainee number).
General Rule:
Naming Convention:
TITLE: Complex SQL Statements - distinct PROCESS: 1. Copy YEXER11aXX. 2. In the selection parameter, remove the flight date select option. 3. In the internal table, remove the ff fields: (plantype, fldate and price) 4. Remove the existing select statement. 5. Select the following fields (carrname, cityfrom and cityto) 6. Inner join SCARR and SPFLI tables only. 7. Use DISTINCT in the selection statement. 8. Conditions will be based on the given parameters (remaining two parameters) 9. Output should be Carrier Name, City From and City to only.
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
INPUT: 1. Create an additional parameter: p_result type p, not an input field. 2. Remove the required field for first two parameters.
PROCESS: Same process. Add on: 1. Error message for subtraction and division. subtraction: If minuend and greater than subtrahend, error message. division: if dividend is zero, error message. 2. Handle two decimal places.
Expected Objects: Three (3) objects (report, text element and transaction code)
Naming Convention:
PROCESS:
1. 2. 3. 4. 5.
Create a dialog program similar to the arithmetic exercise Create pf-status for the addition, subtraction, multiplication and division Create input field for First, and second parameter Create output field for the result Create buttons for execute computation and clear results.
OUTPUT:
Expected Objects:
Naming Convention:
Expected Objects:
Naming Convention:
PROCESS:
OUTPUT:
Expected Objects:
Naming Convention:
PROCESS:
OUTPUT:
Expected Objects:
Naming Convention:
Naming Convention: