Ansicht
Dokumentation
BAL_TP_CB_READ -
General Material Data CPI1466 during BackupThis documentation is copyright by SAP AG.
BAL_CALLBACK_READ
======================================================================
Purpose and event
This callback routine reads log display data, e.g. material short
text. The routine is called for each message and field defined as external in the field catalog. Read
the data buffered to avoid performance problems. You cannot prefetch or read the table of data to be read in one go because it is dynamic.
Definition
The display profile I_S_DISPLAY_PROFILE (structure
BAL_S_PROF) is passed in the log display (e.g. called with
BAL_DSP_LOG_DISPLAY). The callback routine is defined in the field
I_S_DISPLAY_PROFILE-CLBK_READ. It is called for all fields which have the attribute IS_EXTERN = X in the
field catalogs LEV1_FCAT, ..., LEV9_FCAT or MESS_FCAT.
Parameterization
FORM bal_callback_read
USING
i_s_info TYPE bal_s_cbrd
CHANGING
c_display_data
TYPE bal_s_show
c_context_header TYPE bal_s_cont
c_context_message TYPE bal_s_cont
c_field TYPE any.
...
ENDFORM.
The structure i_s_info specifies the field for which the callback routine was called (REF_TABLE and REF_FIELD). Put the contents of the field in c_field.
You need the other message data (e.g. material number to get material short text ), to fill c_field.
It is in c_display_data (contains displayable message and log header data), c_context_header (log header context) and c_context_message (message context).
==>Note
This CALLBACK routine is called at two events, which of them is in the field I_S_INFO-IS_MESSAGE:
1. I_S_INFO-IS_MESSAGE = ' ' ==> at tree creation
2. I_S_INFO-IS_MESSAGE = 'X' ==> when creating message list
The events are (normally) chronologically distinct: the tree is created when the log display appears, the message list when the user selects a set of messages in the tree.
This fact is used to optimize performance: only those fields in the structure c_display_data are filled which are needed at this event.
- ==>Example
When the tree is created, you do not need the message text. This would waste time. The message text is fetched when the user has selected e.g. 100 of perhaps 1.000 messages from the tree.
This affects the data in the structure c_display_data:
_S_INFO-IS_MESSAGE = ' '
When called from the tree, only those fields in c_display_data are sure to be filled which are in the field catalogs LEV1_FCAT to LEV9_FCAT.
I_S_INFO-IS_MESSAGE = 'X'
When called for the list, only those fields in c_display_data are sure to be filled which are in MESS_FCAT.
Bear this in mind when you use this callback routine.
Example program
The program SBAL_CALLBACK is an example and template.
You can e.g. select BAL_CALLBACK_READ in the selection screen of this program. You go to the debugger if:
- this callback routine is defined
- this callback routine is processed
You can also search for the string "BAL_CALLBACK_READ" in the program coding.
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 4406 Date: 20240601 Time: 234253 sap01-206 ( 56 ms )