2008 Jun 09 3:58 PM
Hey,
trying to use a table type as parameter for an own BAPI. As I try to publish
the BAPI (swo1) I got following error:
"Data type ZBAPI_FPOC_REQUEST cannot be used for methods"
Helps says only data elements and struktures are allowed as reference type.
I'm using a table reference type in my function module. Is this not possible?
What do I have to do if I would like to allow a structure 1..n times in a BAPI?
thx
chris
2008 Jun 09 4:01 PM
You will need to use a TABLES parameter against your BAPI and just use the line structure of your table type...
Hi Chris,
I definitely think it is because you are trying to publish it for external systems. As you have found, there is no problem using table types in function modules.
Gareth.
2008 Jun 09 4:01 PM
You will need to use a TABLES parameter against your BAPI and just use the line structure of your table type...
2008 Jun 09 4:13 PM
So I am able to include a structure like this in function moduel, but not in bapi?
|-import (structure)
...|- layer1 (structure)
......|- data element
......|- table element
...|-data element
So I have to transform it for BAPI this way????
|-import (structure)
|..|- layer1 (structure)
|.....|- data element
|..|-data element
|- table element (table)
Why does it work in function module with first structure in not in BAPI?
So everytime I have to insert input in BAPI with occurency 1..n I have to
insert a table??
How many tables with different structure I'm able to insert?
thanks
chris
2008 Jun 10 8:05 AM
Hi,
There is absolutely no difference technically between a BAPI and a function module - a BAPI is just a specific type of function module so there shouldn't be any problem from that perspective.
You can use DDIC table types as import and export parameters or you can use a DDIC structure to define a table against your function module interface. You can insert lots of tables - just go to the tables tab and add them as you need with their type set to a DDIC structure.
Are you trying to call the function module from an external system as an RFC?
I seem to recall that table types as import/export parameters don't work for certain external calls, say via JCo or Web Dynpro models or something (I really can't remember at the moment) - just wondering if that is why you are seeing the error?
Gareth.
2008 Jun 10 8:34 AM
hi,
the function module I called from se37 and even with table types in structure I can
call it without a problem. If I try to publish this function module in BOR he returns
an error.
Now I transformed my function module, so that every table I have to use is in
tab table and no table type in a structure, but I didn't try it yet to publish in BOR.
greetz
chris
2008 Jun 10 8:37 AM
Hi Chris,
I definitely think it is because you are trying to publish it for external systems. As you have found, there is no problem using table types in function modules.
Gareth.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |