Difference in functional modules

Dear all,
What is the difference between functional modules FI_period_Determine and Period_day_Determine? Under which scenarios they are used?
Thanks and Regards,
vijay

hi
To check whether Posting date belongs to closed period we can use 2 FM's in sequence. Firstly call Function Module  FI_PERIOD_DETERMINE .and Then call Function module  FI_PERIOD_CHECK  to check whether Period belongs to closed period or not
If you know year, month and fiscal year variant and you want to know the first date and end date of that period, you can apply function module "PERIOD_DAY_DETERMINE" in ABAP/4 to get them.
hope it helps
regards
kunal

Similar Messages

  • Difference between function module and userexit and badi

    Hello Gurus,
                    As a functional consultant i want to know what is function module and user exit and badi.
    what is the difference between function module , user exit and badi?
    regds
    Ramachandra

    Rama,
    Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system. You must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules.
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    User exit - A user exit is a three character code that instructs the system to access a program during system processing.
    SXX: S is for standard exits that are delivered by SAP.   XX represents the 2-digit exit number.
    UXX: U is for user exits that are defined by the user.  XX represents the 2-digit exit number .
    Difference between BADI and USER-EXIT.
        i) BADI's can be used any number of times, where as USER-EXITS can be used only one time.
           Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
        ii) BADI's are oops based.
    Hope this helps you.
    Rgds
    Manish

  • Difference between Function module in Update task

    Hi folks,
    What is the difference between
    1. A function module calling in 'update task'( if attributes not set for update mode).
    2.A function module's attributes set to update mode, but while calling not specified 'Update task'.
    Please clarify this doubt.
    Thanks in advance.
    Bhavani

    CALL FUNCTION func IN UPDATE TASK.
    Additions:
    1. ... EXPORTING  p1 = f1     ... pn = fn
    2. ... TABLES     p1 = itab1  ... pn = itabn
    Effect
    Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder
    The return value is not set.
    Addition 1
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module.
    Addition 2
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must have values.
    Note
    With update function modules, both import parameters and exceptions are ignored when the call is made.
    Administration transaction
    Related
    COMMIT WORK, SET UPDATE TASK LOCAL
    regards,
    kartikey.

  • Difference between Function Module Vs Method in Class Module

    1) Can you please tell the difference between the Function module used in abap program and the method of the class module used in abap programming.
    2) does it necessary to do commit statement after calling the function module.
    Thankyou for you time.
    Bhaskar.

    Hi,
    1)
    Check this difference..
    The main difference between real object orientation and function groups is that although a program can work with the instances of several function groups at the same time, it cannot work with several instances of a single function group. Suppose a program wanted to use several independent counters, or process several orders at the same time. In this case, you would have to adapt the function group to include instance administration, for example, by using numbers to differentiate between the instances.
    2) COMMIT WORK is required for BAPI..And not required when you normally call a function module..Unless required ..
    Example
    Update function modules requires COMMIT WORK to execute the function module.
    Thanks,
    Naren

  • Difference between Function Module and Routine

    Hi,
      I am zero at ABAP Skill.
      Can any one explain me what is the difference between Routine in BW  and Function Module .
    Thanks

    Hi,
    well basically it is almost the same. Both have a defined interface. You can pass variables to them and they can return variables. They can also change parameters... The main difference is, that a routine (form routine) can be used within the program where it is defined only and a function module can be used in all programs, form routines.
    regards
    Siggi

  • Difference between function module and a method?

    Hi Experts
    Can anybody pls tell me the technical and functional difference between function moduel and a method?
    Thanks
    Sudhansu

    Hi,
    Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.
    You can declare methods in the declaration part of a class or in an interface. To declare instance methods, use the following statement:
    METHODS <meth> IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..
                   EXPORTING.. [VALUE(]<ei>[)] TYPE type [OPTIONAL]..
                   CHANGING.. [VALUE(]<ci>[)] TYPE type [OPTIONAL]..
                   RETURNING VALUE(<r>)
                   EXCEPTIONS.. <ei>..
    When you declare a method, you also define its parameter interface using the additions IMPORTING, EXPORTING, CHANGING, and RETURNING. The additions define the input, output, and input/output parameters, and the return code. They also define the attributes of the interface parameters, namely whether a parameter is to be passed by reference or value (VALUE), its type (TYPE), and whether it is optional (OPTIONAL, DEFAULT).
    Unlike in function modules, the default way of passing a parameter in a method is by reference.
    As in function modules, you can use exception parameters (EXCEPTIONS) to allow the user to react to error situations when the method is executed.
    As in function modules, you can use the RAISE <exception> and MESSAGE RAISING statements to handle error situations.
    Regards,
    Sruthi

  • Difference Between Function Module And BAPI

    Hi Friends,
    What is the technical difference between BAPI and Function Module (Normal, RFC and update)?
    When do we use BAPI and FM?
    If BAPI is also RFC enabled then why do we have RFC function module?
    Kindly clarify with examples.
    Regards,
    Pradeep Singh Dhadwal

    Hi Pradeep,
    BAPI vs FM
    Difference between FM and BAPI
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module
    ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access.
    Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects.
    You create business objects and those are then registered in your BOR (Business Object Repository)
    which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA.
    FM
    Normal FM used internally inside SAP.
    Hope this helps,
    Manish

  • Difference between function module and subroutines

    hey all...
    can u pls explai me the exact difference between subroutines and function modules...
    also, when is a sub routine used and also when is a function module used..???
    regards..
    vishal

    Hi Vishal,
    Basically they do the same thing and purpose is almost same but tecnically the are way apart:
    Function modules must belong to a pool called a function group.
    They possess a fixed interface for data exchange. This makes it easier for you to pass input and output parameters to and from the function module.
          For example, you can assign default values to the input parameters. The interface also supports exception handling. This allows you to catch errors and pass them back to the calling program for handling.
    They use their own memory area. The calling program and the function module cannot exchange data using a shared memory area - they must use the function module interface. This avoids unpleasant side effects such as accidentally overwriting data.
    You call a function module by its name (which must be unique) in a CALL FUNCTION statement.
    and also
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Structure link Function Builder.
    Check this link too
    Re: Regarding difference between Subroutines and Function modules
    Hope this helps you,
    Regards
    Amit
    Message was edited by: Amit Kumar

  • Difference BAPI & Functional Module

    hi friends
    my Q is
    => what are differences between BAPI and Function Module?
    => why Smart form is client independent? (in detail)

    Hi   Sujit ayare ,
    BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.
    RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system.
    Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.
    When you are familiar with web developments: RFC can be compared to HTTP and BAPIs are CGI applications.
    In other words: A BAPI function is a function module that can be called remotely using the RFC technology.
    BAPI's are RFC enabled API's where as FM's are not.
    Regards
    Eshwar.

  • 21.01.2008 18:57:48 - 03.04.2008 13:16:47 difference use function module

    21.01.2008 18:57:48 - 03.04.2008 13:16:47 difference use function module

    Hi Kumar,
    Try the FM CCU_TIMESTAMP_DIFFERENCE.
    Here u need to pass the data in time stamp.
    i.e YYYYMMDDHHMMSS format
    Take 2 variable as same type as of FM
    CCUPEAKA-TIMESTAMP
    In ur example u have to pass 20080403185748 in TIMESTAMP1 and 20080121131647 in TIMESTAMP2
    U will get the difference in seconds in parameter DIFFERENCE as 6,327,661. U can convert this as per ur requirement by deviding with 60.
    EG: diff in min = 6,327,661/60
           diff in hr   = 6,327,661/3600
           diff in days = 6,327,661/86400
    Thanks,
    Vinod.

  • Difference between Function module and a subroutine

    hi
    In the case of subroutine i can access the global workarea values.
    I want to know whether in the case of function module
    whether
    i can follow the same procedure to access the workarea values
                                       or
    i have to pass this workarea values as an import or tables parameter to the function module and then use it
    (in first case whether that workarea to make global whether i have to place it in function pool please check this but which is better one)
    Thx in advance for any replies.

    Yes
    You would have to pass the values as import parameters to access the global variables of the program otherwise you will not be able to get the values of the global variable from inside the program.
    Another solution would be to export to SAP memory but the entire concept of modularization of using the FM would be lost.

  • 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 modules for operations on Info Types

    Hi All,
      what is the difference between function modules HR_MAINTIAN_MASTERDATA and HR_INFOTYPE_OPERATION ??

    Hi vijay,
    1. HR_INFOTYPE_OPERATION
       It is just a wrapper function module
       Inside, it finally uses 
       HR_MAINTIAN_MASTERDATA  only.
       (HR_MAINTIAN_MASTERDATA  does the real work)
    2.  HR_INFOTYPE_OPERATION
        This FM Does some small extra things viz.
       a) check for infotype existence
       b) check the particular record
         If not found, then operation = INS (Insert)
         (This kind of facility is not available in
            HR_MAINTIAN_MASTERDATA )
    3. SAP Recommends to use  HR_INFOTYPE_OPERATION .
    I hope it helps.    
    regards,
    amit m.

  • Standard Macro and Functional Module in HR -Programming.

    Hi friends,
    Could i know the difference between a standard macro and a function module in hr programming.
    how do we have to use that and what are the different std macro's and functional modules used in HR-Programming...
    Thanks in Advance..
    Regards
    Shiva

    You will find the macros in table TRMAC .
    Macros are set of pre defined instructions .
    You can define your own macros in the program using 'definition' command  or use standard macros.
    you will find most of the HR function module starting  with HR*  or RH * .
    You can get Macro  definition  /  its fundamental difference with function module on web .
    Hopw this is helpful

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

Maybe you are looking for

  • Separate users on Ipod Ipad but same account

    I currently have an IPad and an IPod but they are used by two separate people. I want them under one account to purchase, but I would like seperate user accounts and I do not want to share every purchase. How can I set that up.

  • Mail attachment in pages

    I recently upgraded to mavericks and at the same time bought Pages for all my documents. I changed all my Word documents into Pages. Now I cannot send any documents any more as an attachment to my mails (I use Yahoo). Any solutions?

  • Adobe Form (add row to  flowed table )

    Hi, experts I have a problem. I need add a row to subform flowed table , but when i  want to see preview a get an error: "Invalid inumerated value: indexChange the fault occured on line 1532. Script failed ( language is formalic; context is xfa[0].fo

  • RAR Web service violation limit setting does not seem to work

    In RAR under config - preformance tuning one can configure the limit for violations of the webservice between RAR and CUP. If I set this to 20000, 100000 or even 1.5 miillion I still get the message: Risk analysis failed: EXCEPTION_FROM_THE_SERVICEVi

  • Installation from app store

    I have an iMac 2.8GHz Intel Core i7 (17Gb free) I downloaded OSX Lion from the App Store overnight however software version shown is 10.6.8 - why isnt it showing 10.7?? I cant see a PKG to be installed The App Store shows that it has been installed E