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

Error when passing parameter as selection options in report

Former Member
0 Likes
1,283

Hi,

I read in numerous threads here on forum that selection option parameters can be passed by just defining parameter as table type RSELOPTION which has lineype with sign, option, low and high.

Im getting error on following call:


 CALL METHOD oref_myObject->read_data
    EXPORTING
      it_numbers          = s_numbers

s_numbers is:


SELECT-OPTIONS: s_numbers FOR someTable-someField,

read_data has one import parameter:


it_numbers type RSELOPTION

error message is:

s_numbers is not type-compatible with formal parameter "IT_NUMBERS".

Any ideas on what I'm doing wrong?

Moderator message - Moved to the correct forum

Edited by: Rob Burbank on Jan 25, 2010 5:38 PM

1 ACCEPTED SOLUTION
Read only

Former Member
838

Try changing the definition of s_numbers:

SELECT-OPTIONS s_number FOR sometable-somefield.

DATA: r_number TYPE RANGE OF sometable-somefield.

r_number[] = s_number[].

CALL METHOD oref_myobject->read_data
  EXPORTING
    it_numbers = r_number.

Rob

Added code

Edited by: Rob Burbank on Jan 25, 2010 5:49 PM

3 REPLIES 3
Read only

Former Member
839

Try changing the definition of s_numbers:

SELECT-OPTIONS s_number FOR sometable-somefield.

DATA: r_number TYPE RANGE OF sometable-somefield.

r_number[] = s_number[].

CALL METHOD oref_myobject->read_data
  EXPORTING
    it_numbers = r_number.

Rob

Added code

Edited by: Rob Burbank on Jan 25, 2010 5:49 PM

Read only

0 Likes
838

Thank you, that worked fine.

Edited by: Pellesap on Jan 26, 2010 12:10 AM

Read only

0 Likes
838

You cannot use tables with header lines in objects. SELECT-OPTIONS have header lines.

Rob