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

parameters query

Former Member
0 Likes
971

     Hi good day everybody,  i have a issue, i am creating a a abap report, using the table fmbdt,  this report has some parameters to ask and use with the query where statement.   When the user type all parameter all is right,  but when the user does not give any value to parameters,  the report not retrieve nothing.   I would like the report:  show the records according the values user,  if the user does not give anything value, the report must retrieve all records. 

I have done it asking if the parameter is initial then create the query according the values,  but now i have ask with 10 parameters, so the program would be with lots of lines!

is there another way to do it?  how?

thank you for all your advices.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
934

You need to use SELECT-OPTIONS instead of PARAMETERS. Blank value would then mean select all.

In select query, use IN operator with select-options.

8 REPLIES 8
Read only

Former Member
0 Likes
934

Hi Saul,

You can achieve it using SELECT-OPTIONS instead of PARAMETERS

Martin

Read only

Former Member
0 Likes
935

You need to use SELECT-OPTIONS instead of PARAMETERS. Blank value would then mean select all.

In select query, use IN operator with select-options.

Read only

0 Likes
934

thank you very much, you are right it works fine

best regards

Read only

0 Likes
934

Hi,  now i need a function module from abap report,  how could be the parameters when it come blank?  i need  it has the same behaviour to follow

thank you

Read only

0 Likes
934

Hi Saul,

Please elaborate your requirement.

Parameters & select-option will behave the same way in FM also.

Regards

M Nair

Read only

0 Likes
934

Hi Good day Manikandan  I need the function module do this:

1.-  ask parameter search

      1.1 fmbdt~rfikrs

      1.2 fmbdt~rmeasure

      1.3 fmbdt~rfundsctr

      1.4 fmbdt~rfund

      1.5 fmbdt~BUDGET_PD_9

2.-  Based on the parameters values, it need to add the amounts

      from fmbdt-tsl01 to fmbdt-tsl16.

Note: the result set must meet according parameters values, otherwise if anyone

is empty must retrive all records from that parmeter field, or if all paramters is empty, must retrieve all recors from all paramter fields .

Best Regards.

Read only

0 Likes
934

Hi Saul,

Please post your sample code so that we can come to know what exactly is your requirement.

Regards

M Nair

Read only

0 Likes
934

Hi Saul,

I posted a sample code on below FM Parameter query thread , hope it might help you.

http://scn.sap.com/thread/3384065

As you have started new thread kindly close this one.

Regards

M Nair