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: 

When is the code contained in a Field Exit executed?

0 Kudos
215

Hello community!

The code contained in a field exit is executed when the dynpro containing the field of field exit is loaded or when performing an action on the field of a field exit?

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
163

The question is a little surprising as it seems like an exam question (is it 1 or 2) instead of an open question.

If you're talking about the deprecated feature of Field Exits (deactivated by default for a long time, can work only under certain circumstances that you don't specify), to answer directly, it doesn't trigger

  • NEITHER "when the dynpro containing the field of field exit is loaded"
  • NOR "when performing an action on the field of a field exit"

It's not triggered when the "dynpro is loaded"

It's not triggered when there's a specific action is done on the field.

It's triggered in the PAI (after input) even if there's no action on the field.

(provided that all conditions are met to have this field exit active of course)

EDIT: ABAP Keyword Documentation:

  • field exit
  • Obsolete customer exit that can be linked with DDIC data elements in the ABAP Dictionary in customer systems. If a dynpro field is defined with reference to such a data element, a function module named FIELD_EXIT_dtel is called during the data transport from the dynpro to the ABAP program at the event PAI. Here, dtel is the name of the data element. The value of the dynpro field can be modified in the function module. The function module of a field exit cannot be debugged at present.
2 REPLIES 2

AlexGourdet
Product and Topic Expert
Product and Topic Expert
0 Kudos
163

Thank you for visiting SAP Community to get answers to your questions.

As you're looking to get most out of your community membership, please consider include a profile picture to increase user engagement & additional resources to your reference that can really benefit you:

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

All the best,

Alex

Sandra_Rossi
Active Contributor
164

The question is a little surprising as it seems like an exam question (is it 1 or 2) instead of an open question.

If you're talking about the deprecated feature of Field Exits (deactivated by default for a long time, can work only under certain circumstances that you don't specify), to answer directly, it doesn't trigger

  • NEITHER "when the dynpro containing the field of field exit is loaded"
  • NOR "when performing an action on the field of a field exit"

It's not triggered when the "dynpro is loaded"

It's not triggered when there's a specific action is done on the field.

It's triggered in the PAI (after input) even if there's no action on the field.

(provided that all conditions are met to have this field exit active of course)

EDIT: ABAP Keyword Documentation:

  • field exit
  • Obsolete customer exit that can be linked with DDIC data elements in the ABAP Dictionary in customer systems. If a dynpro field is defined with reference to such a data element, a function module named FIELD_EXIT_dtel is called during the data transport from the dynpro to the ABAP program at the event PAI. Here, dtel is the name of the data element. The value of the dynpro field can be modified in the function module. The function module of a field exit cannot be debugged at present.