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: 

Perform in a function module

Former Member
0 Kudos

Hi

I use FM similar to HR_EVENT_RULES_PA0000 to fetch data and then save data in an own created table.

In that FM I have a perform and in that perform I will save the data, but under the perform all data is lost.

The form is in the bottom of the same FM.

How come?

Thanks // Peter B

2 REPLIES 2

Former Member
0 Kudos

Hi Peter,

check whether the table c9ontaining data to be saved is declared globally. it would be declared locally.

Also optionally you can pass that table as uisng parameter to save_perform.

Hope this is helpful.

Regards,

Uma Dave

matt
Active Contributor
0 Kudos

To clarify a little the previous answer - data declared in a function module, and the parameters (unless set otherwise), are local to the function module - i.e. not visible in any forms.

It is better programming practice to pass parameters to forms, rather than using global variables, by the way.

mtt