I have working C# code to return RFC table data, but the same code is not working for a different RFC call. The major differences between the two RFCs is that the working one is very basic in that it only returns 1 table. The same code does not seem to work for the second more complex RFC which returns several export parameters and several tables. I will include my code and the RFC code from the Visual Studio debugger below. Can anyone tell me what needs to be changed in my code to get the Export Parameters and the Tables returned for my C# program? Here is the code returned from the RFC: {FUNCTION ZCRM_WEB_LOGIN_DATA_RET (EXPORT PARAMETER ES_CONTACT_ADDRESS=STRUCTURE BAPIBUS1006_BP_ADDR { FIELD PARTNER= FIELD ADDRESSGUID= FIELD ADDRESSTYPE= FIELD COMPANY_PARTNER= }, EXPORT PARAMETER ES_USER_DATA=STRUCTURE CRMT_ISA_UA_IUSER_DATA { FIELD FIRSTNAME= FIELD LASTNAME= FIELD BIRTHNAME= FIELD MIDDLENAME= FIELD SECONDNAME= FIELD NAME1= FIELD NAME2= FIELD NAME3= FIELD NAME4= FIELD TITLE_KEY= FIELD TITLE_ACA1= FIELD TITLE_ACA2= FIELD TITLE_SPPL= FIELD TITLELETTER= FIELD PREFIX1= FIELD PREFIX2= FIELD NICKNAME= FIELD INITIALS= FIELD NAMEFORMAT= FIELD NAMCOUNTRY= FIELD NAMCOUNTRYISO= FIELD ***= FIELD BIRTHPLACE= FIELD BIRTHDATE=0000-00-00 FIELD DEATHDATE=0000-00-00 FIELD MARITALSTATUS= FIELD FULLNAME= FIELD EMPLOYER= FIELD OCCUPATION= FIELD NATIONALITY= FIELD NATIONALITYISO= FIELD C_O_NAME= FIELD CITY= FIELD DISTRICT= FIELD REGIOGROUP= FIELD POSTL_COD1= FIELD POSTL_COD2= FIELD POSTL_COD3= FIELD PCODE1_EXT= FIELD PCODE2_EXT= FIELD PCODE3_EXT= FIELD PO_BOX= FIELD PO_W_O_NO= FIELD PO_BOX_CIT= FIELD PO_BOX_REG= FIELD POBOX_CTRY= FIELD PO_CTRYISO= FIELD STREET= FIELD STR_ABBR= FIELD HOUSE_NO= FIELD HOUSE_NO2= FIELD HOUSE_NO3= FIELD STR_SUPPL1= FIELD STR_SUPPL2= FIELD STR_SUPPL3= FIELD LOCATION= FIELD BUILDING= FIELD FLOOR= FIELD ROOM_NO= FIELD COUNTRY= FIELD COUNTRYISO= FIELD REGION= FIELD TIME_ZONE= FIELD TAXJURCODE= FIELD HOME_CITY= FIELD TRANSPZONE= FIELD LANGU= FIELD LANGUISO= FIELD COMM_TYPE= FIELD TELEPHONE= FIELD TEL_EXTENSION= FIELD TEL_NO= FIELD FAX= FIELD FAX_EXTENSION= FIELD FAX_NO= FIELD E_MAIL= FIELD LANGU_TEXT= FIELD TITLE_TEXT= FIELD ACA_TITLE_TEXT= FIELD REGION_TEXT= FIELD COUNTRY_TEXT= }, EXPORT PARAMETER ET_ACCOUNT_STRUCTURE=TABLE ZCRM_ACCOUNT_DESC_T, EXPORT PARAMETER ET_PERMISSIONS=TABLE ZCRM_PERMISSION_T [STRUCTURE ZCRM_PERMISSION_S { FIELD SITE_ID= FIELD CREDIT=TABLE ZCRM_BP_CREDIT_STATUS_T [STRUCTURE ZCRM_BP_CREDIT_STATUS { FIELD SITE_ID= FIELD CHECK_OK=Y }] FIELD ENTITLEMENTS=TABLE ZCRMT_ENTITLEMENTS_T FIELD PERMISSIONS=TABLE ZCRM_PERMISSION_ROLES_T }], EXPORT PARAMETER E_ALT_EMAIL=, EXPORT PARAMETER E_BUPA=8011111, EXPORT PARAMETER E_BUPA_TYPE=B, EXPORT PARAMETER E_CREDIT_HOLD=, EXPORT PARAMETER E_CREDIT_HOLD_DATE=0000-00-00, EXPORT PARAMETER E_IS_EMPLOYEE=X, EXPORT PARAMETER E_IS_RESELLER=, EXPORT PARAMETER E_USER=AHORWITZ, EXPORT PARAMETER E_USER_ALIAS=ALLAN.HORWITZ@BENTLEY.COM, IMPORT PARAMETER I_BUPA=8011111, TABLES PARAMETER ET_ACCT_ADDRESS_DATA=TABLE , TABLES PARAMETER ET_BUPA_ADDRESS=TABLE , TABLES PARAMETER ET_CHAR_VALUES=TABLE , TABLES PARAMETER ET_RETURN=TABLE , TABLES PARAMETER ET_ROLES=TABLE , TABLES PARAMETER ET_SITE_ADDRESS_DATA=TABLE , TABLES PARAMETER ET_SOLD_TOS=TABLE )} Here is the C# code that is returning zero rows: MyBackendConfig myBackendConfig = new MyBackendConfig(); RfcDestinationManager.RegisterDestinationConfiguration(myBackendConfig); RfcDestination dest = RfcDestinationManager.GetDestination("CD3"); RfcRepository repo = dest.Repository; IRfcFunction getProfile = repo.CreateFunction("ZCRM_WEB_LOGIN_DATA_RET"); getProfile.SetValue("I_BUPA", "8011111"); getProfile.Invoke(dest); IRfcTable tblSites = getProfile.GetTable("ET_SOLD_TOS"); RfcDestinationManager.UnregisterDestinationConfiguration(myBackendConfig); Console.WriteLine("tblSites.RowCount = " + tblSites.RowCount.ToString()); Console.WriteLine(""); Console.WriteLine("Press any key to exit..."); Console.ReadLine();
↧