Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
philipdavy
Contributor
Blog Series :

  1. ABAP Lesser Known Heroes Series - Group Column : Part 1

  2. ABAP Lesser Known Heroes Series – Value Operator : Part 2 | SAP Blogs

  3. ABAP Lesser Known Heroes Series – TYPE RANGE OF : Part 3 | SAP Blogs


The objective of this series is to introduce to the features( new or old ) which are lesser known but helpful . Then the obvious question comes, how could one define the lesser known or used topics . One topic known to someone does not necessarily have to be known for others and vice versa. Everyone has varied years of experience, different kind of exposures and skills.  So my strategy is as below,

  1. I am no expert , but still based on my experience and intuitions .

  2. Discussing with the fellow colleagues .

  3. How often a topic is discussed /explained in scn.sap,   if not discussed sufficiently , a yes to my post series.

  4. Availability of posts related to a topic , if not available with sufficient information , a yes to my post series .


 

Please pardon me  if you already know some of these topics.

Group Column in SE11 

An average ABAP developer will spend a good amount of time in SE11. But chances are very high that they may have noticed ( or not ) but given little importance to this column.

 


Figure 1: Group Column in SE11


So what is this column basically about ?  When we have a structure which has to be  included repeatedly in another structure , we could group the includes using meaningful names.


Figure 2: Include in Structure


For example , we have a product which costs different price through out the year based on season and if we need to develop a report based on this assumption
REPORT ZSAMPLE_INCL_GROUP.


CLASS demo DEFINITION.
PUBLIC SECTION.
CLASS-METHODS main.
ENDCLASS.

CLASS demo IMPLEMENTATION.
METHOD main.
DATA prod_det TYPE zprod_det_seas.
prod_det-summer-price = '15.45'.
prod_det-summer-product = '63664636' .
prod_det-spring-price = '215.45'.
prod_det-spring-product = '63664637'.
prod_det-winter-price = '120.45'.
prod_det-winter-product = '63664638'.
prod_det-autumn-price = '151.45'.
prod_det-autumn-product = '63664639'.
cl_demo_output=>display( prod_det ).
ENDMETHOD.
ENDCLASS.

START-OF-SELECTION.
demo=>main( ).

Figure 3 : Code Example with Group Column

More information about grouping in SAP Documentation 

https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenddic_include_structure.htm

Applicability

In the above example we have only two fields in the structure with 4 different groups. Think about a report where the months of few years happen to be as columns. Suppose 04/2020 - 04/2022, then there has to be 36 Columns.  In this case we just need to create an include with a group name for each year with the months .

 

Note: When you have more ideas regarding lesser known things but which are helpful in ABAP , you can shed me more light.

 
4 Comments