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: 

How to define a global field for use in User exit

Former Member
0 Kudos

Hi All,

I want to define a global flag field (say my_flag) in Function group VEDA. I need to set/reset it in exit EXIT_SAPLVEDA_003 and check its value in EXIT_SAPLVEDA_002.

Can anyone help me out in this. Where can I define this field?

Thanks.

Regards,

Riyaz

1 ACCEPTED SOLUTION

Former Member
0 Kudos

u have to take the include top of function group XVED goto include LXVEDTOP

Double click on this include it shows u INCLUDE ZXVEDTOP as global data .

u need to define ur flag over here .

regards,

vijay

4 REPLIES 4

Former Member
0 Kudos

I have created a customer table zflag1 which has one field z_flag and the correspopndiong data el;ement is 'zflag' and i also ccreated parameter ID in table TPARA and assigned tht parameter ID 'ZFLAG' to my data element.

reward points if helps..

in the Z include of Exit function 3 write -

data :g_global like zflag1-z_flag.

G_GLOBAL = 'X'.

set parameter id 'ZFLAG' field g_global.

and in the Z include of exit function 2 write -

DATA G_GLOBAL LIKE ZFLAG1-Z_FLAG.

GET PARAMETER ID 'ZFLAG' FIELD G_GLOBAL.

Former Member
0 Kudos

Function group XVED contains all of the user exit function modules. This was done so long ago in our system so I don't know if all of the empty includes mention exist or whether you will have to create them. But in include program LXVEDTOP, we have another include statement:

Include ZXVEDTOP.

All of our global variables are defined in this include.

Regards,

Chris

Former Member
0 Kudos

u have to take the include top of function group XVED goto include LXVEDTOP

Double click on this include it shows u INCLUDE ZXVEDTOP as global data .

u need to define ur flag over here .

regards,

vijay

Former Member
0 Kudos

did you try export to memory ID and import from memory ID ?

what I mean is export that value from the first exit and then import it in the second one .. if u do use it, dont forget to delete it afterwards