cancel
Showing results for 
Search instead for 
Did you mean: 

.NET call function in SAP failed

Former Member
0 Kudos

I want to run the function TMS_TP_IMPORT from .NET but an error message appears when invoke the function:

Información adicional: The function module "TMS_TP_IMPORT" cannot be used for 'remote' calls.

Also prove the function TMS_MGR_IMPORT_TR_REQUEST but I receive the following message:

Información adicional: cannot find STRUCTURE specified by STMS_TP_IMPORTS

My code is:

RfcDestinationManager.RegisterDestinationConfiguration(new MyBackendConfig());

RfcDestination qas = RfcDestinationManager.GetDestination("SE37");

RfcRepository repo = qas.Repository;

//IRfcFunction companyBapi = repo.CreateFunction("TMS_TP_IMPORT");         

IRfcFunction companyBapi = repo.CreateFunction("TMS_MGR_IMPORT_TR_REQUEST");

companyBapi.SetValue("IV_SYSTEM", "QAS");

//companyBapi.SetValue("IV_SYSTEM_NAME", "QAS");

companyBapi.SetValue("IV_DOMAIN", "DOMAIN_DEV");

companyBapi.SetValue("IV_REQUEST", "DEVK907734");

companyBapi.SetValue("IV_CLIENT", "800");

companyBapi.Invoke(qas);

IRfcTable mensaje = companyBapi["TT_LOGPTR"].GetTable();

if (mensaje.RowCount !=0)

{

   for (int index = 0; index < mensaje.RowCount; ++index)

{

lMensaje.Text = mensaje[index]["PROGRAM"].GetString();

Someone knows why these errors might be displayed.

Accepted Solutions (0)

Answers (2)

Answers (2)

yannick_carel
Member
0 Kudos

Hi,

You can call a specific function SAP with remote-enable attribut. This SAP specific function allow calling TMS_TP_IMPORT function.

Yannick

Former Member
0 Kudos

To call FM via RFC it must be remote-enabled. TMS_TP_IMPORT is not remote-enabled module.