Application Development 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: 

FM and SWO1question

Former Member
0 Kudos

I created a FM with import parameter MATNR, Remote Enable is set.

When I attach this FM to a business object by using SWO1, it says:

"Data type MATNR cannot be used for methods"

The reason is:

"You tried to create a method in the BOR with a data type that is not supported. Only data elements and structures are allowed as reference types for parameters in the BOR."

But when I change the parameter in the FM, not passing by value, It says:

"Reference parameters are not allowed with RFC"

If I set the FM to not remote call enable, I cannot attach to the business object type.

How can I solve this problem? Thanks!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Anthony,

Define your import parameter type as: BAPIMATALL-MATERIAL not MATNR.

When faced with a doubt like this, check existing BAPIs - e.g. BAPI_MATERIAL_EDIT.

Cheers,

Aditya

Edited by: Aditya Laud on Apr 10, 2009 2:25 PM

3 REPLIES 3

Former Member
0 Kudos

Hi Anthony,

Define your import parameter type as: BAPIMATALL-MATERIAL not MATNR.

When faced with a doubt like this, check existing BAPIs - e.g. BAPI_MATERIAL_EDIT.

Cheers,

Aditya

Edited by: Aditya Laud on Apr 10, 2009 2:25 PM

0 Kudos

Thank you all very much!

Anthony

Former Member
0 Kudos

Hi,

Make sure all parameters of Rfc are "pass by value" and this Rfc is in realeased status.

Thanks,

Asit Purbey.