Hello SAP Experts,
Needs urgent help
what is the example of type group?
There are several Type Groups available in SAP. For example ‘ABAP’ and ’SLIS’ etc.
A Type Group is sort of like an INCLUDE program which you use to put all of your TYPES statements into, mostly it is used for reuse, so you define your TYPES there, and they can be included in any program, or class, and be used within. In simple terms, if we want to use some custom types in various programs then we need not define them separately, we can simply create a type group in ABAP dictionary and use that in our programs.
If we want to create our own type group go for SE11 and create the Type Group. To use them in program we use key word ‘TYPE-POOLS’.
Please Look at below example for your reference.
Let the type group abcde be created as follows in the ABAP Dictionary:
TYPES: BEGIN OF abcde_typ1,
col1(10) TYPE c,
col2 TYPE i,
END OF abcde_typ1.
TYPES abcde_typ2 TYPE p DECIMALS 2.
CONSTANTS abcde_twelve TYPE i VALUE 12.
This type group defines two data types abcde_typ1 and abcde_typ2, as well as a constant abcde_twelve with the value 12.
Any ABAP program can use this definition with the TYPE-POOLS statement:
DATA: dat1 TYPE abcde_typ1,
dat2 TYPE abcde_typ2 VALUE '1.23'.
WRITE: dat2, / abcde_twelve.
The output is:
Sign up for STechies
All the site contents are Copyright © www.stechies.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies. The site www.stechies.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
The content on this site may not be reproduced or redistributed without the express written permission of
www.stechies.com or the content authors.