49
ABAP Training Exercise ___________________________________________ ___ Exercise # 1 Topic: ABAP Data Dictionary Objective: To be able to practice how to create domains, data element, tables, views and search help General Rule: 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. Naming Convention: 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 Domai n YDOM_DESCXX Date Eleme nt YDEL_DESCXX Table YTAB_DESCXX View YVIEW_DESCX X Searc h Help YSH_DESCXX Example: YTAB_CUST00 (Customized Table created by trainee # 00) ______________________________________________________________________________ ______ Create a customized table for reservation system.

ABAP Training Exercise

Embed Size (px)

Citation preview

Page 1: ABAP Training Exercise

ABAP Training Exercise

______________________________________________

Exercise # 1

Topic: ABAP Data DictionaryObjective: To be able to practice how to create domains, data element, tables, views

and search help   General Rule: 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.

Naming Convention: Y - test objectTAB - table/ DOM - domain / DEL - Data Element / VIEW - View / SH - search helpDESC - free field (to describe the table)XX - trainee number Domain

YDOM_DESCXX

Date Element

YDEL_DESCXX

TableYTAB_DESCXX

ViewYVIEW_DESCXX

Search Help

YSH_DESCXX

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.  

DomainData Type

No of Char.

YDOM_ADD00 char 20

YDOM_TEL00 char 10

YDOM_RSRVNO00 char 10

Page 2: ABAP Training Exercise

 

Exercise 1.2 Create a Data Element

 Field Domain Field Label

YDEL_ADD100 YDOM_ADD00Agent Address

YDEL_ADD200 YDOM_ADD00Customer Address

YDEL_TEL100 YDOM_TEL00Agent Telephone No.

YDEL_TEL200 YDOM_TEL00Customer Telephone No.

YDEL_RSRVNO00 YDOM_RSRVNO00Reservation Number

 

Exercise 1.3 Create a transparent table (customized table)

 Table Structure 1:

Master Data Table: YTAB_AGENT00

Fields Data Element

AGENTCODE KUNNR

NAME NAME1

OFFICE YDEL_ADD100

TELNO YDEL_TEL100

 Table Structure 2:

Transactional Table: YTAB_TRAVEL00

Fields Data Element Description

RESERV_NO YDEL_RSRVNO00  

CARRID S_CARR_ID  

CONNID S_CONN_ID  

FLIGHT DATE S_DATE  NO. OF  SEAT CHAR 4 No. of reserved seat

CUST_NAME CHAR 30 Customer Name

Page 3: ABAP Training Exercise

ADDRESS YDEL_ADD200  

TELNO YDEL_TEL200  

AGENTCODE KUNNR  

 

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

NOTE: This will be use on later exercises. 

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.

 

NOTE: This will be use on later exercises. 

 

Expected Objects:

Five (5) objects (domain, data element, table and view, search help)

Page 4: ABAP Training Exercise

ABAP Training Exercise

______________________________________________

Exercise # 2

Topic: Simple Report ProgramObjective: To be able to practice how to create a simple report   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a simple report.

          In the transaction code SE38 (ABAP Editor), create a program named YWRITEXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER02XX (XX - trainee number).

 

TITLE: My First Report

INPUT:  NONE

PROCESS:

Page 5: ABAP Training Exercise

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)

Page 6: ABAP Training Exercise

ABAP Training Exercise

______________________________________________ 

Exercise # 3

Topic: Simple Report ProgramObjective: To be able to practice how to create a simple report   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a simple report.

          In the transaction code SE38 (ABAP Editor), create a program named YIMABAPXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER03XX (XX - trainee number).

TITLE: My Profile

INPUT:  NONE

PROCESS:

Page 7: ABAP Training Exercise

1. Create a program that will display your information 2. Remove Page heading. 3. Set the following Color:

a. NAME – BLUE b. BIRTHDAY – BLUE c. School – Yellow d. Course – Yellow e. Year Graduated – Yellow

 

Note: Remove formats within <>.  

OUTPUT:

 

Expected Objects:

Two  (2) objects (report and transaction code)

Page 8: ABAP Training Exercise

ABAP Training Exercise

______________________________________________

 

Exercise # 4

Topic: Simple ArithmeticObjective: To be able to practice how to create a simple program using different

operators   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will let you perform arithmetic computation

          In the transaction code SE38 (ABAP Editor), create a program named YARITHXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER04XX (XX - trainee number).

 

TITLE: ARITHMETIC

Page 9: ABAP Training Exercise

INPUT:  NONE

PROCESS:

1. 1.      The following are the equations and rules:

a.      Write the sum of two even numbers.

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 ( letter c ) by 100.

e.       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.       SUM = 14.

b.      QUOTIENT = 7

c.       DIFFERENCE  = 6

d.      PRODUCT = 600

e.       RESULT   = 600

 

OUTPUT:      Please follow the layout

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>    

 

Page 10: ABAP Training Exercise

 

Expected Objects:

Two  (2) objects (report  and transaction code)

 

ABAP Training Exercise

______________________________________________ 

Exercise # 5

Topic: ParametersObjective: To be able to practice how to create a simple program with parameters   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will let you perform arithmetic computation with Parameters.  You will enter value for computation

          In the transaction code SE38 (ABAP Editor), create a program named YPARAMETERXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER05XX (XX - trainee number).

 TITLE: PARAMETERS

INPUT: 

Create the following selection text

Page 11: ABAP Training Exercise

First Even Number   Second Even NumberMultiply By

PROCESS:

1.      The following are the equations and rules:

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 = 102nd Parameter  =   4.3rd Parameter = 100.

a. SUM = 14. b. QUOTIENT = 7.

c. DIFFERENCE  = 6

d. PRODUCT = 600

e. RESULT   = 600

 OUTPUT:      Please follow the layout

Page 12: ABAP Training Exercise

 Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

ABAP Training Exercise

______________________________________________ 

Exercise # 6

Topic: Date CalculationObjective: To be able to practice how to Calculate the date base on the parameters   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will Calculate the date base on the parameters. 

Page 13: ABAP Training Exercise

          In the transaction code SE38 (ABAP Editor), create a program named YDATEXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER06XX (XX - trainee number).

TITLE: DATE CALCULATION

INPUT: 

PROCESS:

Get the actual date.

Example: Date:  06/03/2008            Days: 5

The date after 5 days is: 06/08/08

 

OUTPUT:      Please follow the layout

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

Page 14: ABAP Training Exercise

ABAP Training Exercise

______________________________________________

 

Exercise # 7

Topic: Control StatementsObjective: To be able to practice control statements   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will use logical expression , case statements, do and while loop.

Page 15: ABAP Training Exercise

          In the transaction code SE38 (ABAP Editor), create a program named YCONTROLXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER07XX (XX - trainee number).

 

TITLE: Control Statements

INPUT: 

Follow the input screen belowParameter 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

Page 16: ABAP Training Exercise

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

______________________________________________

 

Exercise # 8a

Topic: Data Structure - Internal TableObjective: To be able to practice the use of data structures (internal tables)   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Page 17: ABAP Training Exercise

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will use an internal table as data structure.

          In the transaction code SE38 (ABAP Editor), create a program named YITTAB1XX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER08aXX (XX - trainee number).

 

TITLE: Internal Tables

TABLES:  SPFLI

INPUT:  none

PROCESS:

1. Create an internal table following the fields below:

carrid, connid, cityfrom, cityto.

2. Select the given field in  SPFLI table

OUTPUT:      Output should be like this. Please follow the layout.

CARRID, CONNID, CITYFROM, CITYTO.

Page 18: ABAP Training Exercise

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

______________________________________________

Page 19: ABAP Training Exercise

 

Exercise # 8b

Topic: Data Structure - Internal Table w/ collectObjective: To be able to practice the use of data structures (internal tables)   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will use an internal table as data structure.

          In the transaction code SE38 (ABAP Editor), create a program named YITTAB2XX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER08bXX (XX - trainee number).

 

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:      Output should be like this. Please follow the layout.

CARRID, SEATSOCC

Page 20: ABAP Training Exercise

 

NOTE: use collect, instead of append

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

Page 21: ABAP Training Exercise

 

Exercise # 9

Topic: SQL StatementsObjective: To be able to practice programming with SQL Statements . To Differentiate

the common SQL statements.   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

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

Page 22: ABAP Training Exercise

Parameter Type Description

rb1 radio buttonAppending Corresponding

rb2 radio buttonInto Corresponding

rb3 radio buttonappending corresponding (diff f)

rb4 radio buttonselect into (diff fields)

rb5 radio button Select single

PROCESS:

for rb1

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

field nam

e

reference field

carrid

CARRID

Step 2: Select the following fields (CARRID CONNID CITYFROM CITYTO) from table SPFLI using a select statement with appending corresponding.

Step 3: Select the following fields (CARRID CONNID COUNTRYFR COUNTRYTO) from table SPFLI using a select statement with appending corresponding.

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

Page 23: ABAP Training Exercise

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.

Step 3: Display output. What did you observe?

 

Page 24: ABAP Training Exercise

in summary:there will be two internal tablefive radio buttonsfor 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)

 

 

 

Page 25: ABAP Training Exercise

ABAP Training Exercise

______________________________________________ 

Exercise # 10

Topic: SQL Statements with where conditionObjective: To be able to practice programming with SQL Statements    General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will use different SQL statements. See the effect.

          In the transaction code SE38 (ABAP Editor), create a program named YSQL2XX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER10XX (XX - trainee number).

 

TITLE: SQL Statements with conditions

INPUT: 

Follow the input screen below

Page 26: ABAP Training Exercise

Field Name

Reference

POR

Field Label /

Description

Required (yes/no)

carrid spfli-carrid Range Carrier ID no

connidspfli-connid

RangeConnection ID

no

PROCESS:

Step 1: Copy the program YEXER08aXX.

Step 2: Revise the select statement. Use the select statement with where condition.

conditions: carrid and connid

 

OUTPUT:      It will depends on the value in the input parameters.

ex:

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

______________________________________________

 

Exercise # 11a

Topic: SQL Statements - complex selectionObjective: To be able to practice programming with SQL Statements using inner join, for

Page 27: ABAP Training Exercise

all entries and distinct   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - 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 YEXER11aXX (XX - trainee number).

 

TITLE: Complex SQL Statements - inner join

INPUT: 

Follow the input screen below

Field Name

Reference

POR

Field Label /

Description

Required (yes/no)

carrid spfli-carrid Range Airline no

connidspfli-connid

RangeConnection Number

no

fldatesflight-fldate

Range Flight Date no

Page 28: ABAP Training Exercise

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:      It will depends on the value in the input parameters.

ex:

Page 29: ABAP Training Exercise

 

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

Page 30: ABAP Training Exercise

ABAP Training Exercise

______________________________________________

 

Exercise # 11b

Topic: SQL Statements - complex selectionObjective: To be able to practice programming with SQL Statements using inner join, for

all entries and distinct   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - 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 YEXER11bXX (XX - trainee number).

 

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 parameters7. Output should be Carrier ID, Planetype, Flight Date and Price only.

Page 31: ABAP Training Exercise

* if no record retrieve, an error message appear "No records found".

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

Page 32: ABAP Training Exercise

 

Exercise # 11c

Topic: SQL Statements - complex selectionObjective: To be able to practice programming with SQL Statements using inner join, for

all entries and distinct   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - 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).

 

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.  

* if no record retrieve, an error message appear "No records found".

 

Page 33: ABAP Training Exercise

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

Page 34: ABAP Training Exercise

______________________________________________

 

Exercise # 12a

Topic: At-Selection Screen and At-Selection Screen OutputObjective: To be able to practice the At Selection Command   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will use At-Selection Screen and At-Selection Screen Output

          In the transaction code SE38 (ABAP Editor), create a program named YATSELECTIONXX (XX - trainee number).           In the transaction code SE93 (Maintain Transaction), create a transaction code named YEXER12XX (XX - trainee number).

 

TITLE: AT Selection Command

 

Copy EXER07. (SE38, click COPY button)

 

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.

Page 35: ABAP Training Exercise

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. 

NOTE: do not click the execute button.

OUTPUT:     

no output

 

 

Expected Objects:

Three  (3) objects (report, text element and transaction code)

 

 

ABAP Training Exercise

Page 36: ABAP Training Exercise

_____________________________________________ 

Exercise # 12b

Topic: Simple DialogObjective: To be able to practice dialog programming   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will let you perform a simple dialog programming.

          In the transaction code SE38 (ABAP Editor), create a program named YDIALOGXX (XX - trainee number).

TITLE: First Dialog

INPUT: 

PROCESS:

Page 37: ABAP Training Exercise

1. Create a dialog program similar to the arithmetic exercise 2. Create pf-status for the addition, subtraction, multiplication and division

3. Create input field for First, and second parameter

4. Create output field for the result

5. Create buttons for execute computation and clear results.

 

Notes:  the input parameter should only contain numeric

 

OUTPUT:     

 

 

Expected Objects:

 

 

Page 38: ABAP Training Exercise

ABAP Training Exercise

_____________________________________________

Exercise # 12c

Topic: Table ControlObjective: To be able to practice dialog programming using table control   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will let you perform a simple dialog programming with table control.

          In the transaction code SE38 (ABAP Editor), create a program named YTABCONTROLXX (XX - trainee number).

TITLE: Table Control

Refer to EXER11a.

INPUT: 

Refer to EXER11a.

 PROCESS:

For data declaration select statement, pls. refer to EXER11a.

 OUTPUT:   Refer to EXER11a. In table control.

 

 Expected Objects:

Page 39: ABAP Training Exercise

 ABAP Training Exercise

______________________________________________ 

Exercise # 13

Topic: Download ProgramObjective: To be able to practice the download programming   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

____________________________________________________________________________________

Create a program that will let you perform a simple download program.

          In the transaction code SE38 (ABAP Editor), create a program named YDOWNXX (XX - trainee number).

TITLE: Download Program

INPUT: 

 

PROCESS:

 

OUTPUT:     

 

 

 

Page 40: ABAP Training Exercise

Expected Objects:

ABAP Training Exercise

______________________________________________ 

Exercise # 14

Topic: Upload ProgramObjective: To be able to practice the upload programming   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

___________________________________________________________________________________________________________________________

Create a program that will let you perform a simple upload program.

          In the transaction code SE38 (ABAP Editor), create a program named YUPXX (XX - trainee number).

TITLE: Upload Program

INPUT: 

 

PROCESS:

 

OUTPUT:     

 

 

Page 41: ABAP Training Exercise

 

Expected Objects:

ABAP Training Exercise

______________________________________________ 

Exercise # 15

Topic: Area MenuObjective: To be able to be familiarize in the area menu   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

___________________________________________________________________________________________________________________________

          In the transaction code SE43 (Area Menu Maintenance), create an area menu named YAREAXX (XX - trainee number).

TITLE: Area Menu - Trainee: <Name>

Create an area menu.Organize all your created program in the created area menu.Be sure all your program has a transaction code.

 

 

  ABAP Training Exercise

Page 42: ABAP Training Exercise

______________________________________________

 

Exercise # 16

Topic: Transport RequestObjective: To be able to be familiarize in the transport organizer   General Rule: 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.

Naming Convention: YDESCXX

Y - test objectDESC - free field (to describe the table)XX - trainee number

Example: YREPORT00  (Customized Table created by trainee # 00)

___________________________________________________________________________________________________________________________

Create a transport request for all the ABAP objects that was previously created.One transport request for each exercise.