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

Data type IMA_POSNR cannot be used for methods

Former Member
0 Likes
1,145

HI,

I created a function module with an input parameter of type IMA_POSNR which is SAP defined. This function module works fine when I test. But when I try to use this function module in a new method which I created in a business object, it displays an error message saying that "Data type IMA_POSNR cannot be used for methods" I guess this must be regarding the conversion routine of this domain.

Can somebody help me on this?

Thanks,

Max

7 REPLIES 7
Read only

Former Member
0 Likes
870

Hi Max,

yes you are right it is because of conversion routine only.

If you go to the one of FM of conversion routine you will find OCCUS 4 is used with table defination which is no longer supported with ABAP OO>

Regards,

Atish

Read only

0 Likes
870

Thanks Atish.

So, how I can fix this issue?

Can you please give me with some good idea?

Thanks,

Max

Read only

0 Likes
870

Hi Max,

You just left with one option, Create your own domain-data element.

Or you can just try raising this with SAP and if they have some solution or note availble they will tell you.

Regards,

Atish

Read only

Former Member
0 Likes
870

Hi Max,

You can create your own Data element & process it.

Explicity call the conversion routine FM in your method.

Best regards,

Prashant

Read only

0 Likes
870

HI Prashant and Atish,

I created my own domain and data element with the same name ZPOSNR.

Still, the method fails to accept this function module saying "Data type ZPOSNR cannot be used for methods". Can you please help me on this?

I haven't worked on conversion routies also. So, I will happy if you kindly give me some good details how to proceed.

Thanks,

Max

Read only

0 Likes
870

Hi max,

you might have assigned the same conversion routine to your domain. You need to create your own conversion exit in the same guideline of SAP but just you need to make some correction in your code to suit for ABAP OO.

below is link on how to create conversion routines.

http://help.sap.com/saphelp_erp2004/helpdata/en/33/206bc8012e11d3b495006094192fe3/content.htm

Regards,

Atish

Read only

0 Likes
870