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

FUNCTION MODULE

Former Member
0 Likes
769

HI experts,

i am creating a function module in se37.In which i want to create a PERFORM to which i sud pass a internal table ...

EG: PERFORM TIME tables g_itab.

FORM TIME tables p_g_itab like g_itab[].

the contents of g_itab after perform sud be changing.

But since my table " g_itab like zstruct " is defined in the export parameter, (not in source code).... i m getting the error g_itab not found.....

Kindly let me know , how to correct

Thanks in advance

Bijal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
551

Hi,

may be this is declared in the top include. activate both FM and top include together.

The problem is that you are using a TYPE that has not be defined in your program, but in a TYPE Group or Type Pool. You need to reference the TYPE group when using that type. If you drill into the TYpe group statement above, you can see all of the types that are included in it

<b>Reward points</b>

Regards

5 REPLIES 5
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
551

Hi,

Declare the data in the TOP include of the Function Group in which you have the function group instead of making it an export paramter.

If you want to share data between FM and a FORM then best way is to declare the data in the TOP include and then let FM and FORM both operate on the gloabal data

Regards,

Sesh

Message was edited by:

Seshatalpasai Madala

Read only

Former Member
0 Likes
551

Hi

You declare these declarations in the Fun module MAIN PROGRAM

which have some top Include there you declare and write the code of PERFORM and FORM in the common inludes also instead of writing between FUNCTION..ENDFUNCTION..

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
552

Hi,

may be this is declared in the top include. activate both FM and top include together.

The problem is that you are using a TYPE that has not be defined in your program, but in a TYPE Group or Type Pool. You need to reference the TYPE group when using that type. If you drill into the TYpe group statement above, you can see all of the types that are included in it

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
551

hi all...

thanks ....

But i m selected a random function group..... just like that....

the internal table g_itab, needs to be outputed

Read only

Former Member
0 Likes
551

Hi Bijal,

As I can understand from your FM's tables parameter "g_itab like zstruct", zstruct is a DDic table / structure.

If so, you can define your Subroutine as follows -


FORM time TABLES pt_itab STRUCTURE zstruct.
ENDFORM.

Regards,

Manish Joshi