Calling Remote Functions Locally Triggers any Database commit(Implicit)

Hello,
Am making use of RFC enabled function module as normal function module (Calling remote function module locally).
My question is does it trigger any implicit database commit or not. Since synchronous RFC triggers database commit.
Regards,
Tenzin Choegyen

I057200 wrote:
Since synchronous RFC triggers database commit.
Let me correct the statement both synchronous as well as asynchronous RFCs trigger an implicit DB commit.
SAP documentation on synch-RFCs states:
If the content of dest is equal to the constant space, then the addition DESTINATION is ignored and a normal call CALL FUNCTION func is executed.
Please note that you should not use the DESTINATION addition or use DESTINATION space. DESTINATION none will start the FM as an RFC in the same app server.

Similar Messages

  • Executing remote function locally

    Is there a way to execute a remote function locally.
    Example
    I have two database DB1,DB2.
    I have a table tab1 in DB1 and fun1 in DB2
    When i try to execute a query as below
    select * from DB1
    where fun1@dblinktodb2(c1,c2) not in (1,2,3,4,5)
    it takes 1 and half hour to fetch all the results.
    I created same function fun2 mimicing fun1@dblinktodb2
    select * from DB1
    where fun2(c1,c2) not in (1,2,3,4,5)
    it takes 7 minutes.
    we don't want to maintain two version of same function (ofcourse in this case fun1 is created by different team so we don't to have copy which can leave the code outdate )
    Is there a way to execute fun1@dblinktodb2 locally.
    Note fun1@dblinktodb2 doesnot uses any schema objects.

    A function can only execute in the database in which it is defined. You could potentially automate the replication of that function to your local database so that you didn't have to manually maintain anything, but you would need a local copy of the function if you want it to execute on the local database.
    Justin

  • What is the exact syntax for calling remote function module.

    Hi to all
    1.....what is the exact syntax for calling remote function module.?
    Thanks and regards,
    k.swaminath reddy

    hi
    good
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & check the pass value (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & check the pass value
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & check the pass value
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination 'XXXXXX'
    exporting
    p_num1 = 10
    p_num2 = 15
    importing
    p_tot = tot.
    write tot.
    please note that XXXXXX is RFC connection which is avialable in sm59 transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of XXXXXX in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    reward point if helpful.
    thanks
    mrutyun^

  • Local function calling remote function - error

    Dear All
    i have following remote function wich return some value from both methods ie.
    1) select func1(variable, varialbe) from dual@remoteDB; working
    2) select func1(variable, varialbe) from dual; -- by making a synonym at local
    Now i create a local function funclocal calling remote functino i.e. func1 in this example as:
    CREATE OR REPLACE FUNCTION funclocal(locc varchar2, artnoo number)
    RETURN NUMBER IS
    query_str VARCHAR2(1000);
    STKQTYY NUMBER;
    artno number(10);
    loc varchar2(80);
    BEGIN
    artno := artnoo;
    loc := locc;
    query_str := 'select func1(loc, artno) from dual ';
    EXECUTE IMMEDIATE query_str
    INTO STKQTYY;
    RETURN STKQTYY;
    END;
    compiled successfully.
    But when i run as:
    SQL> select funclocal('abc', 469183) from dual;
    select funclocal('@st3', 469183) from dual
    ERROR at line 1:
    ORA-00904: "ARTNO": invalid identifier
    ORA-06512: at "funclocal", line 11
    Please guide me.
    Regards
    Saeed

    EXECUTE IMMEDIATE query_strAs Andreas states: Why are you using dynamic sql?
    From what I see all you need is sth like
    create or replace function funclocal (locc varchar2, artnoo number)
       return number
    is
    begin
       return func1 (locc, artnoo);
    end funclocal ;
    /even the whole concept of a »local« function seems suspicious. Why do you need that one?

  • Calling Remote function tool leads always to a logon screen

    Hello,
    I run an remote function tool in system A. In System B I run a report calling this function module.
    Each time, I execute the report, a remote logon screen appears. It looks the same like the one you logon the system. You have to specifiy client, user and password.
    I know one possibilty to avoid this logon screen appeaering.
    System B (holding the function module) must declare System A as a trusted system. Thus, the user does not need to logon system B, each time calling the func. module. I processed this in correspondence with the help data, but the screen still appears.
    Is there any other possibilty to avoid appearing the logon screen or does anybody know wheter I did something wring??
    thanks, holger

    Hi Holger,
    1. This has to do with tcode SM59 (Maintain RFC Connections)
    THE CALLING SYSTEM HAS NOT DEFINED
    USER ID / PASSWORD TO LOGON TO THE TARGET SYSTEM.
    HENCE, IT SHOWS BLANK LOGIN SCREEN
    2. Under the node RFC Destinations ---> R/3 Connections,
       various systems are defined for RFC Purpose.
    3. Lets say ur system(which u want to connect) is PRD.
    4. Double Click PRD and go the the details.
    5. There are 3 Tabs. Goto LOGON/SECURITY TAB.
    6. In the logon information , enter the
       USERID and password and client.
    7. Save.
    Then try your program.
    Hope this helps.
    Regards,
    Amit Mittal.

  • ODI Error - Calling a function in the source database

    I am using this directly in the Interface mapping and getting the following error
    This is the syntax I am using SUM(CASE WHEN ((main.getCertDate(person_id,getdate()) >= current_timestamp) THEN 1 ELSE 0 END)
    ODI-1228: Task Load_Fact_Table1 (Integration) fails on the target MICROSOFT_SQL_SERVER connection SQLSERVER_USA.
    Caused By: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Cannot find either column "main" or the user-defined function or aggregate "main.dbo.getCertDate", or the name is ambiguous.
    Am I missing any additional steps, before calling a function in the mapping. Do I have to do something in the model to include teh function etc., Please help in fixing this issue.
    Thanks for your time and help.

    Hi Michael, Please see below.
    IKM - MSSQL Incremental Update
    Failing on Step 3 - Integration - Insert flow into I$ table
    insert into db11.dbo.##I$_FCT_TABLE
    COMP_ID,
    CNT_CLP_TARGET_MET,
    CNT_CERTIFIED,
    CNT_NOTCERT_WITHIN_GRACE_PRD,
    CNT_CERT_OR_WITHIN_GRACE_PRD,
    CNT_CERT_DELINQUENT,
    SUM_OF_AGE,
    SUM_OF_YEARS_EXPERIENCE,
    LOAD_DATE,
    IND_UPDATE
    select
    CASE WHEN DIM_COMP.COMP_ID IS null then -9999
    ELSE DIM_COMP.COMP_ID
    END,
    SUM(CASE WHEN ((main.dbo.getCertDate ([DISTINCT_RWF.MASTERKEY],GETDATE()) >= CURRENT_TIMESTAMP) OR DISTINCT_RWF = 'NO') THEN 1 ELSE 0 END),
    CURRENT_TIMESTAMP,
    'I' IND_UPDATE
    from ((
    select DISTINCT
    REPORT_WORKFORCE_REVIEW.REGION as REGION, REPORT_WORKFORCE_REVIEW.COMPO as COMPO, REPORT_WORKFORCE_REVIEW.PERSON_ID as PERSON_ID, REPORT_WORKFORCE_REVIEW.WF_STATUS as WF_STATUS, REPORT_WORKFORCE_REVIEW.PERSON_NAME as PERSON_NAME, REPORT_WORKFORCE_REVIEW.CPCN_NUM as CPCN_NUM, REPORT_WORKFORCE_REVIEW.COMMAND as COMMAND, REPORT_WORKFORCE_REVIEW.UIC as UIC, REPORT_WORKFORCE_REVIEW.UIC_STATE as UIC_STATE, REPORT_WORKFORCE_REVIEW.ORG_STRUCTURE_CODE as ORG_STRUCTURE_CODE, REPORT_WORKFORCE_REVIEW.ORG_DESC as ORG_DESC, REPORT_WORKFORCE_REVIEW.LOCATION as LOCATION, REPORT_WORKFORCE_REVIEW.STATE as STATE, REPORT_WORKFORCE_REVIEW.SVC_COMP_DATE as SVC_COMP_DATE, REPORT_WORKFORCE_REVIEW.YRS_OF_SERVICE as YRS_OF_SERVICE, REPORT_WORKFORCE_REVIEW.POSITION_ENTER_DATE as POSITION_ENTER_DATE, REPORT_WORKFORCE_REVIEW.MTHS_EXP_IN_PRESENT_POS as MTHS_EXP_IN_PRESENT_POS, REPORT_WORKFORCE_REVIEW.MTHS_EXP_IN_CURRENT_APC_ACL as MTHS_EXP_IN_CURRENT_APC_ACL, REPORT_WORKFORCE_REVIEW.AGE as AGE, REPORT_WORKFORCE_REVIEW.SEX as SEX, REPORT_WORKFORCE_REVIEW.SUPV_CODE as SUPV_CODE, REPORT_WORKFORCE_REVIEW.ACF as ACF, REPORT_WORKFORCE_REVIEW.CP as CP, REPORT_WORKFORCE_REVIEW.SERIES as SERIES, REPORT_WORKFORCE_REVIEW.DUTY_TITLE as DUTY_TITLE, REPORT_WORKFORCE_REVIEW.APT as APT, REPORT_WORKFORCE_REVIEW.APT_DESC as APT_DESC, REPORT_WORKFORCE_REVIEW.API as API, REPORT_WORKFORCE_REVIEW.SAA as SAA, REPORT_WORKFORCE_REVIEW.GRADE as GRADE, REPORT_WORKFORCE_REVIEW.HI_DEGREE as HI_DEGREE, REPORT_WORKFORCE_REVIEW.LVL_DESC as LVL_DESC, REPORT_WORKFORCE_REVIEW.APC as APC, REPORT_WORKFORCE_REVIEW.ACL as ACL, REPORT_WORKFORCE_REVIEW.CERT_LVL_ACHIEVED_IN_APC as CERT_LVL_ACHIEVED_IN_APC, REPORT_WORKFORCE_REVIEW.CERT_IN_POSITION as CERT_IN_POSITION, REPORT_WORKFORCE_REVIEW.CERT_BELOW_POSITION as CERT_BELOW_POSITION, REPORT_WORKFORCE_REVIEW.NOT_CERTIFIED as NOT_CERTIFIED, REPORT_WORKFORCE_REVIEW.CLP as CLP, REPORT_WORKFORCE_REVIEW.LAST_IDP_UPDATE as LAST_IDP_UPDATE, REPORT_WORKFORCE_REVIEW.LAST_IDP_UPDATE_MTHS as LAST_IDP_UPDATE_MTHS, REPORT_WORKFORCE_REVIEW.SUPV_REVIEW_DATE as SUPV_REVIEW_DATE, REPORT_WORKFORCE_REVIEW.SUPV_REVIEW_DATE_MTHS as SUPV_REVIEW_DATE_MTHS, REPORT_WORKFORCE_REVIEW.EMAIL as EMAIL, REPORT_WORKFORCE_REVIEW.MASTERKEY as MASTERKEY
    from main.dbo.REPORT_WORKFORCE_REVIEW as REPORT_WORKFORCE_REVIEW
    where (1=1)
    ) as DISTINCT_REPORT_WORKFORCE_REVIEW LEFT JOIN main.dbo.PERSON as PERSON ON DISTINCT_REPORT_WORKFORCE_REVIEW.MASTERKEY=PERSON.MASTERKEY) LEFT JOIN main.dbo.ACQUISITION_CORPS_QUALIFICATION as ACQUISITION_CORPS_QUALIFICATION ON DISTINCT_REPORT_WORKFORCE_REVIEW.MASTERKEY=ACQUISITION_CORPS_QUALIFICATION.MASTERKEY) LEFT JOIN main.dbo.PERSONS_POSITIONS as PERSONS_POSITIONS ON DISTINCT_REPORT_WORKFORCE_REVIEW.PERSON_ID=PERSONS_POSITIONS.MASTERKEY
    AND PERSONS_POSITIONS.POSITION_END_DATE IS NULL) INNER JOIN db11.dbo.DIM_COMP as DIM_COMP ON DISTINCT_REPORT_WORKFORCE_REVIEW.COMPO=DIM_COMP.COMP_CODE AND DIM_COMP.CURRENT_RECORD_IND = 1) LEFT JOIN db11.dbo.DIM_POSITION_TYPE as DIM_POSITION_TYPE ON DISTINCT_REPORT_WORKFORCE_REVIEW.APT=DIM_POSITION_TYPE.POSITION_CODE
    AND DIM_POSITION_TYPE.CURRENT_RECORD_IND=1)

  • Urgent: No data while calling remote function in custom widget.

    Hi,
    I created a function module with transaction se37 and in its attributes checked the 'Remote Enabled' radiobutton.
    Now in my widget I called this remote function in my RFC view.
    The data is not displayed in the widget and in debug mode error is displayed :
    "Type error: data.root has no properties (RFCRequest .js: Line 102 )"
    what is the reason for the error ?
    or am I going wrong with remote function module call.
    regards,
    Omkar H. Nakhate

    Hi,
    Thanks for the information provided.
    We are using Eclipse plug in to create the widget
    After  Debug yahoo widget,
    This is my Konfabulator log.
    Welcome to Yahoo! Widgets 4.5.1 (build 10A39) on 04/03/08 17:01:44.531
    Type '/help' for help.
    Loaded Widget 'rfc_call' from C:\Documents and Settings\Administrator\Desktop\new Data\rfc_call\Main.kon
    04/03/08 17:01:44.875: rfc_call version is 1
    Main.kon (Included file 'js/utils/PlatformUtil.js')
    Main.kon (Included file 'js/utils/DomUtil.js')
    Main.kon (Included file 'js/utils/CommonUtil.js')
    Main.kon (Included file 'js/utils/Common.js')
    Main.kon (Included file 'js/utils/Timer.js')
    Main.kon (Included file 'js/utils/DataLoader.js')
    Main.kon (Included file 'js/utils/RFCRequest.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/Skin.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinCell.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinConfiguration.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinCustomDraw.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinImage.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinInput.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinList.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinElementStyle.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinEvents.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinComponent.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinText.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinLabel.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinViewDefinition.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinViewDraw.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/XmlUtil.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/ConfigurationReader.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/SkinUtil.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/ResourcesReader.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/ResourceBundle.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/Components.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/ComponentEvents.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/ComponentProperties.js')
    js/utils/PlatformUtil.js (Included file 'js/skinlib/WidgetUtil.js')
    Main.kon (Included file 'js/skinlib/SkinLib_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.About/js/c.About.js')
    js/utils/PlatformUtil.js (Included file 'components/c.About/js/c.About_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Feedback/js/c.Feedback.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Feedback/js/Animation.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Feedback/js/c.FeedbackController.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Feedback/js/c.Feedback_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Footer/js/Footer.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Footer/js/c.Footer_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Header/js/Header.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Header/js/c.Header_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/tasks/Task.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/tasks/TaskSet.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/tasks/JavaChecker.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/tasks/FoundationChecker.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/tasks/WidgetDeployer.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/TaskViewer.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/StartupServices.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/ActivityLogger.js')
    js/utils/PlatformUtil.js (Included file 'components/c.StartupManager/js/c.StartupManager_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Table/js/Table.js')
    js/utils/PlatformUtil.js (Included file 'components/c.Table/js/c.Table_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/c.TellToFriend/js/c.TellToFriend.js')
    js/utils/PlatformUtil.js (Included file 'components/c.TellToFriend/js/c.TellToFriend_Include.js')
    js/utils/PlatformUtil.js (Included file 'components/Main/js/controller/Controller.js')
    js/utils/PlatformUtil.js (Included file 'components/Main/js/view/View.js')
    js/utils/PlatformUtil.js (Included file 'components/Main/js/model/Model.js')
    js/utils/PlatformUtil.js (Included file 'components/Main/js/Main_Include.js')
    Main.kon (Included file 'components/Main/js/Main.js')
    04/03/08 17:01:45.859: Starting deployment
    04/03/08 17:01:45.859: Deployment Finished
    17:1:46! [Components.create] cAbout : c.About
    17:1:46! [Components.create] cFeedback : c.Feedback
    17:1:46! [Components.create] cFeedbackHeader : c.Header
    17:1:46! [Components.create] cFeedbackFooter : c.Footer
    17:1:46! [Components.create] referenced1 : c.Table
    17:1:46! [Components.create] cMainHeader : c.Header
    17:1:46! [Components.create] cMainFooter : c.Footer
    17:1:46! [utils.DataLoader]> open( POST http://127.0.0.1:7531/SapMiddleTier/RESTJSON/ewcs/service/rfct?serviceProvider=&httpMethodOverride=POST true );
    17:1:46! [utils.DataLoader]> headerName: Content-Type ; headerSource: text/xml
    17:1:46! [utils.DataLoader]> data: <root><RfcRequest name='ZTABLE'><![CDATA[ <T_ROM></T_ROM> ]]></RfcRequest></root>
    17:1:52! [utils.DataLoader]> (http://127.0.0.1:7531/SapMiddleTier/RESTJSON/ewcs/service/rfct?serviceProvider=) request returned
    TypeError: data.root has no properties (RFCRequest.js: Line 102)

  • Calling syntactically incorrect remote function module triggers short dump

    Hi,
    I have some Z Function modules in ABC system and i need to call them remotely from XYZ.
    There are some syntax errors in the FM's of ABC system so in the call of XYZ I am getting dump.
    Can I know how to capture if there is any syntax error in the remote FM of ABC system from XYZ.
    I have got FUNCTION_EXISTS to check the existence.
    Can I have like that some other function to check the syntax?
    Thanks,
    Sham Sundher.

    Hi,
    Check if this link can be of any help.
    [FM for Syntax Check of function modules]
    Regards,
    Vik

  • Call remote function on a satellite system using RFC target sys option

    Hi all,
    I am on the Java stack and I would like to call the ABAP stack of a statellite system. I can create a JCo connection on this system directly but for security reason I am not allowed to do that. I would like to call this system through the ABAP stack of my machine (I am in dual stack environment).
    - How can I use RFC target sys (available in SE37 for Remote-Enabled functions) with my JCo connection?
    - Or, is there a generic function which can call all other functions on a remote system (still using RFC target sys)?
    Many thanks,
    Stephan

    Siddhesh - thank you for the link; the blogs by Thomas are required reading as far as I am concerned.
    Hi Raja;
    <i> do you mean another ABAP system (was6.40)?
    and from here using another FM you call the 4.6c
    system RFC ?</i>
    Yes, that is what we are doing.  We are calling a web service from an Intranet form to the 6.40 system that, in turn will call the 4.6C system and pass the data back to the Intranet form (through 6.40)
    <i> may be you could pass the RFC destination as import
    parameter to the 6.40 RFC and use the same will the
    call to 4.6C RFC from the 6.40 RFC</i>
    That would work, but it would be more beneficial to just use the function module on the 6.40 system as a proxy to the function on 4.6c and not have to enter code in it each time. 
    I had thought of writing just one function module in the 6.40 system that could dynamically call any different function module in 4.6c (based on the input parameters), but since were are trying to accomplish SOA, we need visiblity to each web service (ergo function module).
    If it's not possible, that is OK I am just hoping someone had found a way to pull this off.
    Thanks!
    John

  • Webdynpro/abap portal unable to call Remote functions?? HELP

    <b>Scenario:</b>
    webdynpro/abap system A talks to system B.
    webdynpro Abap has a call as
    call function 'BAPI_FLIGHT_GETLIST'
        destination 'RFCB'....
    At "A"
    created  SSL  Server for https, created certificate request and imported it from SAPtest ticket.
    imported certificates for the SSL from "mySAP" and "Server CA" downloaded from sap site
    enabled the ACLs for the above 2 certificates on client '000"
    The browser's http proxy tool shows that after login to system A with Http, further requests go through RFC destination to system B, called RFCB.
    RFCB config to systemB as a specific user, everything is fine.
    However, if RFCB is set to 'current user', it does not work.
    So, SSO ticket is not used to login to system B, I guess.
    How to set up the RFCB.  If I change to 'trusted system', I get RFC authentication error.  The sdn shows to setup S_RFC auth object into user profice with PFCG.
    Can you help?
    Thanks.

    Hi ,
    I have used RFC's couple of time in WebDynpro ABAP .As I am doing WD Application for SRM where I require to fetch data from other R/3 servers .
    Now do you want something like this . You will pass some parameters to RFC and based on that will updates data in that Remote R/3 and Also send results that you want show over WebDynpro Application .
    Please see thread below .See that help you or not.
    Re: RFC call Dumps with ***Ilegal reference***
    Cheers
    Parry

  • Call Remote Function Module with SAEURI  dataelement as Export parameter

    Hi Experts, Am creating a program in a Gateway system, where i need to call a FM from HR system.
    My Code is like this,
    Data: lname(20) type c,
             lv_url type SEAURI.
    Call 'Z_EMP_GET' Destination 'HR_DEST'
    Exporting
    Pernr = '12345678'
    Importing
    lname = lv_lname
    Url = lv_url.
    At HR Destination system, I have a FM 'Z_EMP_GET ' with signature as
    Importing : Pernr Type NUMC
    Exporting : lname Type Char20
                     Url Type SAEURI(Char 4096).
    When i debugged it, I see the Remote FM is getting Perner value and returning only lname, but URL paramter is empty.
    I believe i have problem in receiving Long Text (URL - Char 4096).
    How can i handle this and let me know if need to specify String length parameter for RFC call somewhere.
    Also let me know if need more details
    Thanks in advance.
    Thanks in advance.

    Hi naveenraj,
    I don't know which type of URL you want in output but you can check  entries in table HTTPURLLOC and or if you want URL of employee photo then you have to use this FM HRWPC_RFC_EP_READ_PHOTO_URI.
    Regards,
    Shahezad

  • 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

  • ERROR  when called TO_CHAR function from XMLQuery

    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHAR
    any help/ideas on the follwing would be much appreciated.
    Thanks
    Abdul
    select XMLQuery('<marketfeed id="f1" action="CREATE" source="marketfeed1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <competitions>
    {for $f in ora:view("fixture")
                        for $c in ora:view("competition")
                         for $homes in ora:view("squad")
                          for $aways in ora:view("squad")
                           for $homet in ora:view("team")
                            for $awayt in ora:view("team")
                       where $f/ROW/GID = "g321667"
                          and $f/ROW/COMPETITIONID = $c/ROW/ID
                          and $f/ROW/HOMESQUADID = $homes/ROW/ID
                          and $f/ROW/AWAYSQUADID = $aways/ROW/ID
                          and $homes/ROW/TEAMID = $homet/ROW/ID
                          and $aways/ROW/TEAMID = $awayt/ROW/ID
                       return              
                       <competition id="{$c/ROW/ID/text()}"
    shortname="{$c/ROW/NAME/text()}"
    name="{$c/ROW/NAME/text()}">
    <teamlists>
    <teamitam name="{$homet/ROW/NAME/text()}"
    id = "{$homes/ROW/TID/text()}" />
    <teamitem name="{$awayt/ROW/NAME/text()}"
    id = "{$aways/ROW/TID/text()}" />
    </teamlists>
    <matches>
    <match id="{$f/ROW/GID/text()}"
    venue="{$f/ROW/VENUE/text()}"
    matchdate="{TO_CHAR($f/ROW/STARTDATE/text(), "YY-MM-DD")}"
    name="{concat($homet/ROW/NAME/text(), " v ", $awayt/ROW/NAME/text())}"
    >
    <teams>
    <team home="H" id = "{$homes/ROW/TID/text()}" />
    <team home="A" id = "{$aways/ROW/TID/text()}" />
    </teams>
    </match>
    </matches>
    </competition>
    </competitions>
    </marketfeed>'
    returning content
    from dual
    Edited by: QAbdul on 26-Oct-2010 06:44

    Hi,
    QAbdul wrote:
    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
    XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
    Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
    For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
    {code}
    declare function local:format-date($d as xs:date) as xs:string
    let $s := xs:string($d)
    return concat(
    substring($s, 10, 2), "/",
    substring($s, 7, 2), "/",
    substring($s, 2, 4)
    {code}
    and an example of use :
    {code}
    SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
    Table created
    SQL> SELECT *
    2 FROM XMLTable(
    3 'declare function local:format-date($d as xs:date) as xs:string
    4 {
    5 let $s := xs:string($d)
    6 return concat(
    7 substring($s, 10, 2), "/",
    8 substring($s, 7, 2), "/",
    9 substring($s, 2, 4)
    10 )
    11 }; (: :)
    12 for $i in ora:view("TEST_XQDATE")/ROW/DT
    13 return element e {
    14 attribute xs_date_format { $i/text() },
    15 attribute local_format { local:format-date($i) }
    16 }'
    17 COLUMNS
    18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
    19 local_format VARCHAR2(10) PATH '@local_format'
    20 )
    21 ;
    XS_DATE_FORMAT LOCAL_FORMAT
    2010-10-28 28/10/2010
    {code}

  • Calling supply function

    Hi
    Can we call supply function explicitly in any other method of the view using wd_this->supply function name( ) ?.
    In case the supply function is local to the view and when it is defined in component controller ?

    hi vishal........
          you cannot call supply function explicitly.......
          what you can do is.... invalidate the node that has the supply function. so the supply function will be called again.
    ---regards,
       alex b justin

  • Call oracle function in ODI

    I am new to ODI. I need to call a function created on the database which return a value. In ODI I created a variable. In the select (of the variable) I don't know how to call the source table value that needs to be passed to the function.
    My oracle function:
    create or replace function return_timeid(trans_date in date)
    return number is
    Result number;
    v_trans_date varchar2(30) := to_char(trans_date, 'dd-mon-rrrr hh24miss');
    v_hour number := 0;
    v_min number := 0;
    begin
    v_hour := substr(v_trans_date, 13, 2);
    v_min := substr(v_trans_date, 15, 2);
    case
    when v_min between 1 and 30 then
    result := (v_hour * 100) + 30;
    when v_min = 0 then
    result := v_hour * 100;
    when v_min > 30 then
    result := (v_hour + 1) * 100;
    end case;
    -- convert 2400 to 0000
    if result = 2400 then
    result := 0;
    elsif result = 2430 then
    result := 30;
    end if;
    return result;
    end return_timeid;
    The result will be a time ID, depending on the source record value in the source table. How do I keep the time ID in the variable that I created.
    This is the select in my variable (Time_ID):
    SELECT BIUSER.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT) FROM dual
    this is my error:
    904 : 42000 : java.sql.SQLException: ORA-00904: "GPRS_HOME_CDRS"."CALL_DATE_DT": invalid identifier
    Regards

    I tried to call the function in the mapping. My code:
    biuser.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT)
    but then I get the ORA-00936 (missing expression)
    My code generated in the operator when loading the flow table:
    insert /*+ APPEND */ into BIUSER.I$_FACT_ABIL_GPRS_T
         DIMDATASOURCEID,
         DIMDATARECORDTYPEID,
         DIMDATEID,
         DIMTIMEID,
         DIMAPNID_IC,
         DIMIMSIID,
         DIMCALLLOCATIONID,
         DIMCAUSERECCLOSEID,
         CALLDURATION,
         UPLINK_DATAVOLUME,
         DOWNLINK_DATAVOLUME,
         CALL_CHARGE,
         DIMRATEPLANID,
         TRANS_DATE,
         DIMPEAKID,
         DIMTARIFFCODEID,
         DIMCHARGEID,
         MOBL_NUM,
         ACC_LINK_CODE,
         CHARGED_UNITS,
         CHARGED_DURATION,
         CHARGED_VOLUME,
         DISCOUNTED_VALUE,
         DISCOUNTED_AMOUNT,
         FACT_PROCESS_DATE,
         CHRONO_NUM,
         ORIGINATE_CELL_ID,
         STAGE_PROCESS_DATE,
         IND_UPDATE
    select      
         case
    When length(rtrim(C19_QOS_USED_1_V)) = 7 then 1
    else 2
    end case,
         DIM_DATA_RECORD_TYPE.DIMDATARECORDTYPEID,
         DIM_DATE.DIMDATEID,
         biuser.return_timeid(C12_CALL_DATE_DT),     DIM_APN.DIMAPNID,
         to_number(DIM_IMSI_MSISDN.DIMIMSIMSISDNID),
         to_number(DIM_CALL_LOCATION.DIMCALLLOCATIONID),
         to_number(DIM_TERM_CAUSE.DIMTERMCAUSEID),
         C5_CALL_DURATION_N,
         .DATA_VOLUME_OUTGOING_1_N,
         C17_DATA_VOLUME_INCOMING_1_N,
         C1_CALL_CHARGE,
         DIM_RATEPLAN.DIMRATEPLANID,
         C12_CALL_DATE_DT,
         to_number(DIM_RATEPLAN.DIMRATEPLANID),
         DIM_TARIFF.DIMTARIFFID,
         to_number(DIM_CALLCHARGE_TYPE_TB.DIMCALLCHARGETYPEID),
         C2_MOBL_NUM,
         C21_ACCOUNT_LINK_CODE_N,
         C10_CHARGED_UNITS_N,
         C9_CHARGED_DURATION_N,
         C8_CHARGED_VOLUME_N,
         C16_DISCOUNTED_VALUE_N,
         round(C15_DISCOUNTED_AMOUNT_N/1000,4),
         SYSDATE,
         C13_CHRONO_NUM_N,
         C6_ORGINATE_CELL_ID_V,
         C3_STAGE_PROCESS_DATE,
         'I' IND_UPDATE
    from     BIUSER.DIM_DATA_RECORD_TYPE DIM_DATA_RECORD_TYPE, BIUSER.DIM_DATE DIM_DATE, BIUSER.DIM_CALL_LOCATION DIM_CALL_LOCATION, BIUSER.DIM_APN DIM_APN, BIUSER.DIM_IMSI_MSISDN DIM_IMSI_MSISDN, BIUSER.DIM_TERM_CAUSE DIM_TERM_CAUSE, BIUSER.DIM_CALLCHARGE_TYPE_TB DIM_CALLCHARGE_TYPE_TB, BIUSER.DIM_TARIFF DIM_TARIFF, BIUSER.DIM_RATEPLAN DIM_RATEPLAN, BIUSER.C$_0FACT_ABIL_GPRS_T
    where     (1=1)
    And (nvl(to_number(C14_SWITCH_CALL_TYPE_V),99999)=DIM_DATA_RECORD_TYPE.RECORD_TYPE)
    AND (to_number(to_char(C12_CALL_DATE_DT,'RRRRMMDD'))=DIM_DATE.DIMDATEID)
    AND (nvl(C11_MOBL_ORIGINATE_ZONE_CODE_V,'Undefined')=DIM_CALL_LOCATION.COUNTRY)
    AND (nvl(C4_ACCESS_POINT_NAME_V,'Undefined')=DIM_APN.APN)
    AND (nvl(C23_IMSI_NUM_N,99999999999)=DIM_IMSI_MSISDN.IMSI_NR)
    AND (nvl(C20_CALL_TERMINATION_CAUSE_V,'XX')=DIM_TERM_CAUSE.TERMCAUSE)
    AND (nvl(C18_CALL_CHRG_TYPE_V,'9')=DIM_CALLCHARGE_TYPE_TB.CALL_CHARGE_TYPE)
    AND (nvl(C7_TARIFF_CODE_V,'999999')=DIM_TARIFF.TARIFF_CODE)
    AND (nvl(C22_RATE_PLAN_CODE_N,99999)=DIM_RATEPLAN.RATEPLAN_CODE and
    nvl(C7_TARIFF_CODE_V,'999999')=DIM_RATEPLAN.TARIFF_CODE)
    minus
    select
         DIMDATASOURCEID,
         DIMDATARECORDTYPEID,
         DIMDATEID,
         DIMTIMEID,
         DIMAPNID_IC,
         DIMIMSIID,
         DIMCALLLOCATIONID,
         DIMCAUSERECCLOSEID,
         CALLDURATION,
         UPLINK_DATAVOLUME,
         DOWNLINK_DATAVOLUME,
         CALL_CHARGE,
         DIMRATEPLANID,
         TRANS_DATE,
         DIMPEAKID,
         DIMTARIFFCODEID,
         DIMCHARGEID,
         MOBL_NUM,
         ACC_LINK_CODE,
         CHARGED_UNITS,
         CHARGED_DURATION,
         CHARGED_VOLUME,
         DISCOUNTED_VALUE,
         DISCOUNTED_AMOUNT,
         FACT_PROCESS_DATE,
         CHRONO_NUM,
         ORIGINATE_CELL_ID,
         STAGE_PROCESS_DATE,
         'I'     IND_UPDATE
    from     BIUSER.FACT_ABIL_GPRS_T

Maybe you are looking for