on 04-01-2011 11:12 AM
Hi,
I have a ZTABLE named Z_FI_TEST. I have an RFC function that accepts a table input and is supposed to update the current records' status column to X in Z_FI_TEST for matching records in the table that is passed in.
Here is my code
RfcDestination destination = RfcDestinationManager.GetDestination("SAP_ECC");
IRfcFunction function = null;
function = destination.Repository.CreateFunction("Z_FI_UPDATE");
foreach (IRfcStructure row in table)
{
// S = SUCCESS
// R = RETRY
// E = ERROR
row.SetValue("STATUS", "X");
}
function.SetValue("T_DATA", table);
function.Invoke(destination); //make the remote call
When I make the call, I can see from the .NET debug window that input parameters are properly structured and contain values. Here is what I see from the debug window:
{FUNCTION Z_FI_TEST (TABLES PARAMETER T_DATA=TABLE [STRUCTURE ZTFI_WF_START { FIELD MANDT=400 FIELD ID=0000000001 FIELD REQUEST=?INVOICE=1900000016&CIECODE=2000&FISCY=2011&WORKFLOW=NONPO&ROUTE=SELECTION&ACTION=NEW FIELD TIMESTAMP=20110401084509 FIELD STATUS=X }] [STRUCTURE ZTFI_WF_START { FIELD MANDT=400 FIELD ID=0000000002 FIELD REQUEST=?invoice=1900000017&ciecode=2000&fiscy=2011&workflow=NonPO&route=Selection&action=New FIELD TIMESTAMP=20110401094238 FIELD STATUS=X }])}
[SAP.Middleware.Connector.RfcFunction]: {FUNCTION Z_FI_TEST (TABLES PARAMETER T_DATA=TABLE [STRUCTURE ZTFI_WF_START { FIELD MANDT=400 FIELD ID=0000000001 FIELD REQUEST=?INVOICE=1900000016&CIECODE=2000&FISCY=2011&WORKFLOW=NONPO&ROUTE=SELECTION&ACTION=NEW FIELD TIMESTAMP=20110401084509 FIELD STATUS=X }] [STRUCTURE ZTFI_WF_START { FIELD MANDT=400 FIELD ID=0000000002 FIELD REQUEST=?invoice=1900000017&ciecode=2000&fiscy=2011&workflow=NonPO&route=Selection&action=New FIELD TIMESTAMP=20110401094238 FIELD STATUS=X }])}
AbapClassExceptionMode: OFF
Metadata: {FUNCTION Z_FI_TEST (TABLES T_DATA:STRUCTURE ZTFI_WF_START)}
The strange thing is, the call did not result in any error. Yet, the records are not updated. I got an ABAP Developer to place a breakpoint when the RFC was called from the connector. When we examine the T_DATA value that is passed in, it is empty.
Can anyone point out what I am doing wrong?
Thank You.
Dear Voon Siong Lum,
I am also facing the same problem. Have you found the answer?
If found the answer, kindly help me to solve this issue.
Regards,
Prabakaran.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Unfortunately, we did not find any solutions. I am thinking that this could be a bug with the connector. We should open an OSS note but we did not. Instead, we just asked the ABAPers to revise their RFC. Instead of passing in the table and update based on the table that was passed in, we are now doing record by record update.
Good Luck.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
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.