Im trying to pass a table parameter to a RFC from .net with no success.
I am folowing this example. pass type table parameter
1) C# CODE:
int low = 2015;
int high = 2016;
string sign = "I";
string option= "BT";
RfcConfigParameters parametros = SapConector_fch.ConexionAsap_fch(SapConector_fch);
RfcDestination DestinoRFC = SapConector_fch.probarConexionASap_fch(parametros, this.Page);
RfcRepository repositorio = DestinoRFC.Repository;
IRfcFunction zrfc_valorhh = repositorio.CreateFunction("ZRFC_VALORHH");
IRfcTable it_ano = zrfc_valorhh.GetTable("ANO");
//IRfcStructure it_ano = zrfc_valorhh.GetStructure("ANO");
it_ano.Append();
it_ano.SetValue("SIGN", sign);
it_ano.SetValue("OPTION", option);
it_ano.SetValue("LOW", low);
it_ano.SetValue("HIGH", high);
try
{
zrfc_valorhh.Invoke(DestinoRFC);
}
catch (RfcAbapException ex)
{
Console.WriteLine(ex.Message);
ClientScript.RegisterStartupScript(this.GetType(), "Exepcion al llamar el RFC", "alert('" +"Exepcion al llamar el RFC " + ex.Message + "');", true);
}
2) I know when the table parameter "ANO" comes empty because an exception is thrown wich is made by me in sap.
The exeption is EMPTYPARAMETER.
FUNCTION ZRFC_VALORHH.
*"*"Interfase local
*" TABLES
*" IT_VALORESHH STRUCTURE ZSTRUCT_VALORESHH
*" ANO STRUCTURE RNG_GJAHR
*" EXCEPTIONS
*" NODATA
*" EMPTYPARAMETER
*"----------------------------------------------------------------------
IF ano IS INITIAL.
RAISE EMPTYPARAMETER.
ENDIF.
3) I also tried this answer but not working. another solution
Please Help-