BTE Name in Called Function Module

Hello,
A function module say XYZ is called from a BTE. Can I know the name of the BTE which called the function module XYZ inside the function module XYZ ?
With Regards,
Avisesh.

I think this document may help you...
<b>Business Transaction Events</b>
This activity describes how you can connect additional components (such as in the form of function modules developed yourself or a product from an external software provider) to the standard R/3 System.
There are two types of interface available in the General Ledger
Accounting (FI-GL), Accounts Receivable and Accounts Payable
(FI-AR/FI-AP), and Sales and Distribution (SD) components for this:
1. Publish & Subscribe interfaces (also called "informing interfaces" in the following) These should inform you about particular events (such as a document being entered) in the SAP standard application and make the data generated as a result available to the external software. The external software does not return any data to the standard R/3 System.
(I'm confused. MIT is using two business transaction events for the SD to FI interface. Both of these events are Publish & Subscribe interfaces. They both return data to the SAP standard application! They both change the FI document before it is posted. What I've figured out is that if there is an export to memory and an import from memory before and after the function call, then we can't modify the data. We can check this in the calling function module - OUTBOUND_CALL_00503110_E or OPEN_FI_PERFORM_00001020_E, etc)
Examples of such events in the R/3 System are:
Master record was created, changed, or blocked
Document was entered, parked, changed, or reversed
Items were cleared or reset
Additional processing can be caused in the additional component on the basis of these events and data:
Starting a workflow
Generating or changing additional data
Requesting correspondence
FI Clearing (F-32) calls (gathered via SE30):
Function OPEN_FI_PERFORM_00001020_E (can't modify data)
00001020 POST DOCUMENT:       Prior to final checks
EVENT
This Event is reached prior to completing the document. The checks that are carried out at this point include checking, prior to posting, that the document balances to zero, and calculations for tax offsetting. This Event is accessed once per standard posting process and is similar to validation at document level (Event 0003). A document number has not yet
been assigned when this Event is reached.
INTERFACE
All document line items created and the document header data are
transferred (both as tables).
Parameter
T_BSEG
T_BKPF
Function OPEN_FI_PERFORM_00001025_E (can't modify data)
00001025 POST DOCUMENT:       Final checks completed
EVENT
This Event lies following all checks on the whole document, but prior to number assignment. Following this Event, no further error messages may be sent. The document is complete at this point, and no further changes can be made to it prior to posting.
INTERFACE
All current data, all document data relevant for the posting, and various control parameters are transferred to the additional component. At this point you can still implement your own checks on the current document data.
Parameter
I_BKDF
T_AUSZ1
T_AUSZ2
T_AUSZ3
T_BKP1
T_BKPF
T_BSEC
T_BSED
T_BSEG
T_BSET
T_BSEU
Function OPEN_FI_PERFORM_00001030_E (can't modify data)
Function OPEN_FI_PERFORM_00001140_E (can't modify data)
2. Process interfaces (also referred to as "process" in the following) Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system, that is process interfaces replace standard processes. Here you can structure determination of individual field contents or of specific reactions to process flows individually. It is possible to connect different external developments to the standard R/3 System. The additional developments are generally carried out using the ABAP/4 Development Workbench. This way you can, for example, influence the control of payment transactions. Selection of payment method, house bank and partner bank can be made using the payment data (currency, amount, and payee) according to a selection logic which you have defined.
FI Clearing (F-32) calls:
Function OPEN_FI_PERFORM_00001120_P
Function OPEN_FI_PERFORM_00001130_P
Function OPEN_FI_PERFORM_00001150_P
Function OPEN_FI_PERFORM_00001170_P
Standard Settings
Sample modules are delivered in the standard R/3 System which you can
copy into your name range and fill them with statements there.
Activities
1. Enter a product using "Settings -> Customer's products". Actually, in 4.6C, from transaction FIBF (IMG -> Financial Accounting -> Financial Accounting Global
Settings -> Business Transaction Events):
Settings -> Products -> ...of a customer
There are generally a large number of function modules belonging to a product which can be called by different program events from within the standard R/3 System. A product can also be an external software component. If the product is in an external system, enter an RFC destination here. If the product is in the same system, you do not have to enter anything. Important: Do not forget to activate the product after making the following settings.
2. Establish the interfaces with which the R/3 System provides you. To do this, choose
Environment -> Info system (P/S)
or
Environment -> Info system (Processes).
Execute the program. You should enter "A" as the
attribute type. You see the respective interfaces with which the R/3 System provides you. Note the key of the interface which you require.
You can also select:
By particular SAP application components
By particular events by entering intervals
Which interfaces are used in activated products
Which interfaces are used within a particular country version or within a particular industry
Which interfaces are used within a particular customer product
3. Enter the function module which you have developed yourself. To do this, choose either Goto -> Edit modules within the info system or Settings -> P/S modules or Process modules -> Customer's in the "SAP Business Framework" menu. Make the following entries:
Key for the interface
The product that you want to use
Function module which belongs to this product.
You can also enter several function modules for a product. Caution:
The function module must be within your name range, that is must begin with the letter Z. You leave the Ctr and Appl. fields blank unless you want a particular country version or a particular SAP industry-specific component to be enhanced or replaced instead of the standard process flow.
4. Fill the source text of your function module
and activate it. To do this, go again via Environment -> Info system (P/S) or Environment -> Info system (Processes) into the information system and execute the program. Then proceed as follows:
Click twice on the interface you have chosen. If you want, you can look at the interface at this point by choosing Goto -> Interface. Then choose the Back function again afterwards.
Place the cursor on the relevant line and choose Goto -> Function library. You see the sample function module delivered by SAP.
Copy the sample module delivered by SAP and call it the same as the function module entered in step 3.
Fill the source text of the empty function module.
Activate the function module.
Activate the product as described in step 1.
5. Run the R/3 program affected and test whether calling your function module works.
Further Notes
The other menu paths are only used for information about additional components delivered by SAP or about software already installed by external software providers.

Similar Messages

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

  • Find Triggered report name in the function module.

    Hi All,
    A function module is being called by many Reports say (100). Now the question is, I need to find out the Triggered report name in the function module where I can do required logic change based on the report. I cannot include an import parameter in the function module to capture the Report name, for this solution I need to change 100 reports. Is there any better way to find the Triggered report name in the Function Module?
    thanks in advance.
    ravi

    Try system parameter SY-CPROG.

  • HOW TO CALL FUNCTION MODULE FROM ABAP4 EDITOR

    HI !
    friends
    I want to call function module from abap 4 editor.
    is there any shortcut key from edit menu through which if give a function module name then  it calls the function automatically?
    points will be awarded.
    Cheers
    troy

    command will be like this
    <b> call function 'YW2_GET_MNW_PERIOD'
            exporting
              w_budat       = v_datum
            importing
              w_period      = i_date-period
              w_period_desc = i_date-p_desc.</b>
    Regards
    prabhu

  • Can we call function module in sap script

    hi
    can we call function module in sap script
    i want to use function module HR_TMW_GET_EMPLOYEE_NAME in sapscript
    to get Empname by using personal no
    pernr no is coming from bseg-pernr table
    so how i can use it .
    please help me
    thanks in advanced.

    hi,
    You can use like this:
    PERFORM FUNCTION_MODULE IN PROGRAM SUBROUTINE_POOL
    USING &FIELD1&
    USING &FIELD2&
    CHANGING &FIELD3&
    ENDPERFORM.
    where function_module is the func. module name defined in program SUBROUTINE_POOL , field1 n field2 are the fields to be passed, and field3 is the value which you want to display...
    You have to read field1 & field2 in the pool, process them & get the value of field to be output.
    Reward helpful answers.
    Regards,
    SIddhesh Sanghvi.

  • How to Developed user defined functions to call function modules in SAP R/3

    •     how to Develope user defined functions to call function modules in SAP R/3 system

    Hello Raja,
    Go through this V.imp Link...
    http://download.oracle.com/docs/cd/B10464_05/integrate.904/b10408/rfc.htm
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Re: User Defined Functions Tutorials
    Hope this information is useful to you..
    Thanks ,
    Satya Kumar..

  • Requirement to call Function Module in Workflow

    Hi,
    I have been assigned to task wherein i have a requierement like this . I have created a workflow with step user decision with 2 options. Now the thing is that when user select one of option i need to call function module and based on result from
    workflow i need to done further processing. Since there is no event to trigger workflow i am using function module
    SAP_WAPI_START_WORKFLOW to trigger workflow .
    Kindly suggest me how would i call Function module in workflow. i.e. What are the ways( or by which step type facilitate
    me to call FM ) by which i should call FM and do further processing based on result.
    Thanks
    Parag

    Follow the below steps inorder to call a fucntion module from the workflow
    1. First you have to create either a business class or a Business object.... from SWO1 txn..
    2. Create a method in the BOR and while created the system will prompt a message that would you like to create by using any FM here you need to specify the name of the FM that you want to use in the workflow...
    3. ONce the method is created and the code will be generated automaticlaly by the system.. and then you have to create a standard task from PFTC txn..
    4. Once the task is created then you have to use the same task in the workflow.. by creating a activity step ...
    That's all..

  • Help in calling function module

    need to call a function module, for security purpose, do not want to show the name of function module,
    how it can be done ?
    Study SAP

    I think the responders so far don't understand the question.   But that's probably because you don't state it very well.  What you want is a way to call a function module without having the name of the function module in the program.  Easy.
    Create a table with one field, perhaps in an encrypted format.  Let's say you've a function module (DECRYPT) that decrypts the entry in the table to plain text.
    SELECT SINGLE field FROM my_table INTO my_field.
    CALL FUNCTION 'DECRYPT' exporting output = my_field
                            importing input = plain_text.
    CALL FUNCTION plain_text.
    You should have noticed that in most cases, where you see CALL FUNCTION, it is followed by a character literal.  CALL FUNCTION 'SOME_FUNCTION'.  You see, it's encased in quote.  That makes it a literal.  You can replace the name of the function module, with the quotes, with any character like variable that contains the function name.
    matt

  • Calling Function Modules Dynamically

    Hi All,
           Is it possible to call a function module dynamically i.e. to pass the module name and the import and export parameters dynamically at runtime. Please provide a way of achieving this.
    Regards,
                 Milan Thaker

    Hello,
    Read this SAP documentation on calling function modules dynamically: [http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_DYNAMIC.htm|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_DYNAMIC.htm] Here you have an example explaining the technique.
    Also check this link on [ABAP FAQs|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-29].
    Cheers,
    Suhas
    Edited by: Suhas Saha on Mar 9, 2010 3:33 PM

  • Call function module from BSP0 (Parameter group)

    Hello All,
    I am trying to call a FM by changing the parameter group of a planning profile (BSP0) as shown:
             CALL FUNCTION Z_BW_CLEAR_VAR.
    The name of the function module is already entered in table RSPLF_FDIR.
    In the above FM there is DB deletion statement, which is not getting process.
    When I kept break point at FM Z_BW_CLEAR_VAR and executed the planning function - it did not trigger the FM.
    Please let me know how to call the FM.
    Thanks & Regards,
    Pratik

    hi Alberto,
    have a look at quesiton 5 in sap note 730870
    it explains what you need to restart
    from this note:
    restart from visual admin:
    " the RfcAdapter J2EE Service 'SAP XI Adapter: RFC' is restarted or a dependend J2EE Service is restarted ('SAP XI AF CPA Cache', 'SAP XI AF Messaging')."
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Calling function modules from a BSP page

    Hi all
    How do we call function modules from a BSP page.
    regards,
    Paul

    Ok, You want to construct the URL pointing to a BW report and want to execute the same when a button is clicked right? if yes here is the answer.
    for constructing the BW query URL
    http://<bwserver>:<port>/sap/bw/BEx?sap-language=ENCMD=LDOC&infocube=<cube anme>&query=<query name>&var_name_1=<variable name1>&var_value_ext_1=<variable value 1>&var_name_2=<variable name2>&var_value_ext_2=<variable value 2>
    (for more info on how to pass parameters to BW query URL refer to the BW web designer reference manual which can be found at http://services.sap.com/bw)
    and for executing this from a button use onclientclick property of htmlb:button along with window.open
    <htmlb:button id ="BWQ"
                  onClientClick = "javascript:window.open("<%= BW_URL %>" );"/>
    Hope this is clear.
    Regards
    Raja

  • Uncatchable exception: BSP calling Function Module

    Hi all,
    currently i'm facing a very weird problem. My application class calls function module
    HR_INFOTYPE_OPERATION. Normally, in case of an error, the function module gives you back a return parameter. But if i call it from my BSP, the processing doesn't leave the function module. It directly throws an exception ERROR_MESSAGE_STATE instead of writing the message into parameter return.
    If i call the function module with the same parameters from a report, it works fine and the error message is written to return parameter without throwing an exception.
    What am i doing wrong? I don't want that exception and need to go on with filled parameter result.
    Regards
    Mark-André

    Hi MA,
    try using ERROR_MESSAGE in the exceptions list, like this.
    CALL FUNCTION 'func_name'
         EXPORTING
              string            = text
              pos               = position
         IMPORTING
              string1           = text1
              string2           = text2
         EXCEPTIONS
              string1_too_small = 1
              string2_too_small = 2
              ERROR_MESSAGE     = 3
              OTHERS            = 4.
    Cheers
    Graham Robbo

  • Need name of a function module or BAPI to update the Tax Classification val

    Hi Guru's
    Need name of a function module or BAPI to update the Tax Classification value for Material master.
    Thanks in advance.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • Third party system call function module/BAPI through RFC to update Z table

    Dear Friends,
    We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
    We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
    waiting for inputs..
    Thanks,
    Kumar

    if third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
    You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table.

  • Why Service Call and why not call Function module Directly in WD ABAP

    Hi,
    I have created a Webdynpro applications and the logic requires calling avrious Function modules.
    Do I need to create Service Call for each Function module or call them directly.
    It would be great if you can suggest me under what cases I need to opt for Service call
    For example, if I use 'RP_CALC_DATE_IN_INTERVAL', do I need to use Service call or call function module directly.
    Note: I have searched forums but could not get the correct answer which I want
    Thanks!

    The Service Call is really meant to be a wizard/time saver.  It has the advantage that it can generate matching context nodes/attributes for the interface of the Function Module you are calling. However everything that the service call does can also be created by hand.
    Personally I'm not a fan of what the service call wizard generates.  Its good as a time saver or for beginners, but I find I prefer to touch up the code it generates anyway. I much prefer to create a nice reusable model class with its own unit test and then consume this model class (with the service call wizard) from WD.  This model class might contain one or more function module calls depending upon what logic I need to access.

Maybe you are looking for