Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

External 'C' function module not available during TCP/IP RFC call

Hi,

We have set up a TCP/IP connection from SAP to an HP-UX executable program and had the program registered. The RFC works when doing a test connection in SM59. However, when we do the call from an ABAP program using an external function module called 'SOCKRFC1' that should be available in the RFC call, we are getting an error message "Function SOCKRFC1 is not available". The SockGW.c file that was used to compile the SockGW.out file has a call to the SAP RFC function InstallFunction. Does anyone know why this 'SOCKRFC1' function would still be unknown to SAP?

Thanks,

Stephen

from ABAP program:

CALL FUNCTION 'SOCKRFC1' DESTINATION 'SOCKGW'

EXPORTING

TRCODE = 'MMSYNCH'

DEST = 'MMSYNCH'

IMPORTING

RTNCODE = W_RTNCODE

ERRCODE = W_ERRCODE

TABLES

CONTENTS = COMM_MMS

EXCEPTIONS

SYSTEM_FAILURE = 1

COMMUNICATION_FAILURE = 2.

from trace file dev_rfc0:

0000f0 00000006 05140010 4A0A2BE1 FDEB65C8 ........J.+áýëeÈ

000100 E1000000 10EA71C8 05140403 00125246 á....êqÈ......RF

000110 435F4558 5445524E 414C5F41 424F5254 C_EXTERNAL_ABORT

000120 04030402 00224675 6E637469 6F6E2053 ....."Function S

000130 4F434B52 46433120 6973206E 6F742061 OCKRFC1 is not a

000140 7661696C 61626C65 0402FFFF 0000FFFF vailable..ÿÿ..ÿÿ

======> Function SOCKRFC1 is not available

from SockGW.c:

//*** sockrfc1

RFC_RC SAP_API sockrfc1( RFC_HANDLE hRFC );

char sockrfc1_doc[] =

"Program calls the MPE ATP function

"

"rfcImportING

TRCODE C(40)

DEST C(64)

"

"rfcExportING

RTNCODE C(4)

ERRCODE C(4)

"

"TABLES

CONTENTS

";

char szAppName[] = "SockGW";

char szServer[ 16 ];

char szLogDir[ MAX_PATH ];

char szDestTime[9];

int nPort;

char szIniFile[32];

void Initialize() {

printf("Calling function Initialize()

");

sprintf( szIniFile, "/var/opt/DMG/bin/sockgw/%s.ini", szAppName );

printf("INI file name is %s",szIniFile);

CIniFile iniFile(szIniFile);

iniFile.ReadFile();

iniFile.GetValue("Settings","LogDir",szLogDir);

printf("LOG Directory Name is %s",szLogDir);

// Install the SAP RFC functions that can be called.

InstallFunction( "SOCKRFC1", sockrfc1, sockrfc1_doc );

InstallFunction( "WHOAMI", whoami, whoami_doc );

}

Edited by: S Gore on May 20, 2009 2:14 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question