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

Declaration

Former Member
0 Likes
858

Hi Experts,

How we can declare the following parameter in function Module..

parameters: vernu like t136-vernu memory id vnr obligatory,

usually we declare in Import parameters in FM

as vernu like t136-vernu..but how we can specify memory id vnr

obligatory in FM..

Thanks,

8 REPLIES 8
Read only

Former Member
0 Likes
814

Hi Silviya,

Parameters are defined in the export/import tabs in a Function module. There you can just specify the type of the parameter & whether it is mandatory to pass the same or not.

You cannot include a memory id in the declaration of a parameter in FM.

Regards,

Chetan.

PS: Reward points if this is helpful.

Read only

Former Member
0 Likes
814

Hi,

You will have to use ABAP( EMPORT TO MEMORY/IMPORT FROM MEMORY) or SAP memory( Get/Set ) to get the values withn the FM. You cannot define a parameter with a memory id in the FM interface.

Cheers

VJ

Read only

Former Member
0 Likes
814

Hi Silviya,

You cannot set Memory ID for FM parameters.

You can either set using

SET PARAMETER ID ... in your calling program

And in the FM retrieve using

GET PARAMETER ID ...

But since FMs are called from different contexts it would be better to pass the values to the FM.

Regards

Wenceslaus

Read only

Former Member
0 Likes
814

Parameters we cant declare in Function module.

Regards

justin

Read only

Former Member
0 Likes
814

Can we use Sub routines inside the Function Module?

Thanks,

Read only

0 Likes
814

Hi,

Yes you can use subroutines inside the FM but you need to create separate INCLUDES to hold the routine code.

Check any std FM's you will get an idea.

Cheers

VJ

Just check FM "BAPI_MATERIAL_BOM_GROUP_CREATE" you will find a lot os PERFORM statements in there....

Message was edited by:

Vijayendra Rao

Read only

0 Likes
814

can we use includes inside of the program? plz let me know...

Thanks

Read only

0 Likes
814

can we use includes inside of the function Module? Let me know..

Thanks