Show TOC

Event 27: After Filling a GUID FieldLocate this document in the navigation structure

Use

This event occurs if the current table/view has a GUID and the GUID field has a new value.

A value can be entered by the New Entry or Copy functions. Even if a maintenance dialog is processed in the background, for example, when importing a BC Set or comparing tables, GUID fields are given new values.

Note

If a table field is a GUID field, it is not visible on the frontend.

The following activities are possible at event 27 after filling a GUID field:

  • Fill other tables in the background

  • Link the new GUID to other objects

  • Check whether the field is to have a new or an existing GUID

    Note

    An existing GUID could, for example, come from a comparison table or an imported BC Set.

Process

In contrast to all other events, event 27 has interfaces. The form routine interface in event 27 is:

*&--------------------------------------------------*
*&  Form "formname"
*&--------------------------------------------------*
*
*       text
*---------------------------------------------------*
*       --> p_old_guid old value in GUID-field*      <--
*       <-- p_new_guid new value in GUID-field
*       <-- p_wa old current view or table dataset


        *---------------------------------------------------*

FORM "formname" USING p_old_guid TYPE any
p_wa TYPE "viewname".

         

The parameter P_OLD_GUID contains the value of the GUID field before the maintenance dialog. This parameter is initial when you create a data record. When you copy, it takes the value from the template. If the table/view only has one GUID field, it can take the type of this field. Otherwise, assign the type ANY.

The parameter P_NEW_GUID is provided by a field symbol. This field symbol points to the table or view structure which was passed in the parameter P_WA and gets the previously determined new value for the GUID field. Changes to this parameter are automatically copied into the internal tables EXTRACT and TOTAL, which are the global view maintenance data container.

You can determine the current maintenance dialog processing mode from the flags in the Overview of the possible changes to GUID fields.