on 2011 Dec 19 10:11 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.