Application Controller saves you time in your daily business and in the maintenance of your applications. Replace your logic without having to change the implementation by simply adjusting it in Customizing.
- Object management and control on singleton via customizing
- Message Handler
- Import via abapGit
- start Transaction code ZAPPL_FIRST_INSTALL
Classes are created dynamically using interfaces
- Call solely via references to interfaces (no reference to the class necessary)
- see [
customizing
](## Customizing).
DATA: lo_demo TYPE REF TO zif_appl_demo.
**Creation object*
lo_demo ?= zcl_appl_cntl=>get_single_obj( 'DEMO_APPL' ).
**Call any method*
call method lo_demo->run( ).
DATA: lo_appl_message TYPE REF TO zif_appl_message.
**Creation object*
lo_appl_message = zcl_appl_cntl=>get_appl_message( ).
**Check error
lo_appl_message->check_error( ).
**Output messages in modal dialogue window
lo_appl_message->->show_messages('M' ).
tables
object_identifikation = lt_obj_key
exeptions
error = 1
warning = 2
others = 3.
if sy-subrc ne 0.
o_appl_message->add_message(
EXPORTING
im_mstyp = sy-msgty
im_msgid = sy-msgid
im_msgno = sy-msgno
im_msgv1 = sy-msgv1
im_msgv2 = sy-msgv2
im_msgv3 = sy-msgv3
im_msgv4 = sy-msgv4.
).
endif.
CALL METHOD o_appl_message->add_message2( ls_return ).
* or
o_appl_message->add_message2( ls_return ).
o_appl_message->add_message(
EXPORTING
im_mstyp = 'S'
im_msgid = 'ZAPPL_MESSAGE'
im_msgno = 001 ).
IF 1 = 2.
* for where-used list
MESSAGE s001(zappl_message).
* This is a success message.
ENDIF.
Database access can be realised via own classes.
The interfaces ZIF_APPL_OBJECT (application object) and ZIF_APPL_OBJECT_DB (DB Object) are to be used.
Class ZCL_APPL_EXAMPLE_DB, for example, can be used as a copy template.
ZAPPL_OBJ_TYPES