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 select-options????

Former Member
0 Likes
2,130

how create function module with select-options in sap abap

9 REPLIES 9
Read only

Former Member
0 Likes
1,989

please answer Any one step by step

Read only

matt
Active Contributor
1,989

Step 1. Read the documentation on select-options and how their data is structured

Step 2. Define appropriate types either in an interface, or in the data dictionary (if FM is to be RFC)

Step 3. Create a function module (and function group if not using an existing one) frdric.girod

Step 4. Create parameters with the type of the select-options you need as defined in Step 2.

Step 2, courtesy of sandra.rossi , many thanks.

Read only

FredericGirod
Active Contributor
1,989

I like this way, we put ideas, and you do the job of answering 🙂

thanks matthew.billingham

Read only

matt
Active Contributor
1,989

I should be in management.

Read only

Sandra_Rossi
Active Contributor
1,989

matthew.billingham It's worth an answer, and I think you miss the creation of the type between Step 2 and 3, I would recommend defining the type in an interface (or DDIC if it's a RFC function module).

Read only

FredericGirod
Active Contributor
1,989

and we don't know if there is a function group ..

(but Why they still using FM ?!?)

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
1,989

Have a look at the "good example" under

https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenencap_class_inter...

The example uses PARAMETERS, but of course, the same holds for SELECT-OPTIONS.

BR

Horst

Read only

matt
Active Contributor
0 Likes
1,989

But why are all the methods static?

Read only

0 Likes
1,989

Because it is generally sufficient for dealing wit classical dynpros in local classes of function pools. You can do it with singletons if you like but I don't see a benefit of multiple objects dealing with one program-global dynpro.

I know, we have https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenstatic_class_sing..., but simply encapsulating classical dynpros runs under exceptions for me.