Skip to Content
author's profile photo Former Member
Former Member

Updating ZTABLE via RFC using .NET Connector 3.0

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 12, 2011 at 01:45 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.