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 program

Former Member
0 Likes
1,171

Dear friends,

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

Thanking You

with regards,

Mani

4 REPLIES 4
Read only

Former Member
0 Likes
919

Can you explain in more detail as what you want to do?

Regards,

Atish

Read only

Former Member
0 Likes
919

are you trying to know how to handle passing select options values to a class method....??

if yes, you can create an internal table of a structure with fields

SIGN OPTION LOW HIGH

and pass the same in the method...

Read only

Former Member
0 Likes
919

Hi there,

Create a variable of type rseloption and assign it to a select-option field.

then pass it to a method ..Method atributes must also have a type rseloption.

select-options : so_bukrs

data: relseoption_bukrs type rseloption.

-


reseloption_bukrs[ ] = rseloption[ ]

passs the rseloption as an export parameter to a method.

I hope this helps ..

Please reward points if useful.

Read only

Former Member
0 Likes
919

In the transaction SE24, enter your class name, click modify.

in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:

" P_SAKNR FOR SKAT-SAKNR".

you've got to declare two types in the class:

a- TYPES: begin of E_S_SAKNR,

sign(1),

option(2),

low(10),

high(10),

end of E_S_SAKNR.

b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.

so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:

method TEST importing ET_SAKNR type E_T_SAKNR.

now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..