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: 

'Pass by value' in BAPI and RFC

Former Member
0 Kudos

Hi

Why do we define parameters as Pass by Value in BAPI and RFC

Please let emn know

Thanks inadvance

Rama Devi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

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 ).

use SAP::Iface;

$iface = new SAP::Iface( NAME =>"RFCNAME" );

NAME is mandatory.

or more commonly:

use SAP::Rfc;

$rfc = new SAP::Rfc( ASHOST => ... );

$iface = $rfc->discover('RFC_READ_REPORT');

DESCRIPTION ^

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

3 REPLIES 3

former_member181995
Active Contributor
0 Kudos

From SE37 itself you may use where used-list to see how they are used in SAP with the help of sample coding.

Edited by: Ámit Güjärgoüd on Oct 3, 2008 6:19 AM

Former Member
0 Kudos

hi..friend..

pls go through the link:

regards,

Padma

Former Member
0 Kudos

HI,

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 ).

use SAP::Iface;

$iface = new SAP::Iface( NAME =>"RFCNAME" );

NAME is mandatory.

or more commonly:

use SAP::Rfc;

$rfc = new SAP::Rfc( ASHOST => ... );

$iface = $rfc->discover('RFC_READ_REPORT');

DESCRIPTION ^

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