cancel
Showing results for 
Search instead for 
Did you mean: 

Problem whith RFC_READ_TABLE SAP.NET connector

Former Member
0 Kudos
146

i'm using SAP .NET Connector 3 whith visual studio 2005

the connection whith the SAP Server is OK

i'm trying to get a table values (Rows) by using the BAPI *RFC_READ_TABLE *

i don't know how to pass parameter to this BAPI

this is my code

RfcRepository repo = prd.Repository;

IRfcTable table = null ;

IRfcFunction myFunction =

repo.CreateFunction

("RFC_READ_TABLE");

myFunction.SetValue("QUERY_TABLE", "ZIPAB_HEADER");

myFunction.SetValue("DATA", table );

myFunction.SetValue("FIELDS", ??);

myFunction.SetValue("OPTIONS", ??);

I have 3 fiilds to display from my table ZIPAB_HEADER

SCENARIO type Char 30

TICKET_PESAGE type char 40

DATE_E type DATS

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI

Here i am explain simple scenario like based upon the empid we need to display the emp details.

RfcDestinationManager.RegisterDestinationConfiguration(new MyBackendConfig());

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

RfcRepository repo = prd.Repository;

IRfcFunction companyBapi1 = repo.CreateFunction("ZBAPI_EMPLOYEE_GETDATA");

///here pass the parameter.based upno the paramtere we are getting the output

///20000003 is the empid

companyBapi1.SetValue("EMPID", 20000003);

companyBapi1.Invoke(prd);

// int j=companyBapi1.Count;

based upon the index we just display the row value

string s = companyBapi1.GetString(0);

IRfcTable address1 = companyBapi1["PERSONAL_DATA"].GetTable();

//int k = address1.ElementCount;

//IRfcStructure strc = companyBapi1["ZBAPI_HRP"]

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

{

string s=address1[index][0].GetString();

}

do have any issues please let me knmow

Best Regards,

Harish.Y

Former Member
0 Kudos

Thanx for your replay

but my probleme is not solved

my probleme is that i need to use the BAPI RFC_READ_TABLE couse my table does not exist in any BAPI

so i have to get it by RFC_READ_TABLE

thanx any way