Application Development 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: 

Passing select-option to FM

Former Member
0 Kudos

Hi

I have to create a FM where I have to code Select-options to FM .

how could I create FM (input/table ) parameter in FM for LIFNR field.

Regards,

Vinesh.

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor
0 Kudos

Hi

Use Ranges Table *FAGL_RANGE_S_LIFNR*  "in Tables Parameters of Function Module
or Ranges structure *RANGE_LIFNR* in Tables Parameter of Function Module " Ignore this one

Cheerz

Ram

6 REPLIES 6

Former Member
0 Kudos

I personally would just give him a table of LIFNR´s and build your select option internally.

Former Member
0 Kudos

Hi Vine,

In the report if the select-option was like

select-options: s_matnr for mara-matnr.

Now in the TOP include of the function module declare a types like,

types: t_matnr type range of mara-matnr.

In the function module use like

FUNCTION ztest.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_MATNR) TYPE t_MATNR OPTIONAL

Now this will act as a select-options .

Regards,

Raj.

Former Member
0 Kudos

Hi vine,

For Eg, In the report if the select-option was like

select-options: s_lifnr for lfa1-lifnr.

Now in the TOP include of the function module declare a types like,

types: t_lifnr type range of lfa1-lifnr.

In the function module use like

FUNCTION ztest.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_LIFNR) TYPE t_lifnr OPTIONAL

Now this will act as a select-options .

Regards,

Raj.

former_member1245113
Active Contributor
0 Kudos

Hi

Use Ranges Table *FAGL_RANGE_S_LIFNR*  "in Tables Parameters of Function Module
or Ranges structure *RANGE_LIFNR* in Tables Parameter of Function Module " Ignore this one

Cheerz

Ram

kesavadas_thekkillath
Active Contributor
0 Kudos

Please search in SCN before posting, you will get the solution.

Subhankar
Active Contributor
0 Kudos

Hi,

This is pretty simple. If any time you checked the structure of select option in debugg mode then you can able to find the solution. Anyway just check any structure in your system having fields sign (1) option (2) low(10) and high(10).

Use this structure as the table type.

Thanks

Subhankar