‎2006 Nov 23 4:30 AM
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,
‎2006 Nov 23 4:36 AM
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.
‎2006 Nov 23 4:39 AM
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
‎2006 Nov 23 4:40 AM
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
‎2006 Nov 23 5:16 AM
‎2006 Nov 23 7:17 AM
‎2006 Nov 23 7:19 AM
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
‎2006 Nov 23 10:30 AM
can we use includes inside of the program? plz let me know...
Thanks
‎2006 Nov 23 10:31 AM
can we use includes inside of the function Module? Let me know..
Thanks