2008 May 13 6:55 AM
Dear friends,
I want to give select-options in abap-objects program. How to give that.
Thanking You
with regards,
Mani
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..
2008 May 13 6:58 AM
Can you explain in more detail as what you want to do?
Regards,
Atish
2008 May 13 10:53 AM
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...
2008 May 13 12:06 PM
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.
2008 May 14 2:34 PM
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..
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |