RFC function is called with null paremeters on SAP side

I used the new version of .Net Connector 2.0.1.
I created a simple client called RFC function with one table parameter and simple RFC function inserts record to simple table on SAP side.
If I call this RFC function from SAP side the record is inserted to my table with correct value.
If I call this RFC function from NET side the record is inserted with null value.
What's wrong ?
Could anybody help me ?
Code :
SAP side
FUNCTION ZRVFRFCNV.
*"  TABLES
*"      ITDATA STRUCTURE  ZRVNAMEVALUE
insert into ZRVNAMEVALUE values ITDATA.
ENDFUNCTION.
Net side                    
ZRVNAMEVALUE nam_val2 = new ZRVNAMEVALUE();
nam_val2.Name = "100";
nam_val2.Value = "NORD";
ZRVNAMEVALUETable tblTest = new ZRVNAMEVALUETable();
tblTest.Add(nam_val2);
// for testing : dataGrid show correct values
dataGrid1.SetDataBinding(tblTest, "");
this.sapProxy11.Zrvfrfcnv(ref tblTest);

The problem was in insert statement. I changed insert to modify on SAP side and solved it.

Similar Messages

  • Function module call with destination

    Hi,
    how can check if a function module call with destination works or not ?
    How can I debug.
    What can be the reason if it is not calles
    regards
    ertas

    * to chcek the rfc Destination By pass RFC destination name and Connection Type..
    RFC_CHECK_DESTINATION
    or
    RFC_CHECK_DESTINATION_ID
    or
    You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
    Check this sample code from Craig Cmehil's weblog.
    CALL FUNCTION 'RFC_VERIFY_DESTINATION'
      EXPORTING
        DESTINATION = TMP
            TIMEOUT = 10
      EXCEPTIONS
        INTERNAL_FAILURE           = 1
        TIMEOUT                    = 2
        DEST_COMMUNICATION_FAILURE = 3
        DEST_SYSTEM_FAILURE        = 4
        UPDATE_FAILURE             = 5
        NO_UPDATE_AUTHORITY        = 6
        OTHERS                     = 7.
      IF SY-SUBRC EQ '0'.
        "* Do code here
      ENDIF.
    Prabhu

  • ABAP Dump due to RFC Function module call in another thread

    Hi,
    I am facing some problem since yesterday. In one of my executable program I am calling a RFC fm as below mentioned    
    REPORT ZREPORT.
    CALL FUNCTION 'Z_XXXXXXXXX'
          STARTING NEW TASK L_NAME
          DESTINATION IN GROUP 'TASK'
          PERFORMING RETURN_INFO ON END OF TASK
          EXPORTING
            P_exp1       = l_emp
          TABLES
            R_VBELN      = r_it_vbeln
          EXCEPTIONS
            NO_DATA_TO_PROCESS = 1
            OTHERS             = 2.
    wait until v_task = 1.
    update ztable.
    Due to some data inconsistence one of the SAP function
    module which I am calling in my function module Z_XXXXXXXXX
    is generating dump with message type X. Since there is data inconsistence it is generating dump that's OK.
    But the problem i am getting is, report ZREPORT is generating dump at WAIT statement saying illegal statement even though I am calling that function module
    Z_XXXXXXXXX as a separate new task.
    Can somebody help me.
    Thanks,
    Amara.

    hi, Amara
    I agree with Rich said, and do a simulate test in my server, here is the analysis.
    Assume we have a RFC, like this:
    FUNCTION ZGZL_DUMPTEST.
    *"*"Local interface:
    *"  EXPORTING
    *"     VALUE(OUT) TYPE  I
    *"  EXCEPTIONS
    *"      CONVERT_FAIL
      data:a  type  i.
      a = 'A'.
    ENDFUNCTION.
    And call this RFC like you way:
    REPORT ZGZL_DUMPTEST .
    DATA:
      SEMAPHORE(1) VALUE SPACE,
      LC_OUT       TYPE  I.
    CALL FUNCTION 'ZGZL_DUMPTEST'
    STARTING NEW TASK 'DUMP'
    PERFORMING RETURN_INFO ON END OF TASK.
    WAIT UNTIL SEMAPHORE = 'X'.
    WRITE: 'OVER'.
    FORM RETURN_INFO USING TASKNAME.
      RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
              IMPORTING  OUT = LC_OUT.
      SEMAPHORE = 'X'.
    ENDFORM.                    " RETURN_INFO
    if we run the RFC in se37 directly, obviously it will occur a rumtime error CONVT_NO_NUMBER, and dump.
    But if we run the above application to call the RFC, we will get a different runtime error CALL_FUNCTION_REMOTE_ERROR.
    Error Analysis in ST22 like this:
    An error occurred when executing a REMOTE FUNCTION CALL.
    It was logged under the name "CONVT_NO_NUMBER"
    on the called page.
    I think that means the application receive the runtime error from RFC when call  <b>RECEIVE RESULTS</b>.
    In normal CALL FUNCTION, the external application will accept the rumetime error throw from FM, that's correct, because it let the caller can handle these runtime errors.
    In you case, you said RFC run in a new task, yes, that's true, so you can call the RFC like this:
    CALL FUNCTION 'ZGZL_DUMPTEST'
    STARTING NEW TASK 'DUMP'
    PERFORMING RETURN_INFO ON END OF TASK.
    WAIT UNTIL SEMAPHORE = 'X'.
    WRITE: 'OVER'.
    FORM RETURN_INFO USING TASKNAME.
      SEMAPHORE = 'X'.
    ENDFORM.                    " RETURN_INFO
    It will goes well, no dump. Why? because we don't use RECEIVE RESULT. RECEIVE RESULT will bring the result from FM, also bring the runtime error from FM.
    So if you want to call the FM and receive the result, handle the runtime error in FM inside at first.
    like this:
      CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
        a = 'A'.
      ENDCATCH.
      IF SY-SUBRC = 1.
        RAISE CONVERT_FAIL.
      ENDIF.
    And then you call FM like this:
    CALL FUNCTION 'ZGZL_DUMPTEST'
    STARTING NEW TASK 'DUMP'
    PERFORMING RETURN_INFO ON END OF TASK.
    WAIT UNTIL SEMAPHORE = 'X'.
    WRITE: 'OVER'.
    FORM RETURN_INFO USING TASKNAME.
      RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
              IMPORTING  OUT = LC_OUT
              EXCEPTIONS CONVERT_FAIL = 1.
      SEMAPHORE = 'X'.
    ENDFORM.                    " RETURN_INFO
    That's will be ok for your scenario.
    Hope my reply is useful.
    thanks

  • Rfc function module call error

    Hi Abaper,
    I'm doing upgrade from 4.7 to ecc 6.0 currently and encounter problem in one of the rfc function module that we used. I've tested the connection to destination using sm59 and the connection is successful.
    As an information, in the rfc setting, the target system is not Unicode system.
    When I test using se37 and put the rfc destination in my function module call, I always encountered system_error exception. There's no issue with this rfc call before in 4.7 system.
    Please help me on this. Thank you.
    Edited by: Abraham Bukit on Sep 3, 2008 2:36 AM

    Hi,
    I had the same issue in the past and solved it in the following way.
    If the destination system is not Unicode please try to set the password for the communication user set in SM59 using only upper-case characters and taking into account that the password shouldn't be longer than 8 characters.
    Hope this will help.

  • RFC function module called inside an enhancment section

    Hi All,
    I am calling a RFC function module in background task as a separate unit. I am calling this FM within an enhancement section. Is it alright to use a commit work inside this RFC enabled FM even if I am calling it within an enhancemnt? Please help

    Hi,
    Yes,  you can use a commit work inside this RFC enabled FM even if I am calling it within an enhancemnt. Please refer below link regaring this. Thanking you.
    Commit within an enhancement point

  • Callback function is called with sys user context.

    1. Create AQ Queue table
    2. Create AQ Queue "MyQueue"
    3. Start Queue "MyQueue"
    4. Register "Subscriber1"
    5. Register "MyQueue"."Subscriber1" with Notification URL : PLSQL:\\Mypackage.SP_Callback
    Till here everything is fine...
    6. Enqueue message into "MyQueue" with "Subscriber1" as recipient.
    7. Now AQ notification is fired and as a result Its calling "Mypackage.SP_Callback".
    Here the problem is "Mypackage.SP_Callback" is called from SYS user context. i.e if i capture the dbuser its "SYS" who is invoking the AQ notification call back method, "Mypackage.SP_Callback".
    Do i have any settings so that "Mypackage.SP_Callback" is called with a specific user account instead of "SYS".
    Please help me...
    Edited by: user13421038 on Jun 30, 2011 5:06 AM

    Hello,
    From what is mentioned in this thread this issue is the same as that discussed in Note 552771.1. The issue should be resolved in 10.2.0.4 and 11.1.0.6 onwards.
    Thanks
    Peter

  • Using RFC Function Module to send data to NON SAP Application

    Hi friends,
    Please guide me how can I send data from SAP -> Dotnet Applcation using Dotnet Connector through RFC function module from SAP side. In my scenerio, I Run Z transaction  to executte RFC function module which create some data to pass to dotnet connector.
    Regards,
    Rajesh Kumar

    Hi,
    You can make use of Dotnet connector to read the content of SAP RFC .. (eaiest of all)
    The RFC can be executed using connector , and can read the data simultaneously.. u need to code in dotnet for this..
    else create a webservice and read it from dot net ..
    Regards
    Renu Gusain
    Edited by: Renu Gusain on Jan 25, 2010 12:55 PM

  • Regarding the RFC Function Module call from PI

    Hi All,
    I am working on one File to RFC interface, in which File adapter picks the file, this file data has to goto  2 function modules in SAP system. For this i added 2 Inbound interfaces in INTERFACE DETERMINATION and I developed 2 RECEIVER AGREEMENTS. In 2 RECEIVER AGREEMENTS i added single receiver RFC Communication Channel.
    Now i want assurance that once 1 st function module will execute completely, then only my second function module should be called. Is there any setting that i can do to make this sync?????.
    what is the use of  Send 'Confirm Transaction' in receiver RFC Communication Channel under Adavanced Mode.
    Thanks,
    Balu

    Hi,
    As per you requirement I would suggest to change your scenario as File To Proxy. It will much more easier and 100% sure to process second BAPI only after first gets successful inside the proxy.
    Pass the data from file adapter to inbound proxy and then inside proxy code you first call the first BAPI and use commit wrok. Once commit work is successful then you call the second BAPI otherwise rollback the changes.
    Example:
    Call First_BAPI
    <pass the data to it's import export parameters>
    Commit work.
    if sy-subrc =0.
    Call Second_BAPI.
    <pass the data to it's import export parameters>
    Commit work.
    endif.
    Note: If you are not very much comfortable with ABAP the discuss this with your ABAP team mate.
    Regards,
    Sarvesh

  • Why are static methods called with null references,valid ?

    This is my code :
    package inheritance;
    public class inh6{
         public static void method(){
         System.out.println("Called");
         public static void main(String[] args){
              inh6 t4 = null;
         t4.method();
    O/P :
    CalledHere t4 is a null reference and yet we are able to call a method on it,why is null pointerexception not thrown.Why are we able to call static methods using null references ?
    t4 is null means it doesnot refer to any memeory address,hence how is method() called correctly.
    I hope i am clear. :)
    Thank you for your consideration.

    punter wrote:
    jverd wrote:
    Memory addresses have nothing to do with it. I doubt memory addresses are even mentioned once in the JLS.
    By memory address i mean the memory location the reference is pointing to.I know what you mean. But if you think it's relevant, can you show me where in the JLS it says anything about memory locations?
    >
    You can do that because a) t4's type is "reference to inh6" and b) method() is declared static, which means that you don't need an object to call it, just the class. That class comes from the compile time type of t4. The fact that t4 is null at runtime is irrelevant.
    So at compile time the type of t4 is inh6 and hence the method is called.Is it ? Had method() not been static a NullPointerException would have been thrown.Correct.
    With non-static, non-private, non-final methods, which implementation of the method gets called is determined at runtime, buy the class of the object on which it's being called. If any one of those "non"s goes away, then the method is entirely determined at compile time, and in the case of static methods, there's no instance necessary to call the method in the first place.

  • Dynamic Function Module call with table parameter?

    Hi All,
    I'm trying to call FMs dynamically with PARAMETER-TABLE. These FMs are mainly about searching data from inputs and returning internal table as outputs. I managed to pass data into import parameters as query conditions, but still failed to set tables parameter. The code is like below, could you please help me check what's the problem? Thank you very much!!
    data: lv_val type RS38L_TYP value 'ls_service_para-fmparam'.
    data: lt_interface TYPE rsfbintfv,
               ls_import_para TYPE rsfbpara,
               ptab TYPE abap_func_parmbind_tab,
               ptab_line TYPE abap_func_parmbind,
               ref_wa type ref to data.
    Field-symbols: <fs> type any,
    CALL METHOD cl_fb_function_utility=>meth_get_interface
           EXPORTING
             im_name             = LV_FM          "FM name
           IMPORTING
             ex_interface        = lt_interface
           EXCEPTIONS
             error_occured       = 1
             object_not_existing = 2
             OTHERS              = 3.
    ***loop IMPORT parameters and fill in data from lt_params***
    loop at  lt_interface-import into ls_import_para.
         read table lt_params into ls_param with key key = ls_import_para-parameter.  "check if exists query value
        if sy-subrc = 0 and ls_param-value is not initial.
              assign (lv_val) to <fs>.
               <fs> = ls_param-value.
              create data ref_wa type (ls_import_para-STRUCTURE).
              assign ref_wa->* to <fs2>.
               <fs2> = <fs>.  UNASSIGN: <fs>,<fs2>.
               ptab_line-name = ls_import_para-PARAMETER.
               ptab_line-value = ref_wa.
               ptab_line-kind = abap_func_exporting.
              insert ptab_line into table ptab.
         endif.
    endloop.
    ***loop at TABLE parameters to retrieve data from FM***
    loop at lt_interface-TABLES into ls_import_para.
         create data ref_wa type (ls_import_para-STRUCTURE).
          ptab_line-tables_wa = ref_wa.     "set data type
          ptab_line-name = ls_import_para-PARAMETER.
          ptab_line-kind = abap_func_tables.
         insert ptab_line into table ptab. "if commented, no exception occurs,but I cannot get any dataset.
    endloop.
    CALL FUNCTION LV_FM PARAMETER-TABLE ptab.
    if I execute the code, when there has TABLES parameter defined in the FM, I get CX_SY_DYN_CALL_PARAM_MISSING exception with runtime error DATREF_NOT_ASSIGNED. But in debug mode, as shown in the screen shot attached, I did see the field TABLES_WA has correct type. So maybe I misunderstand the usage of PARAMETER-TABLE. Does anyone has experience on it?
    Best Regards,
    Jeff

    Hi Rama,
    Yes, I'm not passing value to the table parameter, but that parameter is where I want to retrieve data from FM, not pass value to, so I don't assign any value to ptab_line-value for that parameter.
    BTW, I just did some test to pass value to the parameter using the following code and still got CALL_FUNCTION_PARM_MISSING exception:
    FM: ZLEAD_CONTACT
    parameters:
    IMPORT:  I_PARTNER TYPE BUT000-PARTNER mandatory
    TABLES: OT_CONT LIKE ZLEAD_INFO_S optional (here ZLEAD_INFO_S is a flat structure)
    ptab_line-name = ls_import_para-PARAMETER.
    ptab_line-kind = abap_func_tables.
    create data ref_type type table of (ls_import_para-STRUCTURE).
    ptab_line-tables_wa = ref_wa.
    ptab_line-value = ref_type.
    The detail of ptab:
    VALUE
    TABLES_WA
    KIND
    NAME
    ->2000000025
    {A:initial}
    10
    2000000025
    ->Standard Table[0x10(588)]
    ->Structure: flat & not charlike
    30
    OT_CONT
    And the same error if I set parameter using below code:
    create data ref_wa type RS38L_TYP.
    assign ref_wa->* to <fs>.
    <fs> = ls_import_para-STRUCTURE.
    ptab_line-tables_wa = ref_wa.
    The detail of ptab:
    VALUE
    TABLES_WA
    KIND
    NAME
    ->2000000025
    {A:initial}
    10
    2000000025
    ->Standard Table[0x10(588)]
    ->ZLEAD_INFO_S
    30
    OT_CONT
    Regards,
    Jeff

  • Portal can not work with abnormal increased /usr/sap/SID file space

    hi experts,
    I got a problem today on our HR portal.
    At first I can't login the nwa, then I checked tha OS of portal, I saw that the file system /usr/sap/SID's used spaces increase very quickly, though I increase the free spaces for emergency use, the portal still can not work and the free space is still missing. I just solved by restart the SAP service.
    Did anyone face the same problems before?
    System information
    OS --> AIX v5.3
    Database --> Oracle 10.2.0.2
    SAP --> netweaver 2004s SP12.

    Hi,
    This happens when your archive log file of the application increases,
    Check the folder usr/sap/sid/instance/j2ee/cluster/server0/log/archive folder this is the reason for your disk space increase. Just take a backup and delete the files in the archive folder (except temp folder).
    The deletion of older archive files is not handeled by SAP, you have to manually delete the archive logs.
    Regards,
    Vamshi.

  • Unknown error calling a RFC Function Module in BODI

    Hi all,
    I am having an issue identifying the error that my batch job in BODI is giving with regards to a RFC function module call in my query. The value returned by the standard parameter 'AL_RFC_RETCODE' are square characters (              ).
    At the completion of the job, the error message 'RFC CallReceive error <Function ZCT_INDSLS_SLS_TRN_INSERT: Invalid request.. Invalid request.>.' is being output.
    Correct me if I'm wrong but the parameter 'AL_RFC_RETCODE' should return standard values as per the techical manual provided to undertand any errors that might occur during a RFC FM call.
    Can anyone help me on this?
    Best regards,
    Andrew Wong

    Hi Senthil,
    I think you answered your query in your question itself
    The user ID and password need to be maintained in RFC destination in SM59.
    Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
    Regards,
    Atish

  • Get interface of RFC function modules in a remote system

    Hi,
    my goal is to write a report which checks if DDIC structures in two systems fit together when I use RFC`s.
    I have the destination and the name of the RFC.
    Can somebody tell me if I can get a list of the Importing/Exporting Parameters of this RFC? Maybe even with a typedescribtion?
    Thanks for you help.
    Best regards
    Lars
    Edited by: Lars-Eric Biewald  on May 21, 2008 8:39 AM

    Hello ,
    Thank you for your quick help.
    Here I have 3 ECC 6 system .
    1 Central systen
    2 Slave system
    Data will be updated to 2 slave system using RFC function module .
    We've already the SAP address, Client, User name , Password.. of the remote system
    So here how we will create RFC in SM59 to be used in the RFC call ?
    We will transfer the username, password , client in the RFC function module/..
    Here I do not know how to create RFC connection in SM59 and how to use them in ABAP
    Could you please help me ????
    Thanks

  • Clarification needed on the behaviour of count with null values

    Hi friends,
    I am confused about the result given by the count aggregate function when dealing with null. Please can anybody clarify about that to me. Here is what i tried
    CREATE TABLE Demo ( a int);
    INSERT INTO Demo VALUES
    (1),
    (2),
    (NULL),
    (NULL);
    SELECT COUNT(COALESCE(a,0)) FROM Demo WHERE a IS NULL; -- Returns 2
    SELECT COUNT(ISNULL(a,0)) FROM Demo WHERE a IS NULL; -- Returns 2
    SELECT COUNT(*) FROM Demo WHERE a IS NULL; -- Returns 2
    SELECT COUNT(a) FROM Demo WHERE a IS NULL; -- Returns 0
    Please can anybody explain me why the result is same for the first three select statements and why not for the last select statement. And what does COUNT(*) actually mean?
    With Regards
    Abhilash D K

    There is a difference to the logic when using a column name versus "*" - which is explained in the documentation (and reading it is the first thing you should do when you do not understand a particularly query/syntax).  When you supply a column
    (or expression) to the count function, only the non-null values are counted.  Isnull and coalesce will obviously replace a NULL values, therefore the result of the expression will be counted. 
    1 and 2 are effectively the same - you replace a null value in your column with 0 and each query only selects rows with a null column value.  The count of non-null values of your expression is therefore 2 - the number of rows in your resultset.
    3 is the number of rows in the resultset since you supplied "*" instead of a column.  The presence of nulls is irrelevant as documented.
    4 is the number of non-null values in the resultset since you DID supply a column.  Your resultset had no non-null values, therefore the count is zero.

  • Getting Return values from RFC function call with visual basic

    Hi,
    I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
       SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
            Export parameters (to SAP):
                    - Student Name [char 10]         ==> "STUNAME"
                    - Student ID         [char 20]        ==> "STUID"
           Return values (From SAP):
                    - Results [char 10]        ==> "RESULT"
                    - Remarks [char 200]        ==> "REMARKS"
    i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
    Here's my vb code to accessing the function
            Dim R3 As Object
            Dim FBFunc As Object
            Dim returnFunc As Boolean
            Dim connected As Boolean
            R3 = CreateObject("SAP.Functions")
            R3.Connection.Client = "000"
            R3.Connection.User = "BCUSER"
            R3.Connection.Password = "minisap"
            R3.Connection.Language = "DE"
            R3.Connection.System = "dtsystem"
            R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx" 
            connected = R3.Connection.Logon(0, True)
            If connected <> True Then
                MsgBox("Unable to connect to SAP")
            End If
            FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
            FBFunc.exports("STUNAME") = "Jonny"
            FBFunc.exports("STUID") = "12345"
            returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
    thanks alot.
    Edited by: Eugene Tan on Mar 4, 2008 7:17 AM

    Hi Gregor,
    Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
    Below is the code snippet.
    Set impReturn = CHPASS_FN.Imports("RETURN")  <<=== is RETURN the standard keyword to get a                                                                                return object?
      expPassword.Value = currpass
      expNewPass.Value = newpass
      expFillRet.Value = "1"
    ''' Call change password function
      If CHPASS_FN.Call = True Then
        outFile.Write (", Called Function")
        Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return                                                               value variable names?
        outFile.WriteLine " : " & Message
      Else
        outFile.Write (", Call to function failed")
      End If
    thanks alot...all your help is very appreciated.

Maybe you are looking for

  • My new USBs are not showing up in Disk Utility

    HI ! I just purchased 25 new USBs to upload biz marketing content to. The USBs are not showing up in the FInder (I've checked all the options in the Preferences Pane) nor are they showing in Disk Utility. What am I missing? Or should I just return th

  • S-curve color correction in Premiere Elements v11

    I'm using the Technicolor Cinestyle profile in my Canon T3i when shooting video. It is recommended to apply an S-curve correction to clips in post-processing. Is that possible in Premiere Elements v11? I didn't see that anywhere in the manual or onli

  • Missing Camera Raw filter in CS6

    Camera raw shows version 8.5.0.236. (If it is relevant, I recently subscribed to CC version, but I am not sure if I will continue. Since I have the CS 6, I want to be able to use this even if I discontinue CC subscription next year) Thanks

  • Dynamic Variants????

    Good Evening, Using SQ01,02,03 I created a simple query on listing the erroneous spools. It is scheduled to run every hour, getting all erroneous spool in the past hour and send it to its corresponding users. I have a field for time stamps and i need

  • OLAP Component is invalid

    Hi, We have a environment where current version of database is 10.2.0.4 but OLAP component version shows 9.2.0.7 from dba_registry and it is invalid. What could be the possible solution in this case. removeand re-install the OLAP components will help