'Pass by value' in BAPI and RFC
Why do we define parameters as Pass by Value in BAPI and RFC
Please let emn know
sudipta das replied
SAP::Rfc - is a Perl extension for performing RFC Function calls against an SAP R/3 System. Please refer to the README file found with this distribution. This Distribution also allows the creation of registered RFCs so that an SAP system can call arbitrary Perl code created in assigned callbacks.
The best way to describe this package is to give a brief over view, and then launch into several examples. The SAP::Rfc package works in concert with several other packages that also come with same distribution, these are SAP::Iface, SAP::Parm, SAP::Tab, and SAP::Struc. These come together to give you an object oriented programming interface to performing RFC function calls to SAP from a UNIX based platform with your favourite programming language - Perl. A SAP::Rfc object holds together one ( and only one ) connection to an SAP system at a time. The SAP::Rfc object can hold one or many SAP::Iface objects, each of which equate to the definition of an RFC Function in SAP ( trans SE37 ). Each SAP::Iface object holds one or many SAP::Parm, and/or SAP::Tab objects, corresponding to the RFC Interface definition in SAP ( SE37 ).
For all SAP::Tab objects, and for complex SAP::Parm objects, a SAP::Struc object can be defined. This equates to a structure definition in the data dictionary ( SE11 ). Because the manual definition of interfaces and structures is a boring and tiresome exercise, there are specific methods provided to automatically discover, and add the appropriate interface definitions for an RFC Function module to the SAP::Rfc object ( see methods discover, and structure of SAP::Rfc ).
$iface = new SAP::Iface( NAME =>"RFCNAME" );
NAME is mandatory.
or more commonly:
$rfc = new SAP::Rfc( ASHOST => ... );
$iface = $rfc->discover('RFC_READ_REPORT');
This class is used to construct a valid interface object ( SAP::Iface.pm ). The constructor requires the parameter value pairs to be passed as hash key values ( see SYNOPSIS ). Generally you would not create one of these manually as it is far easier to use the "discovery" functionality of the SAP::Rfc->discover("RFCNAME") method. This returns a fully formed interface object. This is achieved by using standard RFCs supplied by SAP to look up the definition of an RFC interface and any associated structures.
So now you can understand why pass by values are given in RFC or Bapi.
thank u again