Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Field Exits

Former Member
0 Kudos

hai

any one help with field exits,

i.e what are the steps to be followed for field exits to be done.

thnx in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

To find available field exists goto the necessary

1) transaction

2) find out the system status->Package

3) goto se81 information systems

4) Enhancement

5) Customer exits

6) enhancements

😎 Give the package name and process it .

OR

1) Goto spro

2) sap reference img

3) search for the field exit .

or

Find the field exit in cmod .

Give the project name and process it .

Goto se51 to find the field exit .

Field exits are obsolete .

Message was edited by:

Christina Kavitha

7 REPLIES 7

Former Member
0 Kudos

hi,

check the below link, may be helpful for you

http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm

mark the helpful answers

Regards,

Naveen

raja_thangamani
Active Contributor
0 Kudos

Hi,

Here are the steps:

<b>Step 1:</b> Execute program ‘RSMODPRF’, entering the data element of the field

<b>Step 2:</b> Create function module when prompted, and add you code to the source section using the parameter

‘INPUT’ as the field value you are checking.

<b>Step 3:</b> Save and activate Function and execute transaction ‘CMOD’.

<b>Step 4:</b> Choose option: Goto-> Text Enhancements->Data elements->New DE cust docu.

<b>Step 5:</b> Enter data element

<b>Step 6:</b> Save and activate

<b>Step 7:</b> Execute program ‘RSMODPRF’ again but this time leave data element field blank.

<b>Step 8:</b> Select the checkbox for the data element you have just created and choose option: Field exit->Activate

This will now be active for all instances of this data element, but you can assign specific program and screen

combinations by pressing the ‘Assign prog./screen’ button. You can also change the code you entered in the field

exit function module by pressing the ‘Edit FM’ button.

Raja T

Message was edited by:

Raja T

Former Member
0 Kudos

hi,

To find available field exists goto the necessary

1) transaction

2) find out the system status->Package

3) goto se81 information systems

4) Enhancement

5) Customer exits

6) enhancements

😎 Give the package name and process it .

OR

1) Goto spro

2) sap reference img

3) search for the field exit .

or

Find the field exit in cmod .

Give the project name and process it .

Goto se51 to find the field exit .

Field exits are obsolete .

Message was edited by:

Christina Kavitha

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please take a look OSS Notes: 29377

Note

Field exits are frozen on the 4.6C maintenance level and are not further developed. This means that the existing functionality is kept with all restrictions (see also the last item below). Existing exits can be further used and are called at runtime as usual.

Existing exits can be maintained using program RSMODPRF (run the

program using transaction SE38). Activation of the field exits and

assignment of the dynpros can also be carried out using program

RSMODPRF. For this purpose, the program must be started without

parameters (input fields remain blank).

If required, new field exits can be created using program

RSMODPRF (see the program documentation).

Solution

1. Field exit was created with CMOD, but is not processed when calling the screen.

Since the field exit is not processed until PAI, an action must be triggered on the screen (Return, Save, ...).

Set profile parameter abap/fieldexit to YES and restart the system.

After activating the function module FIELD_EXIT... and the field exit, leave the transaction on whose screen the field exit is to be executed. The screen is not generated until the transaction is started.

Do not work on different application servers since there may be some delay before the field exit is activated.

The profile parameter must be set on all or none of the application servers.

If the field exit is to only be active on specific screens, check whether you chose the correct program and the correct screen number (take care with subscreens).

Generate the screen on which the exit should be active using SE51. It is possible that it was not correctly generated. If you want to be sure that all screens that use the data element are regenerated, you can transfer Report rsmodfdg from the correction instructions and start it with SE38. The Report uses the affected data element as the input parameter and regenerates all screens that use the data element.

Using SE51 -> Field list, check that the screen field does have a reference to a data element. In the name of the field exit, use the name of the data element and not the field name.

After transport, field exits are marked as active but will not be processed. Tip: First try deactivating the field exit once more and then activate it again.

2. How is performance affected by setting abap/fieldexit?

If a screen is generated and the profile parameter is set, a check is run on 2 tables (TDDIR, TDDIRS) to see whether a field exit must be generated for the respective field. In practice, the screen load is not generated until the screen is selected after an update. The user should not notice any difference because screen generation is very fast.

3. Can you read the contents of other screen fields in the field exit?

In principle, every field exit can store its value in the global variables of the function group (TOP) and hence make them available to other field exits. Note here that field exits are always called, not only if an entry is made in the field or if the field is empty. In addition, it is not possible to make any assumptions about the order in which the field exits will be called in the future.

4. How does the field exit behave on step loop fields ?

After the user has entered data, the field exit is called in PAI as often as there are visible fields in the step loop. The system variable SY-STEPL is incremented each time. If a new value is assigned to the field, it is displayed in the module between LOOP and ENDLOOP. This module is also called once for each visible step loop line.

5. Can field exits be debugged ?

No. Field exits must be tested separately in the ABAP/4 Development Workbench. For errors which only occur in the screen environment, it is helpful to write interesting variables to the file system using TRANSFER... . These can then be analysed there.

6. What can you do if the field contents are no longer transported to ABAP/4?

Check whether a value is assigned to the field OUTPUT.

7. When is the field exit called if a conversion exit is attached to the data element?

The field exit is called after the conversion exit. This means that the INPUT field receives the data in the same format as the ABAP/4 program receives it.

8. Although a global field exit is inactive, a function module is called which does not exist (for example FIELD_EXIT_PROGRAMM_@). This can lead to an ABAP dump error when function module FIELD_EXIT_<data element name> is called.

This is an error in the kernel which no longer occurs as of Release 3.0C. As a temporary measure, it is useful to assign a program and a screen which do not exist to the field exit and then activate the field exit.

Due to performance reasons, the active/inactive indicator is stored in the screenload. This can cause inconsistencies between Source and Load. Generate the affected screen with se51. If you want to be sure that all screens that use the data element are regenerated, you can transfer Report rsmodfdg from the correction instructions and start it with se38. The Report uses the affected data element as the input parameter and regenerates all screens that use the data element.

9. Field exit is not visible in CMOD, although created.

If you want to create a field exit for a data element, a function module is proposed with the name FIELD_EXIT_<data_element>. This function module must exist for the field exit to work. If you do not create this function module, but do create one with a suffix, the data element is not displayed in CMOD.

10. Field exit is not executed although it is active.

Fields which do not have the 'Input field' attribute usually do not trigger a field exit. The field exit is designed to allow an extended input check. It is therefore only called for input fields - even if they are not ready for input at runtime of the application by LOOP AT SCREEN.

This rule does not apply, however, if the field is located within a steploop. Here the field will be always activated, even if it is invisible.

Field exits can only be executed for fields that are directly related to the dictionary. If the relation is indirect, i.e. via an ABAP declaration (<fieldname> LIKE <dictionary element>), no field exit can be executed.

11. Field exits do not work on selection screens.

Results from the previous item since ABAP-internal fields and never the original Dictionary fields are used on selection screens.

12. Field exists do not work on check buttons.

Field exits are only intended for input fields. As check buttons count as graphical elements, you cannot install field exits on them.

13. How can all screens that use a data element be generated?

If you want to be sure that all screens that use a specific data element are regenerated, you can transfer Report rsmodfdg from the correction instructions into a customer report (e.g. zsmodfdg). The Report regenerates all screens. In this way, you can ensure that active field exits refer to screens and that inactive exits cannot be called on any screen. The Report uses the affected data element as the input parameter. The affected data element is in the name of the exit: FIELD_EXIT_<data element name>.

14. Restriction of usage

Field exit technology was developed for input fields on dynpros and cannot be used for other/new dynpro elements. This means that this technology does not offer support for the new ScreenPainter elements such as graphical elements (e.g. checkbuttons, radiobuttons, dropdown listboxes), controls (except for table controls which are supported like a step loop), or selection screens

Hope this will help.

Regards,

Ferry Lianto

Former Member
0 Kudos

HI

first you have to know the data element of the field and screen no.

then you have to run the program RSMODPRF.

in the selection screen pass your data element name if the field exits are not present for that it will go to se37 and create a new FM for that field other wise it will go directly to the FM source code.

after coding in the FM

now you run the RSMODPRF without giving any dataelement name in the selection screen.

search your dataelement assign screen no and programname for that data element by clicking the button Assign program/screen. activate that.

regards

shiba dutta

Former Member
0 Kudos

HAI,

CREATE FIELD EXITS USING CMOD.

Former Member
0 Kudos

hi

good

Field Exits

Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.

The field exit concept lets you create a special function module that contains this logic.

You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

In 4.6c, you can use "RSMODPRF" program to create field exits.

An example of a user exits :-

MODULE user_exit_0001 INPUT

CASE okcode.

WHEN 'BACK OR EXIT'.

CASE sy-dynnr.

WHEN '100'.

SET SCREEN 0.

LEAVE SCREEN.

WHEN '200'.

        • Note that you can write any code that satisfy your needs. ****

        • But in this case, this was wrote as a sample code for reference sake. ****

        • And you can test it. ****

SET SCREEN 100.

LEAVE SCREEN.

ENDCASE.

ENDCASE.

thanks

mrutyun^