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 exit activation problem

matteo_montalto
Contributor
0 Kudos

Hi all,

for my purpose I'd like to create a field exit (SAP_APPL 46C) to lock/ulock for modification a standard field in the grid shown in me51n/me52n/me53n tx. I did as follows:

1 - run the report RSMODPRF and created a field exit for the field EPSTP (FIELD_EXIT_EPSTP);

2 - wrote the (dummy) code that follows, just to verify if it works:

FUNCTION FIELD_EXIT_EPSTP.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(INPUT) TYPE  MEREQ3211GRID
*"  EXPORTING
*"     REFERENCE(OUTPUT) TYPE  MEREQ3211GRID
*"----------------------------------------------------------------------

loop at screen.
  if screen-name = 'EPSTP'. "make it non-editable
    screen-input = 0.
    screen-active = 1.
  endif.
  modify screen.
endloop.
ENDFUNCTION.

3 - save & activate.

4 - run the report RSMODPRF (without parameters), and attribute this new Field Exit to Program RM_MEREQ_GUI and screen 0014 (as I've seen pressing F1 in me52n on the field in order to get some info about program/screen).

So far, so good ... but now in the field exit list i get the following entry:

EPSTP | INACTIVE | RM_MEREQ_GUI | 0014

and can't get to turn it into the ACTIVE status. If I try to activate from the list the entry, a message tells that the Field Exit is still active... but that list view isn't updated anyway, and shows that the FE is not active. Obviously, I can't see any effects in the transaction in which it should trigger.

Any help is really appreciated, thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Can you let me know what function group you have used while creating 'FIELD_EXIT_EPSTP' function module.

Check this [link|http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm]:

11 REPLIES 11

Manohar2u
Active Contributor
0 Kudos

Another option is to check if field exit parameter is activated in system parameters.

Check in RZ10 and makesure "abap/fieldexit" is set to YES

0 Kudos

Hi Manohar, and thanks for your help.... Unfortunately I cannot verify anything from tx RZ10 because the development user I'm using doesn't have permissions to use it (I mean, my user isn't sap_all here). Is there any alternative way to check for that setting? I'm anyway quite confident that system's parameters are fine, because i can see running RSMODPRF without any parameters that many field exits are active and used...

Manohar2u
Active Contributor
0 Kudos

I think the program you selected may not be the right one - I cannot simulate as I have no access system with this parameter on.

go through this link

http://www.saptechies.com/faqs-field-exits-cmod/

it tells you about few similar problems you have.

0 Kudos

Hi Manohar and thanks,

I'm quite sure there's something wrong in the identification of the program and the screen.

But I just followed instructions I found in many pages and in this forum:

- open the transaction (in my case, ME51n or ME52N or ME53N);

- find the field on which I want to create a field exit, then F1 on it -> Technical information; a popup info box contains then the information I need (three sections in particular: screen data, gui data, field data).

What's wrong in this sequence? I'm quite confident that identifying the program/screen in Me52N for the field EPSTP is a standard procedure, in the sense that probably the result is the same for every 46C system (EPSTP is a standard field, and ME5?N is a standard transaction). Can anyone check and give me some addictional info, so that I can understand where's my fault? Thanks in advance.

Former Member
0 Kudos

Can you let me know what function group you have used while creating 'FIELD_EXIT_EPSTP' function module.

Check this [link|http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm]:

0 Kudos

Hi Satya, and thanks for your help.

I used the report RSMODPRF, simply specifying the field on which I'd like to build a field exit (EPSTP).

I think anyway, like Manohar said, that the problem is in the pair program/screen specified... even tho I tried to make the FE global and... still doesn't seem to work.

0 Kudos

If you execute the program RSMODPRF it will ask for data element & Number of field exit, if you give the data element as 'EPSTP' and execute then it will take you to the 'Function builder initial screen'. If you try to create function module then it will ask for the function group. Just i want to know which function group you have used there.

0 Kudos

Ops sorry Satya, I misunderstood... I used a custom function group, called "ZSRM_TE", which also contains some FM made my dev. team. Could this be a problem?

EDIT: I've also seen in SE51 that compiling the input mask with RM_MEREQ_GUI as program and 0014 as dynpro number and pressing on the "show" button, an error message appears: "Screen RM_MEREQ_GUI 0014 does not exist". Guess if the problem is related to the program and screen number I used...

Edited by: Matteo Montalto on Apr 2, 2009 9:49 AM

0 Kudos

As per my knowledge, yes, u hv to use a custom function group, but, its better to use a new custom function group, which is exclusive for this purpose.

Pls. check, am may be wrong.

thanq

0 Kudos

Hi all,

so far I understood that the system I'm working has support to field exits active (that's good). I finally succeed in activating the field exit but it seems that the execution flow doesn't pass thru that FE.

Probably there's something wrong with my Program/Screen no. setting, but since this is a standard field in a standard transaction I hope that someone could give me an hint/feedback.

The transaction is: ME51N / ME2N / ME53N.

The field is: EPSTP (Item category in purchasing document).

What's in your opinion the couple Program/screen number for a field exit built upon that field in a standard ME5xN transaction? I tried RM_MEREQ_GUI (0014), SAPLMEREQ, SAPLMEGUI (1211) but without success.

I inserted in the code a MESSAGE clause in order to see if the exec flow pass thru the field exit... can't see it, neither the message nor the effects of the FE

Edited by: Matteo Montalto on Apr 6, 2009 11:37 AM

0 Kudos

Hi all,

ir's passed over a month since my last request in this thread, unfortunately I have to say this question is still not solved

There are some questions that could help me identifying what's going wrong:

- in ME51N/ME52N/ME53N, pressing F1 on the field I'd like to build a fieldexit on, I can clearly see that field's name reported is EPSTP. BUT... In the EBAN table, that field is called PSTYP... so, what field should I consider to build a specific field exit?

- if I activate a field exit GLOBALLY, it should mean that in every dynpro in which that field is present, the code in that field exit should be executed. True that? I tried to do so for both of the above names (creating two field exits) but I can't see the effects.

- Since the transaction IS a standard Enjoy one, can anybody provide me some details about field and screen name, screen number, program name? I guess something is wrong on my system, or maybe there are some customs I can't see that inhibit that checks from being executed.