2008 Jun 01 9:52 PM
Hi there,
I build a function module, and want to use it as a BAPI. But when I add the function module as a method of a BAPI object, it gives me the following error: data type xxxxx cannot be used for methods.
I guess the problem happens because of the type of data element I used for the input parameter of the function module. Thus I tried many other data elements, but I keep getting the same error. I am really out of the game. Could anyone tell me which data element I should use for the input parameter of the function module? The function module has only one input parameter, which should be a string with length less than 100.
Thank you so much!!
Sincerely,
Bing
2008 Jun 04 7:21 PM
hope when you are creating the FM the parameter is set to TYPE and not LIKE.
HI,
Can you give the importing and exporting parametes of your FM so that we can check it .
Regards
Raj
2008 Jun 04 7:05 PM
Could anybody help me with this question? Any comments or suggestions are sincerely appreciated!!
2008 Jun 04 7:21 PM
hope when you are creating the FM the parameter is set to TYPE and not LIKE.
2008 Jun 06 9:03 PM
2008 Jun 12 3:40 AM
I still can't solve this problem. Could anyone help me with that? Thanks a lot.
Bing
2008 Jun 12 3:45 AM
HI,
Can you give the importing and exporting parametes of your FM so that we can check it .
Regards
Raj
2008 Jun 12 5:00 AM
The function module has only one input parameter, which should be a string with length less than 256. (I tried many predefined data element like RPLM_STRING, but when I tried to add the function module as a method of BAPI, the SAP always gave me the error: data type xxxxx cannot be used for methods)
It only has one output parameter: RETURN (associated type: BAPIRETURN)
I am really not familiar with ABAP program, let alone BAPIs. Any suggestions would be very helpful to me. I sincerely appreciate your help.
Bing
2008 Jun 12 6:03 AM
Hello Noyan,
Can you try this: Create a New Structure in SE11 Say ZBAPITEST. In that Structure create a field with length of type CHAR256 say ZZ_STRING. Now In the BAPI Interface, For the Input parameter Specigy the typeas ZBAPITEST-ZZ_STRING. Hope this Works.
Also make sure that you check the 'Pass By Value flag' and your FM has attibutes as 'RFC Enabled'.
Regards
Saket Sharma
2008 Jun 12 7:43 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |