0% found this document useful (0 votes)
28 views

19 - Additional ABAP Concepts

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

19 - Additional ABAP Concepts

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Additional ABAP Concepts

1
Where Used List

▪ SAP provided a where used list functionality to check the used places of an ABAP object.
Where used list in SE11 transaction code

2
TADIR and TFDIR Tables

▪ TADIR - Directory of Repository Objects

▪ TFDIR - Directory of Function Modules

3
Conversion Routines

▪ Conversion Routines are used to convert the values from external display format to

internal storage format and vice-versa.

▪ They are the part of the domain and are the function modules.

4
Hot Key in Search Help

▪ The hot key permits the user to select an elementary search help from the collective

search help by passing it directly in the input field with the short notation.

▪ This can save time if the user frequently looks for values using the same search help.

▪ Letters and digits are allowed as hot key.

▪ The shortcut must be entered in the input field according to the following convention -

=HK.S1.S2.S3 etc. where HK = hot key and S1, S2,S3 are the restrictions.

5
Hot Key in Search Help (Contd.)

▪ If the hot key is entered without restrictions (=HK), the dialog box for restricting values

appears.

▪ If restrictions are defined, the dialog box for restricting values does not appear and the

hit list is displayed directly.

▪ If exactly one hit is found, the hit list is not displayed. The values of the hits that are

found are returned directly to the screen in this case.

6
Search Help Exit - Introduction

▪ A search help exit is a function module that has a predefined interface.

▪ This function module is used to write the logic for the search help.

▪ The example search help exit provided by SAP is : F4IF_SHLP_EXIT_EXAMPLE.

▪ We make a copy of this search help exit and create our own search help exit.

7
Search Help Exit - Pre-defined Parameters

▪ The various search help exit pre-defined parameters are as follows :

 SHLP - Parameter for current search help.

 CALLCONTROL - Parameter for control of F4 process.

 SHLP_TAB - Table for elementary search help.

 RECORD_TAB - Record list/Hit list

8
Search Help Exit - CallControl Steps

▪ The various callcontrol steps in search help exit process are as follows:

 SELONE - Select one of the elementary search helps. This step is applicable for

collective search help.

 PRESEL - Enter selection conditions.

 SELECT - Select values.

 DISP - Display values.

 RETURN - To return the values.


9
Change Document Log

▪ With the help of change document log we can track the changes made to that

document.

▪ Change document log/history is available in CDHDR(header table) & CDPOS(item table).

▪ The SAP standard program to display the change document log is ‘RSSCD100’.

1
0
Steps to Create Change Document Log for Z Tables

▪ The various steps to generate a change document log for Z tables are as follows:

 Select the change document checkbox in the data element for the respective fields of

the table.

 Create a change document object for the Z table using transaction code SCDO.

 When we generate the change document object, SAP generates a function module

automatically.

1
1
Steps to Create Change Document Log for Z Tables(Contd.)

 The naming convention of the generated function module is : change document object

name_WRITE_DOCUMENT.

 The N(new) parameter of the generated function module is used for insert log, O(old)

parameter is used for delete log , N(new) and O(old) both are used for update log.

1
2
CURSOR

▪ CURSOR is mainly used to extract data in segments/chunks/packets from the database

table.

▪ The various statements for the cursor are as follows:

 OPEN CURSOR - It is used to open the cursor.

 FETCH NEXT CURSOR - It is used to fetch the data in packets.

 CLOSE CURSOR - It is used to close the cursor.

1
3
SAP Memory and ABAP Memory

▪ Refer to the attached sheet for the detailed explanation of SAP memory and ABAP

memory.

Microsoft Excel
Worksheet

1
4
Update Function Module - Introduction

▪ An update function module is a function module having the processing type ‘Update

Module’ in the properties tab.

▪ The purpose of update function module is to COMMIT all the changes at once or

ROLLBACK them all.

▪ The syntax to call a update function module is - CALL FUNCTION <name of the function

module> IN UPDATE TASK.

1
5
Update Function Module - Introduction(Contd.)

▪ During program execution, when the system reaches the statement CALL FUNCTION

<name of the function module> IN UPDATE TASK, the function module is not executed

immediately.

▪ Update function module executes in a special work process that is

called as update work process.

▪ This actual execution of update work process is triggered by the COMMIT WORK

statement.
1
6
Update Function Module - Introduction(Contd.)

▪ The transaction code for update requests is SM13.

1
7
Update Function Module - Important Points

▪ All parameters needs to be pass by value.

▪ Update function module does not support changing and exporting parameters.

▪ Never write COMMIT WORK in the update function module otherwise system throws

runtime error.

1
8
Update Function Module - Important Points

▪ All parameters needs to be pass by value.

▪ Update function module does not support changing and exporting parameters.

▪ Never write COMMIT WORK in the update function module otherwise system throws

runtime error.

1
9
Displaying Data of More than 128 Characters in ALV

▪ In ALV, we can display data up to 128 characters only.

▪ If the length of the data is more than 128 characters, we can display the data on a

separate screen.

▪ The various steps to display the ALV data on a separate screen are as follows:

 Design the layout element custom control through screen painter.

 Create the object of container class CL_GUI_CUSTOM_CONTAINER.

2
0
Displaying Data of More than 128 Characters in ALV(Contd.)

 Create the object of text edit class CL_GUI_TEXTEDIT and pass container object as the

parent.

 Use the method SET_TEXT_AS_R3TABLE of CL_GUI_TEXTEDIT class to display the text.

2
1
Background Jobs - Introduction

▪ There are 2 types of jobs.

1. Foreground jobs(interactive jobs)

2. Background jobs( non-interactive jobs)

▪ The background jobs are the non-interactive jobs in the SAP system that perform their

work in the background without affecting the normal operations.

▪ Once the background job is defined, the system makes sure that it runs the defined job

at a specific time.
2
2
Background Jobs - Introduction(Contd.)

▪ Background jobs run in the background without any user input and can be scheduled to

run when the system load is low.

▪ They are used to reduce the manual efforts and automate the process.

2
3
Background Jobs - Transaction Codes

▪ SM36 - To schedule the background job

▪ SM37 - To check the status of background job

▪ JDBG - To Debug a background Job

2
4
Background Jobs - Classification

▪ Background jobs are classified into 3 categories.

1. Class A - High priority jobs

2. Class B - Medium priority jobs

3. Class C - Low priority jobs

2
5
Background Jobs - Classification

1. Class A( High Priority) - Some tasks are urgent or critical and must be scheduled with

class A priority job. Class A priority jobs reserves one or more background work

processes.

2. Class B( Medium Priority) - Once class A jobs are completed , class B job will start

executing in the background.

3. Class C(Low Priority) - Class C job runs after both class A and class B jobs are completed.

2
6
Background Jobs - Status

▪ The various status of background jobs are as follows:

1. Scheduled

2. Released

3. Ready

4. Active

5. Finished

6. Cancelled
2
7
Background Jobs - Status

1. Scheduled - Scheduled status means that all steps required to create the job are

completed but the start conditions like start date, end date frequency etc. are still not

defined.

2. Released - Released status means that all the steps including start conditions that are

required for creating a job are finished.

2
8
Background Jobs - Status(Contd.)

3. Ready - Ready status means that a job is completely ready for execution but still not

running because it has been put in a queue by the job scheduler. The job is waiting for

the next available background work process.

4. Active - Active status means that a job is currently active and running. We cannot

change the status of the job once it is in active status.

2
9
Background Jobs - Status(Contd.)

5. Finished - Job is executed successfully. It means the desired task is completed without

any error.

6. Cancelled - There are two possibilities when a job is cancelled. The administrator

cancelled forcefully cancelled the job or there might be some issue with job. We can

check the reason for the same with the help of job logs.

3
0
Background Jobs - Function Modules/ABAP Statements

▪ The below mentioned function modules/statements are involved in background jobs:

1. JOB_OPEN - This function module creates a background job.

2. JOB_SUBMIT / SUBMIT – The function module JOB_SUBMIT or ABAP statement SUBMIT

adds a step to the background Job.

3. JOB_CLOSE – This function module process the background job.

3
1
Comparison of ABAP Statement SUBMIT and FM JOB_SUBMIT

▪ With SUBMIT, we can specify selection criteria for an ABAP report dynamically, when

the background job is submitted whereas with JOB_SUBMIT, we can only specify an

existing variant for a report.

3
2
Number Range

▪ The transaction code to create the number range object is SNRO.

▪ The table to store the number range object is TNRO.

▪ The table to store the number range intervals is NRIV.

▪ The function module NUMBER_GET_NEXT provides the next available number.

3
3
Number Range - Steps

▪ The various steps in the number range process are as follows:

 Create a number range object through transaction code SNRO.

 Provides the intervals to that number range object.

 Use the function module : NUMBER_GET_NEXT in the program to get the next available

number for that number range object.

3
4
AUTHORITY-CHECK

▪ Authority-check(authorization) is a concept which enables or allow users to perform

certain functions/activities in the SAP system.

▪ In SAP, we achieve authorization through authorization object.

▪ These authorization objects are assigned to the user which enables the respective users

to work in the system.

3
5
AUTHORITY-CHECK - Terminologies

▪ The various terminologies used in the process of authority-check are as follows:

 Object class - It is a container for the authorization objects.

 Authorization object - Object to check the authorization.

 Authorization field - An authorization object has the authorization field which is used to

define the field values.

 Imp point : Object class has authorization objects and authorization object has

authorization fields.
3
6
AUTHORITY-CHECK - Transaction Codes

 Authorization field - SU20

 Object class and authorization object - SU21

3
7
AUTHORITY-CHECK - Steps

▪ The various steps involved in the process of authority-check are as follows:

1. Creating authorization field through transaction code SU20.

2. Creating object class through transaction code SU21.

3. Creating authorization object which contains authorization fields under object class

through SU21 transaction code.

4. Creating a role through transaction code PFCG

5. Assigning authorization object to the role.


3
8
AUTHORITY-CHECK - Steps(Contd.)

6. Assigning role to the business user.

7. Using AUTHORITY-CHECK on authorization object in the program.

 Imp point : steps(4-6) - creation of role through PFCG transaction code, assigning the

authorization object to the role and assigning the role to the user is done by SAP basis

person/system administrator.

3
9
AUTHORITY-CHECK - SAP_ALL

▪ This composite profile SAP_ALL contains all SAP authorizations.

▪ It means that a user with this profile can perform all tasks in the SAP System.

▪ The user which is having SAP_ALL authorization has the rights to administer the SAP

system.

▪ In projects, it is recommended to have only one user with this SAP_ALL authorization,

rest all users have the authorizations based upon their roles.

4
0
Validations

▪ Validations are used to validate the values that are entered in the SAP

system.

▪ Example - Whenever a accounting document is posted for company

code ABC, the cost center XYZ is allowed.

▪ Validation rules are stored in rule manager.

▪ When we enter the data the integration manager validates the data

based upon the validation rules stored in the rule manager.


4
1
Validations(Contd.)

▪ The transaction code for Validation maintenance is GGB0.

4
2
Substitutions

▪ Substitution are used to substitute the values based on certain

prerequisites.

▪ Example - Whenever a accounting document is posted with company

code ABC and cost center XYZ, the system substitutes the value X for

payment method.

▪ Substitution rules are stored in the rule manager.

▪ When data is entered in the system the integration manager


4
3
Substitutions(Contd.)

▪ The transaction code for substitution maintenance is GGB1.

4
4
Validations/Substitutions : Application Area & Callup Point

▪ When we create validations/substitutions 2 terms plays a vital role.

 Application Area

 Callup Points

4
5
Validations/Substitutions : Application Area

▪ Application area specifies the general application area for which the validation or

substitution is defined.

▪ Every application area has 2 digit character code which is called as application area

code.

▪ Example - FI is a 2 digit code for application area financial accounting.

4
6
Validations/Substitutions : Callup Points

▪ Callup points specifies the exact location of validation or substitution in that application

area.

▪ Every callup point has 4 digit number code which is called as callup point code.

▪ Example - 0001 is a 4 digit code for callup point document header for application area

financial accounting(FI).

 Imp point: For the same application area and callup point, if both are implemented, the

substitutions calls first, then system calls the validations.


4
7
Steps to Create a Validation

▪ The various steps to create a validation are as follows:

 Go to transaction code GGB0.

 Choose the application area and callup point for the validation.

 Select the callup point and click on to validation creation.

 Provide the validation name, description and message class.

 Create step for the validation.

 The step has 3 parts - prerequisite, check and message.


4
8
Steps to Create a Validation(Contd.)

 Define the prerequisite statement, which determines whether or not the data should be

checked.

 Define the check statement, which validates the data.

 Define the messages that will appear if a check statement is found to be false during

validation.

 Activate the validation.

4
9
Transaction Code , Tables and Function Modules for Validations

 GGB0 - Transaction code for validation maintenance

 OB28 - Transaction code for validation of accounting documents(financial accounting)

 T001D - Table for validation of accounting documents(financial accounting)

 G_VSR_VALIDATION_CALL - Function module to call the validation

5
0
Steps to Create a Substitution

▪ The various steps to create a substitution are as follows:

 Go to transaction code GGB1.

 Choose the application area and callup point for the validation.

 Select the callup point and click on to substitution creation.

 Provide the substitution name and description.

 Create step for the substitution.

 The step has 2 parts - prerequisite and substitutions.


5
1
Steps to Create a Substitution(Contd.)

 Define the prerequisite statement, which determines whether or not the substitution

needs to be performed.

 Define the substitutions.

 Activate the substitution.

5
2
Transaction Code , Tables and Function Modules for Substitutions

 GGB1 - Transaction code for substitution maintenance

 OBBH - Transaction code for substitution of accounting documents(financial accounting)

 T001Q - Table for substitution of accounting documents(financial accounting)

 G_VSR_SUBSTITUTION_CALL - Function module to call the substitution

5
3
Standard Text

▪ The transaction code to create a standard text is SO10.

▪ It is a reuseable text which can be used in smartforms, scripts, ABAP code etc.

▪ A standard text is identified by text name, language, text id and text object.

▪ The tables to store the standard text are STXH(standard text header) and STXL(standard

text item tables).

▪ The standard function module used to save and read the standard text are SAVE_TEXT

and READ_TEXT.
5
4
Adding Standard Text/Include Text to Transport Request

▪ The various steps to add the standard text to the transport request are as follows:

 Create a workbench transport request through transaction code SE09.

 Change the type of the transport request task to development/correction.

 Run the SAP standard program RSTXTRAN.

 Pass the transport request task and name of the standard text.

 Press enter and click on to add to task button.

5
5
Adding Report Variant to Transport Request

▪ The various steps to add the report variant to the transport request are as follows:

 Run the standard program RSTRANSP through transaction code SE38.

 Pass the report name , variant name and click on to execute button.

 One pop-up appears for the selection of the variants. Click on to ok button.

 One pop-up window appears to pass the transport request.

 Pass the transport request and click on to ok button.

5
6
Adding Report Variant to Transport Request(Contd.)

▪ We can follow the below mentioned steps also to add a report variant to transport

request.

 Go to transaction code SE38 and pass the program name.

 Click on to variant button. One screen appears having program name and variant.

 Go to Utilities-Transport request, which navigates to standard program RSTRANSP only.

 After that follow the same steps which is mentioned in the previous slide.

5
7
SE63 Translation Export(Adding Translation to Transport Request)

▪ The various steps to add the translation to the transport request are as follows:

 Go to transaction code - SLXT.

 Target Language - Choose the target language. There is an option to choose the

individual , multiple or all target languages.

 Transport Request - We can create the new transport request or pass the existing

transport request which stores the translated text.

5
8
SE63 Translation Export(Adding Translation to Transport Request)

 Time period - We can pass the processing date/delta date and system considers the

translated text of that time period.

 Execute the transaction code and the translated text stores in the transport request.

5
9
SAP ABAP Learning Sources/SAP ABAP Reference Material

▪ F1 Help( technical information)

▪ Transaction code - ABAPDOCU or ABAPHELP

▪ HELP.SAP.COM

▪ OPEN SAP

▪ Learning Hub

6
0
Thank You

6
1

You might also like