PacktLib: SAP ABAP Advanced Cookbook

SAP ABAP Advanced Cookbook


About the Author

About the Reviewers


ABAP Objects


Creating a shared memory object

Creating a persistent object

Creating classes based on factory methods

Creating classes based on singleton design pattern

Creating classes based on adapter pattern

Dynamic Programming


Using field symbols and data references to print database table contents

Applying dynamic Open SQL

Dynamic program generation

ALV Tricks


Setting ALV columns as key columns and making zero amount appear as blank

Removing columns from display and layout

Enable Adding Layout toolbar buttons

Adding Hotspot to columns

Adding your own buttons to ALV toolbar

Adding checkboxes to columns

Regular Expressions


Using regex as an IF statement

Removal of characters from a string

Converting date into internal date type

Validation of format (telephone number)

Removing repeated words from text string

Inserting commas in an amount string

Removing comments from program code

Interpreting HTML stream

Optimizing Programs


Using transaction SAT to find problem areas

Creation of secondary indexes in database tables

Adding hints in SELECT clause

Secondary indexes for internal tables

Hashed table for single read access

Replacing for all entries constructwith Ranges

Doing More with Selection Screens


Adding tabstrips and listboxes to report selection screens

Adding toolbar buttons on selection screen

Changing screen fields on radio button selection

Taking desktop folder and filename as input

Coding search help exits for creating better F4 helps

Smart Forms – Tips and Tricks


Toggle on/off the Microsoft Word text editor

Using background pictures and print preview

Using folder options for page protection

Printing several forms in one spool request

Converting Smart Forms to PDF output

Applying sorting and subtotaling to table fields

Working with SQL Trace


Carrying out SQL trace

Generating and interpreting the trace result

Carrying out restricted trace

Filtering unwanted trace result entries

Summarizing a SQL list and viewing table-related information

Quickly finding the data source of a screen field

Finding the data source of a field's hit list

Code Inspector


Carrying out quick code inspection

Carrying out a full-fledged inspection

Carrying out database-specific performance checks

Suppressing messages using pseudo comments

Searching for ABAP statement patterns and tokens within code

Creating your own Code Inspector checks

Simple Transformations


Creating simple transformations

Creating transformations for structures and calling them in programs

Creating transformations for internal tables

Generating transformations for dictionary table types

Downloading into Excel made easy using simple transformations

Sending E-mail Using BCS Classes


Creating a simple e-mail message

Sending e-mail to Internet e-mail addresses

Adding attachments to your message

Creating HTML e-mail

Running a program and sending its output as an e-mail

Creating and Consuming Web Services


Creating a Web service from a function module

Configuring the created Web service

Consuming a Web service

Creating a consumer proxy's logical port

Calling a Web service from an ABAP program

SAP Interactive Forms by Adobe


Creating nested tables

Enabling duplex printing in forms

Using form elements and scripting to create interactive forms

Working with Adobe offline infrastructure

Parallel printing of form

Adding error messages for interactive forms

PDF object API

Web Dynpro for ABAP


Creating trees

Creating navigation lists

Creating tabstrips

Displaying error messages

Calling dialog boxes of same component

Displaying Adobe forms in Web Dynpros

Floorplan Manager


Creating applications based on OIF Floorplan design

Changing header and ticket area at runtime

Adding list GUIBBs to Floorplan applications

Viewing structure of FPM applications

Creating GAF applications

Creating FPM applications using Application Creation Tool