Professional Documents
Culture Documents
Creation of Sets in SAP-ABAP, How To Read Them INI SAP-ABAP Reports PDF
Creation of Sets in SAP-ABAP, How To Read Them INI SAP-ABAP Reports PDF
Applies to:
This Article is intended for all those ABAPers who are interested in creating SAP-SETS and use them in
ABAP. For more information, visit the ABAP homepage.
Summary:
Learn here how to use SETS as per the client requirement. This article will show you how to create SETS,
and use them in sap ABAP reports
Author: Daljeet Singh Kohli
Company: Infosys Technologies limited
Created on: 24 November 2010
Author Bio
Daljeet Singh Kohli works for Infosys Technologies Limited on ABAP module of SAP.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
Table of Content
Overview: ............................................................................................................................................................ 3
Introduction to SETS: .......................................................................................................................................... 3
What is a Set? ................................................................................................................................................. 3
For Example: ................................................................................................................................................... 3
Advantages of Using Sets .................................................................................................................................. 9
Useful Transaction Codes .................................................................................................................................. 9
How to Read Sets in ABAP? .............................................................................................................................. 9
Example code for ABAPers. ............................................................................................................................... 9
Debugger Screen Values.................................................................................................................................. 10
Related Content ................................................................................................................................................ 12
Disclaimer and Liability Notice .......................................................................................................................... 13
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
Overview:
IF you as an ABAPer want to use SETS as per the client requirement. You can create SETS, and use them
in sap ABAP reports .
Introduction to SETS:
What is a Set?
Sets are flexible structures for Organizing hierarchies and quantities.
Sets can be used for Grouping values or giving value intervals in a set and several sets into a hierarchy
For Example:
In SAP Sales and Delivery, if the sales organization for a specific place are to be placed in different ways
we can use tjese SETS. Many a time, it is required to group these Sales Org to the types of customer .
In order to maintain such data, SAP has provided a methodology known as Sets.
Go to Transaction GS01
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
Now for entering the values inside the SET , We will follow the following screens.
After entering the values you can save the SET. Your SET Z_TEST1 has been created.
Now say, If u want to use the reference set . than enter the name of set Z**********. And follow the screen
shots
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
As below
Enter the name of the Reference Set , so that we are able to use the values , which already has been used
in the previous SET(Z_TEST1)
Press Enter and SAVE. New SET has been created.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
REPORT Z_TESTSETS.
IF SY-SUBRC EQ 0.
WRITE 'SUCCESS'.
ELSE.
WRITE 'ERROR'.
ENDIF.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
Output screen.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
Related Content
For more information, visit the ABAP homepage
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 13