on 09-23-2020 4:23 PM
Hello Everyone,
I'm trying to execute the RFC in SAP iRPA. I used ActiveXObject and execute the RFC well in the code. But I didn't iterate(loop) in the table. I didn't find any documentation about how to use ActiveXObject. How can I do this?
There is no import values in the RFC just there is export value
After execution
Values
var BAPI = rootData.BAPI;
var rfcTable = BAPI.Add("Z_CRM_GET_RB_LEAD_LIST");
rfcTable.Call();
var rfcTableData = rfcTable.imports("ET_LIST");
ctx.log("Row Count" + rfcTableData.RowCount); // Gives me undefined
serdar_yazici35
Hello Serdar,
it isn't possible, this is a very old error in the ActiveX component, here a post from 2013.
Table parameters are obsolete, so it is better to don't use it.
Without any additional software installation you can't solve your requirement.
Best regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi serdar_yazici35
Please have a look at the step-by-step guide in the below blog post. It has explained how to iterate on the table data. Hope it helps.
SAP Intelligent RPA – Post General Journal Entries via RFC
Regards,
Vishal Kumar Dubey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer Vishal but I looked the all answered questions about this problem. The problem is actually the rfcTable.imports method has no RowCount so it comes undefined. If you want to iterate data in the table, you have to take the variable from rfcTable.tables method. After that you can iterate like that.
var BAPI = rootData.BAPI;
var rfcTable = BAPI.Add("Z_CRM_GET_RB_LEAD_LIST");
rfcTable.Call();
var rfcTableData = rfcTable.tables("ET_LIST");
for (var enumerator = new Enumerator(rfcTableData.Rows); !enumerator.atEnd(); enumerator.moveNext()) {
var rfcTableDataRow = enumerator.item();
ctx.log(rfcTableDataRow("COLUMN_NAME"));
}
Hi serdar_yazici35
Could you please check the below details once again.
Regards,
Vishal Kumar Dubey
User | Count |
---|---|
70 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.