05-21-2005 3:31 AM
Purpose: I am trying to create a new BAPI to generate a list of Flight Customers that will display both Customer ID and Customer Name using FlightCustomer Business Object type.
BAPI name: Z_BAPI_GET_CUSTOMER_LIST
Processing type: Remote-enable module
Can I define a reference type?
I am getting an error message of 'Reference Parameter are not allowed with RFC' when trying to define the following EXPORT parameters:
Parameter name: RETURN
Type spec: LIKE
Reference type: BAPIRET2
Pass type: no
Short text: Return parameter
Please advise. Thanks in advance.
05-21-2005 5:47 AM
Hi Collins,
You can't pass parameter by reference in a BAPI.
BAPI is remote enabled, if we pass parameters by reference then it points to local memory address which has no meaning in the BAPI server, so you must pass parameters by value only. You can do it by checking the option Pass By Value in the EXPORT tab of BAPI.
Hope this is clear to you now.
regards,
Narinder Hartala
Message was edited by: Narinder Hartala
05-21-2005 5:47 AM
Hi Collins,
You can't pass parameter by reference in a BAPI.
BAPI is remote enabled, if we pass parameters by reference then it points to local memory address which has no meaning in the BAPI server, so you must pass parameters by value only. You can do it by checking the option Pass By Value in the EXPORT tab of BAPI.
Hope this is clear to you now.
regards,
Narinder Hartala
Message was edited by: Narinder Hartala
05-21-2005 8:29 AM
Hi Margie,
You can't use LIKE but you can use TYPE. So you use TYPE BAPIRET2 rather than LIKE BAPIRET2 (the result is the same its just semantics).
You might want to think about making your RETURN field a TABLES parameter so that you can return multiple messages if required. Refer to BAPI_SALESORDER_CREATEFROMDAT2 as an example of this.
Cheers,
Brad