Call RFC enabled function from within VBA in BI 7.0

Hello Experts,
the problem that we have should be general, i have found some postings on this forum concerning it, but unfortunately no proper solutiont.
I just want to have the possibility to call the rfc enabled function module from within the callback function in VBA after executing of some query.
I have seen the suggestion to build a new RFC connection in VBA, but therefore you should hard-code all connection parameters (including user + password)
in the VBA code, this solution is for us not acceptable due to the security reasons.
Is there some way to use the existing connection of BEx Analyser in order to execute the function calls?
This functionality was possible in 3.5 but not in 7.0 since many functions that were available in 3.5 are not supported now.
Do you have experience/suggestions for this problem?
Any help would be great.
Thanks a lot,
Kirill

I've got the same problem. Did you find the solution?
Thank you,

Similar Messages

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Problem with String parameters while Calling RFC enabled Function Module

    Hi all,
    I execute BAPI(RFC enabled Function Module) from my WebDynpro Application and retrieve data from R/3.
    To fetch the data I pass few String parameters to BAPI from my Dynpro Application.
    Now the problem is that while making this call, the parameters are automatically converted to UpperCase. And I want those parameters in the original case at R/3.
    I am not able to find out whether this conversion occurs at Dynpro side or R/3 Side.
    Should i configure my BAPI(RFC enabled Function Module) or is there some option on the Dynpro Side to preserve the Case of the String?
    Please help me.
    Thanks,
    Darshil

    Hi Darshil,
    I'm not sure whether you have experience with ABAP or you are a Java Programmer, but we cannot set that flag permanently.
    Now, if you are saying that the domains are marked with the <i>Lowercase</i> attribute, then it means that the final table field will be capable of holding Case Sensitive data.
    I have a hunch that the case-conversion is happenning at the Web-Dynpro side. Or, the application logic converts the string to UPPERCASE explicitly.
    By the way, which BAPI are you talking about ?
    Regards,
    Anand Mandalika.

  • Calling a Member Function from within a Cursor in a Procedure

    Hello Folks
    I'm a newbie to oracle and am in the process of learning 10G. My question is:
    I created a type called row_po and defined a member function getCost() which returns the total cost of the order with line items as nested table, which i intend to call from within a procedure. In the procedure my SELECT returns multiple records and hence I need to use a cursor. For each record I've got to display the order_no, qty and order_cost (qty and order_cost are part of a line items nested table). I'm able to get to the order_no and qty but don't know how to call the member function to get the order_cost. Here's my procedure:
    CREATE OR REPLACE PROCEDURE get_podet(part_num in number)
    AS
    CURSOR c2 is
    SELECT *
    FROM tab_po po, TABLE (po.LineItemList_nestab) L
    WHERE L.PartNo = part_num;
    BEGIN
    FOR crec in c2 LOOP
    DBMS_OUTPUT.PUT_LINE('ORDER NUMBER: ' || crec.PONo);
    DBMS_OUTPUT.PUT_LINE('LINE QTY: ' || crec.Qty);
    {color:#ff0000}*DBMS_OUTPUT.PUT_LINE('ORDER VALUE: ' || ''); -- order_cost which should be returned from the member function i've mentioned --*
    {color}END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Failed' || 'SQLCODE: ' || SQLCODE);
    DBMS_OUTPUT.PUT_LINE('SQL ERROR MESSAGE ' || SQLERRM);
    END;
    The line in red is where i want to call my function getCost() which is a member of tab_po po as mentioned in my SELECT.
    Any thoughts highly appreciated.
    Thanks and Regards

    One way would be to just run the query in a editor (sqlplus or toad) and see whats the column name.
    Before that can you show us the structure of the type.
    If you declare a table type without an object then the default column name is COLUMN_VALUE else the object filed name is taken.
    Example without object in table type.
    SQL> create or replace type tbl as table of integer
      2  /
    Type created.
    SQL> create or replace function fn return tbl
      2  as
      3     ltbl tbl;
      4  begin
      5     select level bulk collect into ltbl
      6       from dual
      7    connect by level <= 10;
      8
      9     return ltbl;
    10  end;
    11  /
    Function created.
    SQL> select * from table(fn)
      2  /
    COLUMN_VALUE
               1
               2
               3
               4
               5
               6
               7
               8
               9
              10
    10 rows selected.
    Example with object in table type.
    SQL> create or replace type obj as object(no integer)
      2  /
    Type created.
    SQL> create or replace type tbl as table of obj
      2  /
    Type created.
    SQL> edit
    Wrote file afiedt.buf
      1  create or replace function fn return tbl
      2  as
      3     ltbl tbl;
      4  begin
      5     select obj(level) bulk collect into ltbl
      6       from dual
      7    connect by level <= 10;
      8     return ltbl;
      9* end;
    10  /
    Function created.
    SQL> select * from table(fn)
      2  /
            NO
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.Edited by: Karthick_Arp on Jan 13, 2009 5:00 AM

  • Calling RFC-enabled function as web service using XI 3.0

    Hi,
    I have a problem when trying to use web services (sending a soap-req. to XI 3.0 based on the generated WSDL from Integration Directory).
    According to the message monitoring, all steps in the central pipeline executes just fine until the last step - CALL ADAPTER.
    I don't think this is an authorization issue since I have tested the XIISUSER/pwd against the URL for adapter engine.
    Seems to me that the problem is related to the msg sent to AE:
    "HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)"
    How to proceed from here?

    Hi Torstein,
    <i>Seems to me that the problem is related to the msg sent to AE:
    "HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)"
    </i>
    According to you, the problem occurs within the SOAP envelope. Does your incoming SOAP message looks like the one below here?
    If that's not the case, then make sure your SOAP/Web Service client is sending a valid SOAP envelope/request (like the sample below) to XI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Inbound Message -->
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <SOAP:Header/>
    <SOAP:Body>
    <ns1:WebServiceRequest xmlns:ns1='http://company.com/xi/webservice/myws' SOAP:actor='http://schemas.xmlsoap.org/soap/encoding/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <Customer xsi:type='xsd:string'>000025</Customer>
    <CompanyCode xsi:type='xsd:string'>BE01</CompanyCode>
    <KeyDate xsi:type='xsd:string'>20050310</KeyDate>
    <Selection>
    <OpenItems xsi:type='xsd:string'>X</OpenItems>
    <ClearItems xsi:type='xsd:string'></ClearItems>
    <GLItems xsi:type='xsd:string'></GLItems>
    <Dunning>
    <From xsi:type='xsd:string'>A</From>
    <To xsi:type='xsd:string'>Z</To>
    </Dunning>
    </Selection>
    </ns1:WebServiceRequest>
    </SOAP:Body>
    </SOAP:Envelope>
    Cheers,
    R.

  • Calling a JavaScript function from an JApplet...

    Can anyone help? Is it possible to call a JavaScript function from within a JApplet? If so, what is the syntax? I've seen reference to the Netscape package but I've been led to believe it doesn't always work within Internet Explorer 6 which is the target browser.
    If the above is not possible can anyone tell me if and how it is possible to load images from outside the init() method of a JApplet? This would allow me to work around the problem.
    Thanks in advance - Jim.

    Call javascript you use the JSObject
    Please note the MAYSCRIPT int the html file.
    html file:
         <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                  height="0" width="0" >
            <param name="code" value="someApplet.class" />
            <!--[if !IE]> Mozilla/Netscape and its brethren -->
            <object classid="java:someApplet.class"
                    height="0" width="0"
                    mayscript=true>
            </object>
            <!-- <![endif]-->
          </object>
    <LABEL id="lblOutputText">This text is the HTML text </LABEL>java class:
    // new class for jsObject!!!! compile this: javac -classpath "C:\Program Files\Java\jre1.5.0\lib\plugin.jar" someApplet.java
    // since jaws.jar does not exsist anymore
    // in 1.4.0 to compile: javac -classpath "C:\j2sdk1.4.0_03\jre\lib\jaws.jar" someApplet.java
    // for msjvm use the -source 1.3 -target 1.1 option so the command looks like this:
    // javac -source 1.3 -target 1.1 -classpath "C:\j2sdk1.4.0_03\jre\lib\jaws.jar" someApplet.java
    import netscape.javascript.*;
    public class someApplet extends java.applet.Applet {
        JSObject win;
        public void init() {
             try{
                 win = JSObject.getWindow(this);
    // you need win.eval("window.close();"); // to close the window. if the current window is not a popup
    // opened by a parent with window.open than the user will get a waring, your next question probably will
    // be "can I stop this warning" and the answer is simple: NO
                 JSObject textBoxLabel = (JSObject) win.eval("document.getElementById('lblOutputText')");
                 textBoxLabel.setMember("innerHTML", "<center><h1>Some text</h1></center>");
            }catch(Exception e){
                 e.printStackTrace();
    }

  • How to call Custom RFC enabled Function Module in R/3 From XI

    Hi Experts,
    I want to call custom RFC enabled Function Module by sending some input parameters from XI.
    How to do this
    Thnx
    RAMS

    Hi RAMS,
    1. Under the SWCV Go to the Imported Objects.
    2. Right click on the RFC and click on the Import of SAP object.
    3. Give the logon server name, system number the user name and pasword.
    4. Select the RFC u want to import.
    5. Execute the import and the RFC is imported under the SWCV.
    Now u can use this Imported RFC in the scenarios of that SWCV.
    Regards
    Santhosh
    Remember to set the thread to solved when you have received a solution

  • RFC enabled function module which will be called from XI

    Hi Abappers,
    I have to send confirmation of the sales orders created by inbound Idocs ORDERS05 to XI. For this I have to use outbound Idoc ALEAUD01. But since I also need to send NETWR(from VBAK) and there is no field in this Idoc for that,
    I have to develop an RFC enabled function module for which a RFC lookup will be performed from XI. This function module has to return NETWR values for sales orders. Can anyone please tell me how to go about with this function module.
    Thanks in advance.

    Hi Priyanka,
    Add a parameter in <b>tables tab</b> of function module with reference to NETWR. It'll work.
    Regards,
    Younus
    Reward Helpful Answers!!!!

  • RFC enabled function module using call transaction

    Hi,
    We have a scenario wherein we have a RFC enabled function module which inturn uses a call transaction to create a PM order & attaches the PM notification against it. Sometimes it so happens that the order does not get created for some reason or the other and there are no logs generated on the system to investigate. However we are capturing the messages produced via the BDCMSGCOLL. At present we are using the update parameter as 'L'.
    In some scenarios it states that the notification is locked by the same notification and comes out without creating the order, in this process we are losing out on the order & the notification number which if successful would have got updated in the database.
    I know this could be done via the BAPI, but there are innumerable steps within the BDC which can't be actually done using the BAPI and hence we could not use this procedure.
    Is there any other way by which we can ensure that there's always a successful order creation, I mean without losing out on the order/notification number?. Would changing the update mode to 'S' help?. Since this process is time bound, it can't actually take more time then what its taking with the current logic.
    Please let me know if you require further details on the same. Any help in this regard would be highly appreciated.
    Regards,
    Vidya

    Sorry for an unclear replay.
    In Simple terms; I have 2 scenarios;
    Launch a new tab (IW38 tcode), on click of a button in SAP screen of custom transaction in NWBC.
    Launch a new tab (IW38 tcode), on click of a button in a Non - SAP App opened (using URL) in NWBC.
    For 1st case, i have used
    CL_NWBC=>URL_CONSTRUCT
      EXPORTING
         CANVAS_WDA__CLIENT_TYPE       = 'nwbc'
         CANVAS_TRANSACTION            = 'IW38'
      RECEIVING
         URL                           = lv_URL.
    CALL METHOD CL_NWBC=>URL_LAUNCH
       EXPORTING
         URL    = lv_url
    But it gets open in NWBC HTML not in NWBC Desktop client.
    I tried all the Parameters you have mentioned in your response to this post earlier, but nothing worked. the last one is CANVAS__WINDOW which actually hides the top area and few buttons but still it is a HTML version.
    If i set the HTML_CLIENT = ABAP_FALSE, it launches a new window instead of the tab and asks for Login. If i login in can see the IW38 in NWBC desktop client. But the only problem is we have the restriction of single window/single login for users.
    I am on NWBC PL12 and also updated the GUI 7.3 to PL8.
    Simply the problem is URL_CONSTRUCT for any transaction is launching it in a new tab but in HTML Version.
    For 2nd case,
    It asks for the login details on click of a button on the 3rd party URL opened in NWBC. which means i am launching SAP from a 3rd party.
    Is there any way to achieve the launch of new tab in this case instead of the new window ?
    I hope its more clear now.
    Regards,
    Nik.

  • Ideas in calling a non RFC enabled FM from another system

    Hi guys,
    I have a request to check the status of the background jobs in miscellaneous systems in the landscape. I'll probably use FM BP_FIND_JOBS_WITH_PROGRAM. The thing is this function is not Remote-Enabled and I need one which is. My idea was to create one RFC-enabled with more or less the same parameters, inside just calling the standard one. I'm not really convinced this is the best approach so that's why I'm asking: is there a better way to do this, any ideas?
    Best regards,
    George

    Function module BP_FIND_JOBS_WITH_PROGRAM either does not exist or is not RFC-enabled.
    No proxies for non RFC-enabled functions.
    Even if it was allowed, then I would have to find out how to consume web services from my ABAP report and everything... sounds interesting but as with all programs this needs to be delivered on time.

  • How to call a RFC-enabled function module

    Hi All,
    We have 2 systems; system 1 (client 420) and system 2 (client 600).
    I just want to know that how can a RFC-enabled function module be called from one system (420) whereas the RFC-enabled functio nmodule exists in the other system (600).
    Also, as per my understanding any RFC-enabled function module is a BAPI. Please confirm.
    Please help.
    Thanks & Regards,
    Namrata

    Hi,
    RFC enabled FM can be called from anther system:
    From 420 we can call RFC FM residing in 600, through RFC destination cretaed in SM59 tcode in 420 client.In sm59, maintain the entries of destination system i.e 600.and test the connection whether it is succesful or not/ through remote logon.
    suppose in 420 client , in sm59 u have cretaed with destination DEST600 say.
    In 420, u can code as below..
    Call  'RSSDK_LOGSYS_REMOTE_CHECK' destination DEST600
    exporting
    I_QSYSTEMNAME =
    tables
    E_T_MSG =
    there exist difference between BAPI/RFC.
    BAPI always return messages / RFC doen't.
    BAPI follows ceratin naiming convetions while defineing the parameter structures ( ex BAPI_..)
    In bapi , no dialog screens can be called.
    In bapi, statements liek COmmit work/Call Transaction/Submit...shouldn't exit.
    Bapi's are implemented as FM's and are stored as methods in Business Object repository.
    another Ex for RFC
    RSAN_LOGSYS_DETERMINE
    Revert back if any issues,
    Reagrds,
    Naveen
    Edited by: Naveen Deva on Feb 18, 2009 9:54 AM

  • Calling ORACLE Functions from within CF Builder report

    Hi, I have an ORACLE function that I would like to call from within my CF REPORT.
    I know there is a section in the report builder where you can write coldfusion code to perform tasks, but I would rather simply call the ORACLE function for each detail row in the report
    I do not want to call this function from within my main ORACLE query that I use for the report, so please don't suggest that.
    Thanks so much.
    -Jim

    6.0.5 is not certified against 10g database, so I suggest to upgrade to 6.0.8.26 (6i patch 17) first to see if the problem is gone.

  • Trying to call a root level function from within a loaded swf

    I'm not very familiar with AS3... I'm trying to have a loaded swf file call a function from the parent to unload itself when it comes to the end (on the timeline, not as a button). I'm assuming I need to be calling the function (that is used for the close button) from the loaded swf (perhaps I'm mistaken though?).
    Here's the code from one of my buttons that loads an swf. I'm guessing I need to call the closeSWF function from the timeline of my loaded movie but having no luck figuring out how to do that.
    Any help would be appreciated.
    // 01 ------------------------------------------------------
    function loadWeaving(ev:MouseEvent):void {
      // load SWF
      var movieClip:MovieClip = new holder_mc;
      //add it to the stage
      addChild(holderSWF);
      holderSWF.x=0;
      holderSWF.y=0;
      var requestEN:URLRequest = new URLRequest("WhatIsWeaving_Eng.swf"); // english
      holderSWF.load(requestEN);
      close_bt.addEventListener(MouseEvent.CLICK, closeSWF);
      function closeSWF(infoObject:Object):void {
      trace("close SWF");
      removeChild(holderSWF);
      // reset switch
      close_bt.visible = false;
      showAllButtons();
      infoObject.currentTarget.removeEventListener(infoObject.type, closeSWF);
      setChildIndex(close_bt,numChildren - 1);
      close_bt.visible = true;
      hideAllButtons();
      // - start timer last
      myTimer.addEventListener(TimerEvent.TIMER, closeSWF);

    You're exactly right. If you attach an event listener to the Loader before you add it to the stage, you can then use event.currentTarget to refer to the loader. And this is definitely the better way to do it if you're planning to use the loaded swf from multiple places or could ever need to do this in the future.
    So:
    protected function initLoader():void {
         var loader:Loader = new Loader();
         loader.addEventListener('closeMe', closeLoader);
         loader.load(new URLRequest(...));
         addChild(loader);
    protected function closeLoader(e:Event):void {
         var loader:Loader = e.currentTarget as Loader;
         if (loader) {
              loader.unloadAnstop(true);
              loader.removeEventListener('closeMe', closeLoader);
              removeChild(loader);

  • 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

  • RFC enabled function module for insert update and delete in a Ztable..

    friends..
    Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
    what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
    Thanks and Regards

    Hi,
    Try this code.
    REPORT ZMMC071Z_RMV.
    TYPE-POOLS : ABAP.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>,
                   <LV_CONDI>.
    DATA: DY_TABLE TYPE REF TO DATA,
    DY_LINE TYPE REF TO DATA,
    XFC TYPE LVC_S_FCAT,
    IFC TYPE LVC_T_FCAT.
    SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_TABLE  LIKE DD02L-TABNAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK F1.
    Evento: At Selection Screen                                          *
    START-OF-SELECTION.
      PERFORM GET_STRUCTURE.
      PERFORM CREATE_DYNAMIC_ITAB.
      PERFORM GET_DATA.
    END-OF-SELECTION.
    *& Form get_structure
    text
    FORM GET_STRUCTURE.
      DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
      XDETAILS TYPE ABAP_COMPDESCR.
      DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
      DATA VL_LENGHT(30).
    Get the structure of the table.
      REF_TABLE_DES ?=
      CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
      IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
      LOOP AT IDETAILS INTO XDETAILS.
        CLEAR XFC.
        XFC-FIELDNAME = XDETAILS-NAME .
        XFC-DATATYPE = XDETAILS-TYPE_KIND.
        XFC-INTTYPE = XDETAILS-TYPE_KIND.
        XFC-INTLEN = XDETAILS-LENGTH.
        XFC-DECIMALS = XDETAILS-DECIMALS.
        APPEND XFC TO IFC.
      ENDLOOP.
    ENDFORM. "get_structure
    *& Form create_dynamic_itab
    text
    FORM CREATE_DYNAMIC_ITAB.
    Create dynamic internal table and assign to FS
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IFC
        IMPORTING
          EP_TABLE        = DY_TABLE.
      ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    Create dynamic work area and assign to FS
      CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
      ASSIGN DY_LINE->* TO <DYN_WA>.
    ENDFORM. "create_dynamic_itab
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA .
    *Get data from p_table into internal table <DYN_TABLE>
      SELECT * INTO TABLE <DYN_TABLE>
          FROM (P_TABLE)
    Here you can implemente function DELETE, INSERT.
    ENDFORM.                    " De_para

Maybe you are looking for