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: 

FUNCTION MODULE

0 Kudos
601

Hi everyone. Good morning. Can select-options be used in function modules? if it is ,please let me know the syntax for using it . Thank you.

1 ACCEPTED SOLUTION

former_member1716
Active Contributor
493

karoncdas_31,

Function modules does not have a direct parameter that deals with Select Options, below are few suggestions for using the select Options:

1) Convert the select option into a Internal table in your program and pass the internal table as a tables parameter in function module. You can internally use this table in your select queries.

2) Another work around would creating a parameter which is very similar to the structure of the select option and use the same. You can follow the below link to understand this option.

SELECT OPTIONS IN FM

Regards!

7 REPLIES 7

former_member1716
Active Contributor
494

karoncdas_31,

Function modules does not have a direct parameter that deals with Select Options, below are few suggestions for using the select Options:

1) Convert the select option into a Internal table in your program and pass the internal table as a tables parameter in function module. You can internally use this table in your select queries.

2) Another work around would creating a parameter which is very similar to the structure of the select option and use the same. You can follow the below link to understand this option.

SELECT OPTIONS IN FM

Regards!

493

Hi

Just don't use TABLES type of parameter. It's obsolete. Instead use IMPORTING or EXPORTING, with full table type definition.

Select options is just an internal table, with a specific line structure.


Kind regards,
Mateusz

493

One small clarification, which is likely not relevant in the original context of the question.

TABLES parameters are obsolete except for in RFC enabled function modules. For those they still have a legitimate role as the enconding and transfer of the data is done in a different way (in most cases with far better performance).

0 Kudos
493

Good to know that, gasparerdelyi


Kind regards,
Mateusz

0 Kudos
493

gasparerdelyi thanks to you for the information.

Sandra_Rossi
Active Contributor
493

Please learn to search. As you can see, many people have asked the same question before you (since the forum used to exist).

Your preferred browser:

Can select-options be used in function modules? site:sap.com

Sandra_Rossi
Active Contributor
493

All results of the web search:

  • select option in function module Feb 2, 2009
  • Select option how to pass in Function Module Mar 14, 2009
  • Select options with function modules. Aug 16, 2010
  • select options in function module Sep 26, 2006
  • How to use select-options in the function module of import Jun 12, 2008
  • select options in function module Apr 25, 2007
  • Passing Select-options as parameter to function module Sep 23, 2005
  • how to pass a SELECT-OPTION to a FUNCTION-MODULE Jun 13, 2007
  • Select options values pass to function module Mar 15, 2009
  • Select option as parameter in FM. Sep 10, 2008
  • Passing SELECT-OPTIONS value to Function Module Sep 8, 2009
  • Select options values pass to function module Mar 03, 2009
  • Passing Select-option to Function Module Dec 29, 2005
  • Select Options to RFC function modules Jun 7, 2007
  • Function module with import as select options Mar 13, 2007
  • Need a function module to fill the select options Dec 5, 2006
  • How to pass select-option filed to Function Module Exporting Dec 6, 2008
  • select option EXTENSION function module? Apr 24, 2007
  • Passing Select-options to methods ? Jul 12, 2007