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

Condition in parameter including and excluding

ABAPER_P
Participant
0 Likes
1,392

I have declare the parameter

p_dokst LIKE draw-dokst but its taking the only single value in my Z report but in the standard transaction we can put the condition equal ,not equal...

but now I have requirement for the parameter I should have including and excluding values.

Pls see below screen shot.

Even I want to implement the same functionality in my Z report. Which is market with red in above Screen shot.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,355

Hi ,

Try with  Select Options with 'NO INTERVALS'.

e.g.

TABLES : draw.

SELECT-OPTIONSso_dokst FOR draw-dokst NO INTERVALS.

I have declare the parameter

p_dokst LIKE draw-dokst but its taking the only single value in my Z report but in the standard transaction we can put the condition equal ,not equal...

but now I have requirement for the parameter I should have including and excluding values.

Pls see below screen shot.

Even I want to implement the same functionality in my Z report. Which is market with red in above Screen shot.

5 REPLIES 5
Read only

Former Member
0 Likes
1,356

Hi ,

Try with  Select Options with 'NO INTERVALS'.

e.g.

TABLES : draw.

SELECT-OPTIONSso_dokst FOR draw-dokst NO INTERVALS.

Read only

Former Member
0 Likes
1,355

Hi,

In your attached screen, the red mark field, they declared it as a select-options only not parameter.

because its showing extension so here its possible excluding and including options.

Thanks,

Sree


Read only

former_member210770
Active Participant
0 Likes
1,355

Hi ABAPER P,

You can refer below code :

REPORT ZTEST_DEMO.

TABLES : EKKO.

DATA   : GIT_EKKO TYPE STANDARD TABLE OF EKKO.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.

    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS.

SELECTION-SCREEN END OF BLOCK B1.

START-OF-SELECTION.

   SELECT * FROM EKKO

            INTO TABLE GIT_EKKO

            WHERE EBELN IN S_EBELN.

   IF GIT_EKKO[] IS NOT INITIAL.

     SORT GIT_EKKO BY EBELN.

   ENDIF.

This will work for your Multiple Vlaues - Including as well as Excluding, also for Range Including and Range Excluding.

Just Pass your Values in below Extension as it is highlighted. 

Please let me know if it useful.

Regards,

Sagar

Read only

Former Member
0 Likes
1,355

Hi

dont use parameter use select-option only

SELECT-OPTIONS: s_vbeln FOR g_vbeln NO INTERVALS,

it will display like that only

regards

laxman

Read only

0 Likes
1,355

Hi ABAPER,

please use SELECT-OPTION instead of parameter as parameter can take only one value.We can not specify any other extensions in that.

SELECT-OPTION has this advantage.Use SELECT-OPTION with 'NO INTERVALS'.

It will give you the desired result.



Best Regards,

Menka