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: 

select-options with where condition

Former Member
0 Kudos

Hello ABAPers,

I want to create a select-options like s_operid for vbpa-kunnr but with a condition specified is VBPA-KUNNR where VBPA-PARVW = 'WE'.

Thanks in advance. Pls reply asap. Points will definitely be rewarded.

Ritu

4 REPLIES 4

0 Kudos

Hi Ritu,

In the initialization event write one select statement to populate the select-option.

best regards,

surendar reddy.

Edited by: suredarreddy pulimamidi on Jun 25, 2008 11:12 AM

former_member195698
Active Contributor
0 Kudos

Add F4 help to your field and populate the field with your required selection.

You have to attach F4 to Selectoption-low and selectoption-high

use the event at selection-screen on value-request for selectoption-low and

at selection-screen on value-request for selectoption-high

Former Member
0 Kudos

hi,

use this

PARAMETERS : TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID OBLIGATORY.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR TAB_ID.

DATA : BEGIN OF INT_TAB_ID OCCURS 0,

TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID,

END OF INT_TAB_ID.

DATA : LOC_MAX TYPE ZALOAD_PROD_COMB-TAB_ID.

CLEAR INT_TAB_ID.

REFRESH INT_TAB_ID.

SELECT MAX( TAB_ID) INTO (LOC_MAX) FROM ZALOAD_PROD_COMB.

COUNT = LOC_MAX + 1.

DO 10 TIMES.

MOVE COUNT TO INT_TAB_ID-TAB_ID.

APPEND INT_TAB_ID.

COUNT = COUNT + 1.

ENDDO.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'TAB_ID' u201C Internal table field name

DYNPPROG = 'PROG_NAME u201C Program name

DYNPNR = SY-DYNNR

DYNPROFIELD = 'TAB_ID' u201C Field where u need F4 help

VALUE_ORG = 'S'

WINDOW_TITLE = u2018Any descriptionu2019

TABLES

VALUE_TAB = INT_TAB_ID. u201C Internal table name

Mark the post answered once ur problem is solved ....

Former Member
0 Kudos

Hi,

The statement select-options delares a internal table, so u can check the condition there and filter the entries u want.

Hope this helps u,

Regards,

Arunsri