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

Selection

Former Member
0 Likes
646

hi all

i have an selection statement like

PARAMETERS:GL LIKE SKB1-SAKNR.

Now i need to specify to ranges for this how can i do that like i need to mention in Low-High values at the same time i cannot use the SELECT-OPTIONS statement...please help

vijay

5 REPLIES 5
Read only

Bema
Active Participant
0 Likes
619

Try to use RANGES . If you declare RANGES ,It will not appear in the selection screen.

you can use it for processing.

Read only

Former Member
0 Likes
619

Hi Vijay,

use this Function Module "SELECT_OPTIONS_RESTRICT".

Thanks.

Reward If Helpful.

Read only

Former Member
0 Likes
619

hi

good

Addition 15

... VALUE-REQUEST

Effect

This addition is only allowed for database-specific parameters in the INCLUDE DBldbSEL . It permits self-programmed value help (for report-specific parameters, this is achieved by specifying the event key word AT SELECTION-SCREEN ON VALUE-REQUEST FOR ... ). The addition has the following effect:

On the selection screen, the parameter has a button for requesting possible entries. When the user presses this button or F4 , this starts the FORM routine p_VAL in the database access program SAPDBldb (if it exists). Then - even if the parameter with LIKE points to a Dictionary field - this FORM routine is processed rather than displaying the check table or the fixed values of the Dictionary field. You can also branch from the routine p_VAL to a function module which offers a selection list of possible values. At the end of the FORM routine, the contents of the field p are copied to the appropriate input/output field.

Example

  • INCLUDE DBXYZSEL

...

PARAMETERS PL_TYPE LIKE SAPLANE-PLANETYPE VALUE-REQUEST.

...

REPORT SAPDBXYZ DEFINING DATABASE XYZ.

...

TABLES SAPLANE.

...

FORM PL_TYPE_VAL.

...

CALL FUNCTION ...

...

ENDFORM.

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/paramete.htm

thanks

mrutyun^

Read only

Former Member
0 Likes
619

Hi

you can do this way,

parameters : p_ebeln like ekpo-ebeln .

data : ds_ebeln type ebeln,

dg_ebeln like range of ds_ebeln with header line.

dg_ebeln-low = p_ebeln.

dg_ebeln-sign = 'I'.

dg_ebeln-option = 'EQ'.

dg_ebeln-high = p_ebeln.

append dg_ebeln.

select ebeln from ekpo into table it_ekpo where ebeln in dg_ebeln.

Regards

Zarina

Read only

Former Member
0 Likes
619

hi vijay,

u can define RANGES instead of PARAMETERS....when u will define a ranges it will create a selection table...

define:

RANGES : r_field like SKB1-SAKNR.

r_field-sign = u will have to put either 'I' or 'E' (inclusive or exclusive)

r_field-option = u will have to put option either u want the field value 'BT' or 'EQ' or 'NE'

r_field-low = low value of SKB1-SAKNR.

r_field-high = high value of SKB1-SAKNR.

append r_field.

clear r_field.

once u had define ranges u can use that particular ranges in your select query....

in where clause

select * from skb1 into table itab where saknr = r_field.

thats all.....

hope this would help out...

Regards,

Prashant