RFC Enabling a Function Module

Hi Friends
I need to remote enable a Function Module( for RFCs ) which was already developed some years ago.
I need to know what all things I need to take care of when remote enabling such a Function Module.
Thanks
~S

this is what u need to do...
1) change attributes of FM to Remote-Enabled
2) create  RFC destination in SM59, u can specify the logon information here to access the remote system
3) call the function by specifying the DESTINATION addition in the CALL FUNCTION statement...
that is...
CALL FUNCTION <func_name>
    DESTINATION <RFC destination name>
but make sure of the following...
1) if u r going to use asynchronous RFC, there should not be a return parameter in the FM,
2) table header lines cannot be passed in RFC FMs
3) no parameters can be passed by reference
read the documentation on RFC for details...
http://help.sap.com/saphelp_erp2004/helpdata/en/22/042abd488911d189490000e829fbbd/frameset.htm
rgds,
PJ

Similar Messages

  • RFC Lookup error :No RFC authorization for function module

    Hi All,
    I have created RFC in the PI system and enabled it as remote. I am working on PI7.1
    I have imported RFC into Repository.But when i am trying to execute RFC lookup function in the graphical mapping I am getting No RFC authorization for function module error.
    Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> com.sap.aii.mapping.api.StreamTransformationException: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:95) at com.sap.aii.mappingtool.tf7.rt.AMultiResIterator$MultiOutIterator.gotoNextContext(AMultiResIterator.java:95) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:315) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:496) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:626) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.transformInternal(ExecuteXiMappingCommand.java:197) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.execute(ExecuteXiMappingCommand.java:94) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1005_10002.execute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304) Runtime exception when processing target-field mapping /ns0:MT_FileDummy/File; root message: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception>
    13:42:37 End of test
    Edited by: Rams on Apr 17, 2009 1:43 PM

    Hi! Rams,
    I think the issue is related to Authentification Issue..Even though u did correctly please check once the below
    1) Check any Typo Erros are there while configuring or giving names in Lookups.
    2) please check Authorizations like ID and PWD and Sufficient Roles
    3) Also please check did u given paramters correctly while doing RFC look up I mean paramers , Binding parameters and RFC channel name and adapter type or Simple type it must be an  adapter
    4) In ID part while configuring Interface determinaition you need to give your RFC look Up name there also..Hence check whether u given or not if yes correctly or not
    5) Also remember one thing if your scenario is correct mostly you can know the result in mapping itself it seems while testing Message mapping and Interface mappings give your RFC look up paramters in the parameters tab present in TEST tab and later in Document tab give Input...and execute it works if it doesn;t works and if there is an issue with RFC you can get there only..ok
    Also go through the below document::
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457]
    I hope this will give u brief idea...
    Also check with basis while taking SAP_ALL authorization so that first u ill came to know whether issue is related to authentification or RFC module itself remote enabled and also do SXI_CACHE also ocne to refresh ESR and ID objects..
    Regards::
    Amar Srinivas Eli

  • No RFC authorization for function module

    Hi Experts,
    I am working on PI 7.3, doing a idoc to jdbc scenario by using the AEX(Advance Adapter Engine Extended).
    I created Integrated Configuration, in tab "Inbound Processing" pointed IDoc_AAE sender channel etc...
    While doing the configuration testing i am getting the below error "No RFC authorization for function module IDOCTYPE_READ_COMPLETE."
    Messages fails in tRFC.
    What can i do, to solve this problem?
    Thanks & Regards
    Stanislav

    I ordered the right to RFC-connect.
    The problem was this: in RFC-connect, in Destination(in NWA), you must specify a username, who have permission to read idoc-metadata (from ERP).
    More about settings AAE, you may read here http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/10/21/pixi-pi-73-new-java-based-idoc-adapters-configuration-sender-receiver--teaser
    Sorry for my bad English.
    Thanks all.

  • Program making a RFC call to Function Module not working in background

    Hi All,
    I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
    1.     Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
    2.     Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
    3.     Function Module Passes back the count values and aggregated Net_Value to the program
    4.     Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
    However we are facing an issue.
    Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
    Thanks & Regards
    Dharmendra

    RFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.

  • Parallelization is not happening using asychnronous RFC in a function module

    A BW data source ZTEST
    has been created based on a function module ZTEST_FM to pull the
    data into BW system from R/3.
    (Have checked the parellel jobs running in SM66 transaction).
    Inside the function module, an RFC function
    module ZTEST_RFC1 has been called asynchronously to implement the parallelization
    to improve the data extraction time into BW system.
    Note: In this scenario asynchronous
    RFC is used to implement the parallel processing.
    The logic in the function module is as follows.
    Function module ZTEST_FM Logic:
    Fetch data from HRP1000 table into an internal table IT_HRP1000 for
    OTYPE = ‘TN’.
    Loop at IT_HRP1000 into work area (WA).
    Call the RFC asynchronously by passing OBJID,OTYPE and ENDDA,
    Calculate SOBID which is the required output field from the RFC
    function module.
    Populate the results into final internal table E_T_DATA.
    The output structure contains the following fields.
    OBJID
    BEGDA
    ENDDA
    SOBID
    Could you please give us some suggestions, to implement the parellel processing using asychronous RFC in this scenario.
    Would appreciate your help.

    Your RFC call looks correct. For collecting the result you will need to code the callback routine Write_E_T_data. Inside the callback you can use the statement
    RECEIVE RESULTS FROM FUNCTION ZFHLS_EX_TNM_ACADEMY_RFC1 IMPORTING <parameter list>
    to retrieve the calculated result. For the declaration of the callback routine I recommend
    FORM Write_E_T_data USING iv_name TYPE c.
    The parameter iv_name containing the name of the RFC task turned out to be mandatory in my tests.

  • Remote enabling a function module

    Hi all,
    I need to use function module WFMC_MESSAGE_SINGLE to allow printing with PDA. However it is not remote enabled.
    How can I make it remote-enabled? What are the possibilities?
    Thanks

    copy the  function module WFMC_MESSAGE_SINGLE  to a ZWFMC_MESSAGE_SINGLE  function module and keep the same function group and click copy icon.
    Now in the attributes of the new function module select the  Processing Type "Remote_Enabled Module"
    Save and activate.
    Reward Points if useful.

  • Changing Password across the RFC systems needed Functional Module

    Hi All,
                 Could anybody pleaese tell me is there any function module to change the password across the RFC destinations.
    Marks will be given immediately.,
    J

    Have a look at the bapi's
    BAPI_EMPLOYEET_CHANGEPASSWORD.
    Type in BAPIPASSWOR to look at the complete suite.
    J

  • No RFC authorization for function module  RSA1_OLTPSOURCE_GET_ALL.

    When I try to replicate datasource on BW I get this error.
    I replicate others but suddenly, there was a problem with the RFC user, and tehn I wans't unable to extract data and replicate DS.
    The RFC user was blocked because password failed too many times, and was unblocked.
    But now I get that error.

    Hi,
    check following things
    1. Source system connection is correct
    2. check SM59  for connection and authorisation test
    3. Check your own authorisation see trace in RSTT or su53 dump ..get the correct role
    4. check authorsation for BWREMOTE and ALEREMOTE user..
    Thanks and regards
    Kiran

  • Function module (FM) to read budget  to be used in n-step approval badi

    We have SRM 5.0 with ECC 6.0 (extended classic). For capital expenses we are going to have budget check in SRM based of account assignment internal orders in R/3. In shopping cart line item approval workflow, it is required to read the budget available for that internal order and compare with shopping cart value...what is the function module to read budget assigned to that internal order, that will used in n-step approval badi at every step??
    Thanks,
    Kim r.

    Hi
    <b>Please try the related SRM function modules, which will definitely help -></b>
    B470_BUDGET_READ   
    BBP_PD_USER_BUDGET_AMOUNTSPENT  
    BBP_PD_USER_BUDGET_CHECK        
    BBP_PD_USER_BUDGET_DEFINED_GET  
    BBP_PD_USER_BUDGET_SAVE         
    BBP_PD_USER_BUDGET_SCVALUE_GET  
    BBP_REQREQ_CHECK_BUDGET 
    META_BUDGET_READ   
    META_BUDGET_READ Function module in turn calls RFC-enabled 'BBP_BUDGET_READ' Function module in the R/3 or the ECC System.
    Hope this will definitely help.
    Do let me know.
    Regards
    - Atul

  • RFc Enabled READ_TEXT

    hi friends,
    i have one requirement , i want to retrive Header text of PO documents into SRM , is there any RFC enabled READ_TEXT function module ? or any RFC enabled function module to retive Header text of PO docs into SRM server
    Thanks and Regards
    Kumar Srin

    Hi Kumar, function module RFC_READ_TEXT. Table parameter TEXT_LINES is used to both pass requested text keys to the function module and also returms the text lines in TEXT_LINES.
    Regards Jack

  • Function module with RFC enable

    Hello ABAPers,
    Im a new comer in ABAP and I would like to have a basic knowledge in RFC using a function module/function group..
    I have this project in Travel Dept...I need to connect on a different system using SAP connector...meaning...I will logon to SAP and connect to another system which is VB.net and has a back-end of SQL 2000. After connection I need to select or search a data to that table...for me to get the ticket number.
    Before I tried to connect from VB.net to SAP...and successfully used the SAP connector...now I need the vice versa version of this approach..
    Can anyone help me? please....
    Thanks in advance...Will reward points
    aVaDuDz

    For Basic Understanding just look at RFC_READ_TABLE FM,This will give good example
    Also Check the SM59 Transaction to create RFC Destination
    Please check with below link :
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rfc&cat=sdn_wiki
    Thanks
    Seshu

  • Access Function Module "RSDU_EXEC_SQL" via Jco

    Hello Experts,
    is there a possibility to acces the FM "RSDU_EXEC_SQL" via Jco?
    My Testcode is like this:
    public class JcoTest {
         public static void connect(){
              Client connection = JCO.createClient("100", "user", "password", "EN",
                        "some.server", "00");
              connection.connect();
              Repository repository = new JCO.Repository("Test", connection);
              IFunctionTemplate functionTemplate = repository.getFunctionTemplate("RSDU_EXEC_SQL");
              Function function = functionTemplate.getFunction();
              System.out.println(function.getImportParameterList().toString());
              connection.disconnect();
         public static void main(String[] args) {
              connect();
    But this leads to an Exception: (126) NOT_FOUND: EXCEPTION NOT_FOUND RAISED
    When i access the RFC_READ_TABLE instead, everything is fine.
    Thanks in advance,
    Tanja

    Check whether RSDU_EXEC_SQL is remote enabled or not.
    You need to make it remote enabled. Only then it will become an RFC from a Function module.

  • Function Module to create a new license

    Hi Folks,
    Can you kindly share details of any standard function module that can be used to create a new license.
    I am not looking to enhance it , so the existing BAdi does not work with me.. The requirement is to create a new license against some data that will be passed by an external application in xml format.
    Regards,
    Jasmit

    Hi Jasmit,
    As far as I know, there is no API provided for creating Licences from external data.  You will have to create your own.
    Take a look at standard Function Module /SAPSLL/LCLIC_CREATE_UPLOAD.  You could probably quite easily create a remote-enabled "wrapper" Function Module for that one.  You would also need to develop code to extract the data from the XML files.
    Regards,
    Dave

  • Impact on using function modules that are flagged as obsolete

    Hi Gurus,
    I'm working on a SAP 4.7 instance and we are soon to be going Unicode enabled. I noticed when running transaction UCCHECK that there are a number of function modules such as "POPUP_TO_CONFIRM_WITH_MESSAGE" and "POPUP_TO_DECIDE" as well as others that are flagged as obsolete, I'm not sure why these are not picked up in UCCHECK. However, can someone tell me what the impact would be if these obsolete functions were left as is and not changed?
    Thanks in advance
    C

    Thanks for your responses, I agree with you both.
    my view was that after we go unicode enabled all function modules that are flagged for deletion will still perform as they do now, however, as Praveen says this may not be the case in later versions.
    Thanks
    C

  • RFC enabled function module is not runing the BDC code in it.

    Dear Experts,
    1. We have created a RFC enabled function module to change status of a activity and to save it we are using BDC code and we have also put the code in the RFC FM only.
    The RFC fm is runing fine and changing the data and also saving it by runing the BDC when run in the R/3 system only.
    But when i run the FM from portal its just chaning the status but not runing the BDC code in it.
    below i am puting the code of the FM.
    FUNCTION ZRFC_CRM_STATUS_CHANGE_EXTERN .
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CHECK_ONLY) TYPE  XFELD DEFAULT ' '
    *"     VALUE(CLIENT) LIKE  SY-MANDT DEFAULT SY-MANDT
    *"     VALUE(OBJNR) TYPE  CRM_JSTO-OBJNR OPTIONAL
    *"     VALUE(USER_STATUS) LIKE  CRM_JEST-STAT
    *"     VALUE(SET_INACT) TYPE  XFELD DEFAULT ' '
    *"     VALUE(SET_CHGKZ) LIKE  CRM_JSTO-CHGKZ OPTIONAL
    *"     VALUE(XNOAUTO) LIKE  CRM_JSTO_UPD-XNOAUTO OPTIONAL
    *"     VALUE(NO_CHECK) TYPE  XFELD DEFAULT ' '
    *"     VALUE(ZOBJNR) TYPE  CHAR80
    *"     VALUE(OBJECT_ID) TYPE  CRMT_OBJECT_ID
    *"  EXPORTING
    *"     VALUE(STONR) LIKE  TJ30-STONR
    *"  EXCEPTIONS
    *"      OBJECT_NOT_FOUND
    *"      STATUS_INCONSISTENT
    *"      STATUS_NOT_ALLOWED
    *{   INSERT         D60K900707                                        1
      DATA: BEGIN OF JSTAT_TMP.
              INCLUDE STRUCTURE JSTAT.
      DATA: END OF JSTAT_TMP.
      data: bdcdata like bdcdata  occurs 0 with header line.
      data: dire type CRMD_ACTIVITY_H-direction.
      CLEAR: DIRE.
    OBJNR = ZOBJNR.
      MANDT = CLIENT.
      JSTAT_TMP-STAT  = USER_STATUS.
      JSTAT_TMP-INACT = SET_INACT.
      IF USER_STATUS+0(1) NE EXTERN.
        RAISE STATUS_NOT_ALLOWED.
      ENDIF.
    Statusobjekt ggf. einlesen
      PERFORM STATUS_READ USING OBJNR IOBTYP ISTSMA NOT_FOUND.
      CHECK NOT_FOUND = OFF.
    ggf. Änderungsbelege aktivieren
      IF SET_CHGKZ = 'X' AND JSTO_BUF-CHGKZ = SPACE AND CHECK_ONLY = SPACE.
        PERFORM SET_CHGKZ USING OBJNR.
      ENDIF.
    set XNOAUTO-flag if desired
      IF XNOAUTO = 'X' AND CHECK_ONLY = SPACE.
        PERFORM SET_XNOAUTO USING OBJNR.
      ENDIF.
      crm_jostd-OBJNR = OBJNR.
    Status-Puffer füllen
      REFRESH JEST_BUF_A.
      REFRESH JEST_BUF_E.
      CLEAR   JEST_BUF_A.
      CLEAR   JEST_BUF_E.
      CLEAR JEST_K.
      MOVE MANDT       TO JEST_K-MANDT.
      MOVE crm_jostd-OBJNR TO JEST_K-OBJNR.
      READ TABLE JEST_BUF WITH KEY JEST_K BINARY SEARCH.
      IF SY-SUBRC IS INITIAL.
        TABIX = SY-TABIX.
        MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_E.
        APPEND JEST_BUF_E.
        MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_A.
        MOVE MANDT TO JEST_BUF_A-MANDT.
        APPEND JEST_BUF_A.
        DO.
          ADD 1 TO TABIX.
          READ TABLE JEST_BUF INDEX TABIX.
          IF SY-SUBRC IS INITIAL AND JEST_BUF-OBJNR = crm_jostd-OBJNR.
            MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_E.
            APPEND JEST_BUF_E.
            MOVE-CORRESPONDING JEST_BUF TO JEST_BUF_A.
            MOVE MANDT TO JEST_BUF_A-MANDT.
            APPEND JEST_BUF_A.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
      g_no_check = no_check.
      OBJNR = ZOBJNR.
      PERFORM STATUS_CHANGE_EXTERN USING CHECK_ONLY
                                         OBJNR
                                         JSTAT_TMP
                                         EXTERN.
      clear g_no_check.
    Zurückschreiben in Puffer
      PERFORM CHG_JEST_BUF_E.
    ggf. Statusordnungsnummer ermitteln
      IF STONR IS REQUESTED.
        CALL FUNCTION 'CRM_STATUS_READ'
             EXPORTING
                  OBJNR       = OBJNR
                  ONLY_ACTIVE = 'X'
             IMPORTING
                  STONR       = STONR.
      ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        =
    *COMMIT WORK.
    wait up to 10 seconds.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=READ'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0510'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'GV_OBJECT_ID'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'GV_OBJECT_ID'.
      bdcdata-fval = OBJECT_ID.
      APPEND bdcdata.
         CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=OKAY'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=1OMAIN_TT'.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-program  = 'SAPLCRM_1O_MANAG_UI'.
      bdcdata-dynpro   = '0100'.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
       CLEAR bdcdata.
      bdcdata-fnam = 'BDC_CURSOR'.
      bdcdata-fval = 'CRMT_7010_ACTIVITY_UI-DIRECTION'.
      APPEND bdcdata.
    select single direction from CRMD_ACTIVITY_H into dire
                                  where  guid = objnr.
      if sy-subrc = 0.
        if dire = '0'.
          dire = '1'.
        elseif dire = '1'.
         dire = ''.
       elseif dire is initial.
         dire = '1'.
        endif.
    endif.
    CLEAR bdcdata.
      bdcdata-fnam = 'CRMT_7010_ACTIVITY_UI-DIRECTION'.
      bdcdata-fVAL = DIRE.
      APPEND bdcdata.
      CLEAR bdcdata.
      bdcdata-fnam = 'BDC_OKCODE'.
      bdcdata-fval = '=SAVE'.
      APPEND bdcdata.
    CALL TRANSACTION 'CRMD_BUS2000126'  using bdcdata mode 'N'.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        =
    *COMMIT WORK.
    wait up to 5 seconds.
    *}   INSERT
    ENDFUNCTION.
    Thanks and regards
    Neel

    Dear experts,
    Already the FM is RFC enabled other i won't be able to call it from portal
    and coming to using the BAPI_ACTIVITY CHANGE fm that acting very weird so we are using the CRM EXTERN CHANGE USER STATUS fm which is working fine but the only problem is even when we comit from BAPI_TRANSACTION_COMMIT its not getting the delta queue of BW updated eventhough its chaning the status.
    So for the above reasons we are using the BDC code in the FM for pressing the save button then its will update the changes to BW delta queue as well.
    its working fine when i run it from the system in tcode SE37 only the BDC code is not runing when i am doing it from portal apart from the fm is chaning the status .
    thanks and regards
    Neel

Maybe you are looking for

  • Btree vs Bitmap.  Optimizing load process in Data Warehouse.

    Hi, I'm working on fine tuning a Data Warehousing system. I understand that Bitmap indexes are very good for OLAP systems, especially if the cardinality is low and if the WHERE clause has multiple fields on which bitmap indexes exist for each field.

  • SD related user-exits scenarios

    Hi Gurus, Can anyone of you please send me some real time SD related user-exits scenarios. Thanks, Rajeev !!!

  • Parameters when a idl exception is thrown

    I am trying to assign a value to a parameter passed to a server through corba...that value varies based on whether or not there is an exception...It works fine with no exceptions, and is assigned the correct value on the server side and is received o

  • Searching time of insertion of a row in a table

    Hi all , My problem is the following. I would want to know if it there's a way , under TOAD or SQL*Plus, to have the time when a row has been inserted in an Oracle table. Thank you very much.

  • Need experience

    Hello, How do you use Software component in the integration repository ? For example in a process with R/3 - XI - BW, where do you put your namespace for your development ? Is it better to put all into R/3, XI, or BW component ? Or is it better to de