Professional Documents
Culture Documents
ABAP Interview Questions
ABAP Interview Questions
the internal tables. The problem complexifies if a program has huge nested internal tables. How much ever
efficient data select routines are, data processing routines would be contributing significantly for the bad
performance. When analysed it would be revealed that the where condition that is used in inner loops expend a
significant amount of processing time. The idea is to avoid where conditions in the inner loops by maintaining the
loop indexes manually.
Field symbols are similar to pointers in C language, field symbols does not have any memory instead they will be
pointing to a memory location.
The concept of field symbols is very important in order to increase the performance of SAP applications, but
unethical use of field-symbols leads to application issues.
Field symbol name should always be within <>, example:.
Syntax for declaring a field symbol.
REPORT ZSAPN_FIELDSYMBOLS.
IF <FS_MARA> IS ASSIGNED.
**process field symbol
ENDIF.
Increase performance using field symbols in SAP ABAP
I belive there are always performance differences between reference variables(work area) and memory
pointing(field symbols), here I wants to add some proof for that
For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to
give some error message. You can declare that fields in the chain enchain so that only those fields will be input
enabled and all other fields will disabled.
Description - Generally in input screen, when the user gives the input and their is no record present in the
database, the user input is restricted by a error message. This error message disables the input screen and now
the user can not provide correct values in the input field as it is disabled by the error message. To overcome this
problem Chain And EndChain Statement is used in the Flow Logic of the screen where Input fields are validated.
CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
&----
*& Module modify_screenfields INPUT
&----
text
----
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
ENDMODULE. " modify_screenfields INPUT
Regards,
TMG
Introduction
Table Maintenance Generator (TMG) is a tool which is used to create equipment by which customized tables created
by end users can be changed as required, such as making an entry to that table, deleting an entry, modifying an
existing entry etc.
Table Maintenance generator can be created using transaction SE54 or SE11.
A table maintenance generator is used to create table maintenance program to add, modify or delete records in the
database tables. It is generated to maintain customizing data with these maintenance dialogs.
We can check the table maintenance dialog in SM30 or SE16. In SM30, We have display and maintain options. Display
option is used to view the table contents and maintain option is used to maintain the entries in the table.
Modify your SAP database table maintenance events, screen, interface and code.
Once you have created your basic SAP database table and then added a standard table maintenance to it you may
find that you want to change the functionality of it slightly. I.e. you may want to display a message when the data is
saved or prevent users from saving certain combinations of data.
If you required to have custom logic/custom validations in your already created table maintenance, you can use
events to implement custom requirements. Events in table maintenance allow developers to access and modify
predefined positions in the maintenance dialog which couldn’t be access using user flow logic modules. These event
modules are dynamically executed at table maintenance runtime. There are different types of events which executes
at different sections of the maintenence PAI and PBO runtime. For example, before saving the data, after saving the
data, before deleting, after deleting are few of the event types available.
Transaction Codes
10 After creating the header entries for the change task (E071)
11 After changing a key entry for the change task (E071K)
12 After changing the key entries for the change task (E071K)