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

Get different results when using FM

Former Member
0 Likes
784

Hi,

Without giving you much detail info about what I am doing, would you be able to guess the problem that I am having? My problem is I wrote an executable program and it ran OK with the correct number of records, but when I put the same logic into a FM, the number of records multiply, and I am getting many records.

What would be the cause of this? Is the FM recursive? How would I resolve this?

Thanks,

RT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
729

hi rob,

try clearing the internal tables or variables before calling the function module.

Hi,

Without giving you much detail info about what I am doing, would you be able to guess the problem that I am having? My problem is I wrote an executable program and it ran OK with the correct number of records, but when I put the same logic into a FM, the number of records multiply, and I am getting many records.

What would be the cause of this? Is the FM recursive? How would I resolve this?

Thanks,

RT

4 REPLIES 4
Read only

Former Member
0 Likes
730

hi rob,

try clearing the internal tables or variables before calling the function module.

Read only

Former Member
0 Likes
729

Hi Rob,

I am making a wild guess here...the reason could be that the internal tables or variables declared as part of Global data (if any) must be refreshed in your FM code.

Regards,

Sumant.

Read only

Manohar2u
Active Contributor
0 Likes
729

Might be you are not refreshing input internal tables / input fields.

Regds

Manohar

Read only

Former Member
0 Likes
729

Hi,

How are you calling the FM. If the FM is inside a loop, then this would happen.

Best regards,

Prashant