User Fields for App. Req. Master Data
Using this enhancement, you can: - Define user-defined fields for appropriation requests.
- Define your own groupings for pre-defined user fields 1 to 14 and your user-defined fields. You can then position these groups, just like field groups defined by SAP, as you wish on tab pages and include them in master data maintenance of appropriation requests.
Defining user-defined fields: - Create structure CI_IMAU in the ABAP Dictionary, and define the fields you want to add to the appropriation request to augment the fields already defined in the standard system. The master data of these fields
is stored in table IMAK along with the data of the SAP fields.
Adding user fields 1 - 14 and user-defined fields to master data maintenance: - For each group of user fields that you want to integrate in master data maintenance, define a separate screen with the attribute 'subscreen' in
function group XAI1. You can group the fields together on this subscreen in the sequence you wish. Then activate the screen.
- You can now place the screens you defined on tab pages in the tab layouts for appropriation requests, in the same way as the field groups defined by SAP.
- You have to take certain steps to ensure that the screen layout rules entered in Customizing, and the checks provided by SAP for user fields 1 - 14 remain effective. Therefore, you are not allowed to position these user fields directly on the subscreen. Instead, make links to the
pre-defined subscreens 601 - 606 and 611 - 618 from function group AIA1. These subscreens each contain a user field, and carry out the screen selection and checks.
- Procedure: Create a one-line subscreen area in the graphical Screen Painter for each user field. Give the subscreen area a name, such as
'userfield1'. Then go to the flow logic, and for each subscreen in the PBO block add the statement: >> CALL SUBSCREEN userfield1 INCLUDING 'SAPLAIA1' '06XX'. << (XX= Dynpronummer) and in the PAI block add the statement >> CALL SUBSCREEN userfield1. <<
. Activate your screen, and include it in a layout in Customizing. Assign this layout to an appropriation request type.
- Treatment of self-defined fields:
- In order to import the existing values of your self-defined fields at the time of PBO, create a PBO module and place it at the beginning of your flow logic. In this module, call form routine
'GET_USERFIELD_DATA', which supplies the values to the transfer structure (type 'IMAK_CI_INCLUDE'). You place these values in the fields of your screen.
- To store newly created or changed data, create a PAI module and place it at the end of your flow logic. In this module, call form routine
'SET_USERFIELD_DATA', which returns values from the transfer structure (type 'IMAK_CI_INCLUDE') to master data maintenance.
- In order to be able to switch the readiness for input of your self-defined fields on or off during display or deletion, the activity
type is transferred by function module EXIT_SAPLAIA1_001. To have access to it, create the include ZXAI1U01 in function group XAI1. Enter program code there in order to transfer the transferred activity type I_AKTYP to the global variable GD_AKTYP. It is available to you there.
- If you define required entry fields, you should place the numbers of the screens in your include ZXAI1U01 in the export parameter ET_REQUIRED of function module EXIT_SAPLAIA1_001. Before saving, the system checks the screens stored there to see if all required entry
fields were completed, even if the tab page, on which the screen appears, was not accessed.
- If you want to make the screen layout or checks of your self-defined fields dependent on the values of SAP fields, call form routine 'READ_REQUEST_DATA' in your program code. This form routine places the
current values of the SAP fields in the corresponding fields of global structures and tables XIMAK, XIMAKT (name of apprropriation request), XIMAKPA (requesting cost center/ business area/ profit center), XIMAKPI (investment reason), XIMAKPS (requesting division), XIMAKPU
(environmental protection reason), XIMAKPW (requesting material group) and XIMAKA (affected asset or equipment). If you need values that may have been changed by the user for checks, then you should assign your field groups in the layout below the SAP field groups, so that your PAI
block is not processed before the PAI blocks of SAP screens. Otherwise the program does not know about value changes to the SAP fields.
There are some restrictions on self-defined fields: - These fields are not linked to screen layout control for appropriation
requests. However, you can program this yourself as described above.
- They cannot be processed using mass change functions.
- At the moment, these fields appear only in master data lists in reporting.
Treatment of self-defined fields in reporting:
- The fields can be reported on immediately in master data lists for appropriation requests.
- You can use these fields for the definition of user-defined characteristics in drilldowns on the investment program (current data) using enhancement AAIP0003.
- You can use these fields for the definition of user-defined characteristics in drilldowns on appropriation requests using enhancement AAIR0004.
- For BW, you can add your self-defined fields to the extract structure for InfoObject 0APPR_REQU without any problems (see BW Implementation Guide in OLTP Add On).
Function/Program:- EXIT_SAPLAIA1_001: Transfer of Activity Category to Customer Exit
|