SAPBRAINSONLINE.com
SAP Training, Tutorials, Certification and Jobs Materials
HOME TUTORIALS ARTICLES PROJECTS JOBS TOOLS REFERENCES CHAT FORUM GUESTS

Related 10 ABAP SyntaxTutorials
LOOP (ABAP Keyword)
ENDPROVIDE (ABAP Keyword)
TYPES ( SAP ABAP Keyword)
INPUT (ABAP keyword)
FIELDS (ABAP keyword)
UPDATE ( SAP ABAP Keyword)
ELSEIF (ABAP Keyword)
SET ( SAP ABAP Keyword)
NEW-LINE (ABAP Keyword)
WHILE ( SAP ABAP Keyword)

  CONTROLS (ABAP Keyword)

A D V E R T I S E M E N T
home--> ABAP --> ABAP Syntax
CONTROLS (ABAP Keyword) introduction & Details
CONTROLS


Basic form
CONTROLS ctrl TYPE ctrl_type.

Effect
Defines a control

A control defines an ABAP/4 runtime object which displays data in a particular visual format, depending on the type. It offers the user standard processing options.

At present, the following types of control are supported:


ABAP/4 table control


Basic form
CONTROLS ctrl TYPE TABLEVIEW USING SCREEN scr.

Effect
Creates a table control ctrl of the type TABLEVIEW . The reference screen for the initialization is the screen scr .

Area of use

The table control (referred to here as TC ) facilitates the display and entry of one-line, tabular data in dialog transactions.
The functional scope has been defined so that you can implement many typical set operations usually handled by an elementary STEP-LOOP with the standard methods of a TC .

Functional scope

Resizeable table grid for displaying and editing data.
Column width and column position modifiable by user and by program.
Storing and loading of user-specific column layout.
Selection column for line selection with color selection display.
Variable column headers as pushbuttons for column selection.
Simple selection, multiple selection, Select/deselect all.
Scrolling functions (horizontal and vertical) via scroll bar.
Fixing of any number of key columns.
Setting attributes for each cell at runtime.

Programming

The data exchange between the application and the SAPgui is achieved with a STEP-LOOP , i.e. an ABAP/4 module is called to transfer data for each page.

Example
Processing without an internal table


PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL ctrl.
MODULE ctrl_pbo.
ENDLOOP.

PROCESS AFTER INPUT.
LOOP WITH CONTROL ctrl.
MODULE ctrl_pai.
ENDLOOP.


In this case, the module ctrl_pbo OUTPUT is called once for each output line before the screen is displayed, in order to fill the output fields.
After the user has entered data on the screen, the module ctrl_pai INPUT is executed to check the input and copy the new contents.

Example
Processing with an internal table


PROCESS BEFORE OUTPUT.
LOOP AT itab WITH CONTROL ctrl CURSOR ctrl-CURRENT_LINE.
ENDLOOP.

PROCESS AFTER INPUT.
LOOP AT itab WITH CONTROL ctrl.
MODULE ctrl_pai.
ENDLOOP.


Here, the system fills the output fields before displaying the screen by reading the internal table itab .
When the user has entered data, the module ctrl_pai INPUT must be executed to check the input and to refresh the contents of the internal table.
Vertical scrolling with the scroll bar is followed by the event PAI for the displayed page. Then, cntl-TOP_LINE is increased and PBO is processed for the next page.
Program-driven scrolling and the most of the functionality described above is achieved by manipulating the control attributes.
Attributes

The CONTROLS statement creates a complex data object of the type CXTAB_CONTROL with the name of the control.

You maintain the initial values in the Screen Painter and assign the screen with the initial values for a control using the addition USING SCREEN .

Initialization is achieved automatically in the "1st access to the control" (setting or reading values).

You can use the customizing button (in the top right corner) to save the current setting (column widths and column positions) and use it as the initial value for the next call.

All the initial values can be overwritten by the program using the MOVE ... TO TC attributes statement.

Example
ctrl-fixed_cols = 2. "2 columns fixed
The contents of the SCREEN structure (table Cols ) acts as a default value for each line of this column, but within LOOP ... ENDLOOP (flow logic), it can be overwritten by LOOP AT SCREEN / MODIFY SCREEN .

With the attributes listed below, you should be aware of the following:
LINES This must always be set as the only attribute if you are not using LOOP AT itab .
TOP_LINE Also set by the SAPgui through the vertical scroll bar slider.
CURRENT_LINE Read only, set by the system ( TOP_LINE + SY-STEPL - 1 )
LEFT_COL Also set by the SAPgui through the horizontal scroll bar slider.
COLS-INDEX Also set by the SAPgui after moving columns.
COLS-SELECTED Also set by the SAPgui after column selection.
When displaying the control, the system uses the current contents when the event DCO occurs (i.e. after all PBO modules have run). The modified values (brought about by the user making changes on the screen) are set immediately after DCI (i.e. before the first PAI module runs).

Email this Tutorial to my friend
Your Mail ID :
Friend mail ID:
Also send to me

Latest Added Tutorials

SAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA
SAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA
Experiense Required for this job: 6-9 years exp
Job Locations: Mumbai
Apply for this SAP Job in INDIA
SAP ABAP Professionals - SAP JOBS INDIA
SAP ABAP Professionals - SAP JOBS INDIA
Experiense Required for this job: 5 - 7 years exp
Job Locations: Bengaluru / Bangalore, Chennai, Others
Apply for this SAP Job in INDIA
Junior SAP Consultants - SAP JOBS INDIA
Junior SAP Consultants - SAP JOBS INDIA
Experiense Required for this job: 0-5 years exp
Job Locations: Bengaluru/Bangalore
Apply for this SAP Job in INDIA
SAP Plant Maintanence with ETM module - SAP JOBS INDIA
SAP Plant Maintanence with ETM module - SAP JOBS INDIA
Experiense Required for this job: 2-7 years exp
Job Locations: Pune
Apply for this SAP Job in INDIA
SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA
SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA
Experiense Required for this job: 3-8 years exp
Job Locations: Gurgaon, Kolkata
Apply for this SAP Job in INDIA
Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA
Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA
Experiense Required for this job: 5-9 years exp
Job Locations: Bengaluru/Bangalore, Chennai, Gurgaon
Apply for this SAP Job in INDIA
SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA
SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA
Experiense Required for this job: 5-8 years exp
Job Locations: Bengaluru/Bangalore
Apply for this SAP Job in INDIA
SAP BPC/EPM - SAP JOBS INDIA
SAP BPC/EPM - SAP JOBS INDIA
Experiense Required for this job: 4-9 years exp
Job Locations: Bengaluru/Bangalore, Hyderabad / Secunderabad, Pune
Apply for this SAP Job in INDIA
LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA
LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA
Experiense Required for this job: 3-8 years exp
Job Locations: Bengaluru/Bangalore, Chennai
Apply for this SAP Job in INDIA
SAP FICO Consultant - SAP JOBS INDIA
SAP FICO Consultant - SAP JOBS INDIA
Experiense Required for this job: 5-10 years exp
Job Locations: Hyderabad / Secunderabad
Apply for this SAP Job in INDIA

Most readed 5 Tutorials

List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes
WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details.
FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components.
List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module.
Report Programming in HR | SAP PDF study material )
This document is intended for all persons who would like to program their own reports in SAP HR or customize standard ones. The documentation is not intended to be an introduction to programming. It contains just the special features that form part of programming in SAP HR.A general knowledge of ABAP programming and HR applications is a prerequisite. This can be acquired by reading the relevant documentation and attending the courses.This document provides information which enables programmers to become acquainted with the special features of programming in HR.
  

CATEGORIES

  ABAP
  Advanced ABAP
  SAP JOBS
  SAP Functional Modules
  SAP R/3
  SAP NetWeaver
   
SAP Technical PDF Tutorials

ABAP
DICTIONARY
INTERNAL TABLES
ALV Reports
SAPSCRIPTS
SMARTFORMS
LSMW
BDC
ALE
IDOC
USER EXITS
TRANSPORTING
ITS


SAP Functional PDF  Tutorials

FI (Financial)
CO (Controlling)
HR (Human Resource)
LO (Logistics)
MM (Materials Management)
PP (Production Planning)
QM (Quality Management)
SD (Sales and Distribution)
TR (Treasury and cash)
WM (Warehouse Management)
PS (project Systems)
PM (plant Maintenance)
CA (Cross Application)


SAP References

transaction codes
System Fields
Function Modules
SAP TABLES
code optimization


TOOLS

SQL Trace tool
Runtime Analysis
LSMW
ABAP Query
CTS


SAP Emerging Technologies

SAP Advanced Planner and Optimizer (APO)
SAP Business Information Warehouse
(BW)

SAP Business Intelligence
(BI)

SAP Customer Relationship Management
(CRM)
SAP Enterprise Portal (EP)
SAP Exchange Infrastructure
(XI)

Human Resource Management Systems
(HRMS)
SAP Manufacturing
SAP Master Data Management
(MDM)

SAP Knowledge Warehouse
(KW)

SAP Product Lifecycle Management
(PLM)

SAP Service and Asset Management

SAP Strategic Enterprise Management
(SEM)

SAP Solutions for mobile business

SAP Solution Manager

SAP Training and Event Management
(TEM)
SAP Web Application Server
(Web AS)
SAP xApps



Jobs in Kerala

 
Custom Search
  site contact sapbrain.support@gmail.com All of the product names here are trademarks of their respective companies. The site www.sapbrainsonline.com no way affiliated with SAP AG. Use information on this site at your own risk. Information furnished in the site is collected from various sites and posts from users. This site does not host any files on its server. If any compliants about the posts please contact us at sapbrain.support@gmail.com, we are ready to move the posts.
Complete SAP Study materials | SAP JOBS | PDF Tutorials web counter