cancel
Showing results for 
Search instead for 
Did you mean: 

SAPNW::Rfc trapping VERSION

Former Member
0 Kudos

I'm trying to send the VERSION flag to BAPI_XMI_LOGON as follows:

SAPNW::Rfc->load_config;
my $rfc = SAPNW::Rfc->rfc_connect;
my $it = $rfc->function_lookup("BAPI_XMI_LOGON");
my $rc = $it->create_function_call;
$rc->EXTCOMPANY('TWDC');
$rc->EXTPRODUCT('MOPS');
$rc->INTERFACE('XMB');
$rc->VERSION('0.1');
$rc->invoke;

This works perfectly if I input the same information in SE37, but in my perl script, I get the error:

SAPNW::RFC::FunctionCall version 0.1 required--this is only version 0.02 at ./read-syslog.pl line 19

So instead of me being able to send a version number to the BAPI, the FunctionCall function is intercepting this version and interpreting it as a requirement for itself. Is there any way to avoid this behavior, and instead be able to pass the version number to the BAPI?

Cheers,

David.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi -

VERSION is a special-by-convention value in a Perl package. To access this or any other namespace clashing parameter name you can do something like:


...
$rc->parameter('VERSION')->value('0.1');
$rc->invoke;

Cheers.

Answers (1)

Answers (1)

Former Member
0 Kudos

That worked perfectly, thanks Piers.

Cheers,

David.