Running a RFC Function in SE37

People,
is there a difference between to run a RFC function using SE37 and when the external system calls it?
I´m trying to run the Function BAPI_SOURCEDETERMIN_GETSOS in SE37, but I don´t know if I have to fill the field "RFC target sys".
If I fill this field or not, the result is always the same: I did not returns records. But when the external system calls it I can see in debug session it returns 1 records (this is the correct).
What can be wrong?
Thanks a lot!

Hi,
When you call a function module (RFC or non RFC) from test environment, you often enter parameters to the function module in an incorrect format.
E.g. material number is stored and used internally within ABAP programs prefixed with leading 0s. E.g. material number 1000 would actually be passed to a parameter when called in a ABAP program as 00000000000000001000 - and is hence treated correctly, however when we call the FM from testing (SE37) environment, since we enter the values, we pass only 1000 and the system does not interpret our input correctly and does not give any output.
As suggested to really analzyze the issue, run both FMs in debugging parallely one called from ABAP program and other called from SE37 and check where the difference lies.
If the above issue stated is the cause, and if testing from SE37 is necessary then you might have to consider using conversion exits on the inputs to ensure they are converted to correct format.
Cheers,
Aditya

Similar Messages

  • Backgroung job failing becuase RFC function module is running in Dialog

    Hi,
    I have a program which is calling a RFC function module. I am running this program in background as a job. Now this function module which is in other system is running in Dialog and giving a time out error and the job is failing becuase of that.
    I tried call fucntion 'test' in background task
        destination 'XVZ'
    tables
       test = 'test'.
    But this is not working, i can still see this function module running in Dialog in SM50. Any suggestion?
    Thanks,
    Shweta

    Hi !
    RFC-Called function-modules are running in a dialog workprocess of the
    target system (they could not run in a batch proecess !!).
    That means the do have the same "Timeout" limitations than any other
    Dialog-Process.
    What you can do:
    - The Dialog "Timeout" could ce increased by your SAP-BASIS
    - If they could not - you should "shorten" the LUWs in the target-funktion.
      ...means - put a COMMIT WORK an any point the work is done.
      After a COMMIT WORK the "Timeout" Counter beginns at 0 !
    Hope that helped....
    Reward points would be nice...

  • Rfc function run on wddoinit

    hi
    I added a RFC Function to the component control from the service call property
    There is 2 export and 2 import parameters in the Function
    and These parameters Exist in the EXECUTE_xty_tt method on the component control
    but i want these parameters in WDDOINIT because i want to divert my page
    according to condition the parameter
    thanks

    Hi,
    This is very simple go to code wizard and select Method call in used controller enter the component controller and enter the method name.
    or you already have an instance varaible  of component controller in attributes of your view,use that and call the method of component controller.you will get importing and exporting parameters of the method.

  • 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

  • How to create RFC function module and how to call this function module

    Hi,
    i want to know step for creating RFC function module and then How to  use this function module from some other sap system.
    Thnaks,
    jigar

    Jigar,
    To implement a remote function module in ABAP, perform the following steps:
    Register the module as remotely callable in the RFC server system.
    In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
    Write the code for the function module.
    Create the destinations.....................
    Displaying, Maintaining and Testing Destinations
    To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
    Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
    It is not possible to maintain the RFCDES table directly.
    You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
    In the Implementation Guide, expand the following hierarchy structure:
    Basis
    Application Link Enabling (ALE)
    Sending and Receiving Systems
    Systems in Network
    Define Target Systems for RFC Calls
    Displaying Destinations
    The initial screen for this transaction displays a tree:
    Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
    To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
    To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
    Creating Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    All available connection types are explained in Types of Destinations.
    To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
    If you want to create a new destination
    As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
    For details of the destination parameters, see Entering Destination Parameters.
    Changing Existing Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    You can display all information for a given destination by double-clicking it or pressing F2 on it.
    To change an existing destination, double-click it, or place the cursor on it and press the Change button.
    For details of the destination parameters, see Entering Destination Parameters.
    Testing Destinations
    To test a destination, choose the appropriate function from the Test menu.
    Connection (also available via the Test connection pushbutton)
    Authorization (checks logon data)
    Local network (provides a list of application servers)
    You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
    CALL FUNCTION RemoteFunction
    DESTINATION Dest
    EXPORTING
    f1 =...
    f2 =...
    IMPORTING
    f3 =...
    TABLES
    t1 =...
    EXCEPTIONS......
    The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
    The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 System’s database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
    Pls. reward if useful

  • 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

  • Problem while calling an RFC Function Module in Background

    Hello,
    I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
    Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
    My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
    However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
    More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
    Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
    I will be on holiday for the next 6 weeks, so take your time to answer .
    Regards,
    Dusan.
    Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
    Please read the forum rules about u r g e n t ...

    This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
    Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
    It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
    Just guessing, but might be worth checking.
    Cheers,
    Julius

  • Calling Synchronous RFC Function Module in Background

    Hi all,
    Currently we are working on some requirement where in we have to retrieve data from one system(CRM) and update the same into another system(ECC). We have developed a RFC Function in CRM system and it is being called from ECC system as in synchronous mode via a batch program.
    Now since all sychronous call to a RFC function will be dialog there is a constraint on the runtime which is being set by maximum run time for each dialog work process. So my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
    The standard TRFC, QRFC calls in background runs asynchronously and so I am trying to check with the SDN world as whether has anyone tried  SRFC(Synchronous) call in background?
    Thanks in advance,
    Jagath

    So my question is there an option to call an RFC function synchronously in background (background task) so there is no runtime performance.
    One solution would be to increase the value of the "time out" parameter defined the CRM system. This i feel is not a fool-proof solution as the run-times cannot be predicted. Check this thread: Re: RFC timeout profile parameter
    For me a better solution would be to implement tRFC call instead of a synchronous call. Any reasons why you don't want to implement a tRFC ?
    BR,
    Suhas
    Edited by: Suhas Saha on Jun 26, 2010 8:52 AM

  • Calling a RFC Function Module

    Hello Guys,
    I have a question regarding calling a RFC function module.
    In BW - BI 7.0 I call a RFC function module:
    (The ABAP program in BW-BI 7.0 is below)
      CALL FUNCTION ''ZTESTFUNCTIONMODULE'  " Function module in ECC
         DESTINATION 'DECCLNT110'  " ECC system
        TABLES
          it_gl_item   = it_gl
          it_errlog_gl = it_errlog_gl.
    The 'ZTESTFUNCTIONMODULE'   is RFC enabled in the ECC system.
    The purpose is we retarct the data from BW to ECC.
    When I run the function module it always asks for the user id and password.
    The SAP logon screen appears and it asks for the user id and password.
    The destination is maintained in the SM59 transaction and also the user is maintained there. I think it should login automatically into remote system and return the tables. is it correct. How to skip the logon screen.
    Do I have to pass the user id and password in the function module. I think it should take the user id from the SM59 destination. Is it correct.
    Please advise. As always thanks for your help guys.

    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

  • Calling RFC Function module from JAVA

    Hi All,
       We have created a RFC Function Module for Billing Plan tab in Sales order (BDC). The function Module contains BDC. When we are running the same function module in SAP it is working fine. But when the FM is called in Java , it is allowing only maximum of 5 entries , when we trying to insert at 6th position in billing plan tab, we are getting an error.
    Can any one help on this.
    Points will be rewarded for helpful answers.
    Thanks & Regards,
    Kiran I

    I think the problem is because of the number of lines displayed on the screen in the BDC session in the Billing Plan.
    You might have to add the page down logic to your BDC program.

  • RFC function callls a SAP Business Connector Flow - only upper case

    Hi everybody,
    I wrote a function in SE37 which is calling a Flow in SAP Business Connector.
    R/3 and SAP BC, both are Non Unicode systems.
    The export parameter is TYPE makt-maktx.
    The call to SAP BC works fine. Only all the text I can see in the pipeline of SAP BC is upper case.
    I checked wether the domain of the makt-maktx allows case sensitive texts.
    This is OK.
    I have no idea how I can tell SAP BC to receive case sensitive texts.
    I checked the forums. Seems nobody had such a problem.
    Can somebyody help?
    Best regards
    Jochen
    Hi to all,
    it was not the JAVA Version, or a bug or whatelse.
    I just ingnored while testing in SE37 that there is
    a Flag [X] case sensitive - That's all!
    Shame on me!
    Greetings Joe
    Message was edited by:
            Jochen Seeliger

    Hi Priya
    Seeing the messages, it appears that server is down.
    "java.net.ConnectException" occurs whenever you try to connect to a system which is not up and running.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Where should i call the rfc function module? in xi or in r/3

    where should i call the rfc function module?
    for the synch scenario: file < -- >  xi <---> rfc
    i know the type of rfc is tcp/ip; but i'm not sure with the followings,
    and with some trials i can not even see any message via rwb even all the setting
    can be activated without errors.
    where should i create the rfc destination? in r/3 or xi
    where should i call the rfc via abap program? in r/3 or xi
    i guess the calling program should belong to the different server with the rfc itself....
    so confused....
    Thanks for your reply!!
    Jun

    if i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
    The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
    but where i need to create the fm via se37? in xi or r/3 ?
    In R3
    Regards,
    Prateek

  • Facing Problem with RFC Function Module

    Hi,
    I have created an RFC function module to get some data in table format.
    I have run the RFC in original system: It is giving the data.
    However, when I run this in target system, It is not giving any values.
    Could you please let me know, why it happens? I am not sure where I missed out.
    Thanks,
    Sandeep

    HI,
    i hope you are calling the RFC function module in the target system like this
    CALL FUNCTION <FUNC NAME> DESTINATION <DESTINATION NAME> . The destination should be logical system name of the source Logical system .
    Regards,
    Nagaraj

  • 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 and SAP logon window

    Hi experts,
    i created the report which uses RFC function ( returns some info from dev. system ). Long time it worked without problem, but before several days ( maybe SAP basis did some changes ), when i run the report and is called RFC function, system ask me to log on into the system.
    Do you have any idea ?
    Thanks in advance
    Martin

    User ALEREMOTE was locked

Maybe you are looking for

  • Billing block

    Hi ALL, WE HAVE CONFIGURED BILLING BLOCK IN OUR ORDER TYPE FOR CREDIT MEMO REQUEST IN V0V8. THIS BLOCK AUTOMATICALLY APPEARS WHEN WE CTREATE A CREDIT MEMO REQUEST IN VA01 T CODE. NOW THE REQUIREMENT IS THIS FIELD SHOULD BE GRAYED OUT IN VA01 TRANSACT

  • How do you use time machine?

    I just got my MBA and I was checking out all the new features of it, however, I can view them all and see them work except Time Machine. I can turn the app on, which it to "On" but then nothing shows up in the field to choose to back up too. How do I

  • ITunes videos won't play when artwork is changed

    I have some of my own Quicktime videos that I've imported into iTunes (10.1.2) and they play fine. However, when I change the artwork to something custom (like a jpg of a screencap) the file will no longer play within iTunes. My Macbook Pro still pla

  • Inconsistent behavior in TestStand and TestStand UI for the same sequence file

    Solved! Go to Solution.

  • Trouble importing from entourage

    I imported from Entourage into iCal, and my times down the side of iCal are incorrect. The events are the correct time (and in the correct time zone,) but it doesn't line up with the times down the left. Help, please???