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

loop through organization unit selected in select options

Former Member
0 Likes
553

Hi,

i need to get all organization units selected in select options(i have a table with sign, option, low, high fields). Is there any function module or should i use st like:

- with fm SELECT_OBJECTS_FOR_OTYPE get all org units and from this units take all units which corresponds selection criteria?

thanks

JJ

4 REPLIES 4
Read only

Former Member
0 Likes
498

Hi!

It's not recommendet to process a select option within a LOOP. There are many options, which makes it though to process.

Try always using the "IN" statement.

For example:

SELECT * FROM t001

INTO TABLE gt_t001

WHERE bukrs IN so_bukrs. "<<< IN

ANd after a select like this, you can use the internal table, with the FOR ALL ENTRIES, during other selects.

Regards

Tamá

Read only

Former Member
0 Likes
498

Do you want the Org. Units entered in the Select-options.

Then you can use the select-option itself for that naaa....

It is having the 4 fields you have soecified and you can use select-options as a normal internal table....

Read only

0 Likes
498

But what to do when user selects some interval of ids?

Read only

Former Member
0 Likes
498

Hi,

You can use Between condition in Where class.

Ex.

select fields from table where field between select-option-low and select-option-high.

Regards,

Bhaskar