Functionality This function module writes the log header data specified in the HEADERstructure to the local memory. When the same object and sub-object are called repeatedly the data isoverwritten. Any parameters may be deleted. You can check this with theflag UPDATE_OR_INSERT. Example Example call: DATA: BEGIN OF HEADER_DATA. INCLUDE STRUCTURE BALHDRI. DATA: END OF HEADER_DATA, UPDA_OR_INS(1) TYPE C. ... CALL FUNCTION 'APPL_LOG_WRITE_HEADER' EXPORTING HEADER = HEADER_DATA IMPORTING UPDATE_OR_INSERT = UPDA_OR_INS EXCEPTIONS OBJECT_NOT_FOUND = 01 SUBOBJECT_NOT_FOUND = 02. Notes
- This function module does not have to be called in order to enter a log
or collect messages. If one of the function modules for creating messages is called, withoutheader data for the affected object being written explicitlybeforehand, the header data is written implicitly. The structure HEADERis then filled from system fields.
- Note that when entering logs or collecting messages object and
sub-object are always interpreted as keys. Therefore you cannot enterlogs for various external numbers simultaneously for one object andsub-object. This can only be done in sequence, by writing the log foran external number with the function moduleAPPL_LOG_WRITE_DB> to the database and theninitializing the local memory with the function moduleAPPL_LOG_INIT>. INCLUDE 'APPL_LOG_FU_HINT_OBJ_SUBOBJ' OBJECT DOKU ID TXDescription This parameter displays whether the log header data was updated orinserted. Value range The following return values are possible: 'U',,The date was updated (Update) 'I',,The data was inserted (Insert) Description The log header data is transferred in this structure. You can specify object, sub-object and external number for which thelog should be created. You can only edit one log per object/sub-object(see note in the function module documentation). If you do not specifyobject and sub-object the last current object and sub-object are used. The structure also contains information on when (date and time) and how(user name, transaction code, program name) the event to be loggedoccurred. You can store more information in two ways:
- Text module
You can specify the name of a text module. If requested the contents ofthis text module will be displayed when analyzing the logs. The text module must be created as a text of the document class 'Textin dialog' with the Document maintenance transaction>.It can contain any number of parameters, whose names must be enclosedin two '&' characters in the text. The name of a parameter can be up toten characters long. When displayed the parameters are replaced withthe parameter values created with the function moduleAPPL_LOG_WRITE_LOG_PARAMETERS>. Thedefault message parameters are also available.
- User exit
Altenatively you can specify a form routine instead of a text module,called instead of the text display. In this case you must also specifythe name of the program that contains the form routine. When an internal table is called the form routine is transferred withthe parameters. The internal table has the structure SPAR and containsboth the parameters transferred in the table and the four defaultparameters. You can also specify an expiry date and set a flag to indicate whetherdeletion is allowed before the date or not.Value range The structure contains the following fields: OBJECT>,,Object name SUBOBJECT>,,Sub-object name EXTNUMBER>,,External number ALDATE>,,Date ALTIME>,,Time ALUSER>,,User name ALTCODE>,,Transaction code ALPROG>,,Program name ALTEXT>,,Name of text module USEREXITP>,,Program name for user exit ,,(if ALTEXT = SPACE) USEREXITF>,,Form routine name for user exit ,,(if ALTEXT = SPACE) ALDATE_DEL>,,Expiry date DEL_BEFORE>,,Flag whether deletion before theexpiry date allowed ,,('X' = Deletion before expiry not permitted, ,, ' ' = Deletion before expiry permitted)Default INCLUDE 'FU_PAR_OBL' OBJECT DOKU ID TX
|