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

Former Member
0 Kudos
920

how create function module with select-options in sap abap

9 REPLIES 9

Former Member
0 Kudos
779

please answer Any one step by step

matt
Active Contributor
779

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.

FredericGirod
Active Contributor
779

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

thanks matthew.billingham

matt
Active Contributor
779

I should be in management.

Sandra_Rossi
Active Contributor
779

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).

FredericGirod
Active Contributor
779

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

(but Why they still using FM ?!?)

retired_member
Product and Topic Expert
Product and Topic Expert
779

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

matt
Active Contributor
0 Kudos
779

But why are all the methods static?

0 Kudos
779

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.