Intro to«AP ChapterExercise


0x08 graphic
Exercise (Chapter 12):

In this exercise, you will write a program to help you to understand authority objects.

Objectives

After completing this exercise, you will be able to:

Estimated time to complete this exercise: 45 minutes

Exercises

This exercise provides practice working with the concepts learned in Chapter 12.

Exercise 1

Name your program YIN018_XX. This program will check to make sure that the user has proper authority to perform the activities (e.g., create, change, display, and delete) on vendor master records. The activity should be entered as a parameter. This parameter should be a length 2 numeric character field.

Some of the valid activities on the customer master records are:

01 - create

02 - change

03 - display

06 - mark for deletion

The appropriate authority object for this authorization check is “F_KNA1_APP”. This authority object has two fields:

ACTVT (activity)

APPKZ (application)

You should suppress the check for the “APPKZ” field. The check for the “ACTVT” field should be on the activity parameter.

To code the “AUTHORITY-CHECK OBJECT” statement, use the menu path “Edit > Insert statement” (or the `Pattern' pushbutton). You need to enter the name of the authority object in the “Authority-Check” field and the system will automatically code the appropriate “AUTHORITY-CHECK OBJECT” statement. By using this method, you cannot make a mistake typing in the proper authority object name and field names.

The report generated by this program is simple. The line written to the report will indicate whether the authority for the selected activity was passed or failed. See the sample output for the content and layout of the report in both scenarios.

Although the processing logic of this program is not complex, imagine this authority check being used in a program that is maintaining vendor master records. Without the authority check, any user executing the program may be able to change or delete records.

0x01 graphic

If the authority check fails, a message should appear, “You do not have the authority for activity XX (authority number)”.

0x01 graphic

Introduction to ABAP ABAP Exercises

Exercise

Chapter 12



Wyszukiwarka

Podobne podstrony:
Intro to?AP ChapterExercise
Intro to?AP ChapterExercise
Intro to?AP ChapterExercise
Intro to?AP ChapterExercise
Intro to ABAP Chapter 13
Intro to ABAP Chapter 07
Intro to ABAP Chapter 12
Intro to ABAP Chapter 15

więcej podobnych podstron