Need to track Function modules called when executing a transaction

Hi All,
          Is there a way through which i can track function modules called, while executing a Transaction. Kindly provide pointers to it.
Thanks in advance.
Regards,
Navin.

Goto SE80 Transaction and use Program name for corresponding Transaction Use Find operation like Call Function .. then you will get list of FM ..
There is no other option .
reward Points if it is helpful
Thanks
Seshu

Similar Messages

  • Getting values from a function module called in a WDA method

    Friends,
    I am trying to execute a function module from WDA.
    I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
    I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
    When the event handler method containing the call to the function module is executed, nothing happens.
    I am not sure how to pass values to the function module and to get the return values from the function module.
    I am new to using function modules from WDA. Please help me out.
    Thanks and Regards.

    Rashmi,
    Is the function module intended to collect input data from the UI and process it? - Yes
    If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
    Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
    Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
    The function module takes a single value as import parameter and returns a table of values as return value.
    It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
    Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
    Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
    Thanks and Regards.

  • Rfc function module call error

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

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

  • Problem with function module calling

    Hi,
    I have two questions here
    i have a function moduel 'Z_GET_MATL_BALANCE'
    in my code it called in the below said way
    CALL FUNCTION 'Z_GET_MATL_BALANCE'
        DESTINATION 'NONE'
        STARTING NEW TASK 'A'
        PERFORMING f_back ON END OF TASK
        EXPORTING
          ref_dte    = s_datum-low
          str_dte    = s_datum-high
          end_dte    = s_datum-high
          i_werks    = p_werks
          i_past     = 'X'
          i_future   = 'X'
          verselem   = p_mrpver
          plscn      = p_scenar
          r_outrec   = r_outrec
          supstk     = p_supstk
          days_ahead = w_days_ahead
          shipnt     = p_shipnt
        TABLES
          mat_bals   = w_zmat_bals_a
          i_zdatum   = i_datum
          mat_movmts = w_mat_movmts_a
          mat_ship   = i_mat_ship_a.
      IF sy-subrc NE 0.
        MESSAGE e005(ZMIM) WITH
       text-009 text-166 text-054 sy-subrc.
      ENDIF.
    FORM f_back USING task.
      CASE task.
        WHEN 'A' .
          RECEIVE RESULTS FROM FUNCTION 'Z_GET_MATL_BALANCE'
         TABLES
              mat_bals                     = w_zmat_bals_a
              mat_movmts                   = w_mat_movmts_a
              mat_ship                     = i_mat_ship_a
           EXCEPTIONS
                call_material_lesen_fail     = 1
                call_t450n_fail              = 2
                call_t399d_fail              = 3
                call_aufbauen_mdpsx_fail     = 4
                call_mdezx_aufbauen_fail     = 5
                call_t001w_fail              = 6
                call_zmrpelem_failed         = 7
                call_aufbauen_mdpsx_sim_fail = 8
                OTHERS                       = 9.
          IF SY-SUBRC NE 0.
           RET_CODE1 = SY-SUBRC.
          ENDIF.
    now my first question is what is the difference between function modules calling normally and in the above said way
    and the second question is
    under tables parameter i have four internal tables defined where as while calling the same function module using recive results i have three internal tables. is this correct?
    i am asking this because i am getting an error message while using this funciton module
    please do not give generic answers, all the helpful answers will get a def reward

    Call function starting new task is used to make Asynchronus RFC Call. In this case your function module will be called in a NEW SESSION and it will exceute independently from the Main program which is calling the FM. Also, the main program will continue its own processing and it will not wait for the RFC FM to complete.
    Its not mandatory to have all the TABLES parameters in the RETURN Perform (..Receive results from ...)

  • Function module/BAPI for executing VD51/VD52 transactions

    Hi
    Warm greetings to all,
    I require a function module/BAPI for executing VD51/VD52 transactions. Can anyone help on this
    Sreekanth

    Hi Sreekanth,
    Use this.
    There is an FM which is used by standard transaction
    'RV_CUSTOMER_MATERIAL_UPDATE' .
    Ex Code -
    CALL FUNCTION 'RV_CUSTOMER_MATERIAL_UPDATE'
    IN UPDATE TASK
    TABLES
    XKNMT_TAB = XKNMT
    YKNMT_TAB = YKNMT
    TCATALOG_TAB = LT_CATALOG.
    commit work.
    Regards,
    Vijay

  • Dynamic function module call

    Hi,
    I need to call few function modules dynamically.The exporting and importing parameters are also known only at run time.
    Can somebody help me out in this regard,
    Thanks and regards,
    Archna

    hi ,
    Create Function module according to your requirment  and call the same 
    such as
    Create functi0n module   where you are passing PLant  runtime   and get data related to Plant 
    write  code in function according to requirment  .
    FUNCTION zrfc_test.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(ZWERKS) TYPE  MARC-WERKS OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    *"  TABLES
    *"      ZIT_DATA STRUCTURE  MARC
      IF zwerks IS NOT INITIAL.
        SELECT *
          FROM marc
          INTO CORRESPONDING FIELDS OF TABLE zit_data
         WHERE werks = zwerks .
      ELSE.
        SELECT *
          FROM marc
          INTO CORRESPONDING FIELDS OF TABLE zit_data.
      ENDIF.
      IF sy-subrc = 0 .
        MESSAGE ' Selected ' TYPE 'I' .
      ENDIF.
    ENDFUNCTION.
      Suppose  at runtime you get Plant  7100
    types : begin  of w_marc .
             include structure  marc  .
    types : end of w_marc .
    data : it_data type standard table of w_marc with header line  .
    p_plant  = 7100 .
    Call to function module 
    CALL FUNCTION 'ZRFC_TEST'
    EXPORTING
       ZWERKS         = 'p_plant 
    IMPORTING
      RETURN         =
      TABLES
        zit_data       =  it_data  .
    You will get result in it_data .
    Note : if you don't know how to create  Function Module then  search on SDN you will get lots of Forum  .
    Regards
    Deepak.

  • Need of a function module to give a pop up of certain values

    Hi Experts,
    I am need of an function module to give a pop up of values present in an internal table, just like an F4 help. Please advise.
    Thanks in advance,
    Vivenchandar R

    hi Viven,
    check the program <b>BALV_POPUP_TO_SELECT</b> to see how the function module <b>REUSE_ALV_POPUP_TO_SELECT</b> can be used for your requirement.
    Hope this helps,
    Sajan Joseph.

  • Function module call with destination

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

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

  • Can a function module call another function module

    Can a function module call another function module:-
      within the same function group
    (ii)  within different function  groups

    Hi,
    We can call function from another function. If there is a function which is like a calculator and all the operations are from different functions then we have to call the functions from the calculator function for different functions.
    If all the function are from same function group, Then the data is globally available to all the functions with in the group.
    Otherwise we have to declare the data definitions for each of the functions if they are in different function groups.  
    Yes it is possible to call a function module from another function module:-
    within the same function group
    (ii) within different function groups
    Reward.

  • Idoc - Error Status 51: Incorrect function module called up

    Hi,
    In the receiver system for the custom message type, I got this error.
    Incorrect function module called up
    Can any one pls help me to solve this one.
    Regards,
    Bala Raja

    Hi Bala,
         Check the inbound function module attached to process code in receiving system. Generally in every inbound function module first check is coded for checking message type or for checking funciton module like below.In the receiving system go to WE20 and then select the partner and select inbound message type. in that double click on assigned process code.then you have to double click on displayed FM. In that fm check first few lines. You will find this error message.
    LOOP AT IDOC_CONTRL.
        IF IDOC_CONTRL-IDOCTP(6) <> 'DESADV'.
          MESSAGE ID 'E0' TYPE 'E' NUMBER '029'
          WITH IDOC_CONTRL-IDOCTP ' ' 'IDOC_INPUT_DESADV'
          RAISING WF_ERROR_PROCESS.
        ENDIF.
      ENDLOOP.
    Thanks & Regards,
    Kalyan.

  • The method 'commit' cant be called when a global transaction is active.

    Hello,
    I've installed the SOAdemo a couple of times on local machines, and it works fine. Now I've deployed the SOADemo on a separate server and a strange error occurs in BPEL when testing the SOADemo.
    The SOAOrderBooking BPEL process runs into an error at the GetOrderId process:
    ================================
    file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_SOAOrderBooking_1.0_937b09d1bd8dae1b33b028b2871aef63.tmp/OrderSequence.wsdl [ OrderSequence_ptt::OrderSequence(OrderSequenceInput_msg,OrderSequenceOutputCollection) ] - WSIF JCA Execute of operation 'OrderSequence' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active .
    ; nested exception is:
         ORABPEL-11616
    =================================
    I am using SOA Suite 10.1.3.0 and Database 10201, deployed on Windows.
    Can anybody tell me what can cause this problem?
    Thanks in advance,
    Regards Leon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    Hi, I am getting the same error using ESB Database Adapter.
    My faultstring is:
    ========================
    oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/my_ESB/myAdapter.wsdl [ myAdapter_ptt::myAdapter(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'myAdapter' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown]. [Caused by: The method 'commit' cant be called when a global transaction is active.]
    Caused by Exceptoin [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Belső kivétel: java.sql.SQLException: The method 'commit' cant be called when a global transaction is active.Error Code: 0.
    ==========================
    (BTW, what has 'commit' to do with a procedure that is only reading the database?)
    Regards,
    Patrik

  • The method 'rollback' cant be called when a global transaction is active

    I receive the following error stack while dequeuing a message (aq adapter outbound) and forward the message to a database (database adapter inbound) within Oracle ESB 10.1.3.4.
    The database connection is dynamic using additional variables in the xlst transformation and putting the connection information (jndi name) in the xml doc:
    <xsl:variable name="JDBC_RESOURCE"
    select="/imp1:MixMatchMsg/imp1:Winkel/imp1:JNDI_NAME"/>
    <xsl:variable name="SET_DATASOURCE"
    select="ehdr:setOutboundHeader('/dhdr:OutboundDBHeaderType/dhdr:dataSourceName',$JDBC_RESOURCE,'dhdr=http://xmlns.oracle.com/pcbpel/adapter/db/;')"/>
    An unhandled exception has been thrown in the ESB system.
    The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException:
    esb:///ESB_Projects/mixmatch_MixMatchESB/WriteWinkels.wsdl
    [ WriteWinkels_ptt::merge(IntMixMatchCollection) ]
    - WSIF JCA Execute of operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed.
    Descriptor name: [WriteWinkels.IntMixMatch].
    [Caused by: The method 'rollback' cant be called when a global transaction is active.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteWinkels.IntMixMatch].
    [Caused by: The method 'rollback' cant be called when a global transaction is active.]
    Caused by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602))
    : oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException:
    The method 'rollback' cant be called when a global transaction is active.Error Code: 0.
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:644)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:739)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:927)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:842)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:865)
    at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:231)
    at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:138)
    at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:411)
    at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:169)
    at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Bu
    The payload looks as follows:
    <top:IntMixMatchCollection xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/WriteWinkels">
    <top:IntMixMatch>
    <top:nummer>1</top:nummer>
    <top:omschrijving>C1000 Tandenborstels: 3 voor 2.56</top:omschrijving>
    <top:kassabonOmschrijving1>Tandenborstelactie</top:kassabonOmschrijving1>
    <top:kassabonOmschrijving2>3 voor 2</top:kassabonOmschrijving2>
    <top:aantalPerKlant>2</top:aantalPerKlant>
    <top:begindatum>2009-03-16</top:begindatum>
    <top:einddatum>2009-03-21</top:einddatum>
    <top:mixMatchGroepNummer>1</top:mixMatchGroepNummer>
    <top:mixMatchGroepOmschrijving>WK 200912 Mix matchess</top:mixMatchGroepOmschrijving>
    <top:intMixMatchDsCollection>
    <top:IntMixMatchDs>
    <top:volgnummer>1</top:volgnummer>
    <top:aantalTeNemenArtikelen>3</top:aantalTeNemenArtikelen>
    <top:omschrijving>C1000 Tandenborstels</top:omschrijving>
    <top:kortingToerekenenJn>J</top:kortingToerekenenJn>
    <top:bedragTeBesteden>1.23</top:bedragTeBesteden>
    <top:kortingwaarde>2.56</top:kortingwaarde>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:intMixMatchHfdgrInDsCollection>
    <top:IntMixMatchHfdgrInDs>
    <top:hoofdgroepnummer>16</top:hoofdgroepnummer>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchHfdgrInDs>
    </top:intMixMatchHfdgrInDsCollection>
    <top:intMixMatchArtikelInDsCollection>
    <top:IntMixMatchArtikelInDs>
    <top:artonnummer>10010205</top:artonnummer>
    <top:actieInkoopprijsEncrypted>6C1407B28B5B7EDC</top:actieInkoopprijsEncrypted>
    <top:uitsluitenJn>J</top:uitsluitenJn>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchArtikelInDs>
    </top:intMixMatchArtikelInDsCollection>
    <top:intMixMatchHfdsubgrpInDsCollection>
    <top:IntMixMatchHfdsubgrpInDs>
    <top:hoofdsubgroepnummer>82</top:hoofdsubgroepnummer>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    <top:mixMatchDoosVolgnummer>1</top:mixMatchDoosVolgnummer>
    </top:IntMixMatchHfdsubgrpInDs>
    </top:intMixMatchHfdsubgrpInDsCollection>
    </top:IntMixMatchDs>
    </top:intMixMatchDsCollection>
    <top:intMixMatchTijdCollection>
    <top:IntMixMatchTijd>
    <top:dagnummer>1</top:dagnummer>
    <top:begintijd>0001-01-0112.23.00</top:begintijd>
    <top:eindtijd>0001-01-0114.45.00</top:eindtijd>
    <top:mixMatchNummer>1</top:mixMatchNummer>
    </top:IntMixMatchTijd>
    </top:intMixMatchTijdCollection>
    </top:IntMixMatch>
    </top:IntMixMatchCollection>
    Anybody any idea what could be wrong?
    Any ideas for a workaround/solution?

    I encountered this error while trying ADF tutorial CH10 - Developing an Edit Page, after changing some data on the Edit page and click on Save, the error appears on top of the page. The roll back was called implicatly by ADF, per stack trace msg it seems to come from failing to commit and then failing to roll back. Not sure why this is happening, please advise.
    WARNING: The method 'commit' cant be called when a global transaction is active. [TopLink Warning]: 2006.12.27 12:14:39.963--ClientSession(29795927)--Thread(Thread[HTTPThreadGroup-6,5,HTTPThreadGroup])--Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: The method 'commit' cant be called when a global transaction is active.Error Code: 0....
    at QPPublicFacade_LocalProxy_4ogao92.mergeEntity(Unknown Source)<----------> WHAT may cause mergeEntity failed??

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

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

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

  • Function Module Call Via CMOD Logic for Master Data Enhancement

    Hi Friends Please help me to resolve this, would really be very kind of all of you.
    Requirement. I want to Enhance the field ZFACTREG from VIBDBE table in my datasource 0busentity_attr extract structure l_s_REIS_BUSENTITY_ATTR, I want to create the logic in CMOD exit_saplrsap_002 to call my function module for enhancement of master data. Please help me Step by Step
    Thanks
    Poonam Roy
    <b>Step #1</b>
    I put this code which gives me error in CMOD like this
    ERROR : Das formale Argument 'OTHERS' muss am Schluss der Ausnahmeliste stehen.
    ABAP Code#1 IN exit_saplrsap_002     
    DATA: l_d_fmname(30) TYPE c.
    CONCATENATE 'Z_DS_' i_datasource(25) INTO l_d_fmname.
    TRY.
    CALL FUNCTION l_d_fmname
    EXPORTING
    I_DATASOURCE = I_DATASOURCE
    I_UPDMODE = I_UPDMODE
    TABLES
    I_T_SELECT = I_T_SELECT
    I_T_FIELDS = I_T_FIELDS
    I_T_DATA = I_T_DATA
    C_T_MESSAGES = C_T_MESSAGES
    EXCEPTIONS
    RSAP_CUSTOMER_EXIT_ERROR = 1
    OTHERS = 2
    IF FOUND.
    IF SY-SUBRC <> 0.
    RASIE RSAP_CUSTOMER_EXIT_ERROR.
    END IF
    CATCH CX_SY_DYN_CALL_ILLEGAL_FUNC.
    ENDTRY.
    <b>Step#2</b>
    I simple created the Function module Z_DS_BUSINESS
    and put the code in source code  which gives me error . what should i put in other tabs like"Import", Export", Tables" i kept blank
    ABAP CODE give me error : The Dictionary structure or table "FIELD-SYMBOLS" is either not active. i have to remove include in the FM. WHY SO??
    FUNCTION Z_DS_BUSINENSS
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_DATASOURCE) TYPE  RSAOT_OLTPSOURCE
    *"             VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM
    *"             VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE
    *"       TABLES
    *"              I_T_SELECT TYPE  SBIWA_T_SELECT
    *"              I_T_FIELDS TYPE  SBIWA_T_FIELDS
    *"              I_T_DATA
    *"              C_T_MESSAGES STRUCTURE  BALMI OPTIONAL
    *"       EXCEPTIONS
    *"              RSAP_CUSTOMER_EXIT_ERROR
    INCLUDE ZXRSAU02.
      WRITE: / 'INSIDE THE Z_DS_MEASUREMENTS PROGRAM'.
    TABLES: REIS_BUSENTITY_ATTR,
            VIBDBE,
    field-symbols:.<fs_REIS_BUSENTITY_ATTR> like REIS_BUSENTITY_ATTR.
    DATA: BEGIN OF i_c_t_data OCCURS 0.
              include structure REIS_BUSENTITY_ATTR.
    DATA END OF i_c_t_data.
    DATA: i_c_t_data_copy like i_c_t_data OCCURS 0 WITH HEADER LINE,
          begin of i_vibdbe occurs 0,
          INTRENO like vibdbe-INTRENO,
          ZFACTREG like vibdbe-ZFACTREG,
                  end of i_vibdbe.
    i_c_t_data_copy[] = i_c_t_data[] = c_t_data[].
    sort i_c_t_data_copy by vibdbe.
    Select  INTRENO
            into table i_VIBDBE from VIBDBE
            for all entries in i_c_t_data_copy
            where  INTRENO = i_c_t_data_copy- INTRENO.
    if sy-subrc = 0.
      sort i_VIBDBE by INTRENO.
      loop at i_c_t_data assigning <fs_REIS_BUSENTITY_ATTR>.
        clear: i_VIBDBE.
        read table i_VIBDBE with key INTRENO = <fs_REIS_BUSENTITY_ATTR>-INTRENO
        BINARY SEARCH
        transporting ZFACTREG .
        if sy-subrc = 0.
          <fs_REIS_BUSENTITY_ATTR>-ZZFACTORY = i_vibebe-ZFACTREG
        endif.
    null

    (I leave office until Monday morning, Europe time)
    in include from customer-exit ZXRSAU01, etc.
    CASE I_DATASOURCE.
    WHEN '0CUSTOMER_ATTR'.
       PERFORM 0customer_attr changing i_t_data...
    ENDCASE.
    In each perform, doing what you wrote ; select (needed fields) from complementary-database-table into an internal table with a for all entries. sort the table. LOOP and MODIFY on i_t_data.
    In some case i had to insert lines of i_t_data to an internal table of DS_structure when entering subroutine and back at exit. (on 4.6C PI 2003 if i remember)
    Some optimization done when reading small tables (T001 society and the same, these are filled once and not for each packet of data.
    Your idea of creating different FM is of interest, but the cost of passing i_t_data between two programs (two function groups) may overcome the gain of performance. In a job only one DataSource is processed so only one routine is actually called.
    Regards.

  • Raise exception in function module call from SAP owned program

    I need to raise an exception in a function module to terminate a transaction, display a error message and return to to previous selection screen so the user can fix the error before moving forward.......  
    How do you do this when the program using the function module is SAP owned?
    Thank You!
    Jeff

    Hi,
    After calling the function module, you can do something like this.
    IF SY-SUBRC <> 0.
      RAISE EXCEPTION.
    ENDIF.
    Regards,
    Ferry Lianto

Maybe you are looking for