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

Method interface

former_member205645
Participant
0 Likes
901

Hello Gurus,


SELECT-OPTIONS:
  so_objid FOR HR_SOBJID MEMORY ID pwn.

    CALL METHOD /gkv/cd01_cl_ausndb_tools=>ausndb_read
       EXPORTING
         i_rng_hr_sobjid = so_objid.

i_rng_hr_sobjid structure:

SIGN S_SIGN

OPTION S_OPTION

LOW HR_SOBJID

HIGH HR_SOBJID

the to tables "i_rng_hr_sobjid" and "so_objid" have the same structure, even though i can not activate the source (Error: The table types are incompatible). Has anyone a solution for this problem without having to use a temporary table for the conversion.

Regards,

Ioan Constantin.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
879

You can try passing the SELECT-OPTION table body by using the [].

Like:


  SELECT-OPTIONS:
    so_objid FOR HR_SOBJID MEMORY ID pwn.
 
    CALL METHOD /gkv/cd01_cl_ausndb_tools=>ausndb_read
       EXPORTING
         i_rng_hr_sobjid = so_objid[].  " <<

Regards,

Naimesh Patel

7 REPLIES 7
Read only

Former Member
0 Likes
879

Select options have a default header line. But, in OOPS only table types can be used. Use an internal table with appropriate table type, instead of directly using the select option.

Read only

h_senden2
Active Contributor
0 Likes
879

Hi,

i've also the issue with the SELECT-OPTIONS so_budat (for instance) and a call of a METHOD.

I want to interface the select-option to the method and use it as you normally would do, so :

WHERE BUDAT in SO_BUDAT

Is there a standard and good working way to use the power of select-options and object oriented programming ?

regards,

Hans

Read only

0 Likes
879

Hello,

well i think not. Like using Dynpros in OO ... it doesn't work. OO and conventional programming don't like eachother in ABAP

Regards,

Ioan Constantin.

Read only

h_senden2
Active Contributor
0 Likes
879

Ok, so i have to create a table type in the DD representing the range of BUDAT and use that table type in the interface.

Hans

Read only

0 Likes
879

Yes, thats right, or you could use a Functionmodule instead of a Method

Have a good day

Read only

naimesh_patel
Active Contributor
0 Likes
880

You can try passing the SELECT-OPTION table body by using the [].

Like:


  SELECT-OPTIONS:
    so_objid FOR HR_SOBJID MEMORY ID pwn.
 
    CALL METHOD /gkv/cd01_cl_ausndb_tools=>ausndb_read
       EXPORTING
         i_rng_hr_sobjid = so_objid[].  " <<

Regards,

Naimesh Patel

Read only

0 Likes
879

Hi Naimesh,

now why didn't i think of that? )) Thanks, it works

Regards,

Ioan.