RFC_PARAMETER import_par[2];
memset(import_par, 0, sizeof(import_par));
rfc_param(&import_par[0], "EKORG", TYPC, "1000", 4 * sizeofR(SAP_UC));
RFC_TABLE rfc_tables[2];
memsetR(rfc_tables, 0, sizeofR(rfc_tables));
rfc_tables[0].name = cU("LT_DATA");;
rfc_tables[0].nlen = strlenU(rfc_tables[0].name);
rfc_tables[0].type = TYPC;
rfc_tables[0].leng = sizeofR(ZINTERFACE_INPUT_STRU3);
rfc_tables[0].itmode = RFC_ITMODE_BYREFERENCE;
rfc_tables[0].ithandle = ItCreate(cU("LT_DATA"), sizeofR(ZINTERFACE_INPUT_STRU3), 0, 0);
#if 1
if (ITAB_NULL == rfc_tables[0].ithandle)
{
return;
}
int lineleng = ItLeng(rfc_tables[0].ithandle);
void* ptr = ItAppLine(rfc_tables[0].ithandle);
if (ptr)
{
memsetR(ptr, 0, sizeofR(ZINTERFACE_INPUT_STRU3));
}
#endif
rfc_tables[1].name = NULL;
RFC_RC rfc_rc = RfcCallReceive(m_rfc_handle, "Z_INTERFACE_OUTPUT_POST", NULL, import_par, rfc_tables, NULL);
if (RFC_OK == rfc_rc)
{
AfxMessageBox("success!");
}
else
{
AfxMessageBox("failed!");
}