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: 

Function module

Former Member
0 Kudos

Hi

I have created one function module and used subroutines. Form definations are written in the TOP include.

Select * from mata into table i_mara where plnat = '105'

if sy-sunrc eq 0.

perform call_marc.

endif.

In above statment when sy-subrc eq 0. it is going to topi nclude as form defination is call_marc is written in Top include. I am not able to see data in I_marc once i enter in the call_marc.

Can any one suggest the solution.

Regards

Raj

5 REPLIES 5

amit_khare
Active Contributor
0 Kudos

Welcome TO SDN.

To view internal tables, variables and work areas globaly in a function Group they need to be declared in the TOP include.

Subroutines/ Form Includes are not the part of TOP include. They need to be declare in a seperate INCLUDE.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hey Raj,

If the table is defined as local then you can't get the data in the include for the same.

Define all your global tables in TOP include.

Regards,

Atish

Former Member
0 Kudos

Hi,

Check how did u declared l_marc.

whether it is local variable or global variable.

as if it is local variable u can't see the values in that.

u need to declare it as global variable.

Local variable means with in the form.

Global means global to entire program.

Regards,

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You need to write the coding in U* subroutine.

dev_parbutteea
Active Contributor
0 Kudos

Hi,

you wn't see it if the table is local!

if you want to see L_marc data in form call_marc,

Select * from mata into table i_mara where plnat = '105'

if sy-sunrc eq 0.

perform call_marc <b>tables I_marc.</b>

endif.

Reegards,

Sooness.