OBRAS PRELIMINARES
3.4 Puertas y ventanas
this object are the available fields. The simplest way to provide a field catalog is to create a flat DDIC structure containing all fields and then get the field catalog via
eo_field_catalog ?=
CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME( <NAME> )
The form GUIBB supports only flat structures. When using deep structures, only the highest level fields are available.
ET_FIELD_DESCRIPTION Here you can provide the additional information needed to create the form, for example Label_by_DDIC,
LABEL_REF
ET_ACTION_DEFINITION A list of all actions (which will be transformed to FPM Events at runtime) that you can assign to form elements.
ET_SPECIAL_GROUPS Here you have the same options that you have in the ABAP ALV (see function module
your field catalogue. You must enter the special group for each field in the field description table in field SP_GROUP. At design-time the FPM Configuration Editor groups the fields. This is an easier way to find fields if your field catalogue contains many fields.
GET_PARAMETER_LIST:
Called at design time and allows you to define a list of the parameters that the feeder class supports. This list is used by the FPM Configuration Editor to provide the input fields for these parameters.
Parameter Description
RT_PARAMETER_DESCR Is returned from this method. It describes which parameter is possible. In Field TYPE, the DDIC type needs to be entered.
INITIALIZE:
Called at runtime when the form is created. It is the first feeder method which is called from FPM.
Parameter Description
IT_PARAMETER Contains a list of the feeder parameters and
the values for them specified in the configuration.
FLUSH:
The first feeder method which is called during an event loop. Whenever an FPM event is triggered (this includes all round trips caused by the form itself) this method is called. Use it to forward changed form data to other components in the same application.
Parameter Description
IT_CHANGE_LOG Lists all changes made by the user.
IS_DATA Is a structure containing the changed data
PROCESS_EVENT:
Called within the FPM event loop, it forwards the FPM PROCESS_EVENT to the feeder class. Here the event processing can take place and this is where the event can be canceled or deferred.
Parameter Description
IO_EVENT The FPM event which is to be processed
EV_RESULT The result of the event processing. There are 3 possible values: EV_RESULT
=
IF_FPM_CONSTANTS=>
GC_EVENT_RESULT-OK EV_RESULT = IF_FPM_CONSTANTS=>GC_EVENT_RESULT- FAILED. EV_RESULT = IF_FPM_CONSTANTS=>GC_EVENT_RESULT-DEFER IV_RAISED_BY_OWN_UI Indicates whether the event originates from thisUIBB.
ET_MESSAGES A list of messages which shall be displayed in the message region.
Called within the FPM event loop and forwards the FPM PROCESS_BEFORE_OUTPUT event to the feeder class. Here you specify the form data after the event has been processed.
Parameter Description
IO_EVENT The FPM event which is to be processed.
IO_EXTENDED_CTRL Request focus on action or field.
IV_RAISED_BY_OWN_UI Indicates whether the event originates from this UIBB.
IV_EDIT_MODE The OVP edit mode state of the UIBB.
IT_SELECTED_FIELDS The list of fields necessary for the form rendering. Provide only the data for the fields listed in this table; all other fields are neither visible at runtime nor used as reference for visible fields.
ET_MESSAGES A list of messages which shall be displayed
in the message area.
EV_DATA_CHANGED For performance reasons, the GUIBB adjusts the data in the form only if the data has been changed. To indicate this, set this flag
whenever you change the data to be displayed within this feeder.
EV_FIELD_USAGE_CHANGED Indicates whether or not the field usage has been changed by this method. If you change the field usage without setting this flag to X, your changes are ignored.
EV_ACTION_USAGE_CHANGD Indicates whether or not the action usage has been changed. Use an X to indicate whether you changed the action usage. If you do not, your changes are ignored.
CS_DATA The form data to be changed.
CT_FIELD_USAGE Field usage to change. The field usage
consists of the field attributes which might change at runtime (for example, enabled, and visible).
Note that if you change the fixed values of a field, set the flag FIXED_VALUES_CHANGED for this field.
CT_ACTION_USAGE Action usage to change. The action usage consists of the attributes related to actions which might change at runtime. For example, visibility. If an action is rendered as a button, then the visibility setting of the button is defined here.
GET_DEFAULT_CONFIG:
Call this if you want to have a default configuration. Use it to call pre-configured form configurations when a user starts the FPM Configuration Editor. This avoids the user, who uses a feeder class to create a form, having to create it from the beginning.
Parameter Description
IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_CONFIG: This object provides the API to create a default
configuration for the “old” Form, is not used in FPM_FORM_UIBB_GL2
IO_LAYOUT_CONFIG_GL2 Of type IF_FPM_GUIBB_FORM_CFG_GL2: This object provides the API to create a default configuration
CHECK_CONFIG:
Call this if you want to make your own application-specific checks on the configuration in the FPM Configuration Editor immediately before saving.
Parameter Description
IO_LAYOUT_CONFIG Of type IF_FPM_GUIBB_FORM_CONFIG: This
object provides the API to read the
configuration to be saved for the “old” Form, is not used in FPM_FORM_UIBB_GL2.
ET_MESSAGES A list of messages which shall be displayed
in the message region.
IO_LAYOUT_CONFIG_GL2 Of type IF_FPM_GUIBB_FORM_CFG_GL2: This object provides the API to read the
configuration to be saved
Using the CHECKBOX_GROUP Display Type in a Form
As of release SAP NetWeaver 7.0 enhancement package 2, the checkbox group display type is available. In contrast to the other display types, the application has to ensure that
everything works.
To use this field to full extent, consider the following:
The field type must be of type Character and the field length needs to be at least the number of checkboxes you expect.
The values of the checkboxes need to be set as fixed values for the field. Default values for a checkbox can be set in the field.
For example, mark the second checkbox field value = X.
Within the FLUSH method you get the data and the change log back.
In the field for the checkbox you see at the index of the field whether it is checked (Checked = X) or not (Unchecked = Space).
Remark on field length
As we set an X for the marked entry on the place in the field it is necessary to have the length at least as long as much as you have values.
You have a field with length 10 and 10 fixed values. If you mark a checkbox this place will be X, checkbox 1 2 3 4 5 6 7 8 9 10. Let us presume all are marked. Within FLUSH method this field of the structure will be updated XXXXXXXXXX. Let us presume the ninth field is not marked. Within FLUSH method this field of the structure will be updated XXXXXXXX_X.
Let us presume the field would be of char10 and you have 12 fixed values. If you mark the twelfth checkbox and want to return this information to the feeder class it does not work as you can only fill ten Xs in the field.
That is the reason why the field length should be at least equal to the numbers of fixed values.