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

Re : select-options in abap objects

Former Member
0 Likes
540

Dear friends,

I want to give select-options in abap-objects program. How to give that.

Thanking You

with regards,

Mani

5 REPLIES 5
Read only

Former Member
0 Likes
505

SELECT-OPTIONS so_kunnr FOR bsid-kunnr.

Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
505

HI Mani,

It's common mix ABAP Procedural with ABAP Objects in the same program.

You should use the same way used in ABAP procedural program as Marco Cerdelli sad.

But inside ABAP OBJECTS classes you can't use is these statement type.

Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].

Best Regards.

Marcelo Ramos

Read only

Former Member
0 Likes
505

Hi ,

You can declare the select-option globally in oops simplly like

you did in procedural method

exp:

select-option : s_carr type sflight-carr.

Reward some points.

Regards,

Anomitro

Read only

Former Member
0 Likes
505

Hi,

I am guessing that from within the object code you want to present selection options to the user and then continue processing based on these inputs.

The only way I know of doing this is to separately design selection screen in a "regular" ABAP program and then call that program via a SUBMIT statement to present the screen to the user.

This gives you those nice selection range features. The called program can also handle screen and input validations.

Regards,

Walter Pointner

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
505

Like the others have said, if you want to give the select-options to the user via selection screen, then this must be outside the OO context. But if you simply want a range which is like SELECT-OPTIONs without the screen interface(it provides the table with SIGN OPTION LOW and HIGH), then you may use TYPE RANGE OF inside the OO context.

data: r_datum type range of sy-datum.

Regards,

Rich Heilman