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 can i declare the variables & parameters in User exit?

Former Member
0 Kudos
70

How can I declare data in sub routine exits i.e. in user exit? Can it be possible to declare the data in side the sub routine? And How can I set the parameters inside the user exits sub routine? If the declaration can't be done inside the subroutine then how can I pass the data or parameters ?

Thanks in Advance,

With Regards,

Abhijit Mandal

1 ACCEPTED SOLUTION

Former Member
0 Kudos
40

Hello,

So far I have read 2 questions on your post:

1) How can I declare data in sub routine exits.

You can do it as usual.


    DATA: ONE TYPE <your type> 

2) How can I set the parameters inside the user exits sub routine

Im afraid it is not possible, you have to use the ones provided by the user exit (Check the Function Module where the exit is being called from.

I hope this gave you a hint.

Bye

Gabriel P.-

3 REPLIES 3

Former Member
0 Kudos
41

Hello,

So far I have read 2 questions on your post:

1) How can I declare data in sub routine exits.

You can do it as usual.


    DATA: ONE TYPE <your type> 

2) How can I set the parameters inside the user exits sub routine

Im afraid it is not possible, you have to use the ones provided by the user exit (Check the Function Module where the exit is being called from.

I hope this gave you a hint.

Bye

Gabriel P.-

0 Kudos
40

Hello Gabriel

Your second answer is not correct. It is possible to fetch data from the main program where the user-exit is called and even to manipulate its data.

For details please refer to [SAP User Exits and the People Who Love Them|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]

However, while reading data from the main program is one thing you should really know what you are doing if you manipulate data in the main program from within the user-exit.

Regards

Uwe

0 Kudos
40

Hello Uwe....

I was not aware of it....again there is nothing imposible for abap!!

Thanks for yor input!!

Bye

Gabriel P.,