Académique Documents
Professionnel Documents
Culture Documents
Admin (https://www.dev-workbench.com/sap-modules/administration/)
CA-DMS (https://www.dev-workbench.com/sap-modules/ca-dms/)
CS (https://www.dev-workbench.com/sap-modules/cs/) FI (https://www.dev-workbench.com/sap-modules/fi/)
LE (https://www.dev-workbench.com/sap-modules/le/)
MM-IM (https://www.dev-workbench.com/sap-modules/mm-im/)
MM-PUR (https://www.dev-workbench.com/sap-modules/mm-pur/)
PM (https://www.dev-workbench.com/sap-modules/pm/) PP (https://www.dev-workbench.com/sap-modules/pp/)
PS (https://www.dev-workbench.com/sap-modules/ps/) QM (https://www.dev-workbench.com/sap-modules/qm/)
SD (https://www.dev-workbench.com/sap-modules/sd/) WM (https://www.dev-workbench.com/sap-modules/wm/)
https://www.dev-workbench.com/blog/implementing-additional-checks-in-table-maintenance-dialogs/ 1/6
11/19/2018 Implementing Additional Checks in Table Maintenance Dialogs - SAP Developer Workbench
dev .wb
(https://www.dev-workbench.com/)
Warning: Parameter 2 to
qtranxf_postsFilter() expected to be a
reference, value given in
/www/htdocs/w01362c7/dev-
workbench.com/wp-includes/class-
Blog SAP Modules SAP Dictionary
wp-hook.php on line 298
Warning: Parameter 2 to
qtranxf_postsFilter() expected to be a
reference, value given in
/www/htdocs/w01362c7/dev-
workbench.com/wp-includes/class-
wp-hook.php on line 298
be enhanced with additional logic, for example to implement custom checks on data workbench.com/blog/tag/control-framework/) CPM
(https://www.dev-workbench.com/blog/tag/cpm/) Email
entered.
(https://www.dev-
(https://www.dev-workbench.com/blog/tag/river-
rde/) SAP Demo (https://www.dev-workbench.com/blog/tag/sap-
demo/) SAP ERP (https://www.dev-workbench.com/blog/tag/sap-
workbench.com/blog/tag/sap-img/) SAPUI5
(https://www.dev-workbench.com/blog/tag/sapui5/) Tables
(https://www.dev-
workbench.com/blog/tag/tables/)
Transport System (https://www.dev-
workbench.com/blog/tag/transport-system/) User Exit
(https://www.dev-workbench.com/blog/tag/user-exit/) User
Parameters (https://www.dev-workbench.com/blog/tag/user-
parameters/) User Status (https://www.dev-
workbench.com/blog/tag/user-status/)
(http://www.dev-workbench.com/blog/implementing-additional-checks-in-table-
maintenance-dialogs/how-to-call-the-events-screen/)
SAP ERP
How to call the events screen
Dictionary
You will get a popup informing you that you’re changing SAP data, which you can Authorization Objects (/sap-
safely ignore. In the list that is opened, you have to select which event you want to dictionary/authorization-object/)
use. Each event is tied to a certain point in the data maintenance process – if you’re Customer Exits (/sap-dictionary/customer-
exit/)
familiar with the hooks programming pattern, that’s exactly what it is.
Function Groups (/sap-dictionary/function-
Your next task will be to pick the correct event for the job you want to do. Since there group/)
are close to 40 different events available, it’s best to use the SAP documentation for Function Modules (/sap-
dictionary/function-module/)
extended table maintenance events
Message Classes (/sap-dictionary/message-
(https://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm),
class/)
which you can also access via the information button ( ). For my example, I want to Packages (/sap-dictionary/package/)
perform a check after data was entered. The correct event for this is 05. You also need
Programs (/sap-dictionary/program/)
to enter a form routine name. Click Save after you’ve entered your data (important!)
Transactions (/sap-dictionary/transaction/)
and click on the button in the Editor column afterwards.
Master Data
https://www.dev-workbench.com/blog/implementing-additional-checks-in-table-maintenance-dialogs/ 3/6
11/19/2018 Access
Implementing Additional Checks in Table Maintenance Dialogs - SAP ControlWorkbench
Developer List (https://www.dev-
workbench.com/sap-data/access-control-
list/)
Catalog (https://www.dev-
workbench.com/sap-data/catalog/)
Characteristic (https://www.dev-
workbench.com/sap-data/characteristic/)
Class (https://www.dev-
workbench.com/sap-data/class/)
Delivery (https://www.dev-
workbench.com/sap-data/delivery/)
Material Document (https://www.dev-
workbench.com/sap-data/material-
document/)
Notification (https://www.dev-
workbench.com/sap-data/notification/)
Purchasing Document (https://www.dev-
workbench.com/sap-data/purchasing-
document/)
(http://www.dev-workbench.com/blog/implementing-additional-checks-in-table- Sales Order (https://www.dev-
workbench.com/sap-data/sales-order/)
maintenance-dialogs/adding-a-new-event-implementation/)
Adding a new event implementation Selected Set (https://www.dev-
workbench.com/sap-data/selected-set/)
After you have added your include, you’re taken to the ABAP Editor. This is the place WBS Element (https://www.dev-
workbench.com/sap-data/wbs-element/)
where you can implement your custom check logic. Before I’m going into the details
SAP Modules (https://www.dev-
of the programming itself, let me explain which variables are available to work with workbench.com/sap-modules/)
the data in the table. SAP Data Objects (https://www.dev-
workbench.com/sap-data-objects/)
Interface variables to work with used data SAP Dictionary (https://www.dev-
workbench.com/sap-dictionary/)
The interface for these hooks is always the same. There’s a set of variables and
internal tables that let you work with the data in the table control. It’s documented
Warning: Parameter 2 to qtranxf_postsFilter()
for each event induvidually (such as for event 01
expected to be a reference, value given in
(https://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm)),
/www/htdocs/w01362c7/dev-
but the generally available variables are the following.
workbench.com/wp-includes/class-wp-
Internal table TOTAL hook.php on line 298
The internal table TOTAL contains the complete dataset that is held in the table you
are working with. Its structure is a combination of the base table structure and the
structure VIMTBFLAGS (http://www.dev-workbench.com/sap-
Recent Posts
dictionary/structure/vimtbflags/). This structure contains fields that indicate the How To Activate a Business Function in SAP
processing status of the table row. ERP (https://www.dev-
workbench.com/blog/activate-business-
Field symbols <ACTION> and <ACTION_TEXT> function-sap-erp/)
How To Become an SAP Consultant
Via these field symbols, you can access the processing status of the current table row
(https://www.dev-
of table TOTAL, which means they mark if the record was created, updated, or
workbench.com/blog/how-to-become-sap-
deleted. These field symbols should only be used for events that are called once for
consultant/)
each table entry, meaning that they are executed in a loop.
SAP: How to Find User Exits for
If you want to read the processing status of table rows manually, it’s better to use the Transactions (https://www.dev-
field VIM_ACT from the structure VIMTBFLAGS (http://www.dev- workbench.com/blog/sap-find-user-exits-
workbench.com/sap-dictionary/structure/vimtbflags/). <ACTION> indicates the transactions/)
processing status of the table itself. <ACTION_TEXT> is used if your underlying data How to Get a Free SAP Demo System
table has a text table attached, and indicates the processing status of the text table. (https://www.dev-
workbench.com/blog/get-free-sap-demo-
The following constants are available to check the processing status. system/)
Internal table EXTRACT
Archives
While the table TOTAL contains all of the data that is in the data table, EXTRACT is
July 2017 (https://www.dev-
the data subset that the user is currently working with. The exact contents of this
workbench.com/blog/2017/07/)
table depend on the function the user is currently executing within the SM30
February 2017 (https://www.dev-
(http://www.dev-workbench.com/sap-dictionary/transaction/sm30/) transaction. If
workbench.com/blog/2017/02/)
he is adding new lines, the table EXTRACT will contain only the newly entered lines,
April 2015 (https://www.dev-
while the table TOTAL will contain all old lines plus the new lines. The table
workbench.com/blog/2015/04/)
EXTRACT has exactly the same structure as the table TOTAL. More information on
August 2014 (https://www.dev-
table extracts can be found here: SAP documentation for table extracts
workbench.com/blog/2014/08/)
(http://help.sap.com/saphelp_scm700_ehp02/helpdata/en/4d/def73332846524e10000000a42189b/content.htm?
July 2014 (https://www.dev-
frameset=/en/4d/def9a132846524e10000000a42189b/frameset.htm¤t_toc=/en/f3/73672be560404587eeb9a63c086d0d/plain.htm&node_id=260).
workbench.com/blog/2014/07/)
Field symbols <XACT> and <XACT_TEXT> May 2014 (https://www.dev-
workbench.com/blog/2014/05/)
These field symbols work exactly in the same way as the <ACTION> and March 2014 (https://www.dev-
<ACTION_TEXT> ones, but for the EXTRACT table. They, too, should only be used workbench.com/blog/2014/03/)
with events that are called in a loop. February 2014 (https://www.dev-
workbench.com/blog/2014/02/)
Field symbol <STATUS>
June 2013 (https://www.dev-
This field symbol provides access to some general information. Especially important workbench.com/blog/2013/06/)
is the field <STATUS>-UPD_FLAG, which indicates if any data was changed in the April 2013 (https://www.dev-
(http://www.dev-workbench.com/blog/implementing-additional-checks-in-table-
maintenance-dialogs/variable-interface-for-extended-table-maintenance/)
Some of the available variables for extended table maintenance
https://www.dev-workbench.com/blog/implementing-additional-checks-in-table-maintenance-dialogs/ 5/6
These are the most important variables that
11/19/2018 are available
Implementing in the extended
Additional Checks in table
Table Maintenance Dialogs - SAP Developer Workbench
maintenance interface. There are a few more, but they are used only in special cases
or only in a few events. On the next page, I will show you how to use these variables
to implement a simple check on entered data.
ABAP (https://www.dev-workbench.com/blog/tag/abap/)
Tables (https://www.dev-workbench.com/blog/tag/tables/)
https://www.dev-workbench.com/blog/implementing-additional-checks-in-table-maintenance-dialogs/ 6/6