Application Development and Automation 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: 
Read only

field exit

Former Member
0 Likes
1,008

Hi

how to bebug a field exit?

thanks,

kiran.M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
963

HI

GOOD

TRY THIS OUT

Enhancement/Modifications

1) Execute tcode SMOD to find available enhancement/modifications.

2) Create a project for the enhancement in tcode CMOD.

3) You must activate your project first in order to hit a break-point or get into debug mode for your existing enhancements/modifications, if you do not, the best you will be able to do is step through the main program until you hit the call for that particular customer enhancement.

4) To get into debug, you can enter a hard break-point in the enhancement itself, set a soft break-point with the stop sign, or the long way, before you execute your transaction or while you are in your transaction, you can place a /h in the ok code area (this is the area of your gui where you can type in a tcode). Once you have the /h, hit enter and that will take you into debug, from there, you can do many different things to find exactly what you are looking for.

User Exits

1) Identify the main program you want to locate a user exit/debug.

2) For example, go to SE80 and do a search by program or dev class (SAPMV45A sales order or Dev Class VMOD, most SD user exits are in this dev class). In SE80 if you go by program, most user exit programs end in a 'Z' on a rare occasion 'X' or 'Y'.

3) If you are looking at including MV45AFZZ, you can see where there are different forms. These forms will get called at times within the program. If you are looking to fill the storage location on the sales order, you will probably want to take a look at the perform that fills in a field in vbap.

4) If this is what you are trying to accomplish, you will need to do the select against the config Table TVKOL based on the shipping point/plant and possibly storage condition based on your picking strategies.

5) For the debug part, you can do the same as in the enhancements/modifications but you will not need to activate any projects.

THANKS

MRUTYUN

Hi

how to bebug a field exit?

thanks,

kiran.M

7 REPLIES 7
Read only

Former Member
0 Likes
963

Hi kiran,

1. Unfortunately we cannot debug a field exit.

2. Hence, we have to use MESSAGE

3. Give some unconditional message of type I or S

as the very first line of your code in field exit.

4. This way u will come to know,

whether the field exit is proper or not.

5. For getting any variable value also,

we have to use message.

regards,

amit m.

Read only

0 Likes
963

hi

put some message once certain condition is met thats how u'll come to know if ur case is met or not!!

Reward Points if it helps

Regards

gunjan

Read only

Former Member
0 Likes
963

Hi Kiran

There is not straight menthod to debug the field exit

but you can use

1. Message statement of type "E". In Message staetement itself you can display values.

2. You can write the contents in file and download in the field exit. this way you can find out what exactly values are going into the exit.

Best regards

Naresh

Read only

0 Likes
963

You can write the data you want to watch into application server using open datasets.

Regds

Manohar

Read only

vinod_gunaware2
Active Contributor
0 Likes
963

No. u cannt debugg field exit. 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

Check whether you have assigned a value to the OUTPUT field.

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.

regards

vinod

Read only

Former Member
0 Likes
964

HI

GOOD

TRY THIS OUT

Enhancement/Modifications

1) Execute tcode SMOD to find available enhancement/modifications.

2) Create a project for the enhancement in tcode CMOD.

3) You must activate your project first in order to hit a break-point or get into debug mode for your existing enhancements/modifications, if you do not, the best you will be able to do is step through the main program until you hit the call for that particular customer enhancement.

4) To get into debug, you can enter a hard break-point in the enhancement itself, set a soft break-point with the stop sign, or the long way, before you execute your transaction or while you are in your transaction, you can place a /h in the ok code area (this is the area of your gui where you can type in a tcode). Once you have the /h, hit enter and that will take you into debug, from there, you can do many different things to find exactly what you are looking for.

User Exits

1) Identify the main program you want to locate a user exit/debug.

2) For example, go to SE80 and do a search by program or dev class (SAPMV45A sales order or Dev Class VMOD, most SD user exits are in this dev class). In SE80 if you go by program, most user exit programs end in a 'Z' on a rare occasion 'X' or 'Y'.

3) If you are looking at including MV45AFZZ, you can see where there are different forms. These forms will get called at times within the program. If you are looking to fill the storage location on the sales order, you will probably want to take a look at the perform that fills in a field in vbap.

4) If this is what you are trying to accomplish, you will need to do the select against the config Table TVKOL based on the shipping point/plant and possibly storage condition based on your picking strategies.

5) For the debug part, you can do the same as in the enhancements/modifications but you will not need to activate any projects.

THANKS

MRUTYUN

Read only

0 Likes
963

Hi Kiran

<b> Field Exits</b>

You cannot debug a field exit. You can at best create a small module pool with a screen that has the appropriate fields and in your PAI, call a module which calls your function that is the field exit and debug the small module pool. Good idea to keep as much of one around if you do field exits regularly.

I used CNEX0007 and CNEX0006 to add fields to the PRPS and PROJ tables respectively in the PS Module. As probably the case with most of these exits, have fun trying to figure out how to protect the fields in display mode. We lived with the fact that the save was disabled so it could not save the changes anyway. A test of the transaction code would not be complete. Use transaction SMOD to do SAP enhancements/field exits. In SMOD, you can get list of SAP enhancements that exist by Utilities - SAP Enhancements. Trying to figure out what they can be used for and how to accomplish the desired results is a major challenge.

Regards,

Santosh