Types in function modules

hi   i want to know how many types of function modules are there please help in this .
thankyou
pavan

Hi,
You have so much information regarding this in sdn.
But function modules basically classified into
1)Normal Function Module
2)Remote-Enabled Module
For more information check this link.
http://www.allinterview.com/showanswers/62377.html
Regards and Best wishes.

Similar Messages

  • Types of function Modules

    What are different types of function modules ??
    Please tell in detail about Normal function modules and RFC enabled functional modules ?
    I have searched other threads also but did not get the enough descriptions of the same.
    Please respond !

    Hi Shreya.
    Basically, RFC function modules deal with remote function call which means those ABAP programs can be run/executed from a remote SAP system.
    The best example for implementing the RFC Function modules are the BAPIs.
    In case of normal function module, The call is made within this SAP system.
    RFCs are more often used to establish link between two servers.
    Normal function modules provide linking localy that is with the same SAP server/environment.
    The calling of RFC function module depends on different client-server specifications.
    In case of normal one, the call is same client related call.
    Hence, In short RFC for Global
    and Normal Function module for Local.
    Good Luck.
    Harsh

  • What are all the types of Function module?

    Hi,
    What are all the types of Function module.
    Pls reply me.

    Hi,
    Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.
    There is no different function module types , but calling the function module will be different.
    check this function calls syntax
    1. Calls a function module:
    - CALL FUNCTION func.
    2. Call a function module in a different mode (asynchronous Remote Function Call):
    - CALL FUNCTION func STARTING NEW TASK taskname.
    3. Call a function module in the update task:
    - CALL FUNCTION func IN UPDATE TASK.
    4. Call a function module in a remote system (Remote Function Call, RFC ):
    - CALL FUNCTION func DESTINATION dest.
    5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):
    - CALL FUNCTION func IN BACKGROUND TASK.
    qRFC with output queue
    6. Call a function module that can be activated in the context of enhancements:
    - CALL CUSTOMER-FUNCTION func.
    plz go through the below links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    Thanks,
    Reward If Helpful.

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • How many types of function modules are there

    hi gurus,
    how many types of function modules are there...
    what type of function module bapi  is....
    i don't know much about that...
    pls help me...
    regards,
    praveen

    hi
    hope it will help you.
    <REMOVED BY MODERATOR>
    Function Modules Used in Script:
    In the Driver Program we must use all or some of the function modules that are listed below to transfer the data.
    • Open_Form
    • Close_Form
    • Start_Form
    • Write_Form
    • Write_Form_Lines
    • End_Form
    • Control_Form
    • Read_Form_elements
    • Read_Form_Lines
    Any driver program must contain Open_Form, Close_Form and Write_Form. Other function modules are optional.
    OPEN_FORM: This function module opens layout set printing. One must call this function module before he uses any of other layout set function modules like Write_Form, Start_Form, Control_Form etc., You need specify a layout set name in the export parameters of this function module. If nothing is passed to Open_Form then one should use Start_Form function module to open layout set before starting the output. The layout set opened by Open_Form should be closed by Close_Form function module, other wise output doesn’t appear. We can use any number of Open_Form, Close_Form functions in one single program. But Close_Form must be there for every Open_Form in the program.
    Some of the important export parameters we have to pass to Open_Form function module.
    Form: Enter the Layout set name here, which then controls the output formatting. If nothing is specified then we must use Start_Form for opening layout set.
    Language: Layout sets are Language dependent. Enter the desired language here. If the entered layout set is not in that language, then the function tries to open the Form entered in its original language. The default value is SY-LANGU.
    Device: SAP Script can format a text on different device types. The device can be ‘PRINTER’ or ‘TELEX’, ‘TELEFAX’, ’ABAP’ and ‘SCREEN’.
    Dialog: Use parameter DIALOG to determine whether to display a dialog box before printing, in which the user can set several spool parameters for print formatting. Possible values: SPACE displays no print parameter screen. 'X' display print parameter screen. Default value: 'X'
    Options: Use parameter OPTIONS to set several options for print formatting. The parameter has the structure ITCPO. The user can change some of the defined settings on the print control screen. The default value for Options is ‘ ‘. We will discuss about ITCPO structure in detail later.
    Other Export, Import and Exceptions are self-explanatory.
    Close_Form: The function module closes the layout set opened using OPEN_FORM. The system executes any terminating processing steps for the last opened layout set. No Export parameters for this Function Module.
    Start_Form: In-between the function modules OPEN_FORM and CLOSE_FORM, we can use different layout sets. This allows us to combine several different layout sets into one print output. However, we can combine only those layout sets that have the same page format. To switch layout sets, use the function module START_FORM. If another layout set is still open, we must close it first using END_FORM. If we specify no layout set name when calling START_FORM, the system restarts the last open layout set. If after OPEN_FORM no layout set was activated yet, the system leaves the function module with the exception UNUSED. Some of the important export parameters for this function module are
    Form: The parameter contains the name of the layout set you want to use for printing. If you specify no layout set here, the system restarts the last active layout set.
    Language: Layout sets are language-dependent. Enter the desired language here. If the layout set does not exist in this language, the system tries to call the layout set in its original language. If the parameter LANGUAGE is empty, the system uses the language of the last active layout set.
    Startpage: Usually, SAP script starts with the page specified as start page in the layout set definition. If we want to start output with another layout set page, enter the name of the desired layout set page here. If the desired page is not defined, the system uses the start page defined in the layout set.
    Program: To replace program symbols, SAP script must know which active program contains the work areas for the values to be passed. If we omit the parameter, the system searches for the field values in the program that was specified in the parameter OPTIONS (field TDPROGRAM) of OPEN_FORM. If we enter a program name, the system replaces the program symbols with the values from this program up to the next END_FORM.
    Exceptions and other Export, Import parameters are self-explanatory.
    Write_Form: The system outputs the layout set element specified in parameter ELEMENT into the currently opened layout set. In the parameter WINDOW we can specify the name of a window for the output. Remember that the layout set element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas. Some of the important export parameters used in Write_Form.
    Element: Specify the name of the text element you want to output into the layout set window specified in the parameter WINDOW. The element must be defined in that layout set window. If you specify no element, the system uses the default element, if one is defined in the layout set.
    Window: Specify the name of the window into which you want to output the layout set element specified in the parameter ELEMENT. Default value for Window is ‘MAIN’.
    Function: The parameter determines how to output the text element into the respective window. The output type depends on the window type and area:
    Window Type: MAIN Area: BODY
    SET/APPEND: Appends to previous output.
    Window Type: Main Area: Top/Bottom and
    Window Type: Other than Main and all areas
    SET : Delete the old element contents and prints the new elements
    APPEND: Appends the new content to existing elements.
    Type: The system interprets this parameter only for output to the main window. The parameter determines the area of the main window into which we want to output the element. Possible values: 'TOP' header area
    'BODY' main area
    'BOTTOM' footer area
    Default value: 'BODY'
    Write_Form_Lines: This function module outputs the text lines in table LINES into the specified layout set window. The text lines must have the SAP script ITF format. From the data in the text header, the system uses only the field TDSTYLE to apply the formatting attributes defined in the specified style for this text. If the field is empty, the system uses the identically named formatting attributes (character and paragraph formats) of the layout set.
    Use parameter WINDOW to specify into which of the windows defined in the layout set we want to output the text. We can specify any window used in the layout set. The parameter FUNCTION determines how to merge the text lines to be output with any existing contents in the window. There are differences between the different window types or areas.
    Header: This parameter contains the header of the text module we want to output in the current layout set. For the formatting process, the system uses only the entries in the header fields TDSTYLE and TDFORM. Structure: THEAD
    WINDOW: Enter the name of the window into which we want to output the layout set element specified in parameter ELEMENT. Default value: 'MAIN'
    FUNCTION: This parameter determines how to output the text element into the respective window. The output type depends on the window type and area: Window type MAIN, area BODY: 'SET' append to previous output 'APPEND' same as SET. DELETE' no effect. Window type MAIN, areas TOP and BOTTOM; all other windows: 'SET' delete old window or area contents and output the element 'APPEND' append the element to the existing elements 'DELETE' no effect Default value: 'SET'
    TYPE: The system interprets this parameter only for output to the main window. The parameter determines the area of the main window into which you want to output the element. Possible values: 'TOP' header area 'BODY' main area 'BOTTOM' footer area Default value: 'BODY'
    END_FORM: END_FORM ends the currently open layout set and executes the required termination processing. After calling this function module, no more layout set is active. For further output, we must start a new layout set using START_FORM. No Export parameters.
    CONTROL_FORM: Use this function module to pass SAP Script Control Commands to the layout set. The Control command is passed through the export parameter ‘COMMAND’ in quotes.
    READ_FORM_ELEMENTS: This function module fills a table with all text elements that appear in one layout set. If we specify no layout set name, the system includes all elements of the currently open layout set. If we specify a layout set, the system uses the information about the active version of the layout set, retrieved from the database. Here we have two export parameters, Form and Language and a table parameter Elements.
    READ_FORM_LINES: Use this function module to transfer the lines of a layout set element into an internal table. If we specify no layout set name, the system transfers the text lines of the currently open layout set. If we specify a layout set, the system uses the text lines of the active version of the layout set from the database. The Export parameters are Form, Language, Window and Element. If we pass these 4 parameters the function module returns a table with the lines from layout set.
    Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.
    There is no different function module types , but calling the function module will be different.
    check this function calls syntax
    1. Calls a function module:
    CALL FUNCTION func.
    2. Call a function module in a different mode (asynchronous Remote Function Call):
    CALL FUNCTION func STARTING NEW TASK taskname.
    3. Call a function module in the update task:
    CALL FUNCTION func IN UPDATE TASK.
    4. Call a function module in a remote system (Remote Function Call, RFC ):
    CALL FUNCTION func DESTINATION dest.
    5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):
    CALL FUNCTION func IN BACKGROUND TASK.
    qRFC with output queue
    6. Call a function module that can be activated in the context of enhancements:
    CALL CUSTOMER-FUNCTION func.
    Cheers,
    Chandru
    Edited by: Alvaro Tejada Galindo on Feb 27, 2008 11:53 AM

  • RE:Idoc type and function module

    HI All
    What are the generic IDoc types and function modules used for the following objects ??We are on SAP R/3 4.7.
    Invoice Release (inbound)
    Payments (outbound)
    Purchase Orders (outbound)
    Goods Receipts (outbound)
    Cost Centers (outbound)
    GL Codes (outbound)
    Internal Orders (outbound)
    WBS (outbound)
    Materials (outbound)
    Invoices (inbound)
    Invoices Blocked (outbbound)
    And How do i judge which IDOC types and function module fit my requirement( I mean what are the things i have to keep in mind while choosing idoc types and function modules)?
    Any help will be very much appreciated
    Thank you
    Steve

    Hi Steve...
    You can find the IDOC types in Tcode WE30 , WE60.
    Invoice Release (inbound)
      INVOIC03
    Payments (outbound)
    Purchase Orders (outbound)
      ORDERS03
    Goods Receipts (outbound)
      ACC_GOODS_MOVEMENT02
    Cost Centers (outbound)
    GL Codes (outbound)
    Internal Orders (outbound)
    WBS (outbound)
    Materials (outbound)
      MATMAS04
    Invoices (inbound)
      ACC_INVOICE_RECEIPT03
    Invoices Blocked (outbbound)
    <b>REWARD IF HELPFUL.</b>

  • Handling pop up of sub type HR_MAINTAIN_MASTERDATA function module

    Hi All,
    I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
    For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address etc.
    Anybody know how to handle such pop up in function module. How to provide values to sub type.
    Thanks in advance.

    Hi,
    <li>Instead of using HR_MAINTAIN_MASTERDATA function module, you can use HR_INFOTYPE_OPERATION, because HR_MAINTAIN_MASTERDATA is used inside HR_INFOTYPE_OPERATION.
    <li>Check the sample program .
    REPORT  ztest_notepad .
    DATA:p0006  TYPE STANDARD TABLE OF p0006 WITH HEADER LINE.
    DATA:return LIKE  bapireturn1.
    p0006-pernr = '00001234'.
    p0006-subty = '2'.
    p0006-endda = '99991231'.
    p0006-begda = sy-datum.
    p0006-anssa = '2'.
    p0006-name2 = 'xyz'.
    p0006-stras = 'Street 64'.
    p0006-ort01 = 'US'.
    p0006-pstlz = '560634'.
    APPEND p0006.
    CLEAR  p0006.
    LOOP AT p0006.
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p0006-pernr.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0006'
          number        = p0006-pernr
          subtype       = p0006-subty
          validityend   = p0006-endda
          validitybegin = p0006-begda
          record        = p0006
          operation     = 'INS'
          tclas         = 'A'
        IMPORTING
          return        = return.
      IF  return IS INITIAL.
        WRITE 'Successfully records created'.
      ENDIF.
      CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p0006-pernr.
    ENDLOOP.
    Thanks
    Venkat.O

  • Different types of function module

    hi,
    When we create a function module : in one of the tabs we can find
      1 general function module
      2. remote function module
    3. update function module.
    What is meant by update function module and remote function module. can anyone explain me with an example and when shd we opt for 2 and 3.
    thanxs
    hari

    Function Modules:
    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.
    Unlike subroutines, you do not define function modules in the source code of your program.
    Instead, you use the Function Builder. The actual ABAP interface definition remains hidden
    from the programmer. You can define the input parameters of a function module as optional.
    You can also assign default values to them. Function modules also support exception handling.
    This allows you to catch certain errors while the function module is running. You can test
    function modules without having to include them in a program using the Function Builder.
    Function Groups:
    Function groups are containers for function modules. You cannot execute a function group.
    When you call a function module, the system loads the whole of its function group into the
    internal session of the calling program.
    Calling Function Modules in ABAP:
    To call a function module, use the CALL FUNCTION statement:
    CALL FUNCTION <module>
    [EXPORTING f1 = a 1.... f n = a n]
    [IMPORTING f1 = a 1.... f n = a n]
    [CHANGING f1 = a 1.... f n = a n]
    [TABLES f1 = a 1.... f n = a n]
    [EXCEPTIONS e1 = r 1.... e n = r n [ERROR_MESSAGE = r E]
    [OTHERS = ro]].
    You can specify the name of the function module <module> either as a literal or a variable.
    Each interface parameter <fi> is explicitly assigned to an actual parameter <a i>. You can
    assign a return value <r i> to each exception <e i>. The assignment always takes the form
    <interface parameter> = <actual parameter>. The equals sign is not an assignment operator
    in this context.
    • After EXPORTING, you must supply all non-optional import parameters with values
    appropriate to their type. You can supply values to optional import parameters if you
    wish.
    [email protected]
    34
    • After IMPORTING, you can receive the export parameters from the function module by
    assigning them to variables of the appropriate type.
    • After CHANGING or TABLES, you must supply values to all of the non-optional
    changing or tables parameters. When the function module has finished running, the
    changed values are passed back to the actual parameters. You can supply values to
    optional changing or tables parameters if you wish.
    You can use the EXCEPTIONS option to handle the exceptions of the function module. If an
    exception <e i > is raised while the function module is running, the system terminates the
    function module and does not pass any values from the function module to the program,
    except those that were passed by reference. If <e i > is specified in the EXCEPTION option,
    the calling program handles the exception by assigning <r i > to SY-SUBRC. <r i > must be a
    numeric literal.
    If you specify of ERROR_MESSAGE in the exception list you can influence the message
    handling of function modules. Normally, you should only call messages in function modules
    using the MESSAGE ... RAISING statement. With ERROR_MESSAGE you can force the system
    to treat messages that are called without the RAISING option in a function module as follows
    for various FM's
    http://www.erpgenie.com/abap/functions.htm
    Calling Function Modules
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
    remote enabled fm's are BAPI's
    refer
    Introduction to BAPIs:
    Definition
    The SAP Business Objects held in the Business Object Repository (BOR) encapsulate their data
    and processes. External access to the data and processes is only possible by means of specific
    methods - BAPIs (Business Application Program Interfaces).
    A BAPI is defined as a method of a SAP Business Object.
    For example, the functionality that is implemented with the SAP Business Object type
    "Material" includes a check for the material’s availability. Thus, the Business Object type
    "Material" offers a BAPI called "Material.CheckAvailability".
    Use
    To use a BAPI method, an application program only needs to know how to call the method;
    that is, it needs to know the method’s interface definition. Therefore, when including a BAPI
    invocation in your application program, you only need to supply the appropriate interface
    information.
    A BAPI interface is defined by:
    • Import parameters, which contain data to be transferred from the calling program to
    the BAPI
    • Export parameters, which contain data to be transferred from the BAPI back to the
    calling program
    • Import/export (table) parameters for both importing and exporting data
    Structure
    The BAPIs in the R/3 System are currently implemented as function modules, all of which are
    held in the Function Builder. Each function module underlying a BAPI:
    • Supports the Remote Function Call (RFC) protocol
    • Has been assigned as a method to an SAP Business Object in the BOR
    • Is processed without returning any screen dialogs to the calling application
    Integration
    The architecture enables SAP to change the details of a BAPI’s implementation without
    affecting external applications, which are using the BAPI.
    Advantages of Using BAPIs
    BAPIs are standardized methods of SAP Business Objects that enable customers and third
    parties to integrate their software components with the R/3 System and the Business
    Framework.
    Business Standard
    SAP Business Objects and their BAPIs provide a business content standard, rather than a
    technical interoperability standard; that is, they enable the integration of R/3 and other
    software components on a business level, not on a technical level.
    [email protected]
    97
    Standards Conformance
    BAPIs are being developed as part of the SAP joint initiative with customers, partners, and
    leading standards organizations. BAPIs are becoming a communication standard between
    business systems.
    You can access SAP Business Objects and their BAPIs by using object-oriented interfacing
    technologies such as Microsoft’s COM/DCOM (Component Object Model/Distributed Component
    Object Model).
    The SAP Business Objects already comply with the Open Applications Group (OAG)
    specifications, and, in conjunction with ObjectBridge from VisualEdge, conform to the Object
    Management Group’s CORBA (Common Object Request Broker Architecture) guidelines.
    Stability and Downward Compatibility
    Once a BAPI is implemented and released by SAP, its interface definition and parameters
    remain stable in the long term, thus ensuring that your application program remains
    unaffected by any changes to the underlying R/3 software and data.
    SAP can make any necessary extensions to the BAPIs, for example, additional optional
    parameters, without destabilizing the operation of existing applications and, at the same time,
    can offer the enhanced functionality to new applications.
    Object Orientation
    As methods of the SAP Business Objects, BAPIs provide access to R/3 data and processes
    following an object-oriented programming model. BAPIs can be called using object-oriented
    interfacing technologies, such as COM/DCOM, thus enabling software components from SAP
    and third parties to interact freely.
    Openness
    You can access BAPIs from all development platforms that support the SAP Remote Function
    Call (RFC) protocol.
    BAPI Definition
    A Business Application Programming Interface (BAPI) is a precisely defined interface providing
    access to processes and data in business application systems such as R/3. BAPIs are defined
    as API methods of SAP Business Objects. These business objects and their BAPIs are described
    and stored in the Business Object Repository (BOR).
    A BAPI is implemented, however, as a function module, that is stored and described in the
    Function Builder.
    BAPIs can be called within the R/3 System from external application systems and other
    programs. BAPIs are the communication standard for business applications. BAPI interface
    technology forms the basis for the following developments:
    • R/3 satellite systems
    • Isolating components within the R/3 System in the context of Business Framework
    • Distributed R/3 scenarios using Application Link Enabling (ALE)
    • Connecting R/3 Systems to the Internet using Internet Application Components (IACs)
    • Visual Basic programs as front-end to R/3 Systems
    • Workflow applications that extend beyond system boundaries
    • Customers’ and partners’ own developments
    • Connections to non-SAP software
    • Connections to legacy systems
    [email protected]
    98
    Standardized BAPIs
    Some BAPIs and methods provide basic functions and can be used for most SAP Business
    Objects. Such BAPIs are known as "standardized" BAPIs.
    Using the descriptions below as a guide, verify whether you can implement the BAPI as a
    standardized BAPI.
    Features
    BAPIs for Reading Data
    The following BAPIs provide you with read-only access to data in the associated business
    object:
    • GetList
    With this BAPI you can select a range of object key values, for example, company
    codes and material numbers. To specify appropriate selection requirements the calling
    program must pass the relevant parameters to the interface. The key values selected
    by the BAPI GetList are returned to the calling program in a table, together with other
    useful information, for example, short texts. The key values can then be passed on to
    another BAPI for further processing, for example, the BAPI GetDetail, as listed below.
    • GetDetail
    The BAPI GetDetail uses a key to retrieve details about an instance(s specific
    occurrence) of a business object and returns this data to the calling program.
    • GetStatus
    The BAPI GetStatus is used to query the status of an SAP Business Object, for
    example, to display the processing status of a sales order. This BAPI is used only for
    displaying the status of an object and does not retrieve full details like the BAPI
    GetDetail.
    • ExistenceCheck
    The BAPI ExistenceCheck checks, whether an entry exists for an SAP Business Object,
    for example, whether the customer master has been created. You should implement
    this method as a workflow method and not as a BAPI (RFC capable function module).
    The method CompanyCode.ExistenceCheck of the business object CompanyCode
    (BUS0002) is an example of this. This workflow method is indirectly invoked when the
    calling program instantiates an object, for example, by using
    GetSAPObject("CompanyCode") from within Visual Basic.
    BAPIs for Creating or Changing Data
    The following BAPIs can create, change or delete instances of a business object: If required,
    you can implement these BAPIs so that, several instances of a business object can be created,
    deleted or modified simultaneously in the same call. In such cases "multiple" is added to the
    method name, for example ChangeMultiple.
    BAPIs that can create, change or delete instances are:
    • Create or CreateFromData
    The BAPI Create or CreateFromData creates an instance of an SAP Business Object,
    for example, a sales order. Create is the preferred name for this BAPI. Use the name
    CreateFromData only when a workflow method called Create already exists for the
    business object in question.
    [email protected]
    99
    • Change
    The BAPI Change changes an existing instance of a SAP Business Object, for example,
    a sales order.
    • Delete
    The BAPI Delete deletes an instance of a SAP Business Object, for example, sales
    order.
    BAPIs for Replicating Business Object Instances
    The BAPIs below can be implemented as methods of business objects that can be replicated.
    They enable specific instances of an object type to be copied to one or more different systems.
    These BAPIs are used mainly to transfer data between distributed systems within the context
    of Application Link Enabling (ALE).
    The method below must be implemented for each business object to be replicated.
    • Replicate
    The BAPI Replicate is called in the system, which contains the originals of the business
    object instances to be replicated. It is used to:
    • Identify the business objects to be replicated and to organize the required data.
    • Call the clone methods described below in the receiving system
    Moreover, at least one of the clone methods below must be implemented for each business
    object to be replicated.
    • Clone
    The BAPI Clone is used by a system to replicate one business object on another
    system or to modify one business object that has already been cloned.
    • CloneMultiple
    The BAPI CloneMultiple is used by a system to replicate several business objects on
    another system or to modify several business objects that have already been cloned.
    Defining and Implementing the BAPI
    Purpose
    Various components of the ABAP Workbench are used when you define and implement a BAPI.
    A BAPI is an API method of a business object and is defined as such in the Business Object
    Repository (BOR). However, a BAPI is implemented as an RFC capable function module, which
    is maintained in the Function Builder. The definitions and descriptions of the data structures
    used by the BAPI are stored in the ABAP Dictionary.
    For function modules that implement BAPIs, certain standards and rules must be adhered to
    over and above the standard programming rules for function modules. For example, COMMIT
    WORK commands must not be used in the function modules that a BAPI is based on.
    The following sections guide you through the steps involved in developing a BAPI. The sections
    contain information about the guidelines and conventions that you should adhere to when
    defining and implementing a BAPI. When implementing BAPIs follow the requirements below
    to ensure you achieve consistent behavior and representation of BAPIs as object oriented
    methods of SAP Business Objects.
    [email protected]
    100
    BAPI Programming
    BAPI Definition
    A Business Application Programming Interface (BAPI) is a precisely defined interface providing
    access to processes and data in business application systems such as R/3.
    BAPIs are defined as API methods of SAP Objects. These objects and their BAPIs are described
    and stored in the BOR (BOR).
    Use
    BAPIs can be called within the R/3 System from external application systems and other
    programs. A BAPI call can either be made as an object oriented method call or as a remote
    function call (RFC).
    BAPIs are a global communication standard for business applications.
    Examples of what BAPIs can be used for include:
    • R/3 satellite systems
    • Distributed R/3 scenarios using Application Link Enabling (ALE)
    • Connecting R/3 Systems to the Internet using Internet application components (IACs)
    • Visual Basic programs as front-end to R/3 Systems
    • Workflow applications that extend beyond system boundaries
    • Customers’ and partners’ own developments
    • Connections to non-SAP software
    • Connections to legacy systems
    BOR Definition
    The Business Object Repository (BOR) is the object-oriented repository in the R/3 System. It
    contains, among other objects, SAP Business Objects and their methods. In the BOR a
    Business Application Programming Interface (BAPI) is defined as an API method of an SAP
    Business Object. Thus defined, the BAPIs become standard with full stability guarantees as
    regards their content and interface.
    Use
    With regard to SAP Business Objects and their BAPIs, the BOR has the following functions:
    • Provides an object-oriented view of R/3 System data and processes.
    R/3 application functions are accessed using methods (BAPIs) of SAP Business
    Objects. Implementation information is encapsulated; only the interface functionality
    of the method is visible to the user.
    • Arranges the various interfaces in accordance with the component hierarchy, enabling
    functions to be searched and retrieved quickly and simply.
    • Manages BAPIs in release updates.
    BAPI interface enhancements made by adding parameters are recorded in the BOR.
    Previous interface versions can thus be reconstructed at any time. When a BAPI is
    created the release version of the new BAPI is recorded in the BOR. The same applies
    when any interface parameter is created.
    The version control of the function module that a BAPI is based on is managed in the
    Function Builder.
    • Ensures interface stability.
    Any interface changes that are carried out in the BOR, are automatically checked for
    syntax compatibility against the associated development objects in the ABAP
    Dictionary.
    [email protected]
    101
    Integration
    You should only define a BAPI as a SAP Business Object method in the BOR if the function
    module that the BAPI is based on has been fully implemented. Full access to the BOR is
    restricted to the persons responsible for the objects involved and for quality control.
    BOR-BAPI Wizard
    The BOR-BAPI Wizard assists with creating new BAPI methods in the BOR. It takes you
    through the creation process step by step.
    Transaction Model for Developing BAPIs Purpose
    The transaction model in which BAPIs are used determines how you have to program BAPIs.
    The transaction model described here has been used to develop BAPIs for R/3 Releases 3.1
    and 4.0A.
    Logical Unit of Work (LUW) and Statelessness
    Within the context of this transaction model a transaction represents one processing step or
    one logical unit of work (LUW). When a transaction is called, database operations are either
    fully executed or not at all. The whole transaction must be programmed to be stateless.
    This transaction model requires that:
    • No data is imported that may indirectly affect the result. If a transaction is called more
    than once, each call must have the same result. For BAPIs this means, for example,
    that Set or Get parameters cannot be used. However, you can keep Customizing data
    in a global memory, as this data remains unchanged even if transaction calls are
    repeated.
    • There must be no functional dependencies between two transactions.
    • Either all relevant data has to be changed in the database or none at all.
    Determining the SAP Business Object and Its Key Fields
    You have to identify the relevant SAP Business Object in the Business Object Repository (BOR)
    and determine whether the key fields of the Business Object are relevant for your BAPI.
    A key is defined in the BOR for most SAP Business Objects. This key can consist of several key
    fields. The content of these key fields uniquely identifies one individual instance of an SAP
    Business Object.
    You can differentiate between instance-dependent and instance-independent BAPI methods.
    Unlike instance-independent methods, instance-dependent methods relate to one instance
    (one specific occurrence) of an SAP Business Object type, for example to one specific sales
    order.
    In the case of instance-dependent BAPIs, the key fields of the corresponding SAP Business
    Object must be used as parameters in the function module the BAPI is based on so that the
    associated object instance can be identified. The names of the key fields in the SAP Business
    Object and the corresponding parameters in the BAPI function module must be the same,
    because the name links the key fields to the parameters.
    All the key fields defined in the BOR for the SAP Business Object in question must be used as
    the parameters in the function module.
    Example
    SAP Business Object Creditor has a key field named CreditorId.
    This key field must be defined as a parameter with the name CREDITORID in the function
    modules of the instant-dependent BAPIs for this Business Object.
    [email protected]
    102
    To display the Business Object and its key fields follow the steps below:
    1. Select Tools -> ABAP Workbench -> Overview -> Business Object Browser . The
    business objects are displayed in the order of the R/3 application hierarchy.
    2. Select the required SAP Business Object in the application hierarchy and double click it
    to open it.
    3. To display the Business Object’s key fields, expand the node Key fields.
    Defining the Interface Structure of the BAPI
    In this step you are going to define the BAPI interface, that is, the individual import, export
    and table parameters required for calling the BAPI.
    Caution
    You cannot use Changing and Exception parameters in a function module which implements a
    BAPI.
    Process Flow
    To define the interface parameters, proceed as follows:
    1. Check whether the key fields of the SAP Business Object are required in the interface. The
    key fields of the SAP Business Object are some of the most important BAPI parameters.
    If a key value is to be passed to the BAPI by the calling program, the key field must be set as
    an import parameter in the function module of the BAPI. That way a specific instance of the
    Business Object is identified.
    For example, this could be a customer number (CustomerNo) in the BAPIs Customer.GetDetail
    and Customer.CheckPassword, or the number of a sales document in the BAPI
    SalesOrder.GetStatus.
    For BAPIs that generate instances, for example, the BAPIs Create or CreateFromData, the key
    field of the Business Object should be set as an export parameter in the BAPI function module.
    These BAPIs return one key value, for example, an order number in the BAPI
    SalesOrder.CreateFromData.
    For BAPIs that are class methods a key field is neither set as an import nor as an export
    parameter in the BAPI function module. Class methods are instance-independent and are
    called without the use of key values. Usually they return a table with a selection of key values.
    2. Specify what other data is relevant as import, export or table parameters for the BAPI.
    Every BAPI must have an Export parameter return that reports messages back to the calling
    program.
    Example
    The BAPI to be developed is to read data from the SAP Business Object Creditor. To read
    creditor details, the calling program has to pass the ID of the creditor and the company code.
    The creditor data returned is to include general details, specific details and bank details.
    To map these requirements onto the BAPI interface, the following parameters must be set in
    the function module which the BAPI is based on:
    • The key field CreditorID of the SAP Business Object as an import parameter
    • An import parameter for the company code
    • A Return parameter that reports messages back to the calling program
    • A parameter for general details of the creditor
    • A parameter for specific details of the creditor
    • A parameter for bank details of the creditor
    for BAPI list
    refer www.sapbapi.com
    for FM's refer www.se37.com
    regards
    srinivas
    <b>*reward for useful answers*</b>

  • IDOC types by Function Module

    Hello,
    I would like to find the IDOC types available by function module.  For example, all idoc types for Production Planning module.  Is there an easy way to get that info?
    Thanks

    Hi,
    Go to Repository Browser (SE80) -> select Appliction Hierarchy and filter it down by Function Modules. you can now go to individual functional area (SD, MM , PP, etc) and drill down EDI objects hierarchy. You can very well judge the IDOC types based on IDOC Processing function modules.
    Hope this will help...
    regards,
    PB

  • Table Types in Function Module

    Hi,
    How to use a table to capture the data from a file, in function module instead of using TABLES parameter.
    This parameter should exist in IMPORT parameters of Function Module
    Many Thanks in Advance

    hi
    you can check out this thread
    Re: Entering data into a dynamically created table.
    hope it helps
    regards
    Aakash Banga

  • Unknown table type in function module

    Hello,
    i try to create a function module, which has one internal table as a result table. The structure is unknown during design time, because the table has the structure like a range table, therefor the fieldtype of the 'low and high' values, depends on the declaration of the calling programm, and is not knowing in the function module during design time.
    The function module load the results of a DDIC-Customizingtable and shell fill the sign, option, low and high field of the result table.
    Is there anybody with an idea how to solve this.
    Thanks in advance
    Michael

    For example.....  here is a program which calls the function module.  Notice that ITAB in the TABLES section is not defined.
    Program Code.
    report zrich_0002.
    ranges: r_datum for sy-datum.
    call function 'Z_TEST'
         tables
              itab = r_datum.
    check sy-subrc  = 0.
    Function Module Code.
    function z_test.
    *"*"Local interface:
    *"  TABLES
    *"      ITAB
    * Fill with data
      itab = 'IBT2006010399991231'.
      append itab.
    endfunction.
    Regards,
    Rich HEilman

  • IDoc : Linking Basic type and function module

    Hi,
    I am in the process of customizing for inbound processing.
    I have one doubt reqarding below customizing :
    t-code WE57:
    FM                               Message type          Basic type
    ZBAPI_IDOC                ACC_DOCUMENT   ACC_DOCUMENT01
    ZBAPI_IDOC                ACC_DOCUMENT   ACC_DOCUMENT02
    t-code WE42:
    Process code     FM                                   Message type         
    ZBAPI                ZBAPI_IDOC                    ACC_DOCUMENT  
    So in this scenario, which Basic type would be considered? or if I want the Idoc with basic type ACC_DOCUMENT02, then how should be the customizing?
    Thanks ,
    Yogita

    Hi Yogita,
    The basic type depends on the version of system in consideration.
    lets say for eg. HRMD_ABA has basic type from HRMD_ABA01 to 05 and they are depend on the version of the system as which to use.
    Regards,
    Atish

  • RE: Idoc types , Function modules

    HI All
    What are the generic <b>Idoc types</b> and <b>function modules</b> used for the following objects for SAP R/3 4.7
    Invoice Release (inbound)
    Payments (outbound)
    Purchase Orders (outbound)
    Goods Receipts (outbound)
    Cost Centers (outbound)
    GL Codes (outbound)
    Internal Orders (outbound)
    WBS (outbound)
    Materials (outbound)
    Invoices (inbound)
    Invoices Blocked (outbbound)
    Any help will be very much appreciated
    And How do i judge which IDOC types and function module fit my requirement( I mean what are the things i have to keep in mind while choosing idoc types and function modules)
    Thnk you
    Steve

    I have an idea.
    Build an idoc from scratch with all the fileds or use the idoc invoic01 and extend it. Comming to function module write a function module that will extract the data from the idoc and will pass the data to bapi BAPI_INCOMINGINVOICE_CREATE( MIRO SCREEN). Please comment on this!!!

  • Datasources with function module which uses table type

    hi..
    I am creating a datasource which extracts data using a function module from xRPM to BW. When creating the function module it gives an error " TABLES parameters are obsolete!" while trying to specify the extract structure. I searched in SDN and learnt that we need to use table types and use that in the changing tab.Not sure how that works and where we need to use the extract structure for this.
    Could someone please explain this to me and let me know how i can create my datasource using this type of function module.

    Hi,
    in your case you need the tables parameter, as the service api expects the result of the fm in a table called e_t_data. Of course table parameters are obsolet but you can just ignore the warning and it will work.
    regards
    Siggi
    PS: Extraction fm must follow a strict interface definition.
    Message was edited by:
            Siegfried Szameitat

  • What is the best way, while creating Function Module based extractor

    Hi Friends,
    I am Sreekanth.
    I have created a Functio Module based Extractor,
    To fetch data from COPA tables.
    In this extracton 3 tables are getting involved.
    1) CE3OP01 2) CE4OP01 and 3) CE1OP01.
    Logic required is as follow:
    1) get data from CE3OP01 and for all entries of this data set,
    get data from CE4OP01 and CE1OP01 and finally send the data set to BW after few manupulations.
    I have implemented the whole logic and its working fine in DEVELOPMENT box where data volume is less.
    But the same code is timing out in Quality Box, due to huge volues of data.
    Below I am copying the code that i am using . Any body can suggest me how to proceed further so that my code works with huge volumes of data.
    Now I am getting the time out error while selection data from CE3IOP01 table itself.
    FUNCTION /ds1/c_bw_zds_copa_recon.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  /DS1/FI_COPA_RECN OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
                            PROGRAM INFORMATION                          *
    RIEF ID.......: N/A                                                  *
    PROGRAM.......: /DS1/C_BW_ZDS_COPA_RECON               
    PROGRAM FUNCTION: This Function Module Extracts Cost Center, Company *
    Code, and all Amount fields form CE3OP01 table and  sectaktbo       "
    *     Current profitability segment (CO-PA)                          *
         paobjnr     "     Profitability Segment Number (CO-PA)       *
         pasubnr     "     Profitability segment changes (CO-PA)      *
         bukrs            "     Company Code
         kndnr       "     Customer from CE4Op01 table.               *
    Segrigate one record from CE3Op01 into 93 based on Value fields.    *
    PROGRAM TYPE..Function Module                                        *
    DEV. CLASS..../DS1/MI_01                                             *
    LOGICAL DB.... N/A                                                   *
                   Conventions used in the Program                       *
    *     global variables      --> g_*                                    *
    *     local variables       --> l_*                                    *
    *     constants             --> c_*                                    *
    *     internal tables       --> t_*                                    *
    *     structures            --> x_*                                    *
    *     parameters            --> p_*                                    *
    *     select-options        --> s_*                                    *
    *     ranges                --> r_*                                    *
    *     workarea          --> w_*                                    *
    *     field symbol            --> fs_*                                   *
    Declaration for Interface: Selection criteria
      STATICS: s_s_if TYPE srsc_s_if_simple,
    Maximum number of lines for DB table
      ls_s_if TYPE srsc_s_if_simple, "Static Structure
    counter
              ls_counter_datapakid LIKE sy-tabix,"Static Counter
    cursor
              ls_cursor TYPE cursor,"Static Cursor.
              ls_cursor1 TYPE cursor."Static Cursor.
    *CONSTANTS
      CONSTANTS:  lc_datasource TYPE char14 VALUE 'ZDS_COPA_RECON',
                                                 " Data Source Name
                  lc_msgtype TYPE char1 VALUE 'E',  "message type
                  lc_msgcls  TYPE char2 VALUE 'R3', "message class
                  lc_msgnum  TYPE char3 VALUE '009',"Message Number.
                  lc_001 TYPE char3 VALUE '001',
                  lc_b0 TYPE char2 VALUE 'B0',
                  lc_10 TYPE char2 VALUE '10',
                  lc_01 TYPE char2 VALUE '01',
                  lc_02 TYPE char2 VALUE '02',
                  lc_1 TYPE sy-tabix VALUE 1.
    *Data Declaration.
      DATA: lt_ce3op01  TYPE STANDARD TABLE OF x_ce3op01,
            " Internal table for ce3op01
            lt_ce3op02  TYPE STANDARD TABLE OF x_ce3op01,
            lt_ce4op01  TYPE STANDARD TABLE OF x_ce4op01,
            " Internal table for ce4op01
            lw_ce3op01  TYPE x_ce3op01,
            " Work area for ce3op01
            lw_ce3op02  TYPE x_ce3op01,                         "MOD-002
            lw_ce4op01  TYPE x_ce4op01,
            " Work area for ce4op01
            lw_e_t_data TYPE /ds1/fi_copa_recn,
      " Work area for /ds1/fi_copa_recn.
    *CE1op01
      lt_ce1op01 TYPE STANDARD TABLE OF x_ce1op01,"Internaltable
      lw_ce1op01 TYPE x_ce1op01,"Work area for CE1op01.
    **CE1op01
      lt_fldlist TYPE STANDARD TABLE OF lx_fldlist, "fields list
      lw_fldlist TYPE lx_fldlist,"  FIELDS list work area
      lt_flnmval TYPE STANDARD TABLE OF lx_flnmval,"table for splitting
      lw_flnmval TYPE lx_flnmval,"work area for spilitting
      l_index TYPE i VALUE 1, "to keep track of index.
      l_len   TYPE i,
      l_s_no_recs   TYPE sy-tabix VALUE 99,
      l_s_loop_from        TYPE sy-tabix,     "from "MOD-002
      l_s_loop_to          TYPE sy-tabix,                       "to"MOD-002
      l_norecs             TYPE sy-tabix,                       "MOD-002
      l_count              TYPE sy-tabix.                       "MOD-002
    *Field Symbols.
      FIELD-SYMBOLS:
         <fs_flnmval> TYPE lx_flnmval."Field symbol for fild values
    Selection Ranges
      RANGES:  lr_bukrs      FOR ce4op01-bukrs, " Range for company code
      lr_versi      FOR ce3op01-versi," Range for version
      lr_paledger   FOR ce3op01-paledger,"Range for paledger
      lr_vrgar      FOR ce3op01-vrgar,"Range for vrgar
      lr_gjahr      FOR ce3op01-gjahr,"Range for Fiscal year
      lr_perbl      FOR ce3op01-perbl."Range for perbl
    Initialization mode (first call by SAPI) or data transfer mode
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        IF ls_counter_datapakid = 0.
          CASE i_dsource.
            WHEN lc_datasource.
            WHEN OTHERS.
              IF 1 = 2. MESSAGE e009(r3). ENDIF.                "#EC *
    this is a typical log call. Please write every error message like this
              log_write lc_msgtype "'E'                  "message type
                        lc_msgcls  "'R3'                 "message class
                        lc_msgnum  "'009'                "message number
                        i_dsource   "message variable 1
                        ' '.                 "message variable 2
              RAISE error_passed_to_mess_handler.
          ENDCASE.
          APPEND LINES OF i_t_select TO s_s_if-t_select.
          APPEND LINES OF i_t_fields TO s_s_if-t_fields.
    Fill parameter buffer for data extraction calls
          ls_s_if-requnr    = i_requnr.
          ls_s_if-dsource   = i_dsource.
          ls_s_if-maxsize   = i_maxsize.
          ls_s_if-initflag  = i_initflag.
      Company Code
          LOOP AT s_s_if-t_select  INTO  i_t_select WHERE fieldnm = c_bukrs.
            MOVE: i_t_select-sign   TO lr_bukrs-sign,
                  i_t_select-option TO lr_bukrs-option,
                  i_t_select-low    TO lr_bukrs-low,
                  i_t_select-high   TO lr_bukrs-high.
            APPEND lr_bukrs.
          ENDLOOP.
    *Version (0)
    *SRSC_S_IF_SIMPLE-T_SELECT
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_versi.
       LOOP AT i_t_select  INTO  s_s_if-t_select WHERE fieldnm = c_versi.
            MOVE: i_t_select-sign   TO lr_versi-sign,
                  i_t_select-option TO lr_versi-option,
                  i_t_select-low    TO lr_versi-low,
                  i_t_select-high   TO lr_versi-high.
            APPEND lr_versi.
          ENDLOOP.
    *Currency Type (company code only)
         LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_paledger.
            MOVE: i_t_select-sign   TO lr_paledger-sign,
                  i_t_select-option TO lr_paledger-option.
            IF i_t_select-low = lc_b0.
              MOVE lc_01 TO lr_paledger-low.
            ELSEIF  i_t_select-low = lc_10.
              MOVE lc_02 TO lr_paledger-low.
            ENDIF.
            APPEND lr_paledger.
          ENDLOOP.
    *Record Type
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_vrgar.
            MOVE: i_t_select-sign   TO lr_vrgar-sign,
                  i_t_select-option TO lr_vrgar-option,
                  i_t_select-low    TO lr_vrgar-low,
                  i_t_select-high   TO lr_vrgar-high.
            APPEND lr_vrgar.
          ENDLOOP.
    *Fiscal Year
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_gjahr.
            MOVE: i_t_select-sign   TO lr_gjahr-sign,
                  i_t_select-option TO lr_gjahr-option,
                  i_t_select-low    TO lr_gjahr-low,
                  i_t_select-high   TO lr_gjahr-high.
            APPEND lr_gjahr.
          ENDLOOP.
    *Period Block/Year
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_perbl.
            MOVE: i_t_select-sign   TO lr_perbl-sign,
                  i_t_select-option TO lr_perbl-option,
                  i_t_select-low    TO lr_perbl-low,
                  i_t_select-high   TO lr_perbl-high.
            APPEND lr_perbl.
          ENDLOOP.
    *Value Field Name.
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_fldnm.
            MOVE:
            i_t_select-sign   TO gr_zfldnm-sign,
            i_t_select-option TO gr_zfldnm-option,
            i_t_select-low   TO gr_zfldnm-low,
            i_t_select-high   TO gr_zfldnm-high.
            APPEND gr_zfldnm.
          ENDLOOP.
    First data package -> OPEN CURSOR
          IF ls_counter_datapakid = 0.
    *Create 93 Field names in an internal table.
         MOVE 'VV010' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV011' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV012' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV013' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV014' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV015' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV016' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV020' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV021' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV030' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV031' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV032' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV033' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV034' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV035' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV200' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV201' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV202' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV203' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV036' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV037' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV038' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV039' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV040' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV041' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV042' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV043' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV204' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV205' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV211' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV212' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV213' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV222' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV223' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV230' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV232' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV233' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV500' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV501' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV502' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV503' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV504' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV505' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV506' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV507' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV508' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV509' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV510' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV511' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV512' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV513' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV514' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV515' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV516' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV517' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV518' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV519' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV520' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV236' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV206' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV051' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV052' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV053' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV054' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV055' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV056' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV057' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV058' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV059' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV060' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV241' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV242' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV243' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV244' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV245' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV246' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV247' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV248' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV249' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV250' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV521' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV522' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV523' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV524' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV525' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV526' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV527' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV528' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV529' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV530' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV227' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV226' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV224' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
            OPEN CURSOR WITH HOLD ls_cursor FOR
                 SELECT
                 paobjnr      " Profitability Segment Number (CO-PA)
                 paledger     " Currency type for an operating concern
                 vrgar        " Record Type
                 versi        " Plan version (CO-PA)
                 gjahr            " Fiscal Year
                 perbl            " Fiscal year/period block
                 pasubnr
                 vv010001     " List Price
                 vv011001     " Formula Price
                 vv012001     " Customer Price
                 vv013001     " Manual Price
                 vv014001     " Retail Pump Price
                 vv015001     " Markup
                 vv016001     " Net Proceeds Other
                 vv020001     " Excise Duty Offset
                 vv021001     " Duties & Government
                 vv030001     " Sales Discounts
                 vv031001     " Sales Surcharges
                 vv032001     " Sales Rebates
                 vv033001     " Agents Comm Paid
                 vv034001     " RBA CR Royalties
                 vv035001     " Other Revenues
                 vv200001     " Transfer PriceSupply
                 vv201001     " Prim Tran Tariff Sup
                 vv202001     " S&Handling TariffDis
                 vv203001     " Sec Trans Tariff Dis
                 vv036001     " Proceeds from Servic
                 vv037001     " Exchanges
                 vv038001     " Throughput fees
                 vv039001     " Output Tax Offset
                 vv040001     " CR comm & Oth Oil Pr
                 vv041001     " Supplier fees
                 vv042001     " RBA Fairshare Adjust
                 vv043001     " Contr Comm Paid IG
                 vv204001     " Sec Tran Tariff Supp
                 vv205001     " Comp Stock Obligatio
                 vv211001     " Prim Tran Tar Transf
                 vv212001     " S&Handling Tar Trans
                 vv213001     " Sec Trans TariffTran
                 vv222001     " DIS:S&Handl Tar OvUn
                 vv223001     " DIS:Sec Tr TarifOvUn
                 vv230001     " Transfer Price LSC
                 vv232001     " S&Handling Tar LSC
                 vv233001     " Sec Trans Tariff LSC
                 vv500001     " 3rd Party Purchases
                 vv501001     " Transf from Oth Sect
                 vv502001     " Purchases IG
                 vv503001     " Inter-Seg Transf Pur
                 vv504001     " Import Freight
                 vv505001     " Stock Variations
                 vv506001     " Other Product Cost
                 vv507001     " Pipeline Operat Exp
                 vv508001     " Primary Transp Expen
                 vv509001     " Manufacturing Expens
                 vv510001     " Supply /Process Exp
                 vv511001     " MK Processing Plants
                 vv512001     " S&Handling Expenses
                 vv513001     " Sec Transp Expenses
                 vv514001     " Point of Sale Expens
                 vv515001     " Contr Comm Rec IG
                 vv516001     " Assoc Inc Dividend
                 vv517001     " Marketing & Sell Exp
                 vv518001     " Other Rev from Dist
                 vv519001     " Other Rev Transferrd
                 vv520001     " Stock Write-Off
                 vv236001     " Oth cost Tar LSC SMP
                 vv206001     " Prim Trp tariff Dist
                 vv051001     " CR Net Turnover
                 vv052001     " Dummy Price 2
                 vv053001     " Dummy Price 3
                 vv054001     " Dummy Price 4
                 vv055001     " Dummy Price 5
                 vv056001     " Dummy Price 6
                 vv057001     " Dummy Price 7
                 vv058001     " Dummy Price 8
                 vv059001     " Dummy Price 9
                 vv060001     " Dummy Price10
                 vv241001     " DummyTariff 1
                 vv242001     " DummyTariff 2
                 vv243001     " DummyTariff 3
                 vv244001     " DummyTariff 4
                 vv245001     " DummyTariff 5
                 vv246001     " DummyTariff 6
                 vv247001     " DummyTariff 7
                 vv248001     " DummyTariff 8
                 vv249001     " DummyTariff 9
                 vv250001     " DummyTariff10
                 vv521001     " SD&A Rebates
                 vv522001     " Dummy Cost 2
                 vv523001     " Dummy Cost 3
                 vv524001     " Dummy Cost 4
                 vv525001     " Dummy Cost 5
                 vv526001     " Dummy Cost 6
                 vv527001     " Dummy Cost 7
                 vv528001     " Dummy Cost 8
                 vv529001     " Dummy Cost 9
                 vv530001     " Dummy Cost 10
                 vv227001     " Sec Tr TarifOvUn LSC
                 vv226001     " S&Handl Tar OvUn LSC
                 vv224001     " Pr Tra TariffOvU DIS
                 FROM ce3op01
                 WHERE   paledger = lc_02 AND
                 vrgar    IN lr_vrgar AND
                 versi    IN lr_versi AND
                 perbl    IN lr_perbl AND
                 gjahr    IN lr_gjahr.
          ENDIF.
    For all other cursors.
          FETCH NEXT CURSOR ls_cursor
              APPENDING TABLE lt_ce3op02
              PACKAGE SIZE ls_s_if-maxsize.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          SORT lt_ce3op02 BY paobjnr pasubnr paledger vrgar versi gjahr
               perbl.
          DELETE ADJACENT DUPLICATES FROM lt_ce3op02 COMPARING paobjnr.
    *Begin of MODE-002
          DESCRIBE TABLE lt_ce3op02 LINES l_norecs.
          l_s_loop_from = lc_1.
          DO.
            l_s_loop_to = l_s_loop_from + l_s_no_recs.
            LOOP AT lt_ce3op02 INTO lw_ce3op02
            FROM l_s_loop_from TO l_s_loop_to .
              APPEND lw_ce3op02 TO lt_ce3op01.
            ENDLOOP.
            SORT lt_ce3op01 BY paobjnr.
    *End of MOS-002
            SELECT
              aktbo       "     Current profitability segment (CO-PA)
              paobjnr     "     Profitability Segment Number (CO-PA)
              pasubnr     "     Profitability segment changes (CO-PA)
              kndnr       "     Customer
              artnr
              bukrs     "     Company Code
              prctr
              kokrs
           FROM ce4op01
           INTO TABLE lt_ce4op01
           FOR ALL ENTRIES IN lt_ce3op01
           WHERE paobjnr = lt_ce3op01-paobjnr AND
                 pasubnr = lt_ce3op01-pasubnr AND
                 bukrs  IN lr_bukrs.
    *CE1op01
            SELECT
            paledger
            vrgar
            versi
            perio
            paobjnr
            pasubnr
            belnr
            posnr
            rbeln
            rposn
           FROM ce1op01
           INTO TABLE lt_ce1op01
           FOR ALL ENTRIES IN lt_ce3op01
           WHERE paledger = lt_ce3op01-paledger AND
                 vrgar    = lt_ce3op01-vrgar AND
                 versi    = lt_ce3op01-versi AND
                 perio    = lt_ce3op01-perbl AND
                 paobjnr = lt_ce3op01-paobjnr AND
                 pasubnr = lt_ce3op01-pasubnr.
    **CE1op01
            LOOP AT lt_ce3op01 INTO lw_ce3op01.
              MOVE:
              lw_ce3op01-paobjnr   TO lw_flnmval-paobjnr,
             lw_ce3op01-paledger  TO lw_flnmval-paledger,
             lw_ce3op01-vrgar     TO lw_flnmval-vrgar,
                      lw_ce3op01-versi     TO lw_flnmval-versi,
                      lw_ce3op01-gjahr     TO lw_flnmval-gjahr,
                      lw_ce3op01-perbl     TO lw_flnmval-perbl.
    *appending all 93 fields as records
              MOVE lw_ce3op01-vv010001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv011001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv012001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv013001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv014001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv015001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv016001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv020001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv021001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv030001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv031001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv032001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv033001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv034001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv035001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv200001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv201001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv202001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv203001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv036001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv037001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv038001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv039001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv040001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv041001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv042001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv043001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv204001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv205001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv211001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv212001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv213001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv222001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv223001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv230001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv232001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv233001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv500001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv501001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv502001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv503001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv504001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv505001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv506001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv507001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv508001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv509001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv510001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv511001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv512001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv513001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv514001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv515001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv516001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv517001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv518001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv519001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv520001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv236001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv206001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv051001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv052001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv053001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv054001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv055001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv056001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv057001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv058001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv059001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv060001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv241001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv242001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv243001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv244001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv245001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv246001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv247001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv248001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv249001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv250001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv521001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv522001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv523001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv524001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv525001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv526001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv527001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv528001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv529001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv530001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv227001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv226001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv224001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
    *Segrigating all one record into 102 records is complete
            ENDLOOP.
            LOOP AT lt_flnmval ASSIGNING <fs_flnmval>.
              IF l_index > 93.
                l_index = 1.
              ENDIF.
              READ TABLE lt_fldlist INTO lw_fldlist INDEX l_index.
              IF sy-subrc = 0.
                CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                  EXPORTING
                    input  = lw_fldlist-fldnam
                  IMPORTING
                    output = <fs_flnmval>-fldnam.
              ENDIF.
              l_index = l_index + 1.
            ENDLOOP.
            SORT lt_ce4op01 BY paobjnr.
            SORT lt_ce1op01 BY paobjnr  paledger vrgar  versi.
            SORT gr_zfldnm BY low.
            DELETE lt_flnmval WHERE fldnam NOT IN gr_zfldnm.
            LOOP AT lt_flnmval INTO lw_flnmval.
              READ TABLE lt_ce4op01 INTO  lw_ce4op01 WITH KEY
                                 paobjnr = lw_flnmval-paobjnr BINARY SEARCH.
              IF sy-subrc = 0.
                MOVE :   lw_flnmval-paledger  TO lw_e_t_data-paledger,
                         lw_flnmval-vrgar     TO lw_e_t_data-vrgar,
                         lw_flnmval-versi     TO lw_e_t_data-versi ,
                         lw_flnmval-gjahr     TO lw_e_t_data-gjahr,
                         lw_flnmval-perbl     TO lw_e_t_data-perbl,
                         lw_ce4op01-bukrs     TO lw_e_t_data-bukrs,
                         lw_ce4op01-kndnr     TO lw_e_t_data-kndnr,
                         lw_ce4op01-artnr     TO lw_e_t_data-artnr,
                         lw_ce4op01-prctr     TO lw_e_t_data-prctr,
                         lw_ce4op01-kokrs     TO lw_e_t_data-kokrs,
                         lw_flnmval-fldnam   TO lw_e_t_data-zfldnm,
                         lw_flnmval-zamunt   TO lw_e_t_data-zamount.
    CE1op01
                READ TABLE lt_ce1op01 INTO lw_ce1op01 WITH KEY
                            paobjnr = lw_flnmval-paobjnr
                            paledger = lw_flnmval-paledger
                            vrgar  = lw_flnmval-vrgar
                            versi = lw_flnmval-versi BINARY SEARCH.
                IF sy-subrc = 0.
                  MOVE: lw_ce1op01-rbeln  TO lw_e_t_data-rbeln,
                        lw_ce1op01-rposn  TO lw_e_t_data-rposn.
                ENDIF.
    CE1op01
                APPEND lw_e_t_data TO gt_out_data.
              ENDIF.
            ENDLOOP.
    *Begin of MOD-002
            FREE lt_flnmval.
            REFRESH :lt_ce3op01,lt_ce4op01,lt_ce1op01.
            e_t_data[] = gt_out_data[].
            DELETE e_t_data WHERE zfldnm NOT IN gr_zfldnm.
            l_s_loop_from = l_s_loop_to + lc_1.
            l_count = l_count + 20.
            IF l_count GE l_norecs.
              EXIT.
            ENDIF.
          ENDDO.
    *End of MOD-002
          ls_counter_datapakid = ls_counter_datapakid + 1.
        ENDIF.                        "IF S_COUNTER_DATAPAKID = 0
      ELSE.
        IF i_maxsize IS INITIAL.
          RAISE error_passed_to_mess_handler.
        ENDIF.
        IF g_start IS INITIAL.
          g_start = 1.
        ELSE.
          g_start  = g_end + 1.
        ENDIF.
        g_end = g_start + i_maxsize - 1.
    Population of E_T_DATA based on Data records size
        APPEND LINES OF gt_out_data FROM g_start TO g_end TO e_t_data.
        DELETE e_t_data WHERE zfldnm NOT IN gr_zfldnm.
        IF e_t_data[] IS INITIAL.
          RAISE no_more_data.
        ENDIF.
        ls_counter_datapakid = ls_counter_datapakid + 1.
      ENDIF.
    ENDFUNCTION.
    Thanks & regards,
    Sreekanth
    +91 9740091981

    Hello Sreekanth,
    See this blog [Generic Extraction via Function Module|/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module]
    Also see this
    [Line Item Level Data Extraction for Financial Accounting and Controlling|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a]
    Thanks
    Chandran

Maybe you are looking for

  • Event call event

    hello, I would like to know how to call event from another, I have for the moment 5 individuals actions (manage with event structure) A B C D and E  and i  need  in somecase that A want to call E, B to call E or  B to call E then quit on quit button.

  • Network Devices not able to connect to the Internet, but local network has no issues.

    Hello All, I have been having this problem for the past 4 months or so(ever since I got the server).  I have a Windows Server 2012 R2 machine running a DHCP server.  I have 2 network devices installed on it.  One hardwired to the motherboard and one

  • Apply Policy On a Dynamic PDF

    Hi, I want to apply a policy on a pdf document. I have created a policy through admin ui. When i am invoking the process following exception occurs:-- ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error. at com.adobe.idp.dsc.c

  • Is there any feature in Endeca to support the natural language search ?

    I am looking to evaluate Endeca for implementing search for a help-center kind of a site where there are list of questions and answers available and the requirement is to provide a search for this content. The guest user can type in question or some

  • Signed Applet Trouble.

    hi, Lately have been working on signing of applets, now by default applets are not allowed to access system resources, i.e files, etc, for obvious reasons. So if one has to access these resources through applet, the applet needs to be signed. Now i h