Problem while creating Function module

Hi All,
               I created a TABLE and am using this table in a FUNCTION MODULE as a reference for declaring an internal table in TABLES tab in the function module  .
But when i click on the table name its giving an error "TABLES parameters are obsolete! "
Can any one figure out the reasons .....and help me out!!!
Deepika K

Hi Deepika,
   Tables option is said to be Obsolete because these days we use internal tables without header line...
Tables Option in FM considers internally that the table name you mentioned is with a header line and the structure of the internal table will be acting as work area.
It is still included in new version because for Upward compatibility...
As we still use the predefine function modules so they should be even compatible with newer versions so its still there..
But for normal practice it can be used but preferably not to use.. rather you use EXPORT parameter and include internal table like field...
Create a structure first and then a Table type which include the previously defined structure in  SE11 and the assign the Table type to the field in EXPORT parameter with TYPE..
Hope this would help u.
Regards
Narin Nandivada.

Similar Messages

  • Problem while creating Functional module

    Hi Experts.
    I was trying to create one FM for currency conversion purpose.The code as follows.
    FUNCTION Z_TEST_CUR_RATE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(TYPE_OF_RATE) LIKE  TCURR-KURST
    *"     VALUE(DATE) LIKE  SY-DATUM
    *"     VALUE(FOREIGN_CURRENCY) LIKE  TCURR-FCURR
    *"     VALUE(LOCAL_CURRENCY) LIKE  TCURR-TCURR
    *"  EXPORTING
    *"     VALUE(RATE) TYPE  TCURR-UKURS
    *"     VALUE(TEST) TYPE  C
    data: rate1 like TCURR-UKURS.
          Select SINGLE UKURS from TCURR into RATE1
                              where KURST = 'TYPE_OF_RATE' and
                                    FCURR = 'FOREIGN_CURRENCY' and
                                    TCURR = 'LOCAL_CURRENCY'  and
                                    GDATU = DATE.
    if sy-subrc = 0.
    rate = rate1.
    else.
    rate = 1.
    ENDFUNCTION.
    When ever  I try to run this program I am getting the output as rate = 1.I mean to say that the select statement is not at all executed....Can any expects help me out.....
    Thanks In advance
    Regards,
    Bala

    Hi
    Try without using the variable RATE1,,and remove the quotes
    Select SINGLE UKURS from TCURR into (TCURR-UKURS)
    where KURST = TYPE_OF_RATE'and
    FCURR = FOREIGN_CURRENCY and
    TCURR = LOCAL_CURRENCY and
    GDATU = DATE.
    regards
    Mahesh

  • 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

  • Problem in creating Function Module

    Hi,
      while creating a function (Z_SPELL_AMOUNT_INDIA) one error is coming . the error  <b>'SPELL not declared</b> ' is coming. already the Function module is running correctly in different client(another client's place) i am just download the Function module from the existing implementation site and upload the function module in new client's place. both the Projects are mySAP ECC 5.0.
      Here first i have created a function group and under the Function group itself i am uploading the FM.
      How can i declare the SPELL?
    is there any rules to be follow while creating the Function Group?
    Thanks,
    Neptune.M

    Before you copy the function module check the following
    1. Check the TOP include copied properly or not
    2. Check any form routine (if existing) copied or not
    3. In the Import, Export & tables if you are pointing to any DDIC structures, check whether they are copied or not.
    While activating the function module CHOOSE ALL THE INCLUDES AND FUNCTION GROUP AT A TIME, AND THEN ACTIVATE ALL.
    I hope this helps you.
    - Raj

  • Problem while copying function modules..

    Hi,
    I am trying to copy a function module called MRM_ENTRY_ERS to Z function module.
    Now the problem is there are 6 performs inside the function module and again in those 6 performs there
    are around 10s of performs.
    So its really hectic to create includes for form-endform for all of those performs.
    Is there a way that when I copy all those form-endform without creating includes for every perform ?
    I mean is there some  easier way to do it ?
    Thanks.
    Rajesh.

    Hi,
    I think copy the total Function group MRMN of this FM (MRM_ENTRY_ERS) into new function group like ZMRMN.
    Please go to SE80, select function group, enter MRMN, press enter. Select the Function group MRMN, press the right butoon, click copy option, now you enter the new function group like ZMRMN,click copy, then after you select the copy function module(only if you need to Z fm), given the Z FM name and then press copy button, then it copies the function module successfully
    subbarao

  • Error while creating Function module extracter

    Hello Guru's
    I am getting error while FM extracter creating.
    Have created FM and Extract structure and while creating datasource using these where i am getting error as given below
    1> ZV_ZFRT_INVOICES(Datasource): TABLES-paramter E_T_DATA for extractor Z_ZFRGT_INVOICES(FM) is missing
    2>(DS)ZV_ZFRT_INVOICES: Field ZEILE of the provider structure is missing in extract str. ZVZFRT_INVOICES(Extract structre)
    3>(DS )ZV_ZFRT_INVOICES: Field EBELP of the provider structure is missing in extract str. ZVZFRT_INVOICESExtract structre)
    Please some one can help me to get out of the issue.

    HI Aryan,
    No need to create FM on your own. You can copy the FM from Function Group RSAX.
    The procedure to create FM extractor is as follows:
    1) Create an extract structure.
    2) Go to SE80. Select Function Group RSAX , right click and then copy.
    3) Give your own name to the function group to copy.
    4) Select one appropriate FM from the list of FMs provided. eg FM RSAX_BIW_GET_DATA_SIMPLE.
    5)Specify the name of new FM you want to create.
    6) Go to SE37 and open the FM you have created by copying from Function Group RSAX.
    7) no need to change the import tab.
    8) On tables tab, for paramerter name E_T_DATA under asociate name specify the name of extract structure you hav created.
    9) Under source code tab make the changes in the source code only to customise it to your requirement. eg: declare the database table you are using, make changes where datasource is in picture, etc.
    I have created a generic DataSource with the help of above procedure.. I hope you will find it helpful...
    Regards,
    Geetanjali

  • Problem in creating Function Modules

    At present i am using ECC 6.0 version.
    Now i want to write a function module for inserting data  into function module.
    When i try to declare internal table usingTABLES keyword.it is giving error "TABLE PARAMETERS ARE OBSOLUTE".so for this i declared an internal table using CHANGING tab.
    But when i try to activate my function module i am getting an error saying that "internal table declaration must include occurs ".
    How can i proceed further.........Can anyone give the source code for function module for inserting data into data base table?

    HI.
    the message TABLE PARAMETERS ARE OBSOLUTE". is just a warning. you can hit enter and continue with the coding using Tables statemnt
    If you wish to use changing  create a internal table in a type group (EX fieldcat of slis ) and use it in refering with TYPE keyword
    regards
    prasanth
    Edited by: prasanth kasturi on Jun 26, 2008 10:05 AM

  • Seeking help(problem while create function)

    hei..to everybody
    I am having a peculiar problem . whenever i create a function , I don't get the acknowledge message and I don't get any response and the function is not getting created.
    As we are running short of disk space , I was examing the disk space usage.I found that the oracle product disk space was about 65GB which is abnormal.
    please send me syntax of checking the tablespace usage.
    please help me to solve the problem
    by
    ravikumar

    It is not to do with space usage.
    Please copy & paste what you typed in SQL*Plus, for example here is what it should look like if you create an invalid function:
    SQL> CREATE OR REPLACE FUNCTION testfun
      2      RETURN VARCHAR2
      3  AS
      4  BEGIN
      5      RETURN;
      6  END;
      7  /
    Warning: Function created with compilation errors.
    SQL> show errors
    Errors for FUNCTION TESTFUN:
    LINE/COL ERROR
    5/5      PLS-00503: RETURN <value> statement required for this return from
             function
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE FUNCTION testfun
      2      RETURN VARCHAR2
      3  AS
      4  BEGIN
      5      RETURN 'Hello, world';
      6* END;
    SQL> /
    Function created.

  • Problem while using function module  TRIP_EDIT_TEXT_IN_POPUP

    Hii,
    I am using a fm TRIP_EDIT_TEXT_IN_POPUP to display text editor where the user can write some comments.
    This is my code
    DATA: TEXTTAB TYPE TABLE OF TDLINE.
    DATA: MOREI TYPE MOREI,
          EDITOR_TYPE TYPE EDITOR_TYPE.
    CALL FUNCTION 'TRIP_EDIT_TEXT_IN_POPUP'
      EXPORTING
        I_MOREI                = MOREI
        I_EDITOR_TYPE          = EDITOR_TYPE
        I_TITLE                = 'Title'
        I_MODUS                = 'C'
      TABLES
        T_TAB_EDITOR           = TEXTTAB
      EXCEPTIONS
        DEFAULT_TEXT_NOT_FOUND = 1
        OTHERS                 = 2.
    The problem is when I am passing a already filled table TEXTTAB (To display data when the screen comes up) It is not working. It is showing the blank editor even if the texttab table is filled.
    Does anyone know how to display data using this FM ?

    you have to pass
    I_EDITOR_TYPE
    I_EDITOR_KEY
    two values in exporting parameter and same value you have to populate in the table parameter.
    T_TAB_EDITOR.
    i.e.
    T_TAB_EDITOR-EDITOR_TYPE should be equal to I_EDITOR_TYPE in exporting parameter and
    T_TAB_EDITOR-EDITOR_KEY should be equal to I_EDITOR__KEY in exporting parameter.
    Regards
    Shiba Prasad Dutta

  • Problem facing in Function module.

    Hi friends,
    Happy New year to all.
    I am facing the problem while crating Function module.
    As my requirement:
    I need to call this Function module in SAP-BW application area. I am creating this in BW side(SE37).
    The intenal table which i am passing to the function module will vary. The structure is not constant.
    Data is flowing from one table(source table) to another table(Destination table) . In BW if we want to refer the data in source table in START ROUTINE while loading, we use SOURCE_PACKAGE internal table.
    1) I am passing Source_package internal table as ITAB_SOURCE_PACKAGE. (this source_package strucute also not canstant, it will vary)
    2) passing second internal table as ITAB1, this structure also vary. I will declare this structure before calling the function module.
    In Function module Table tab i given as
    PARAMETER       TYPE           Associated Type
    ITAB1                   LIKE           ANY     
    ITAB_SOURCE_PACK   LIKE      ANY
    In Import tab:
    SOURCEINFOOBJECT           pass value
    In source code i written as
    DATA: WA_SOURCE_PACK like line of ITAB_SOURCE_PACK.
    DATA: WA_ITAB1 like line of ITAB1.
    LOOP AT ITAB_SOURCE_PACK INTO WA_SOURCE_PACK.
      READ TABLE ITAB1 WITH KEY SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT
      INTO WA_ITAB1.
      IF SY-SUBRC NE  0.
        WA_ITAB1-SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT.
        INSERT WA_ITAB1 INTO TABLE ITAB1.
      ENDIF.
    ENDLOOP.
    (Note: this is piece of code)
    While checking i am getting as error
    Field "ANY" is unknown. It is neither in one of the specified tablesnor defined by a "DATA" statement. "DATA" statement. "DATA" statement.
    For this what i need to do.
    As i am not very good in ABAP, pls help me.
    Thanks & Regard
    MRK

    Hi,
    u have to do like this..decalre itab1 and ITAB_SOURCE_PACK in the tables parameter...
    so change like this
    In Function module Table tab do like this
    PARAMETER TYPE Associated Type
    ITAB1
    ITAB_SOURCE_PACK
    In Import tab:
    SOURCEINFOOBJECT pass value
    In source code i written as
    DATA: WA_SOURCE_PACK type ITAB_SOURCE_PACK.
    DATA: WA_ITAB1 type ITAB1.
    LOOP AT ITAB_SOURCE_PACK INTO WA_SOURCE_PACK.
    READ TABLE ITAB1 WITH KEY SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT
    INTO WA_ITAB1.
    IF SY-SUBRC NE 0.
    WA_ITAB1-SOURCEINFOOBJECT = WA_SOURCE_PACK-SOURCEINFOOBJECT.
    INSERT WA_ITAB1 INTO TABLE ITAB1.
    ENDIF.
    ENDLOOP.
    Regards,
    Nagaraj

  • Problem while creating script form - lang EN is not available in client 800

    Hi friends,
    I getting a problem while creating a script form in SE71.
    if I give the name of the script (zform1) and clicked on create then its giving an information message like " Form ZFORM1 language EN is not available in client 800".
    But if I use this form in the abap program its giving stop message "Form ZFORM1 language EN is not active and has no errors" and the control is coming out of the program.
    What could be the problem and how to solve it friends . Please help me.
    Thanks
    -Hima

    Hi There,,
    By default all the forms will be there in client 100, if you are using the exisiting form and making a Z copy of the same,, then first you will have to copy from the client 100 to 800.
    If you are creating the form right from the scratch,, you will that message,,but need now worry about that..
    go head and create the Zform, don't forget to activate the form, before calling in the driver program.
    In the driver program,, call the function modules to invoke the form and activate the driver program as well. then you are all set/
    Thanks-
    Rahul

  • Problem while creating WBS elements using LSMW

    Hello experts,
    I am able to create Project Definitions using LSMW. (using recording)
    But there is a problem while creating WBS elements.
    Tcode CJ20 has table control and that will become problem for multiple rows (levels).
    Can anyone suggest a solution to mass upload WBS elements?
    Thanks for your valuable advice.

    Hi,
    Instead of using "BAPI_PROJECT_MAINTAIN", use following solution. We are using this solution and it is working pretty good.
    If the WBS element is already created and you want to create one more with same data, first get the WBS related information using BAPI_PROJECT_GETINFO as you are doing currently.
    I am using different sets of BAPIs to create project, create / change WBS element.
    I use function module from Function group CJ2001 ( Project related BAPIs ), CJ2054 ( WBS related BAPIs ) and PS_BAPI ( pre/post processing BAPIs ). There are specific order in which you need to execute these BAPIs.
    For example if you want to create / change the WBS element, the BAPIs sequence is:
    <b>1. BAPI_PS_INITIALIZATION
    2. BAPI_BUS2054_CREATE_MULTI ( to create  WBS )
             or
    2. BAPI_BUS2054_CHANGE_MULTI ( to change WBS )
    3. BAPI_PS_PRECOMMIT
    4. BAPI_TRANSACTION_COMMIT</b>
    Check the documentation of BAPI "BAPI_BUS2054_CREATE_MULTI " to see how these function modules work.
    Let me know if you need further information.
    Regards,
    RS

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Problem while creating xml with cdata section

    Hi,
    I am facing problem while creating xml with cdata section in it. I am using Oracle 10.1.0.4.0 I am writing a stored procedure which accepts a set of input parameters and creates a xml document from them. The code snippet is as follows:
    select xmlelement("DOCUMENTS",
    xmlagg
    (xmlelement
    ("DOCUMENT",
    xmlforest
    (m.document_name_txt as "DOCUMENT_NAME_TXT",
    m.document_type_cd as "DOCUMENT_TYPE_CD",
    '<![cdata[' || m.document_clob_data || ']]>' as "DOCUMENT_CLOB_DATA"
    ) from table(cast(msg_clob_data_arr as DOCUMENT_CLOB_TBL))m;
    msg_clob_data_arr is an input parameter to procedure and DOCUMENT_CLOB_TBL is a pl/sql table of an object containing 3 attributes: first 2 being varchar2 and the 3rd one as CLOB. The xml document this query is generating is as follows:
    <DOCUMENTS>
    <DOCUMENT>
    <DOCUMENT_NAME_TXT>TestName</DOCUMENT_NAME_TXT>
    <DOCUMENT_TYPE_CD>BLOB</DOCUMENT_TYPE_CD>
    <DOCUMENT_CLOB_DATA>
    &lt;![cdata[123456789012345678901234567890123456789012]]&gt;
    </DOCUMENT_CLOB_DATA>
    </DOCUMENT>
    </DOCUMENTS>
    The problem is instead of <![cdata[....]]> xmlforest query is encoding everything to give &lt; for cdata tag. How can I overcome this? Please help.

    SQL> create or replace function XMLCDATA_10103 (elementName varchar2,
      2                                             cdataValue varchar2)
      3  return xmltype deterministic
      4  as
      5  begin
      6     return xmltype('<' || elementName || '><![CDATA[' || cdataValue || ']]>
      7  end;
      8  /
    Function created.
    SQL>  select xmlelement
      2         (
      3            "Row",
      4            xmlcdata_10103('Junk','&<>!%$#&%*&$'),
      5            xmlcdata_10103('Name',ENAME),
      6            xmlelement("EMPID", EMPNO)
      7         ).extract('/*')
      8* from emp
    SQL> /
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SMITH]]></Name>
      <EMPID>7369</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ALLEN]]></Name>
      <EMPID>7499</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[WARD]]></Name>
      <EMPID>7521</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JONES]]></Name>
      <EMPID>7566</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MARTIN]]></Name>
      <EMPID>7654</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[BLAKE]]></Name>
      <EMPID>7698</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[CLARK]]></Name>
      <EMPID>7782</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SCOTT]]></Name>
      <EMPID>7788</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[KING]]></Name>
      <EMPID>7839</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[TURNER]]></Name>
      <EMPID>7844</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ADAMS]]></Name>
      <EMPID>7876</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JAMES]]></Name>
      <EMPID>7900</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[FORD]]></Name>
      <EMPID>7902</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MILLER]]></Name>
      <EMPID>7934</EMPID>
    </Row>
    14 rows selected.
    SQL>

  • Problem while creating the Partner Address in CRM

    Hi,
       We are facing one problem while creating the new address for the Business Partner.
       When ever customer wants to change the address : we are following one process : where we are      
       using 'BAPI_BUPA_ADDRESS_ADD' functin module. Becuse of this , new addrss number will be generated for the 
      corresponding account in BUT021_FS table.But this table contains old address number as a first record, so that when ever
      we display the partner address in UI, it is displaying the old address only because first entry of the the table 'BUT021_FS'
      contains the old address number.
      Because of this , we are getting lots of complaints regarding this.
    Can you please help on this ASAP.
    Thanks & Regards
    Pradeep.

    Try BAPI_BUPA_ADDRESS_CHANGE  for address change followed by BAPI_TRANSACTION_COMMIT . It works.

Maybe you are looking for

  • I can not see "Keyword" detail

    Hello I have got a problem with Windows Explorer and it is because of Adobe Flash product. I added keywords to some files with right click in every file, then properties, Summary and in the field Keyword I wrote some data. Then in Windows Explorer in

  • Kyocera 1320 D won't connect

    I was using my Kyocera 1320 d just fine.  Now, I went to print a document, and the computer won't connect to the printer.  In the system preferences, it won't even appear.  I restarted it, deleted the old printer, reinstalled the drivers.  I can't ev

  • Exclude pages from Create PDF from Webpage?

    My organization wants to use the Create PDF from Webpage functionality in Acrobat to keep a record of our site. However, the PDF Acrobat created using the "Entire Site" setting includes all PDFs linked to the site as well as other pages (for individu

  • Background Color Possible in Mail?

    I would like to colorize the background when I send email messages. This can be done with Entourage & Firefox. Can one set a background color with Mail when creating & sending email messages? Thanks for you help.

  • Transfer digital camera videos to ipod

    how can i transfer my digital camera video to the ipod? i can transfer the pictures, but the digital video says it does not support, what can i do?