ABAP BADI SCREEN ENHACEMENTS

Besides program and menu enhancements, you can also create screen enhancements for business Add-Ins. Screen enhancements are not supported, however, for Business Add-Ins designed for multiple use.

With the old enhancement technique based on customer exits, X function groups were used for data retention and data processing purposes. These tasks are now performed by a user function group or a module pool if you implement a screen enhancement using BAdIs. The instance of the implementing class is only used for data transport.

The name of the function group lies in the namespace of the implementing person/user. The 'X' which was necessary at the beginning of a function group in case of customer exits is now no longer required and therefore eliminated.

An instance of the BAdI class must be passed to the user of the BAdI to allow that user to get the data to be displayed on the screen. For this purpose, the instance is saved in a public static readomly attribute DYNPRO_INSTANCE of the BAdI class. This attribute is generated.

A public static method SET_INSTANCE_FOR_SUBSCREEN sets the attribute on the application side to the parameter passed. Using the method GET_INSTANCE_FOR_SUBSCREEN the parameter is then read on the user side.

Different sub screen states can be represented by different instances.

The relationships shown between the calling program, the classes and the user function group or module pool are illustrated below by means of an example.

Example:

A user wants to display flight data in a transaction and enters the airline carrier, the flight number, and the flight date first.


At the specific request of the customer, you are to enhance this function to allow the user to additionally display the time of departure and arrival as well as the departure and destination airport.

The definition of a Business Add-In containing the functionality required is then delivered to the customer. If the customer creates an implementation, the system displays additional fields.


If you are interested with SAP ABAP BADI MENU ENHANCEMENTS you can try the highlighted link.

You can go through entire SAP ABAP BADI COURSE HERE.

Customer Relationship Management and mysap an introduction
CRM Management and sales and service strategy of mysap crm
MySAP CRM and customer as business partner

SAP ABAP BADI MENU ENHANCEMENTS

SAP allows you to enhance menus in its user interfaces using function codes. These function codes must adhere to the form /namespace/+<...>, just like in SMOD/CMOD enhancements.They are assigned to a specific enhancement and only appear in their corresponding menus once an  implementation of this enhancement has been activated.

Application developers reserve specific function codes for customers when defining a Business Add-In. They use the Menu Painter to include these codes in the appropriate menu lists.

Application developers must also ensure that these menu options are called in their applications and that the corresponding add-in methods are also retrieved. Customers can take advantage of menu enhancements by creating a new implementation, choosing a text for the menu option, and then programming the method used to determine what action is performed when the menu enhancement is called.

Menu enhancement is only possible using single use add-ins (not multiple use add-ins) that are not filter-dependent. Currently, menu enhancements can only be created in conjunction with program enhancements (interfaces).

To create a menu enhancement, proceed as follows:

1 . Create an add-in and define its interface.
2 . Choose Fcodes from the tabstrip.
3 . Enter the name of your program, the function code, and a description.

4 . Call the Menu Painter or double-click on your program name or function code to branch to user interface maintenance in the Menu Painter. Enter your function code in the appropriate menu list. If you have accessed the Menu Painter directly during add-in definition, you can call your menu lists by choosing Goto ® Object lists ® Menu list instead.


Calling a Menu Enhancement from an Application Program

You programming should look like this:

(…)
case fcode.
when 'SAP'.
(…)
when '+CUS'
call method …

Implementing a Menu Enhancement

When implementing menu enhancements, proceed as follows:

1. Create an implementation and choose Fcodes. All data adopted from your Business Add-In's definition is displayed here. You can make entries for the implementation on the right.

You can also double-click on the first input field. The following dialog box appears:

Here you may enter a text for your function code, the name of an icon and a text for the icon, and a short informational text.

The actions that you want the system to perform after the pushbutton is chosen must be programmed in the appropriate method, either manually or using default source code that has been provided to you.

Menu enhancements only become visible after the implementation has been activated and the application program that calls the Business Add-In has been executed.




You can learn SAP ABAP BADI IMPLEMENTATION here.

You can go through entire SAP ABAP BADI COURSE HERE.
Organizational Challenges with crm and mysap crm solutions
My sap crm and marketing planning

SAP ABAP Business Add-Ins implementation

This concept is in continuation with SAP ABAP BADI FILTER DEPENDENT PART TWO and it may be more convenient if you to go through it before proceeding to this concept.

If you want to use a filter-dependent Business Add-In, you will need an implementation for each relevant filter value. Multiple filter values may use the same implementation, however.

When implementing a filter-dependent Business Add-In, proceed as follows:

1. Create an implementation by referring to the corresponding Business Add-In definition.

2. Enter a characteristic filter value for the implementation, or choose F4 and select a value from the list of possible entries displayed. In principle, it is possible to define multiple characteristic filter values for each implementation.

3. Use the Class Editor to fill the interface method.

In the string conversion example, you would make the following entries for each country:
BRD:
translate parameter to upper case.
Ireland:
translate parameter to lower case.
Italy:
translate ...

4. Repeat steps 1-3 for each implementation that you create.

5. Activate your implementations.

Now, whenever you execute the report program described above, different country-specific implementations are executed.

You can specify generic filter values for the implementation of a Business Add-In, which means that you can use the special character "*". You can use the asterisk to represent any part of a filter value. A generic filter value can be replaced by different values which may be found in the
database.

You can show and hide short texts for filter values by double-clicking the corresponding column.

As far as extendible filter types are concerned, it is also possible to edit short texts.

Extendible Filter Types

If you flag a filter type as being extendible, it is also possible to create implementations for filter values that did not exist so far. When you assign the extendible attribute to a filter type, the Implementation menu option in the BAdI Builder is replaced by Filter value. If you choose Filter value ® Create and enter a filter value that did not yet exist (you do not need to specify the name of the implementation), the system takes you to the transaction for implementing Business Add- Ins. You can also use transaction SE19, as usual.

The assignment of the extendible attribute is subject to the following restrictions:

The domain to which the extendible filter type refers must have the following properties:

1· The domain is linked to a cross-client value table. This value table has exactly one key field which has the data element of the filter type as its field type.

2· The domain has a text table with two key fields. A key field has the filter type as its field type, and a key field is a language field. To mark a field as a text field, a field must exist in this table that contains the string 'TEXT' or 'TXT as a partial string. In the Dictionary, the text table must be assigned to the value table.

3· The delivery class of both tables must be "E" or "S".

All filter values that are created in the context of an extendible filter-dependent Business Add-In must not yet occur in the value table and are added to the value table when the data is saved.

Analogously, the values are removed from the value table when the implementation or the entire Business Add-In is deleted. The same applies to the text table.

Special Characteristics of Country-Specific Business Add-Ins

The standard system contains a Business Add-In which provides an interface for integrating additional postal checks of the address data through external tools. This Business Add-In is called Address-Check.

This example uses the data element INTCA (ISO code of the country). Since SAP recommends complying with the international ISO standard for country-specific queries, you should use the data element INTCA also for Business Add-Ins. The ISO code of a country key would be, for example, US instead of USA, or DE instead of BRD.

Before the Business Add-In is called from within the application program, you must determine the ISO code of the country by submitting a SELECT statement against table T005 (field INTCA).

Then you can pass the filter value as exporting parameter.
15.5

You can go through entire BADI COURSE HERE.


MySAP CRM business intelligence at work
CRM data administration in mysap and business intelligence

SAP ABAP Business Add-Ins Filter Dependent part two

This post is in continuation with SAP ABAP BUSINESS ADD INS WITH FILTER DEPENDENT and it is highly advisable to go through it first.

The filter value is declared using parameter flt_val and is preset in the list of parameters.

Calling a Filter-Dependent Business Add-In from an Application Program

The filter value is passed to the method as export parameter.

Report businessaddin.

class cl_exithandler definition load.

data flt type usa_land.

data exit type ref to if_ex_businessaddin.

data word(15) type c value 'Business Add-in'.

start-of-selection.

perform formatlist.

call method cl_exithandler=>get_instance

changing instance = exit.

write:/'Please click here'.

at line-selection.

new-page.

write:/ 'Original word: ',word.

call method exit->method

exporting

flt_val = flt.

Changing

parameter = word.

write:/ 'Changed word: ',word.

The subroutine formatlist looks like this:

form formatlist.

write:/'USA -> Conversion to upper case'.

flt = 'USA'.

hide flt.

write :/'Ireland -> Conversion to lower case'.

flt = 'Ireland'

hide flt.

write :/'Italy -> Conversion to...'

flt = 'Italy'.

hide flt.

endform.


In the next post i will be discussing the implementation of the BADI.

SAP CRM Business Transactions
 SAP CRM marketing Management Campaign
SAP CRM Internet sales Features

SAP ABAP Business Add-Ins Filter Dependent

The basics of this concept are discussed as BADI IMPLEMENTATION CONCEPTS and you can go through this before proceeding for this.

Business Add-Ins may be implemented depending on a specific filter value. If the standard allows for an enhancement for, for example, country-specific versions, it is likely that various partners will want to implement this enhancement Distinct implementations can then be created and activated according to country.

Enter a filter type when defining your enhancement (a country or industry sector, for example). All methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter. The application program provides the filter value to the enhancement method. The method then selects the active implementation for that value.

A description follows of how a filter-dependent Business Add-In works in the context of the string conversion example. In the following example, different implementations will be called using different filter values.

To define a filter-dependent Business Add-In, first create a normal Business Add-In and select the Filter checkbox.

Enter the data element you want as a filter type or select a filter type using the possible entries help. A filter type can be a data element or a structure. A data element must fulfill the following criteria:

1 · The data element's domain may contain a maximum of 30 characters and must be of type Character.

2 · The data element must 1). either have a search help with a search help parameter of the same type as the data element and this parameter must serve as both the import and export parameter or 2). the element's domain must have fixed domain values or a value table containing a column with the same type as the data element.

If need be, you can create such data elements yourself.

If you want to call the implementation of a Business Add-In depending not only on one filter value but on various values, you can enter the name of a structure into the Filter type field. The
structure can consist of several data elements that fulfull the above conditions for data elements.

Now create an interface with a method. Be aware that for each method you create in the interface of a filter-dependent enhancement, the appropriate filter value must be defined as the import parameter so that the application program can provide the filter value to the enhancement method. The method then selects the active implementation for that value.

This discussion will be continued in further posts.

You can access entire BADI COMPLETE COURSE here.

The previous post of the blog deals with SAP SMART FORMS CONCEPT in detail.

CRM Sales Cycle Management

SAP SMART FORMS Complete

Smart forms is very similar to SAP scripts . This is also a tool which is extensively used to creat layouts and then a separate print program is created.This print program is used to create the output internal table which in turn is thrown to the smart form where the field values are displayed .

SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
Here is the list of all related sap smart forms content placed for reference sake.


SAP SMART FORMS A BRIEF DISCUSSION

SMART FORMS INTRODUCTION AND COMPARISON WITH SCRIPTS

CREATION OF SMART FORMS

CREATION OF SMART FORMS PART TWO


CREATION OF SMART FORMS PART THREE

If you are looking for SAP SCRIPTS complete lessons topic wise can be found by clicking it.

You can find in specific SCRIPT CONTROLS in detail here.

The previous post of the blog is regarding SAP ABAP SYNTAX FOR GENERATE.

Customer Relationship Management and mysap an introduction
CRM Management and sales and service strategy of mysap crm

SAP ABAP Syntax for Generate

Generate a screen

GENERATE DYNPRO h f e m ID g.

...MESSAGE F1 ...LINE F2 ...WORD F3.

Additions

1. ... OFFSET f4
2. ... TRACE-FILE f5

Effect

Generates the screen specified in the field g .Here, the source code is taken from the structure h and the internal tables f , e and m . The field h (screen header) should correspond to the structure D020S , the internal table f (field list) to the structure D021S , the internal table e (flow logic) to the structure D022S and the internal table m (match code information) to the structure D023S .

If a syntax error occurs, the error message is stored in the field f1 .If a syntax error occurs, the number of the incorrect line is stored in the field f2 .

By reading the return code value, you can determine whether this line refers to the flow logic or the field list.

If a syntax error occurs, the incorrect word is stored in the field f3 .

The return code value is set as follows:

SY-SUBRC = 0 The screen was generated.

SY-SUBRC <> 0 The screen could not be generated.

SY_SUBRC = 4 The error is in the flow logic.

SY-SUBRC = 8 The error is in the field list.

Addition 1

... OFFSET f4

Effect

If a syntax error occurs, the position of the incorrect word is output in this field.

Addition 2

... TRACE-FILE f5

Effect

Stores performance data in this file. This addition automatically switches on the trace mode.


Here you can try learning SAP ABAP SYNTAX FOR FREE KEY WORD.

The previous topic here is SAP ABAP BADI IMPLEMENTATION USING FORMULA BAR.

You like this information and would like to get updates.

Organizational Challenges with crm and mysap crm solutions
My sap crm and marketing planning

ABAP BADI IMPLEMENTATION part two

Earlier i covered BADI IMPLEMENTATION and this is in continuation with that.Here we are going to learn BADI implementation using Formula Bar.You can use the Formula Builder to implement methods for Business Add-Ins without writing a single line of ABAP code. The methods are implemented by means of so called formulas.

This type of implementation does not require you to have programming knowledge. However, the functions it offers are more restricted than if you implement a method by writing ABAP code. If the
range of functions provided by the Formula Builder is not sufficient, you can change the implementation type of the method at any time.

A formula can consist of the following steps:

1 · Condition

You define a Boolean formula expression whose result can be true or false. This formula expression is a logical condition based on the importing and changing parameters of the method. Depending on whether the condition is true or false, the system triggers different steps. If you do not specify a dependent step for one of these two possibilities, the system continues with the next superior step.

2 · Substitution

The system replaces the value of a specific parameter with another value which you define as a constant value or by means of a ma thematic formula. Substitution is only possible if the method contains changing, exporting or returning parameters.

3 · Message

The system issues a message. All messages issued are collected in a log table. You define the message variables as constant values or by means of ma thematic formulas. The system can only issue a message if you created a log table during method definition.

4 · Exception

The system exits the method. No further steps are executed, and the application program continues in accordance with the exception defined. You can additionally display a message whose variables you define as constant values or by means of ma thematic formulas. An exception can only be triggered if the method contains exceptions.

A formula editor is available which you can use to enter formula expressions. After starting the formula editor, you can display information on how to use it by choosing the pushbutton next to the status display (traffic light).

Activities:

To implement a method as a formula, choose the Formula implementation type on the Interface tab.

Double-clicking the method name takes to to the Formula Builder: BadI Implementation screen.

You can change the implementation type of the method on the Interface tab. You can implement a method both using a formula and using ABAP code. At the runtime of the application program, the system executes the implementation type currently chosen.

You create the necessary steps in the left section of the screen. To do this, choose (Create) and then select the appropriate step type from the dropdown list. Using the other icons available or the context menu (which you can call by clicking the right mouse button), you then determine the arrangement and the descriptions of the steps. You can also copy steps to use them as templates for other steps, or you can delete individual steps.

To specify the parameters for the individual steps, double-click the corresponding entry in the left section of the screen. You then enter the data required in the right section of the screen.

Formulas are transported automatically.

Here you can go through the entire list of BADI related topics with in depth analysis.

The previous post is regarding SAP BW architecture and it will be helpful for a abap programmer to expand his base.


MySAP CRM System architecture and design
MySAP CRM architecture and E procurement introduction

SAP BW Architecture

BW is an end-to-end data warehousing solution that uses preexisting SAP technologies. BW is built on the Basis 3-tier architecture and coded in the ABAP (Advanced Business Application Programming) language. It uses ALE (Application Link Enabling) and BAPI (Business Application Programming Interface) to link BW with SAP systems and non-SAP systems.
The top layer is the reporting environment. It can be BW Business Explorer (BEx) or a third-party reporting tool. BEx consists of two components:
    • BEx Analyzer
    • BEx Browser
    BEx Analyzer is Microsoft Excel with a BW add-in. Thanks to its easy-to-use graphical interface, it allows users to create queries without coding SQL statements. BEx Browser works much like an information center, allowing users to organize and access all kinds of information. Third-party reporting tools connect with BW OLAP Processor through ODBO (OLE DB for OLAP).
  1. The middle layer, BW Server, carries out three tasks:
    • Administering the BW system
    • Storing data
    • Retrieving data according to users' requests
      We will detail BW Server's components next.
  2. The bottom layer consists of source systems, which can be R/3 systems, BW systems, flat files, and other systems. If the source systems are SAP systems, an SAP component called Plug-In must be installed in the source systems. The Plug-In contains extractors. An extractor is a set of ABAP programs, database tables, and other objects that BW uses to extract data from the SAP systems. BW connects with SAP systems (R/3 or BW) and flat files via ALE; it connects with non-SAP systems via BAPI.
    The middle-layer BW Server consists of the following components:
    • Administrator Workbench, including BW Scheduler and BW Monitor
    • Metadata Repository and Metadata Manager
    • Staging Engine
    • PSA (Persistent Staging Area)
    • ODS (Operational Data Store) Objects
    • InfoCubes
    • Data Manager
    • OLAP Processor
    • BDS (Business Document Services)
    • User Roles
The previous post is regarding the data warehousing introduction.

SAP CRM Business Transactions
 SAP CRM marketing Management Campaign

Data warehousing sap bw introduction

Hi every one ,This blog would like to extend its base.Earlier we have written only ABAP focused posts.  Now it will be extended to to all SAP concepts like xi,net weaver,bw,basis,sd,fi/co. Hope you do enjoy learning. ABAP Programmer will be more comfortable and authoritative in his job and position once they now at least basics of all concepts of SAP TREE. What do you say ? Let me know in comments ? Let us start with SAP BUSINESS WARE HOUSING and we will start with what is data warehousing first.

INTRODUCTION TO WAREHOUSING CONCEPT
In data extraction, we move data out of source systems, such as an SAP R/3 system. The challenge during this step is to identify the right data. A good knowledge of the source systems is absolutely necessary to accomplish this task.
In data transfer, we move a large amount of data regularly from different source systems to the data warehouse. Here the challenges are to plan a realistic schedule and to have reliable and fast networks.
In data transformation, we format data so that it can be represented consistently in the data warehouse. For example, we might need to convert an entity with multiple names (such as AT&T, ATT, or Bell) into an entity with a single name (such as AT&T). The original data might reside in different databases using different data types, or in different file formats in different file systems. Some are case sensitive; others may be case insensitive.
In data loading, we load data into the fact tables correctly and quickly. The challenge at this step is to develop a robust error-handling procedure.
ETTL is a complex and time-consuming task. Any error can jeopardize data quality, which directly affects business decision making. Because of this fact and for other reasons, most data warehousing projects experience difficulties finishing on time or on budget.
To get a feeling for the challenges involved in ETTL, let's study SAP R/3 as an example. SAP R/3 is a leading ERP (Enterprise Resources Planning) system. According to SAP, the SAP R/3 developer, as of October 2000, some 30,000 SAP R/3 systems were installed worldwide that had 10 million users. SAP R/3 includes several modules, such as SD (sales and distribution), MM (materials management), PP (production planning), FI (financial accounting), and HR (human resources). Basically, you can use SAP R/3 to run your entire business.
SAP R/3's rich business functionality leads to a complex database design. In fact, this system has approximately 10,000 database tables. In addition to the complexity of the relations among these tables, the tables and their columns sometimes don't even have explicit English descriptions. For many years, using the SAP R/3 data for business decision support had been a constant problem.
Recognizing this problem, SAP decided to develop a data warehousing solution to help its customers. The result is SAP Business Information Warehouse, or BW. Since the announcement of its launch in June 1997, BW has drawn intense interest. According to SAP, as of October 2000, more than 1000 SAP BW systems were installed worldwide.

The previous post is regarding sap abap syntax for FREE and you can have a look at it if you are interested.


SAP Solution Manager Overview
People Centric SAP CRM Introduction
CRM Technical Infrastructure

ABAP Syntax for FREE

Basic form

FREE f.

Effect

Like CLEAR f , FREE f resets any data object f to the correct initial value for its type.

In contrast to CLEAR , however, FREE also releases any resources connected with the data object f . This may be relevant with internal tables, structures with tabular components as well as table work areas (created with TABLES).

After FREE f , you can address the data object f again at any time, but this may involve reallocating resources.

Note

1. If f is an internal table with a header line, the FREE f statement refers to the table body, but the CLEAR f statement refers to the header line.
2. Performance : The runtime required to execute the FREE statement is about 5 msn (standardized microseconds).

FREE - Release an area in ABAP/4 memory

FREE MEMORY.

Addition

... ID key

Effect

Releases an area in ABAP/4 memory previously defined with EXPORT TO MEMORY , i.e. an additional IMPORT ... FROM MEMORY sets the return code value of SY-SUBRC to 4.

Note

FREE MEMORY deletes the entire ABAP/4 memory , including data exported with EXPORT TO MEMORY ID key .

Addition

... ID key

Effect

Releases only the ABAP/4 memory for the ID key .

FREE - Release memory occupied by an external object

FREE OBJECT obj.

Effect

Releases the memory needed for object obj . The object cannot be processed afterwards.The return code value is set as follows:

SY-SUBRC = 0 Object was released successfully.
SY-SUBRC = 1 Error during communication with SAPGUI .
SY-SUBRC = 2 Error during function call in SAPGUI .

The OLE function modules are only implemented in Windows.

FREE OBJECT

Example

Release an EXCEL object:

INCLUDE OLE2INCL.
DATA EXCEL TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'Excel.Application'.
FREE OBJECT EXCEL.

68.4

Check the syntax for sap abap FORMAT PART THREE HERE.

If you are looking for ABAP alv report sample code for hierarchical report sample code check here.

Incentives and commission management in sales using CRM
CRM Web interaction Center Overview
CRM Interaction Center Agent Perform
CRM Technical Architecture

ALV HIRARCHIAL VIEWER Report Sample Code

****EXE PROGRAM-****
REPORT ZREPORT .

***TABLE WORK AREA****
TABLES:KNA1,VBAK.
***INTERNAL TABLE***
DATA:ITAB TYPE VBAK OCCURS 0,
****LOGIC FOR CUTOM CONTROL OF SCREEN 100 ****

CONTAINER TYPE SCRFNAME VALUE 'LVCONTROL',

CUST TYPE REF TO CL_GUI_CUSTOM_CONTAINER,

TREE TYPE REF TO CL_GUI_ALV_TREE_SIMPLE,


CL_GUI_ALV_TREE_SIMPLE,

FCAT TYPE LVC_T_FCAT,

***DECLARE FOR THE INTERNL TABLE BODY AND WORK AREA***
SORT_B TYPE LVC_T_SORT,

SORT_W TYPE LVC_S_SORT.

CALL SCREEN 100.

FORM COL_HEAD.
***CALL FUNCTION LVC_FIELDCATLOG_MERGE'
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'VBAK'

CHANGING
ct_fieldcat = FCAT.
ENDFORM.

***SUBROUTINE FOR OUTPUT
FORM OUTPUT.
SELECT * FROM VBAK INTO TABLE ITAB WHERE KUNNR = KNA1-KUNNR.
ENDFORM.

****SUBROUTINE SORTING****

FORM SORT.
****FIRST COLUM HEAD
SORT_W-SPOS = 1.
SORT_W-FIELDNAME = 'VBELN'.
APPEND SORT_W TO SORT_B.
***SECOND COLUMN HEAD
SORT_W-SPOS = 2.
SORT_W-FIELDNAME = 'ERDAT'.
APPEND SORT_W TO SORT_B.
***THIRD COLUMN HEAD
SORT_W-SPOS = 3.
SORT_W-FIELDNAME = 'ERNAM'.
APPEND SORT_W TO SORT_B.
***FOURTH COLUMN HEAD
SORT_W-SPOS = 4.
SORT_W-FIELDNAME = 'NETWR'.
APPEND SORT_W TO SORT_B.

ENDFORM.



*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
****LOGIC FOR DISPLAY AND EXIT**
CASE SY-UCOMM.
WHEN 'DISPLAY'.
****PERFORM FOR CALLSUB
PERFORM CALLSUB.

WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
endmodule. " USER_COMMAND_0100 INPUT
****SUBROUTINE FOR THE TO CALL PREVIESLY DEFINED SUBROTINES***
FORM CALLSUB.

PERFORM COL_HEAD.

PERFORM OUTPUT.

PERFORM SORT.
****LOGIC FOR DISPLAY THE LOCATION***
IF CUST IS INITIAL.

CREATE OBJECT CUST

EXPORTING

CONTAINER_NAME = CONTAINER.

CREATE OBJECT TREE

EXPORTING

I_PARENT = CUST.

CALL METHOD TREE->SET_TABLE_FOR_FIRST_DISPLAY

CHANGING
IT_OUTTAB = ITAB

IT_FIELDCATALOG = FCAT

IT_SORT = SORT_B.

ENDIF.

The previous post has covered the aspect of BADI IMPLEMENTATION at the same blog.

RELATED POSTS

ALV INTERACTIVE REPORT SAMPLE CODE
INTERACTIVE REPORT SAMPLE CODE 2
ALV SAMPLE CODE OUTPUT TO EXCEL SHEET
ALV LIST OBJECT ORIENTED STYLE

ABAP BADI IMPLEMENTATION

This can be taken like a continuation post for ABAP BADI DEFINITION.

A list of the Business Add-Ins present in your system can be found either in the IMG or in the component hierarchy. The enhancements' names and corresponding documentation should help you decide which add-in you want to create an implementation for. During implementation creation, a class for implementing the enhancement's interface is also created. Implementations are discrete transport objects and lie within the namespace of the person or organization implementing them.

In order to create an implementation for the string conversion example, the add-in (in this case,the interface's method) needs to be filled with logic that converts the string. This logic will be run through every time the add-in is called from the application program.

To create an implementation, proceed as follows:

1. Choose ABAP Workbench ® Utilities ® Business Add-Ins (transaction SE19) from the SAP menu or double-click on the corresponding activity in the Implementation Guide.

2. Enter a name for the implementation and choose Create.

3. Enter the name of the add-in you want to create an implementation for in the dialog box that appears.

4. Enter a short text describing your implementation on the following screen.

5. Choose the Interface tab.

6. Choose ABAP Code as the implementation type.

Besides ABAP Code, there is also the Formula option. If you choose Formula, the content of a method is determined using the Formula Builder. For more information on this, see Implementing Methods Using the Formula Builder.

7. Navigate to the Class Builder by double-clicking the method. You must first enter a package before the Class Builder is displayed.

8. Insert the desired source code for the implementation between the method if_ex_businessaddin~method. and endmethod. statements automatically provided to you by the system.

Enter the statement translate parameter to upper case. for the string conversion example.

9. Save your entries and return to the Change Implementation screen.

10. Choose Activate. You may now use this implementation when the application program is executed.

Numerous implementations may exist for a Business Add-In that cannot be used on a multiple basis. However, only one implementation can be active for these kinds of Business Add-Ins at any one time.

What is also important is that you must declare the instance generation of the implementing class (Attributes tab) as public and not as private or even abstract. If you do this, the system will return short dumps at runtime.

If you are interested in abap dictionary try this list of complete series of abap dictionary.

Mobile Scenarios in SAP CRM 
Connecting Mobile Clients to SAP CRM
Administering Sites for Mobile Users in CRM
CRM Middle ware for Mobile Replication