|
Questions and answers on field exits |
|
|
|
|
Written by Anon.
|
|
Wednesday, 21 February 2007 |
1. A field exit was created with the CMOD and activated, but it does not get executed when the screen is called. 2. How does setting abap/fieldexit affect the performance? 3. Can the contents of other screen fields be read in a field exit? 4. How does the field exit work in step-loop fields? 5. Can field exits be debugged? 6. What should one do if the field contents are not getting transported to ABAP/4? 7. When does the field exit get called in the case that there is a conversion exit attached to the data element?
1. A field exit was created with the CMOD and activated, but it does not get executed when the screen is called. - Since the field exit is not executed until DCI, some action must occur in the screen (e.g. press Return, saving....).
- Set the abap/fieldexit profile parameter to YES and start the system again.
- After the FIELD_EXIT... function module has been activated and the field exit has been activated, the transaction in whose screen the field exit is to be executed must be terminated. The screen is not generated until it is called.
- Do not work on different application servers, otherwise there may be a delay before the field exit becomes active.
- The profile parameter must be set either on all application servers or on none.
- If the field exit is to be active in certain screens only, then you should check whether you have selected the correct program and the correct screen number (Careful with SUBSCREENS !).
- Use SE51, field list, to ensure that the screen field really does have a DDIC reference! Do not rely on the F1 information for the field!
2. How does setting abap/fieldexit affect the performance? - If a screen is generated and the profile parameter is set, then the system checks in 2 tables (TDDIR, TDDIRS) to see whether a field exit has to be generated for the field. In practice the screen load after a Put is not generated until the screen is called. The user will not experience a noticeable delay, since screen generation is extremely fast.
3. Can the contents of other screen fields be read in a field exit? - In principle all fields can be copied to global variables in the TOP or the function group. However, since the order in which the field exits are called is not guaranteed, this possibility should not be used.
4. How does the field exit work in step-loop fields? - After data input to DCI the field exit will be called as many times as fields are visible on the step-loop. The SY-STEPL system variable is incremented each time. If a new value is assigned to be field, then it will be visible in the module between LOOP. ENDLOOP. This module will also be called as many times as there are visible step-loop lines.
5. Can field exits be debugged? - No. Field exits have to be tested in isolation in the development environment. To analyze problems that occur only in the screen environment, the relevant variables can be written to the file system using TRANSFER... and can be analyzed there.
6. What should one do if the field contents are not getting transported to ABAP/4? - Check whether you have assigned a value to the OUTPUT field.
7. When does the field exit get called in the case that there is a conversion exit attached to the data element? - The field exit will be called after the conversion exit. This means that the INPUT field contains the data in the same form as that in which the ABAP/4 program also gets them.
Related Items:
|